|
|
!function(i){var n={};function r(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=i,r.c=n,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1240)}([,,,,,,,,,,function(e,t,i){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=function(){return this}();try{r=r||new Function("return this")()}catch(o){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,r,o){"use strict";(function(e){var t=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function n(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new n(i.call(setTimeout,t,arguments),clearTimeout)},r.setInterval=function(){return new n(i.call(setInterval,t,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e&&e.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(t,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},o(82),r.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||void 0,r.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||void 0}).call(this,o(10))},,,,,,function(e,t,i){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,i){"use strict";var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],h=!1,p=-1;function d(){h&&u&&(h=!1,u.length?c=u.concat(c):p=-1,c.length&&g())}function g(){if(!h){var e=l(d);h=!0;for(var t=c.length;t;){for(u=c,c=[];++p<t;)u&&u[p].run();p=-1,t=c.length}u=null,h=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function I(e,t){this.fun=e,this.array=t}function B(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];c.push(new I(e,t)),1!==c.length||h||l(g)},I.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=B,o.addListener=B,o.once=B,o.off=B,o.removeListener=B,o.removeAllListeners=B,o.emit=B,o.prependListener=B,o.prependOnceListener=B,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,,,,,,,,,,,,,,,function(e,t,i){(function(e){_global=undefined,_global="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[])}).call(this,i(10))},function(e,ta,ia){(function(qo,$o){var ea;(function(){var y,d=200,m="Expected a function",n="__lodash_hash_undefined__",T="__lodash_placeholder__",b=1,C=2,N=4,V=1,E=2,v=1,S=2,x=4,L=8,w=16,A=32,D=64,M=128,H=256,e=512,i=1/0,r=9007199254740991,t=17976931348623157e292,o=NaN,a=4294967295,s=[["ary",M],["bind",v],["bindKey",S],["curry",L],["curryRight",w],["flip",e],["partial",A],["partialRight",D],["rearg",H]],P="[object Arguments]",f="[object Array]",l="[object AsyncFunction]",Y="[object Boolean]",k="[object Date]",_="[object Error]",R="[object Function]",W="[object GeneratorFunction]",G="[object Map]",F="[object Number]",u="[object Null]",O="[object Object]",c="[object Promise]",h="[object Proxy]",Z="[object RegExp]",X="[object Set]",J="[object String]",K="[object Symbol]",p="[object Undefined]",g="[object WeakMap]",Q="[object ArrayBuffer]",U="[object DataView]",z="[object Float32Array]",j="[object Float64Array]",q="[object Int8Array]",$="[object Int16Array]",ee="[object Int32Array]",te="[object Uint8Array]",ie="[object Uint8ClampedArray]",ne="[object Uint16Array]",re="[object Uint32Array]",I=/[&<>"']/g,B=RegExp(I.source),oe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ae=/^\w*$/,se=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,le=/^\s+|\s+$/g,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,he=/,? & /,pe=/\\(\\)?/g,de=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,Ie=/^0b[01]+$/i,Be=/^\[object .+?Constructor\]$/,Ee=/^0o[0-7]+$/i,fe=/^(?:0|[1-9]\d*)$/,_e="\\ud800-\\udfff",me="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Te="\\ufe0e\\ufe0f",be="["+_e+"]",Ce="["+me+"]",Ne="\\ud83c[\\udffb-\\udfff]",ye="[^"+_e+"]",Ve="(?:\\ud83c[\\udde6-\\uddff]){2}",ve="[\\ud800-\\udbff][\\udc00-\\udfff]",Se="\\u200d",xe="(?:"+Ce+"|"+Ne+")"+"?",Le="["+Te+"]?",we=Le+xe+("(?:"+Se+"(?:"+[ye,Ve,ve].join("|")+")"+Le+xe+")*"),Ae="(?:"+[ye+Ce+"?",Ce,Ve,ve,be].join("|")+")",De=RegExp(Ne+"(?="+Ne+")|"+Ae+we,"g"),Me=RegExp("["+Se+_e+me+Te+"]"),He={};He[z]=He[j]=He[q]=He[$]=He[ee]=He[te]=He[ie]=He[ne]=He[re]=!0,He[P]=He[f]=He[Q]=He[Y]=He[U]=He[k]=He[_]=He[R]=He[G]=He[F]=He[O]=He[Z]=He[X]=He[J]=He[g]=!1;var Pe={};Pe[P]=Pe[f]=Pe[Q]=Pe[U]=Pe[Y]=Pe[k]=Pe[z]=Pe[j]=Pe[q]=Pe[$]=Pe[ee]=Pe[G]=Pe[F]=Pe[O]=Pe[Z]=Pe[X]=Pe[J]=Pe[K]=Pe[te]=Pe[ie]=Pe[ne]=Pe[re]=!0,Pe[_]=Pe[R]=Pe[g]=!1;var Ye=parseFloat,ke=parseInt,Re="object"==typeof qo&&qo&&qo.Object===Object&&qo,We="object"==typeof self&&self&&self.Object===Object&&self,Ge=Re||We||Function("return this")(),Fe=ta&&!ta.nodeType&&ta,Oe=Fe&&"object"==typeof $o&&$o&&!$o.nodeType&&$o,Ze=Oe&&Oe.exports===Fe,Xe=Ze&&Re.process,Je=function(){try{return Xe&&Xe.binding&&Xe.binding("util")}catch(e){}}(),Ke=Je&&Je.isDate,Qe=Je&&Je.isMap,Ue=Je&&Je.isRegExp,ze=Je&&Je.isSet,je=Je&&Je.isTypedArray;function qe(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function $e(e,t,i,n){for(var r=-1,o=null==e?0:e.length;++r<o;){var a=e[r];t(n,a,i(a),e)}return n}function et(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}function tt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(!t(e[i],i,e))return!1;return!0}function it(e,t){for(var i=-1,n=null==e?0:e.length,r=0,o=[];++i<n;){var a=e[i];t(a,i,e)&&(o[r++]=a)}return o}function nt(e,t){return!!(null==e?0:e.length)&&-1<pt(e,t,0)}function rt(e,t,i){for(var n=-1,r=null==e?0:e.length;++n<r;)if(i(t,e[n]))return!0;return!1}function ot(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r}function at(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e}function st(e,t,i,n){var r=-1,o=null==e?0:e.length;for(n&&o&&(i=e[++r]);++r<o;)i=t(i,e[r],r,e);return i}function lt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}var ut=gt("length");function ct(e,n,t){var r;return t(e,function(e,t,i){if(n(e,t,i))return r=t,!1}),r}function ht(e,t,i,n){for(var r=e.length,o=i+(n?1:-1);n?o--:++o<r;)if(t(e[o],o,e))return o;return-1}function pt(e,t,i){return t==t?function(e,t,i){var n=i-1,r=e.length;for(;++n<r;)if(e[n]===t)return n;return-1}(e,t,i):ht(e,dt,i)}function dt(e){return e!=e}function gt(t){return function(e){return null==e?y:e[t]}}function It(e,n,r,o,t){return t(e,function(e,t,i){r=o?(o=!1,e):n(r,e,t,i)}),r}function Bt(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function Et(t){return function(e){return t(e)}}function ft(e,t){return e.has(t)}var _t,mt=(_t={"&":"&","<":"<",">":">",'"':""","'":"'"},function(e){return null==_t?y:_t[e]});function Tt(e){return Me.test(e)}function bt(e){var i=-1,n=Array(e.size);return e.forEach(function(e,t){n[++i]=[t,e]}),n}function Ct(t,i){return function(e){return t(i(e))}}function Nt(e,t){for(var i=-1,n=e.length,r=0,o=[];++i<n;){var a=e[i];a!==t&&a!==T||(e[i]=T,o[r++]=i)}return o}function yt(e,t){return"__proto__"==t?y:e[t]}function Vt(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}function vt(e){return(Tt(e)?function(e){var t=De.lastIndex=0;for(;De.test(e);)++t;return t}:ut)(e)}function St(e){return Tt(e)?e.match(De)||[]:e.split("")}var xt,Lt=Array.prototype,wt=Function.prototype,At=Object.prototype,Dt=Ge["__core-js_shared__"],Mt=wt.toString,Ht=At.hasOwnProperty,Pt=0,Yt=(xt=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+xt:"",kt=At.toString,Rt=Mt.call(Object),Wt=Ge._,Gt=RegExp("^"+Mt.call(Ht).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ft=Ze?Ge.Buffer:y,Ot=Ge.Symbol,Zt=Ge.Uint8Array,Xt=Ft?Ft.allocUnsafe:y,Jt=Ct(Object.getPrototypeOf,Object),Kt=Object.create,Qt=At.propertyIsEnumerable,Ut=Lt.splice,zt=Ot?Ot.isConcatSpreadable:y,jt=Ot?Ot.iterator:y,qt=Ot?Ot.toStringTag:y,$t=function(){try{var e=lr(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),ei=Math.ceil,ti=Math.floor,ii=Object.getOwnPropertySymbols,ni=Ft?Ft.isBuffer:y,ri=Ge.isFinite,oi=Ct(Object.keys,Object),ai=Math.max,si=Math.min,li=Date.now,ui=Math.random,ci=(Lt.reverse,lr(Ge,"DataView")),hi=lr(Ge,"Map"),pi=lr(Ge,"Promise"),di=lr(Ge,"Set"),gi=lr(Ge,"WeakMap"),Ii=lr(Object,"create"),Bi=gi&&new gi,Ei={},fi=wr(ci),_i=wr(hi),mi=wr(pi),Ti=wr(di),bi=wr(gi),Ci=Ot?Ot.prototype:y,Ni=Ci?Ci.valueOf:y,yi=Ci?Ci.toString:y;function Vi(e){if(Bo(e)&&!so(e)&&!(e instanceof wi)){if(e instanceof Li)return e;if(Ht.call(e,"__wrapped__"))return Ar(e)}return new Li(e)}var vi=function(e){if(!Io(e))return{};if(Kt)return Kt(e);Si.prototype=e;var t=new Si;return Si.prototype=y,t};function Si(){}function xi(){}function Li(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=y}function wi(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=a,this.__views__=[]}function Ai(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Di(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Mi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Hi(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Mi;++t<i;)this.add(e[t])}function Pi(e){var t=this.__data__=new Di(e);this.size=t.size}function Yi(e,t){var i=so(e),n=!i&&ao(e),r=!i&&!n&&co(e),o=!i&&!n&&!r&&No(e),a=i||n||r||o,s=a?Bt(e.length,String):[],l=s.length;for(var u in e)!t&&!Ht.call(e,u)||a&&("length"==u||r&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ir(u,l))||s.push(u);return s}function ki(e,t,i){(i===y||oo(e[t],i))&&(i!==y||t in e)||Oi(e,t,i)}function Ri(e,t,i){var n=e[t];Ht.call(e,t)&&oo(n,i)&&(i!==y||t in e)||Oi(e,t,i)}function Wi(e,t){for(var i=e.length;i--;)if(oo(e[i][0],t))return i;return-1}function Gi(e,n,r,o){return Ui(e,function(e,t,i){n(o,e,r(e),i)}),o}function Fi(e,t){return e&&Gn(t,Yo(t),e)}function Oi(e,t,i){"__proto__"==t&&$t?$t(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function Zi(i,n,r,e,t,o){var a,s=n&b,l=n&C,u=n&N;if(r&&(a=t?r(i,e,t,o):r(i)),a!==y)return a;if(!Io(i))return i;var c,h,p,d,g,I,B=so(i);if(B){if(a=function(e){var t=e.length,i=new e.constructor(t);t&&"string"==typeof e[0]&&Ht.call(e,"index")&&(i.index=e.index,i.input=e.input);return i}(i),!s)return Wn(i,a)}else{var E=hr(i),f=E==R||E==W;if(co(i))return Hn(i,s);if(E==O||E==P||f&&!t){if(a=l||f?{}:dr(i),!s)return l?(I=p=i,d=(g=a)&&Gn(I,ko(I),g),Gn(p,cr(p),d)):(h=Fi(a,c=i),Gn(c,ur(c),h))}else{if(!Pe[E])return t?i:{};a=function(e,t,i){var n=e.constructor;switch(t){case Q:return Pn(e);case Y:case k:return new n(+e);case U:return function(e,t){var i=t?Pn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case z:case j:case q:case $:case ee:case te:case ie:case ne:case re:return Yn(e,i);case G:return new n;case F:case J:return new n(e);case Z:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case X:return new n;case K:return function(e){return Ni?Object(Ni.call(e)):{}}(e)}}(i,E,s)}}var _=(o=o||new Pi).get(i);if(_)return _;if(o.set(i,a),To(i))return i.forEach(function(e){a.add(Zi(e,n,r,e,i,o))}),a;if(Eo(i))return i.forEach(function(e,t){a.set(t,Zi(e,n,r,t,i,o))}),a;var m=B?y:(u?l?rr:nr:l?ko:Yo)(i);return et(m||i,function(e,t){m&&(e=i[t=e]),Ri(a,t,Zi(e,n,r,t,i,o))}),a}function Xi(e,t,i){if("function"!=typeof e)throw new TypeError(m);return setTimeout(function(){e.apply(y,i)},t)}function Ji(e,t,i,n){var r=-1,o=nt,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;i&&(t=ot(t,Et(i))),n?(o=rt,a=!1):t.length>=d&&(o=ft,a=!1,t=new Hi(t));e:for(;++r<s;){var c=e[r],h=null==i?c:i(c),c=n||0!==c?c:0;if(a&&h==h){for(var p=u;p--;)if(t[p]===h)continue e;l.push(c)}else o(t,h,n)||l.push(c)}return l}(Vi.prototype=xi.prototype).constructor=Vi,(Li.prototype=vi(xi.prototype)).constructor=Li,(wi.prototype=vi(xi.prototype)).constructor=wi,Ai.prototype.clear=function(){this.__data__=Ii?Ii(null):{},this.size=0},Ai.prototype["delete"]=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ai.prototype.get=function(e){var t=this.__data__;if(Ii){var i=t[e];return i===n?y:i}return Ht.call(t,e)?t[e]:y},Ai.prototype.has=function(e){var t=this.__data__;return Ii?t[e]!==y:Ht.call(t,e)},Ai.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Ii&&t===y?n:t,this},Di.prototype.clear=function(){this.__data__=[],this.size=0},Di.prototype["delete"]=function(e){var t=this.__data__,i=Wi(t,e);return!(i<0)&&(i==t.length-1?t.pop():Ut.call(t,i,1),--this.size,!0)},Di.prototype.get=function(e){var t=this.__data__,i=Wi(t,e);return i<0?y:t[i][1]},Di.prototype.has=function(e){return-1<Wi(this.__data__,e)},Di.prototype.set=function(e,t){var i=this.__data__,n=Wi(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this},Mi.prototype.clear=function(){this.size=0,this.__data__={hash:new Ai,map:new(hi||Di),string:new Ai}},Mi.prototype["delete"]=function(e){var t=sr(this,e)["delete"](e);return this.size-=t?1:0,t},Mi.prototype.get=function(e){return sr(this,e).get(e)},Mi.prototype.has=function(e){return sr(this,e).has(e)},Mi.prototype.set=function(e,t){var i=sr(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},Hi.prototype.add=Hi.prototype.push=function(e){return this.__data__.set(e,n),this},Hi.prototype.has=function(e){return this.__data__.has(e)},Pi.prototype.clear=function(){this.__data__=new Di,this.size=0},Pi.prototype["delete"]=function(e){var t=this.__data__,i=t["delete"](e);return this.size=t.size,i},Pi.prototype.get=function(e){return this.__data__.get(e)},Pi.prototype.has=function(e){return this.__data__.has(e)},Pi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Di){var n=i.__data__;if(!hi||n.length<d-1)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new Mi(n)}return i.set(e,t),this.size=i.size,this};var Ki,Qi,Ui=(Ki=nn,function(e,t){if(null==e)return e;if(!lo(e))return Ki(e,t);for(var i=e.length,n=Qi?i:-1,r=Object(e);(Qi?n--:++n<i)&&!1!==t(r[n],n,r););return e});function zi(e,n){var r=!0;return Ui(e,function(e,t,i){return r=!!n(e,t,i)}),r}function ji(e,t,i){for(var n=-1,r=e.length;++n<r;){var o,a,s=e[n],l=t(s);null!=l&&(o===y?l==l&&!Co(l):i(l,o))&&(o=l,a=s)}return a}function qi(e,n){var r=[];return Ui(e,function(e,t,i){n(e,t,i)&&r.push(e)}),r}function $i(e,t,i,n,r){var o=-1,a=e.length;for(i=i||gr,r=r||[];++o<a;){var s=e[o];0<t&&i(s)?1<t?$i(s,t-1,i,n,r):at(r,s):n||(r[r.length]=s)}return r}var en=Zn(),tn=Zn(!0);function nn(e,t){return e&&en(e,t,Yo)}function rn(e,t){return e&&tn(e,t,Yo)}function on(t,e){return it(e,function(e){return po(t[e])})}function an(e,t){for(var i=0,n=(t=Mn(t,e)).length;null!=e&&i<n;)e=e[Lr(t[i++])];return i&&i==n?e:y}function sn(e,t,i){var n=t(e);return so(e)?n:at(n,i(e))}function ln(e){return null==e?e===y?p:u:qt&&qt in Object(e)?function(e){var t=Ht.call(e,qt),i=e[qt];try{e[qt]=y;var n=!0}catch(o){}var r=kt.call(e);n&&(t?e[qt]=i:delete e[qt]);return r}(e):(t=e,kt.call(t));var t}function un(e,t){return t<e}function cn(e,t){return null!=e&&Ht.call(e,t)}function hn(e,t){return null!=e&&t in Object(e)}function pn(e){return Bo(e)&&ln(e)==P}function dn(e,t,i,n,r){return e===t||(null==e||null==t||!Bo(e)&&!Bo(t)?e!=e&&t!=t:function(e,t,i,n,r,o){var a=so(e),s=so(t),l=a?f:hr(e),u=s?f:hr(t),c=(l=l==P?O:l)==O,h=(u=u==P?O:u)==O,p=l==u;if(p&&co(e)){if(!co(t))return!1;c=!(a=!0)}if(p&&!c)return o=o||new Pi,a||No(e)?tr(e,t,i,n,r,o):function(e,t,i,n,r,o,a){switch(i){case U:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Q:return e.byteLength==t.byteLength&&o(new Zt(e),new Zt(t))?!0:!1;case Y:case k:case F:return oo(+e,+t);case _:return e.name==t.name&&e.message==t.message;case Z:case J:return e==t+"";case G:var s=bt;case X:var l=n&V;if(s=s||Vt,e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;n|=E,a.set(e,t);var c=tr(s(e),s(t),n,r,o,a);return a["delete"](e),c;case K:if(Ni)return Ni.call(e)==Ni.call(t)}return!1}(e,t,l,i,n,r,o);if(!(i&V)){var d=c&&Ht.call(e,"__wrapped__"),g=h&&Ht.call(t,"__wrapped__");if(d||g){var I=d?e.value():e,B=g?t.value():t;return o=o||new Pi,r(I,B,i,n,o)}}return p&&(o=o||new Pi,function(e,t,i,n,r,o){var a=i&V,s=nr(e),l=s.length,u=nr(t).length;if(l!=u&&!a)return!1;var c=l;for(;c--;){var h=s[c];if(!(a?h in t:Ht.call(t,h)))return!1}var p=o.get(e);if(p&&o.get(t))return p==t;var d=!0;o.set(e,t),o.set(t,e);var g=a;for(;++c<l;){h=s[c];var I,B=e[h],E=t[h];if(n&&(I=a?n(E,B,h,t,e,o):n(B,E,h,e,t,o)),!(I===y?B===E||r(B,E,i,n,o):I)){d=!1;break}g=g||"constructor"==h}{var f,_;d&&!g&&(f=e.constructor,_=t.constructor,f!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof f&&f instanceof f&&"function"==typeof _&&_ instanceof _)&&(d=!1))}return o["delete"](e),o["delete"](t),d}(e,t,i,n,r,o))}(e,t,i,n,dn,r))}function gn(e){return Io(e)&&!(Yt&&Yt in e)&&(po(e)?Gt:Be).test(wr(e))}function In(e){return"function"==typeof e?e:null==e?Xo:"object"==typeof e?so(e)?function(i,n){if(Er(i)&&_r(n))return mr(Lr(i),n);return function(e){var t=Do(e,i);return t===y&&t===n?Mo(e,i):dn(n,t,V|E)}}(e[0],e[1]):mn(e):Er(t=e)?gt(Lr(t)):function(t){return function(e){return an(e,t)}}(t);var t}function Bn(e){if(!fr(e))return oi(e);var t=[];for(var i in Object(e))Ht.call(e,i)&&"constructor"!=i&&t.push(i);return t}function En(e){if(!Io(e))return function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}(e);var t=fr(e),i=[];for(var n in e)("constructor"!=n||!t&&Ht.call(e,n))&&i.push(n);return i}function fn(e,t){return e<t}function _n(e,n){var r=-1,o=lo(e)?Array(e.length):[];return Ui(e,function(e,t,i){o[++r]=n(e,t,i)}),o}function mn(t){var i=function(e){var t=Yo(e),i=t.length;for(;i--;){var n=t[i],r=e[n];t[i]=[n,r,_r(r)]}return t}(t);return 1==i.length&&i[0][2]?mr(i[0][0],i[0][1]):function(e){return e===t||function(e,t,i,n){var r=i.length,o=r,a=!n;if(null==e)return!o;for(e=Object(e);r--;){var s=i[r];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<o;){var l=(s=i[r])[0],u=e[l],c=s[1];if(a&&s[2]){if(u===y&&!(l in e))return!1}else{var h,p=new Pi;if(n&&(h=n(u,c,l,e,t,p)),!(h===y?dn(c,u,V|E,n,p):h))return!1}}return!0}(e,t,i)}}function Tn(n,r,o,a,s){n!==r&&en(r,function(e,t){var i;Io(e)?(s=s||new Pi,function(e,t,i,n,r,o,a){var s=yt(e,i),l=yt(t,i),u=a.get(l);if(u)return ki(e,i,u);var c=o?o(s,l,i+"",e,t,a):y,h=c===y;{var p,d,g;h&&(p=so(l),d=!p&&co(l),g=!p&&!d&&No(l),c=l,p||d||g?c=so(s)?s:uo(s)?Wn(s):d?Hn(l,!(h=!1)):g?Yn(l,!(h=!1)):[]:_o(l)||ao(l)?ao(c=s)?c=function(e){return Gn(e,ko(e))}(s):(!Io(s)||n&&po(s))&&(c=dr(l)):h=!1)}h&&(a.set(l,c),r(c,l,n,o,a),a["delete"](l));ki(e,i,c)}(n,r,t,o,Tn,a,s)):((i=a?a(yt(n,t),e,t+"",n,r,s):y)===y&&(i=e),ki(n,t,i))},ko)}function bn(e,n,i){var r=-1;return n=ot(n.length?n:[Xo],Et(In)),function(e,t){var i=e.length;for(e.sort(t);i--;)e[i]=e[i].value;return e}(_n(e,function(t,e,i){return{criteria:ot(n,function(e){return e(t)}),index:++r,value:t}}),function(e,t){return function(e,t,i){var n=-1,r=e.criteria,o=t.criteria,a=r.length,s=i.length;for(;++n<a;){var l=function(e,t){if(e!==t){var i=e!==y,n=null===e,r=e==e,o=Co(e),a=t!==y,s=null===t,l=t==t,u=Co(t);if(!s&&!u&&!o&&t<e||o&&a&&l&&!s&&!u||n&&a&&l||!i&&l||!r)return 1;if(!n&&!o&&!u&&e<t||u&&i&&r&&!n&&!o||s&&i&&r||!a&&r||!l)return-1}return 0}(r[n],o[n]);if(l){if(s<=n)return l;var u=i[n];return l*("desc"==u?-1:1)}}return e.index-t.index}(e,t,i)})}function Cn(e,t,i){for(var n=-1,r=t.length,o={};++n<r;){var a=t[n],s=an(e,a);i(s,a)&&yn(o,Mn(a,e),s)}return o}function Nn(e,t){return Nr(Tr(e,t,Xo),e+"")}function yn(e,t,i,n){if(!Io(e))return e;for(var r=-1,o=(t=Mn(t,e)).length,a=o-1,s=e;null!=s&&++r<o;){var l,u=Lr(t[r]),c=i;r!=a&&(l=s[u],(c=n?n(l,u,s):y)===y&&(c=Io(l)?l:Ir(t[r+1])?[]:{})),Ri(s,u,c),s=s[u]}return e}var Vn=Bi?function(e,t){return Bi.set(e,t),e}:Xo,vn=$t?function(e,t){return $t(e,"toString",{configurable:!0,enumerable:!1,value:Zo(t),writable:!0})}:Xo;function Sn(e,t,i){var n=-1,r=e.length;t<0&&(t=r<-t?0:r+t),(i=r<i?r:i)<0&&(i+=r),r=i<t?0:i-t>>>0,t>>>=0;for(var o=Array(r);++n<r;)o[n]=e[n+t];return o}function xn(e,n){var r;return Ui(e,function(e,t,i){return!(r=n(e,t,i))}),!!r}function Ln(e){if("string"==typeof e)return e;if(so(e))return ot(e,Ln)+"";if(Co(e))return yi?yi.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}function wn(e,t,i){var n=-1,r=nt,o=e.length,a=!0,s=[],l=s;if(i)a=!1,r=rt;else if(d<=o){var u=t?null:jn(e);if(u)return Vt(u);a=!1,r=ft,l=new Hi}else l=t?[]:s;e:for(;++n<o;){var c=e[n],h=t?t(c):c,c=i||0!==c?c:0;if(a&&h==h){for(var p=l.length;p--;)if(l[p]===h)continue e;t&&l.push(h),s.push(c)}else r(l,h,i)||(l!==s&&l.push(h),s.push(c))}return s}function An(e,t){var i=e;return i instanceof wi&&(i=i.value()),st(t,function(e,t){return t.func.apply(t.thisArg,at([e],t.args))},i)}function Dn(e){return uo(e)?e:[]}function Mn(e,t){return so(e)?e:Er(e,t)?[e]:xr(xo(e))}function Hn(e,t){if(t)return e.slice();var i=e.length,n=Xt?Xt(i):new e.constructor(i);return e.copy(n),n}function Pn(e){var t=new e.constructor(e.byteLength);return new Zt(t).set(new Zt(e)),t}function Yn(e,t){var i=t?Pn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function kn(e,t,i,n){for(var r=-1,o=e.length,a=i.length,s=-1,l=t.length,u=ai(o-a,0),c=Array(l+u),h=!n;++s<l;)c[s]=t[s];for(;++r<a;)(h||r<o)&&(c[i[r]]=e[r]);for(;u--;)c[s++]=e[r++];return c}function Rn(e,t,i,n){for(var r=-1,o=e.length,a=-1,s=i.length,l=-1,u=t.length,c=ai(o-s,0),h=Array(c+u),p=!n;++r<c;)h[r]=e[r];for(var d=r;++l<u;)h[d+l]=t[l];for(;++a<s;)(p||r<o)&&(h[d+i[a]]=e[r++]);return h}function Wn(e,t){var i=-1,n=e.length;for(t=t||Array(n);++i<n;)t[i]=e[i];return t}function Gn(e,t,i,n){var r=!i;i=i||{};for(var o=-1,a=t.length;++o<a;){var s=t[o],l=n?n(i[s],e[s],s,i,e):y;l===y&&(l=e[s]),(r?Oi:Ri)(i,s,l)}return i}function Fn(r,o){return function(e,t){var i=so(e)?$e:Gi,n=o?o():{};return i(e,r,In(t),n)}}function On(s){return Nn(function(e,t){var i=-1,n=t.length,r=1<n?t[n-1]:y,o=2<n?t[2]:y,r=3<s.length&&"function"==typeof r?(n--,r):y;for(o&&Br(t[0],t[1],o)&&(r=n<3?y:r,n=1),e=Object(e);++i<n;){var a=t[i];a&&s(e,a,i,r)}return e})}function Zn(l){return function(e,t,i){for(var n=-1,r=Object(e),o=i(e),a=o.length;a--;){var s=o[l?a:++n];if(!1===t(r[s],s,r))break}return e}}function Xn(n){return function(){var e=arguments;switch(e.length){case 0:return new n;case 1:return new n(e[0]);case 2:return new n(e[0],e[1]);case 3:return new n(e[0],e[1],e[2]);case 4:return new n(e[0],e[1],e[2],e[3]);case 5:return new n(e[0],e[1],e[2],e[3],e[4]);case 6:return new n(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new n(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var t=vi(n.prototype),i=n.apply(t,e);return Io(i)?i:t}}function Jn(o,a,s){var l=Xn(o);return function u(){for(var e=arguments.length,t=Array(e),i=e,n=ar(u);i--;)t[i]=arguments[i];var r=e<3&&t[0]!==n&&t[e-1]!==n?[]:Nt(t,n);return(e-=r.length)<s?zn(o,a,Kn,u.placeholder,y,t,r,y,y,s-e):qe(this&&this!==Ge&&this instanceof u?l:o,this,t)}}function Kn(l,u,c,h,p,d,g,I,B,E){var f=u&M,_=u&v,m=u&S,T=u&(L|w),b=u&e,C=m?y:Xn(l);return function N(){for(var e,t,i=arguments.length,n=Array(i),r=i;r--;)n[r]=arguments[r];if(T&&(t=function(e,t){for(var i=e.length,n=0;i--;)e[i]===t&&++n;return n}(n,e=ar(N))),h&&(n=kn(n,h,p,T)),d&&(n=Rn(n,d,g,T)),i-=t,T&&i<E){var o=Nt(n,e);return zn(l,u,Kn,N.placeholder,c,n,o,I,B,E-i)}var a=_?c:this,s=m?a[l]:l,i=n.length;return I?n=function(e,t){for(var i=e.length,n=si(t.length,i),r=Wn(e);n--;){var o=t[n];e[n]=Ir(o,i)?r[o]:y}return e}(n,I):b&&1<i&&n.reverse(),f&&B<i&&(n.length=B),this&&this!==Ge&&this instanceof N&&(s=C||Xn(s)),s.apply(a,n)}}function Qn(a,s){return function(e,t){return i=e,n=a,r=s(t),o={},nn(i,function(e,t,i){n(o,r(e),t,i)}),o;var i,n,r,o}}function Un(a,e,s,l){var u=e&v,c=Xn(a);return function h(){for(var e=-1,t=arguments.length,i=-1,n=l.length,r=Array(n+t),o=this&&this!==Ge&&this instanceof h?c:a;++i<n;)r[i]=l[i];for(;t--;)r[i++]=arguments[++e];return qe(o,u?s:this,r)}}function zn(e,t,i,n,r,o,a,s,l,u){var c=t&L;t|=c?A:D,(t&=~(c?D:A))&x||(t&=~(v|S));var h=[e,t,r,c?o:y,c?a:y,c?y:o,c?y:a,s,l,u],p=i.apply(y,h);return function(e){var t=function(e){var t=e.name+"",i=Ei[t],n=Ht.call(Ei,t)?i.length:0;for(;n--;){var r=i[n],o=r.func;if(null==o||o==e)return r.name}return t}(e),i=Vi[t];if("function"!=typeof i||!(t in wi.prototype))return!1;if(e===i)return!0;var n=or(i);return!!n&&e===n[0]}(e)&&Cr(p,h),p.placeholder=n,yr(p,e,t)}var jn=di&&1/Vt(new di([,-0]))[1]==i?function(e){return new di(e)}:Ko;function qn(e,t,i,n,r,o,a,s){var l=t&S;if(!l&&"function"!=typeof e)throw new TypeError(m);var u,c,h=n?n.length:0;h||(t&=~(A|D),n=r=y),a=a===y?a:ai(vo(a),0),s=s===y?s:vo(s),h-=r?r.length:0,t&D&&(u=n,c=r,n=r=y);var p,d,g,I,B,E=l?y:or(e),f=[e,t,i,n,r,u,c,o,a,s];return E&&function(e,t){var i=e[1],n=t[1],r=i|n,o=r<(v|S|M),a=n==M&&i==L||n==M&&i==H&&e[7].length<=t[8]||n==(M|H)&&t[7].length<=t[8]&&i==L;if(!o&&!a)return;n&v&&(e[2]=t[2],r|=i&v?0:x);var s=t[3];{var l;s&&(l=e[3],e[3]=l?kn(l,s,t[4]):s,e[4]=l?Nt(e[3],T):t[4])}(s=t[5])&&(l=e[5],e[5]=l?Rn(l,s,t[6]):s,e[6]=l?Nt(e[5],T):t[6]);(s=t[7])&&(e[7]=s);n&M&&(e[8]=null==e[8]?t[8]:si(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=r}(f,E),e=f[0],t=f[1],i=f[2],n=f[3],r=f[4],!(s=f[9]=f[9]===y?l?0:e.length:ai(f[9]-h,0))&&t&(L|w)&&(t&=~(L|w)),p=t&&t!=v?t==L||t==w?Jn(e,t,s):t!=A&&t!=(v|A)||r.length?Kn.apply(y,f):Un(e,t,i,n):(g=i,I=t&v,B=Xn(d=e),function _(){return(this&&this!==Ge&&this instanceof _?B:d).apply(I?g:this,arguments)}),yr((E?Vn:Cr)(p,f),e,t)}function $n(e,t,i,n,r,o){return Io(e)&&Io(t)&&(o.set(t,e),Tn(e,t,y,$n,o),o["delete"](t)),e}function er(e){return _o(e)?y:e}function tr(e,t,i,n,r,o){var a=i&V,s=e.length,l=t.length;if(s!=l&&!(a&&s<l))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,h=!0,p=i&E?new Hi:y;for(o.set(e,t),o.set(t,e);++c<s;){var d,g=e[c],I=t[c];if(n&&(d=a?n(I,g,c,t,e,o):n(g,I,c,e,t,o)),d!==y){if(d)continue;h=!1;break}if(p){if(!lt(t,function(e,t){return!ft(p,t)&&(g===e||r(g,e,i,n,o))&&p.push(t)})){h=!1;break}}else if(g!==I&&!r(g,I,i,n,o)){h=!1;break}}return o["delete"](e),o["delete"](t),h}function ir(e){return Nr(Tr(e,y,Hr),e+"")}function nr(e){return sn(e,Yo,ur)}function rr(e){return sn(e,ko,cr)}var or=Bi?function(e){return Bi.get(e)}:Ko;function ar(e){return(Ht.call(Vi,"placeholder")?Vi:e).placeholder}function sr(e,t){var i,n,r=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?r["string"==typeof t?"string":"hash"]:r.map}function lr(e,t){var i,n,r=(n=t,null==(i=e)?y:i[n]);return gn(r)?r:y}var ur=ii?function(t){return null==t?[]:(t=Object(t),it(ii(t),function(e){return Qt.call(t,e)}))}:jo,cr=ii?function(e){for(var t=[];e;)at(t,ur(e)),e=Jt(e);return t}:jo,hr=ln;function pr(e,t,i){for(var n=-1,r=(t=Mn(t,e)).length,o=!1;++n<r;){var a=Lr(t[n]);if(!(o=null!=e&&i(e,a)))break;e=e[a]}return o||++n!=r?o:!!(r=null==e?0:e.length)&&go(r)&&Ir(a,r)&&(so(e)||ao(e))}function dr(e){return"function"!=typeof e.constructor||fr(e)?{}:vi(Jt(e))}function gr(e){return so(e)||ao(e)||!!(zt&&e&&e[zt])}function Ir(e,t){var i=typeof e;return!!(t=null==t?r:t)&&("number"==i||"symbol"!=i&&fe.test(e))&&-1<e&&e%1==0&&e<t}function Br(e,t,i){if(Io(i)){var n=typeof t;return("number"==n?lo(i)&&Ir(t,i.length):"string"==n&&t in i)&&oo(i[t],e)}}function Er(e,t){if(!so(e)){var i=typeof e;return"number"==i||"symbol"==i||"boolean"==i||null==e||Co(e)||(ae.test(e)||!oe.test(e)||null!=t&&e in Object(t))}}function fr(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||At)}function _r(e){return e==e&&!Io(e)}function mr(t,i){return function(e){return null!=e&&(e[t]===i&&(i!==y||t in Object(e)))}}function Tr(o,a,s){return a=ai(a===y?o.length-1:a,0),function(){for(var e=arguments,t=-1,i=ai(e.length-a,0),n=Array(i);++t<i;)n[t]=e[a+t];t=-1;for(var r=Array(a+1);++t<a;)r[t]=e[t];return r[a]=s(n),qe(o,this,r)}}function br(e,t){return t.length<2?e:an(e,Sn(t,0,-1))}(ci&&hr(new ci(new ArrayBuffer(1)))!=U||hi&&hr(new hi)!=G||pi&&hr(pi.resolve())!=c||di&&hr(new di)!=X||gi&&hr(new gi)!=g)&&(hr=function(e){var t=ln(e),i=t==O?e.constructor:y,n=i?wr(i):"";if(n)switch(n){case fi:return U;case _i:return G;case mi:return c;case Ti:return X;case bi:return g}return t});var Cr=Vr(Vn),Nr=Vr(vn);function yr(e,t,i){var n,r,o,a=t+"";return Nr(e,function(e,t){var i=t.length;if(!i)return e;var n=i-1;return t[n]=(1<i?"& ":"")+t[n],t=t.join(2<i?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(a,(o=a.match(ce),n=o?o[1].split(he):[],r=i,et(s,function(e){var t="_."+e[0];r&e[1]&&!nt(n,t)&&n.push(t)}),n.sort())))}function Vr(i){var n=0,r=0;return function(){var e=li(),t=16-(e-r);if(r=e,0<t){if(800<=++n)return arguments[0]}else n=0;return i.apply(y,arguments)}}var vr,Sr,xr=(Sr=(vr=no(function(e){var r=[];return 46===e.charCodeAt(0)&&r.push(""),e.replace(se,function(e,t,i,n){r.push(i?n.replace(pe,"$1"):t||e)}),r},function(e){return 500===Sr.size&&Sr.clear(),e})).cache,vr);function Lr(e){if("string"==typeof e||Co(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function wr(e){if(null!=e){try{return Mt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Ar(e){if(e instanceof wi)return e.clone();var t=new Li(e.__wrapped__,e.__chain__);return t.__actions__=Wn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Dr=Nn(function(e,t){return uo(e)?Ji(e,$i(t,1,uo,!0)):[]});function Mr(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:vo(i);return r<0&&(r=ai(n+r,0)),ht(e,In(t),r)}function Hr(e){return(null==e?0:e.length)?$i(e,1):[]}function Pr(e){return e&&e.length?e[0]:y}var Yr=Nn(function(e){var t=ot(e,Dn);return t.length&&t[0]===e[0]?function(e,t,i){for(var n=i?rt:nt,r=e[0].length,o=e.length,a=o,s=Array(o),l=Infinity,u=[];a--;){var c=e[a];a&&t&&(c=ot(c,Et(t))),l=si(c.length,l),s[a]=!i&&(t||120<=r&&120<=c.length)?new Hi(a&&c):y}c=e[0];var h=-1,p=s[0];e:for(;++h<r&&u.length<l;){var d=c[h],g=t?t(d):d,d=i||0!==d?d:0;if(!(p?ft(p,g):n(u,g,i))){for(a=o;--a;){var I=s[a];if(!(I?ft(I,g):n(e[a],g,i)))continue e}p&&p.push(g),u.push(d)}}return u}(t):[]});function kr(e){var t=null==e?0:e.length;return t?e[t-1]:y}var Rr=Nn(function(e){return wn($i(e,1,uo,!0))});function Wr(t){if(!t||!t.length)return[];var i=0;return t=it(t,function(e){return uo(e)&&(i=ai(e.length,i),1)}),Bt(i,function(e){return ot(t,gt(e))})}var Gr=Nn(function(e,t){return uo(e)?Ji(e,t):[]}),Fr=Nn(Wr);function Or(e){var t=Vi(e);return t.__chain__=!0,t}function Zr(e,t){return t(e)}ir(function(t){var i=t.length,e=i?t[0]:0,n=this.__wrapped__,r=function(e){return function(e,t){for(var i=-1,n=t.length,r=Array(n),o=null==e;++i<n;)r[i]=o?y:Do(e,t[i]);return r}(e,t)};return!(1<i||this.__actions__.length)&&n instanceof wi&&Ir(e)?((n=n.slice(e,+e+(i?1:0))).__actions__.push({func:Zr,args:[r],thisArg:y}),new Li(n,this.__chain__).thru(function(e){return i&&!e.length&&e.push(y),e})):this.thru(r)});var Xr=Fn(function(e,t,i){Ht.call(e,i)?++e[i]:Oi(e,i,1)});var Jr,Kr=(Jr=Mr,function(e,t,i){var n,r=Object(e);lo(e)||(n=In(t),e=Yo(e),t=function(e){return n(r[e],e,r)});var o=Jr(e,t,i);return-1<o?r[n?e[o]:o]:y});function Qr(e,t){return(so(e)?et:Ui)(e,In(t))}var Ur=Fn(function(e,t,i){Ht.call(e,i)?e[i].push(t):Oi(e,i,[t])});var zr=Nn(function(e,t){if(null==e)return[];var i=t.length;return 1<i&&Br(e,t[0],t[1])?t=[]:2<i&&Br(t[0],t[1],t[2])&&(t=[t[0]]),bn(e,$i(t,1),[])}),jr=function(){return Ge.Date.now()};function qr(e,t){var i;if("function"!=typeof t)throw new TypeError(m);return e=vo(e),function(){return 0<--e&&(i=t.apply(this,arguments)),e<=1&&(t=y),i}}var $r=Nn(function(e,t,i){var n,r=v;return i.length&&(n=Nt(i,ar($r)),r|=A),qn(e,r,t,i,n)});function eo(n,r,e){var o,a,s,l,u,c,h=0,p=!1,d=!1,t=!0;if("function"!=typeof n)throw new TypeError(m);function g(e){var t=o,i=a;return o=a=y,h=e,l=n.apply(i,t)}function I(e){var t=e-c;return c===y||r<=t||t<0||d&&s<=e-h}function B(){var e,t,i=jr();if(I(i))return E(i);u=setTimeout(B,(t=r-((e=i)-c),d?si(t,s-(e-h)):t))}function E(e){return u=y,t&&o?g(e):(o=a=y,l)}function i(){var e,t=jr(),i=I(t);if(o=arguments,a=this,c=t,i){if(u===y)return h=e=c,u=setTimeout(B,r),p?g(e):l;if(d)return u=setTimeout(B,r),g(c)}return u===y&&(u=setTimeout(B,r)),l}return r=So(r)||0,Io(e)&&(p=!!e.leading,s=(d="maxWait"in e)?ai(So(e.maxWait)||0,r):s,t="trailing"in e?!!e.trailing:t),i.cancel=function(){u!==y&&clearTimeout(u),h=0,o=c=a=u=y},i.flush=function(){return u===y?l:E(jr())},i}var to=Nn(function(e,t){return Xi(e,1,t)}),io=Nn(function(e,t,i){return Xi(e,So(t)||0,i)});function no(r,o){if("function"!=typeof r||null!=o&&"function"!=typeof o)throw new TypeError(m);var a=function(){var e=arguments,t=o?o.apply(this,e):e[0],i=a.cache;if(i.has(t))return i.get(t);var n=r.apply(this,e);return a.cache=i.set(t,n)||i,n};return a.cache=new(no.Cache||Mi),a}function ro(t){if("function"!=typeof t)throw new TypeError(m);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function oo(e,t){return e===t||e!=e&&t!=t}no.Cache=Mi;var ao=pn(function(){return arguments}())?pn:function(e){return Bo(e)&&Ht.call(e,"callee")&&!Qt.call(e,"callee")},so=Array.isArray;function lo(e){return null!=e&&go(e.length)&&!po(e)}function uo(e){return Bo(e)&&lo(e)}var co=ni||function(){return!1},ho=Ke?Et(Ke):function(e){return Bo(e)&&ln(e)==k};function po(e){if(!Io(e))return!1;var t=ln(e);return t==R||t==W||t==l||t==h}function go(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=r}function Io(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Bo(e){return null!=e&&"object"==typeof e}var Eo=Qe?Et(Qe):function(e){return Bo(e)&&hr(e)==G};function fo(e){return"number"==typeof e||Bo(e)&&ln(e)==F}function _o(e){if(!Bo(e)||ln(e)!=O)return!1;var t=Jt(e);if(null===t)return!0;var i=Ht.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Mt.call(i)==Rt}var mo=Ue?Et(Ue):function(e){return Bo(e)&&ln(e)==Z},To=ze?Et(ze):function(e){return Bo(e)&&hr(e)==X};function bo(e){return"string"==typeof e||!so(e)&&Bo(e)&&ln(e)==J}function Co(e){return"symbol"==typeof e||Bo(e)&&ln(e)==K}var No=je?Et(je):function(e){return Bo(e)&&go(e.length)&&!!He[ln(e)]};function yo(e){if(!e)return[];if(lo(e))return(bo(e)?St:Wn)(e);if(jt&&e[jt])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[jt]());var t=hr(e);return(t==G?bt:t==X?Vt:Oo)(e)}function Vo(e){return e?(e=So(e))!==i&&e!==-i?e==e?e:0:(e<0?-1:1)*t:0===e?e:0}function vo(e){var t=Vo(e),i=t%1;return t==t?i?t-i:t:0}function So(e){if("number"==typeof e)return e;if(Co(e))return o;var t;if(Io(e)&&(e=Io(t="function"==typeof e.valueOf?e.valueOf():e)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=e.replace(le,"");var i=Ie.test(e);return i||Ee.test(e)?ke(e.slice(2),i?2:8):ge.test(e)?o:+e}function xo(e){return null==e?"":Ln(e)}var Lo=On(function(e,t){Gn(t,ko(t),e)});var wo=Nn(function(e,t){e=Object(e);var i=-1,n=t.length,r=2<n?t[2]:y;for(r&&Br(t[0],t[1],r)&&(n=1);++i<n;)for(var o=t[i],a=ko(o),s=-1,l=a.length;++s<l;){var u=a[s],c=e[u];(c===y||oo(c,At[u])&&!Ht.call(e,u))&&(e[u]=o[u])}return e}),Ao=Nn(function(e){return e.push(y,$n),qe(Wo,y,e)});function Do(e,t,i){var n=null==e?y:an(e,t);return n===y?i:n}function Mo(e,t){return null!=e&&pr(e,t,hn)}var Ho=Qn(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=kt.call(t)),e[t]=i},Zo(Xo)),Po=Qn(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=kt.call(t)),Ht.call(e,t)?e[t].push(i):e[t]=[i]},In);function Yo(e){return(lo(e)?Yi:Bn)(e)}function ko(e){return lo(e)?Yi(e,!0):En(e)}var Ro=On(function(e,t,i){Tn(e,t,i)}),Wo=On(function(e,t,i,n){Tn(e,t,i,n)}),Go=ir(function(t,e){var i={};if(null==t)return i;var n=!1;e=ot(e,function(e){return e=Mn(e,t),n=n||1<e.length,e}),Gn(t,rr(t),i),n&&(i=Zi(i,b|C|N,er));for(var r,o,a=e.length;a--;)r=i,o=e[a],null==(r=br(r,o=Mn(o,r)))||delete r[Lr(kr(o))];return i});var Fo=ir(function(e,t){return null==e?{}:Cn(i=e,t,function(e,t){return Mo(i,t)});var i});function Oo(e){return null==e?[]:ot(Yo(t=e),function(e){return t[e]});var t}function Zo(e){return function(){return e}}function Xo(e){return e}function Jo(n,t,e){var i=Yo(t),r=on(t,i);null!=e||Io(t)&&(r.length||!i.length)||(e=t,t=n,n=this,r=on(t,Yo(t)));var o=!(Io(e)&&"chain"in e&&!e.chain),a=po(n);return et(r,function(e){var i=t[e];n[e]=i,a&&(n.prototype[e]=function(){var e=this.__chain__;if(o||e){var t=n(this.__wrapped__);return(t.__actions__=Wn(this.__actions__)).push({func:i,args:arguments,thisArg:n}),t.__chain__=e,t}return i.apply(n,at([this.value()],arguments))})}),n}function Ko(){}var Qo,Uo,zo=function(e,t,i){return i&&"number"!=typeof i&&Br(e,t,i)&&(t=i=y),e=Vo(e),t===y?(t=e,e=0):t=Vo(t),function(e,t,i,n){for(var r=-1,o=ai(ei((t-e)/(i||1)),0),a=Array(o);o--;)a[n?o:++r]=e,e+=i;return a}(e,t,i=i===y?e<t?1:-1:Vo(i),Qo)};function jo(){return[]}Vi.after=function(e,t){if("function"!=typeof t)throw new TypeError(m);return e=vo(e),function(){if(--e<1)return t.apply(this,arguments)}},Vi.assignIn=Lo,Vi.before=qr,Vi.bind=$r,Vi.chain=Or,Vi.compact=function(e){for(var t=-1,i=null==e?0:e.length,n=0,r=[];++t<i;){var o=e[t];o&&(r[n++]=o)}return r},Vi.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),i=arguments[0],n=e;n--;)t[n-1]=arguments[n];return at(so(i)?Wn(i):[i],$i(t,1))},Vi.countBy=Xr,Vi.create=function(e,t){var i=vi(e);return null==t?i:Fi(i,t)},Vi.debounce=eo,Vi.defaults=wo,Vi.defaultsDeep=Ao,Vi.defer=to,Vi.delay=io,Vi.difference=Dr,Vi.drop=function(e,t,i){var n=null==e?0:e.length;return n?Sn(e,(t=i||t===y?1:vo(t))<0?0:t,n):[]},Vi.filter=function(e,t){return(so(e)?it:qi)(e,In(t))},Vi.flatten=Hr,Vi.flattenDeep=function(e){return(null==e?0:e.length)?$i(e,i):[]},Vi.groupBy=Ur,Vi.initial=function(e){return(null==e?0:e.length)?Sn(e,0,-1):[]},Vi.intersection=Yr,Vi.invert=Ho,Vi.invertBy=Po,Vi.iteratee=function(e){return In("function"==typeof e?e:Zi(e,b))},Vi.keys=Yo,Vi.map=function(e,t){return(so(e)?ot:_n)(e,In(t))},Vi.matches=function(e){return mn(Zi(e,b))},Vi.merge=Ro,Vi.mixin=Jo,Vi.negate=ro,Vi.omit=Go,Vi.omitBy=function(e,t){return function(e,i){if(null==e)return{};var t=ot(rr(e),function(e){return[e]});return i=In(i),Cn(e,t,function(e,t){return i(e,t[0])})}(e,ro(In(t)))},Vi.once=function(e){return qr(2,e)},Vi.pick=Fo,Vi.range=zo,Vi.reject=function(e,t){return(so(e)?it:qi)(e,ro(In(t)))},Vi.rest=function(e,t){if("function"!=typeof e)throw new TypeError(m);return Nn(e,t=t===y?t:vo(t))},Vi.set=function(e,t,i){return null==e?e:yn(e,t,i)},Vi.slice=function(e,t,i){var n=null==e?0:e.length;return n?(i=i&&"number"!=typeof i&&Br(e,t,i)?(t=0,n):(t=null==t?0:vo(t),i===y?n:vo(i)),Sn(e,t,i)):[]},Vi.sortBy=zr,Vi.take=function(e,t,i){return e&&e.length?Sn(e,0,(t=i||t===y?1:vo(t))<0?0:t):[]},Vi.takeRight=function(e,t,i){var n=null==e?0:e.length;return n?Sn(e,(t=n-(t=i||t===y?1:vo(t)))<0?0:t,n):[]},Vi.tap=function(e,t){return t(e),e},Vi.throttle=function(e,t,i){var n=!0,r=!0;if("function"!=typeof e)throw new TypeError(m);return Io(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),eo(e,t,{leading:n,maxWait:t,trailing:r})},Vi.thru=Zr,Vi.toArray=yo,Vi.union=Rr,Vi.uniq=function(e){return e&&e.length?wn(e):[]},Vi.uniqBy=function(e,t){return e&&e.length?wn(e,In(t)):[]},Vi.unzip=Wr,Vi.values=Oo,Vi.without=Gr,Vi.zip=Fr,Vi.zipObject=function(e,t){return function(e,t,i){for(var n=-1,r=e.length,o=t.length,a={};++n<r;){var s=n<o?t[n]:y;i(a,e[n],s)}return a}(e||[],t||[],Ri)},Vi.extend=Lo,Jo(Vi,Vi),Vi.clamp=function(e,t,i){return i===y&&(i=t,t=y),i!==y&&(i=(i=So(i))==i?i:0),t!==y&&(t=(t=So(t))==t?t:0),n=So(e),r=t,o=i,n==n&&(o!==y&&(n=n<=o?n:o),r!==y&&(n=r<=n?n:r)),n;var n,r,o},Vi.clone=function(e){return Zi(e,N)},Vi.cloneDeep=function(e){return Zi(e,b|N)},Vi.escape=function(e){return(e=xo(e))&&B.test(e)?e.replace(I,mt):e},Vi.every=function(e,t,i){var n=so(e)?tt:zi;return i&&Br(e,t,i)&&(t=y),n(e,In(t))},Vi.find=Kr,Vi.findIndex=Mr,Vi.findKey=function(e,t){return ct(e,In(t),nn)},Vi.findLastIndex=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=n-1;return i!==y&&(r=vo(i),r=i<0?ai(n+r,0):si(r,n-1)),ht(e,In(t),r,!0)},Vi.findLastKey=function(e,t){return ct(e,In(t),rn)},Vi.forEach=Qr,Vi.get=Do,Vi.has=function(e,t){return null!=e&&pr(e,t,cn)},Vi.head=Pr,Vi.identity=Xo,Vi.indexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:vo(i);return r<0&&(r=ai(n+r,0)),pt(e,t,r)},Vi.isArguments=ao,Vi.isArray=so,Vi.isArrayLike=lo,Vi.isBoolean=function(e){return!0===e||!1===e||Bo(e)&&ln(e)==Y},Vi.isDate=ho,Vi.isEmpty=function(e){if(null==e)return!0;if(lo(e)&&(so(e)||"string"==typeof e||"function"==typeof e.splice||co(e)||No(e)||ao(e)))return!e.length;var t=hr(e);if(t==G||t==X)return!e.size;if(fr(e))return!Bn(e).length;for(var i in e)if(Ht.call(e,i))return!1;return!0},Vi.isEqual=function(e,t){return dn(e,t)},Vi.isFinite=function(e){return"number"==typeof e&&ri(e)},Vi.isFunction=po,Vi.isNaN=function(e){return fo(e)&&e!=+e},Vi.isNull=function(e){return null===e},Vi.isNumber=fo,Vi.isObject=Io,Vi.isPlainObject=_o,Vi.isRegExp=mo,Vi.isString=bo,Vi.isUndefined=function(e){return e===y},Vi.last=kr,Vi.max=function(e){return e&&e.length?ji(e,Xo,un):y},Vi.min=function(e){return e&&e.length?ji(e,Xo,fn):y},Vi.noConflict=function(){return Ge._===this&&(Ge._=Wt),this},Vi.noop=Ko,Vi.random=function(e,t,i){var n,r,o;if(i&&"boolean"!=typeof i&&Br(e,t,i)&&(t=i=y),i===y&&("boolean"==typeof t?(i=t,t=y):"boolean"==typeof e&&(i=e,e=y)),e===y&&t===y?(e=0,t=1):(e=Vo(e),t===y?(t=e,e=0):t=Vo(t)),t<e&&(n=e,e=t,t=n),i||e%1||t%1){var a=ui();return si(e+a*(t-e+Ye("1e-"+((a+"").length-1))),t)}return o=t,(r=e)+ti(ui()*(o-r+1))},Vi.reduce=function(e,t,i){var n=so(e)?st:It,r=arguments.length<3;return n(e,In(t),i,r,Ui)},Vi.result=function(e,t,i){var n=-1,r=(t=Mn(t,e)).length;for(r||(r=1,e=y);++n<r;){var o=null==e?y:e[Lr(t[n])];o===y&&(n=r,o=i),e=po(o)?o.call(e):o}return e},Vi.size=function(e){if(null==e)return 0;if(lo(e))return bo(e)?vt(e):e.length;var t=hr(e);return t==G||t==X?e.size:Bn(e).length},Vi.some=function(e,t,i){var n=so(e)?lt:xn;return i&&Br(e,t,i)&&(t=y),n(e,In(t))},Vi.trim=function(e,t,i){if((e=xo(e))&&(i||t===y))return e.replace(le,"");if(!e||!(t=Ln(t)))return e;var n,r,o,a,s=St(e),l=St(t),u=function(e,t){for(var i=-1,n=e.length;++i<n&&-1<pt(t,e[i],0););return i}(s,l),c=function(e,t){for(var i=e.length;i--&&-1<pt(t,e[i],0););return i}(s,l)+1;return r=u,o=c,a=(n=s).length,o=o===y?a:o,(!r&&a<=o?n:Sn(n,r,o)).join("")},Vi.uniqueId=function(e){var t=++Pt;return xo(e)+t},Vi.each=Qr,Vi.first=Pr,Jo(Vi,(Uo={},nn(Vi,function(e,t){Ht.call(Vi.prototype,t)||(Uo[t]=e)}),Uo),{chain:!1}),Vi.VERSION="4.17.5",et(["drop","take"],function(i,n){wi.prototype[i]=function(e){e=e===y?1:ai(vo(e),0);var t=this.__filtered__&&!n?new wi(this):this.clone();return t.__filtered__?t.__takeCount__=si(e,t.__takeCount__):t.__views__.push({size:si(e,a),type:i+(t.__dir__<0?"Right":"")}),t},wi.prototype[i+"Right"]=function(e){return this.reverse()[i](e).reverse()}}),et(["filter","map","takeWhile"],function(e,t){var i=t+1,n=1==i||3==i;wi.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:getIteratee(e,3),type:i}),t.__filtered__=t.__filtered__||n,t}}),et(["head","last"],function(e,t){var i="take"+(t?"Right":"");wi.prototype[e]=function(){return this[i](1).value()[0]}}),et(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");wi.prototype[e]=function(){return this.__filtered__?new wi(this):this[i](1)}}),wi.prototype.compact=function(){return this.filter(Xo)},wi.prototype.find=function(e){return this.filter(e).head()},wi.prototype.findLast=function(e){return this.reverse().find(e)},wi.prototype.invokeMap=Nn(function(o,a){return"function"==typeof o?new wi(this):this.map(function(e){return n=a,null==(r=null==(t=br(t=e,i=Mn(i=o,t)))?t:t[Lr(kr(i))])?y:qe(r,t,n);var t,i,n,r})}),wi.prototype.reject=function(e){return this.filter(ro(getIteratee(e)))},wi.prototype.slice=function(e,t){e=vo(e);var i=this;return i.__filtered__&&(0<e||t<0)?new wi(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==y&&(i=(t=vo(t))<0?i.dropRight(-t):i.take(t-e)),i)},wi.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},wi.prototype.toArray=function(){return this.take(a)},nn(wi.prototype,function(h,e){var p=/^(?:filter|find|map|reject)|While$/.test(e),d=/^(?:head|last)$/.test(e),g=Vi[d?"take"+("last"==e?"Right":""):e],I=d||/^find/.test(e);g&&(Vi.prototype[e]=function(){var e=this.__wrapped__,i=d?[1]:arguments,t=e instanceof wi,n=i[0],r=t||so(e),o=function(e){var t=g.apply(Vi,at([e],i));return d&&a?t[0]:t};r&&p&&"function"==typeof n&&1!=n.length&&(t=r=!1);var a=this.__chain__,s=!!this.__actions__.length,l=I&&!a,u=t&&!s;if(I||!r)return l&&u?h.apply(this,i):(c=this.thru(o),l?d?c.value()[0]:c.value():c);e=u?e:new wi(this);var c=h.apply(e,i);return c.__actions__.push({func:Zr,args:[o],thisArg:y}),new Li(c,a)})}),et(["pop","push","shift","sort","splice","unshift"],function(e){var i=Lt[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Vi.prototype[e]=function(){var t=arguments;if(!r||this.__chain__)return this[n](function(e){return i.apply(so(e)?e:[],t)});var e=this.value();return i.apply(so(e)?e:[],t)}}),nn(wi.prototype,function(e,t){var i,n=Vi[t];n&&(i=n.name+"",(Ei[i]||(Ei[i]=[])).push({name:t,func:n}))}),Ei[Kn(y,S).name]=[{name:"wrapper",func:y}],wi.prototype.clone=function(){var e=new wi(this.__wrapped__);return e.__actions__=Wn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Wn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Wn(this.__views__),e},wi.prototype.reverse=function(){var e;return this.__filtered__?((e=new wi(this)).__dir__=-1,e.__filtered__=!0):(e=this.clone()).__dir__*=-1,e},wi.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=so(e),n=t<0,r=i?e.length:0,o=function(e,t,i){var n=-1,r=i.length;for(;++n<r;){var o=i[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=si(t,e+a);break;case"takeRight":e=ai(e,t-a)}}return{start:e,end:t}}(0,r,this.__views__),a=o.start,s=o.end,l=s-a,u=n?s:a-1,c=this.__iteratees__,h=c.length,p=0,d=si(l,this.__takeCount__);if(!i||!n&&r==l&&d==l)return An(e,this.__actions__);var g=[];e:for(;l--&&p<d;){for(var I=-1,B=e[u+=t];++I<h;){var E=c[I],f=E.iteratee,_=E.type,m=f(B);if(2==_)B=m;else if(!m){if(1==_)continue e;break e}}g[p++]=B}return g},Vi.prototype.first=Vi.prototype.head,jt&&(Vi.prototype[jt]=function(){return this}),Ge._=Vi,(ea=function(){return Vi}.call(ta,ia,ta,$o))===y||($o.exports=ea)}).call(this)}).call(this,ia(10),ia(62)(e))},function(e,t,i){(function(e,t){function i(){u=!1;for(var e=l.slice(0),t=l.length=0;t<e.length;t++)e[t]()}var n,r,o,a,s,l,u,c,h,p,d;_global=undefined,_global="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),h=function(n,r){return function(e,t,i){return n.call(r,t,e,i)}},p=function(e){return function(){return _[e].apply(_,arguments)}},d=function(t){return function(){var e=Array.prototype.slice.call(arguments,0);return e[1]=_.isFunction(e[1])?h(e[1],e[2]):e[1],_[t].apply(_,e)}},_.extend(BI,{assert:function(e,t){if(this.isFunction(t)){if(t(e))return!0;throw new Error(e+" error")}if(this.isArray(t)||(t=[t]),!this.deepContains(t,e))throw new Error(e+" error");return!0},warn:function(e){console.warn(e)},UUID:function(){for(var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t="",i=0;i<16;i++){t+=e[parseInt(e.length*Math.random(),10)]}return t},isWidget:function(e){return e instanceof BI.Widget||BI.View&&e instanceof BI.View},createWidgets:function(e,i,t){if(!BI.isArray(e))throw new Error("cannot create Widgets");return i=BI.isWidget(i)?{}:i||{},BI.map(BI.flatten(e),function(e,t){return BI.createWidget(t,BI.deepClone(i))})},createItems:function(e,i,n){return i=BI.isArray(i)?i:BI.makeArray(BI.flatten(e).length,i||{}),n=BI.isArray(n)?n:BI.makeArray(BI.flatten(e).length,n||{}),BI.map(e,function(e,t){return BI.isArray(t)?BI.createItems(t,i,n):t instanceof BI.Widget?BI.extend({},i.shift(),n.shift(),{type:null,el:t}):i[0]instanceof BI.Widget?(n.shift(),BI.extend({},t,{el:i.shift()})):t.el instanceof BI.Widget||BI.View&&t.el instanceof BI.View?(i.shift(),BI.extend({},n.shift(),{type:null},t)):t.el?BI.extend({},n.shift(),t,{el:BI.extend({},i.shift(),t.el)}):BI.extend({},n.shift(),{el:BI.extend({},i.shift(),t)})})},packageItems:function(e,i){for(var n=i.length-1;0<=n;n--)e=BI.map(e,function(e,t){return BI.extend({},i[n],{items:[BI.extend({},i[n].el,{el:t})]})});return e},formatEL:function(e){return e&&!e.type&&e.el?e:{el:e}},stripEL:function(e){return e.type&&e||e.el||e},trans2Element:function(e){return BI.map(e,function(e,t){return t.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(e){BI[e]=p(e)}),_.each(["get","set","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(e){BI[e]=d("any"===e?"some":e)}),_.extend(BI,{count:function(e,t,i){var n;if(i)for(n=e;n<t;n++)i(n);return t-e},inverse:function(e,t,i){return BI.count(t,e,i)},firstKey:function(e){var i=n;return BI.any(e,function(e,t){return i=e,!0}),i},lastKey:function(e){var i=n;return BI.each(e,function(e,t){return i=e,!0}),i},firstObject:function(e){var i=n;return BI.any(e,function(e,t){return i=t,!0}),i},lastObject:function(e){var i=n;return BI.each(e,function(e,t){return i=t,!0}),i},concat:function(e,t){return BI.isKey(e)?BI.map([].slice.apply(arguments),function(e,t){return t}).join(""):BI.isArray(e)?_.concat.apply([],arguments):BI.isObject(e)?_.extend.apply({},arguments):void 0},backEach:function(e,t,i){t=BI.iteratee(t,i);for(var n=e.length-1;0<=n;n--)t(n,e[n],e);return!1},backAny:function(e,t,i){t=BI.iteratee(t,i);for(var n=e.length-1;0<=n;n--)if(t(n,e[n],e))return!0;return!1},backEvery:function(e,t,i){t=BI.iteratee(t,i);for(var n=e.length-1;0<=n;n--)if(!t(n,e[n],e))return!1;return!0},backFindKey:function(e,t,i){t=BI.iteratee(t,i);for(var n,r=_.keys(e),o=r.length-1;0<=o;o--)if(t(e[n=r[o]],n,e))return n},backFind:function(e,t,i){var n=BI.isArray(e)?BI.findLastIndex(e,t,i):BI.backFindKey(e,t,i);if(void 0!==n&&-1!==n)return e[n]},remove:function(i,n,r){var e,o=BI.isFunction(n);if(n=o||BI.isArray(n)?n:[n],BI.isArray(i))for(e=0;e<i.length;e++)(o&&!0===n.apply(r,[e,i[e]])||!o&&BI.contains(n,i[e]))&&i.splice(e--,1);else BI.each(i,function(e,t){(o&&!0===n.apply(r,[e,i[e]])||!o&&BI.contains(n,i[e]))&&delete i[e]})},removeAt:function(e,t){t=BI.isArray(t)?t:[t];for(var i=BI.isArray(e),n=0;n<t.length;n++)i?e[t[n]]="$deleteIndex":delete e[t[n]];i&&BI.remove(e,"$deleteIndex")},string2Array:function(e){return e.split("&-&")},array2String:function(e){return e.join("&-&")},abc2Int:function(e){for(var t=0,i=0,n=(e=e.toUpperCase()).length;i<n;++i)if((t=e.charAt(i).charCodeAt(0)-"A".charCodeAt(0)+26*t+1)>(2147483646-e.charAt(i).charCodeAt(0)+"A".charCodeAt(0))/26)return 0;return t},int2Abc:function(e){var t=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],i=e,n="";if(0===e)return"";for(;0!==i;){var r=i%26;0===r&&(r=26),n=t[r-1]+n,i=(i-r)/26}return n}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight","uniqBy"],function(e){BI[e]=p(e)}),_.each(["findIndex","findLastIndex"],function(e){BI[e]=d(e)}),_.extend(BI,{makeArray:function(e,t){for(var i=[],n=0;n<e;n++)BI.isNull(t)?i.push(n):i.push(BI.deepClone(t));return i},makeObject:function(e,t){for(var i={},n=0;n<e.length;n++)BI.isNull(t)?i[e[n]]=e[n]:i[e[n]]=BI.deepClone(t);return i},makeArrayByArray:function(e,t){var i=[];if(!e)return i;for(var n=0,r=e.length;n<r;n++)BI.isArray(e[n])?i.push(arguments.callee(e[n],t)):i.push(BI.deepClone(t));return i},uniq:function(e,t,i,n){return null==e?[]:(_.isBoolean(t)||(n=i,i=t,t=!1),i=i&&h(i,n),_.uniq.call(_,e,t,i,n))}}),_.each(["keys","allKeys","values","pairs","invert","create","functions","extend","extendOwn","defaults","clone","property","propertyOf","matcher","isEqual","isMatch","isEmpty","isElement","isNumber","isString","isArray","isObject","isPlainObject","isArguments","isFunction","isFinite","isBoolean","isDate","isRegExp","isError","isNaN","isUndefined","zipObject","cloneDeep"],function(e){BI[e]=p(e)}),_.each(["mapObject","findKey","pick","omit","tap"],function(e){BI[e]=d(e)}),_.extend(BI,{inherit:function(e,t,i){"object"==typeof t&&(i=t,t=e,e=function(){return t.apply(this,arguments)});var n=function(){},r=t.prototype;return n.prototype=r,e.prototype=new n,e.superclass=r,_.extend(e.prototype,i,{superclass:t}),e},init:function(){for(;BI.prepares&&0<BI.prepares.length;)BI.prepares.shift()();BI.initialized=!0},has:function(i,e){return BI.isArray(e)?0!==e.length&&BI.every(e,function(e,t){return _.has(i,t)}):_.has.apply(_,arguments)},freeze:function(e){return Object.freeze&&BI.isObject(e)?Object.freeze(e):e},isKey:function(e){return BI.isNumber(e)||BI.isString(e)&&0<e.length},isCapitalEqual:function(e,t){return e=BI.isNull(e)?e:(""+e).toLowerCase(),t=BI.isNull(t)?t:(""+t).toLowerCase(),BI.isEqual(e,t)},isWidthOrHeight:function(e){return"number"==typeof e?0<=e:"string"==typeof e?/^\d{1,3}%$/.exec(e)||"auto"==e||/^\d+px$/.exec(e):void 0},isNotNull:function(e){return!BI.isNull(e)},isNull:function(e){return null==e},isEmptyArray:function(e){return BI.isArray(e)&&BI.isEmpty(e)},isNotEmptyArray:function(e){return BI.isArray(e)&&!BI.isEmpty(e)},isEmptyObject:function(e){return BI.isEqual(e,{})},isNotEmptyObject:function(e){return BI.isPlainObject(e)&&!BI.isEmptyObject(e)},isEmptyString:function(e){return BI.isString(e)&&0===e.length},isNotEmptyString:function(e){return BI.isString(e)&&!BI.isEmptyString(e)},isWindow:function(e){return null!=e&&e==e.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(e,t){var i=BI.keys(t),n=i.length;if(null==e)return!n;for(var r=Object(e),o=0;o<n;o++){var a=i[o];if(!(BI.isEqual(t[a],r[a])&&a in r))return!1}return!0},contains:function(e,t,i){return _.isArrayLike(e)||(e=_.values(e)),0<=_.indexOf(e,t,"number"==typeof i&&i)},deepContains:function(e,i){return BI.isObject(i)?BI.any(e,function(e,t){if(BI.isEqual(t,i))return!0}):BI.contains(e,i)},deepIndexOf:function(e,t){for(var i=0;i<e.length;i++)if(BI.isEqual(t,e[i]))return i;return-1},deepRemove:function(i,n){var e,r=!1;if(BI.isArray(i))for(e=0;e<i.length;e++)BI.isEqual(n,i[e])&&(i.splice(e--,1),r=!0);else BI.each(i,function(e,t){BI.isEqual(n,i[e])&&(delete i[e],r=!0)});return r},deepWithout:function(i,n){if(BI.isArray(i)){for(var r=[],e=0;e<i.length;e++)BI.isEqual(n,i[e])||r.push(i[e]);return r}r={};return BI.each(i,function(e,t){BI.isEqual(n,i[e])||(r[e]=t)}),r},deepUnique:function(e){var i=[];return BI.each(e,function(e,t){BI.deepContains(i,t)||i.push(t)}),i},deepDiff:function(e,t){e=e||{},t=t||{};var i=[],n=[];for(var r in e)this.has(e,r)&&(this.isEqual(e[r],t[r])||i.push(r),n.push(r));for(var r in t)this.has(t,r)&&!BI.contains(n,r)&&i.push(r);return i}}),_.each(["uniqueId","result","chain","iteratee","escape","unescape","before","after"],function(e){BI[e]=function(){return _[e].apply(_,arguments)}}),_.each(["bind","once","partial","debounce","throttle","delay","defer","wrap"],function(e){BI[e]=function(){return _[e].apply(_,arguments)}}),_.extend(BI,{nextTick:(u=!(l=[]),c=void 0,c="undefined"!=typeof Promise?(r=Promise.resolve(),function c(){r.then(i)}):"undefined"!=typeof MutationObserver?(o=1,a=new MutationObserver(i),s=document.createTextNode(String(o)),a.observe(s,{characterData:!0}),function c(){o=(o+1)%2,s.data=String(o)}):void 0!==t?function c(){t(i)}:function c(){setTimeout(i,0)},function(t){var i=void 0,n=[].slice.call(arguments,1);if(l.push(function(){if(t)try{t.apply(null,n)}catch(e){console.error(e)}else i&&i.apply(null,n)}),u||(u=!0,c()),!t&&"undefined"!=typeof Promise)return new Promise(function(e,t){i=e})})}),_.each(["random"],function(e){BI[e]=p(e)}),_.extend(BI,{getTime:function(){return _global.performance&&_global.performance.now?_global.performance.now():_global.performance&&_global.performance.webkitNow?_global.performance.webkitNow():Date.now?Date.now():BI.getDate().getTime()},parseInt:function(e){var t=10;/^0x/g.test(e)&&(t=16);try{return parseInt(e,t)}catch(i){throw new Error(e+"parse int error")}},parseSafeInt:function(e){var t=9007199254740991;return e?this.clamp(this.parseInt(e),-t,t):0===e?e:0},parseFloat:function(e){try{return parseFloat(e)}catch(t){throw new Error(e+"parse float error")}},isNaturalNumber:function(e){return!!/^\d+$/.test(e)},isPositiveInteger:function(e){return!!/^\+?[1-9][0-9]*$/.test(e)},isNegativeInteger:function(e){return!!/^\-[1-9][0-9]*$/.test(e)},isInteger:function(e){return!!/^\-?\d+$/.test(e)},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isFloat:function(e){return!!/^([+-]?)\d*\.\d+$/.test(e)},isOdd:function(e){return!!BI.isInteger(e)&&1==(1&e)},isEven:function(e){return!!BI.isInteger(e)&&0==(1&e)},sum:function(e,i,n){var r=0;return BI.each(e,function(e,t){r+=i?Number(i.apply(n,[e,t])):Number(t)}),r},average:function(e,t,i){return BI.sum(e,t,i)/e.length}}),_.extend(BI,{trim:function(){return _.trim.apply(_,arguments)},toUpperCase:function(e){return(e+"").toLocaleUpperCase()},toLowerCase:function(e){return(e+"").toLocaleLowerCase()},isEndWithBlank:function(e){return/(\s|\u00A0)$/.test(e)},isLiteral:function(e){return/^\s?(true|false|-?[\d\.]+|'[^']*'|"[^"]*")\s?$/.test(e)},stripQuotes:function(e){var t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)},camelize:function(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})},hyphenate:function(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()},isNotEmptyString:function(e){return BI.isString(e)&&!BI.isEmpty(e)},isEmptyString:function(e){return BI.isString(e)&&BI.isEmpty(e)},encrypt:function(e,t,i){switch(e){case BI.CRYPT_TYPE.AES:default:return BI.aesEncrypt(t,i)}},decrypt:function(e,t,i){switch(e){case BI.CRYPT_TYPE.AES:default:return BI.aesDecrypt(t,i)}},escape:function(e){return e.replace(/('|\\)/g,"\\$1")},leftPad:function(e,t,i){var n=String(e);for(i=i||" ";n.length<t;)n=i+n;return n.toString()},format:function(e){var i=Array.prototype.slice.call(arguments,1);return e.replace(/\{(\d+)\}/g,function(e,t){return i[t]})}}),_.extend(BI,{isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},checkDateVoid:function(e,t,i,n,r){var o=[];return e|=0,t|=0,i|=0,n=BI.isString(n)?n.match(/\d+/g):n,r=BI.isString(r)?r.match(/\d+/g):r,e<n[0]?o=["y"]:e>r[0]?o=["y",1]:e>=n[0]&&e<=r[0]&&(e==n[0]&&(t<n[1]?o=["m"]:t==n[1]&&i<n[2]&&(o=["d"])),e==r[0]&&(t>r[1]?o=["m",1]:t==r[1]&&i>r[2]&&(o=["d",1]))),o},checkDateLegal:function(e){var t=e.match(/\d+/g),i=0|t[0],n=0|t[1],r=0|t[2];if(t.length<=1)return!0;if(t.length<=2)return 1<=n&&n<=12;var o=BI.Date._MD.slice(0);return o[1]=BI.isLeapYear(i)?29:28,1<=n&&n<=12&&r<=o[n-1]},parseDateTime:function(e,t){var i=BI.getDate(),n=0,r=0,o=1,a=e.split(/\W+/);"%y%x"!=t.toLowerCase()&&"%y%x%d"!=t.toLowerCase()||(a[0]=e.substring(0,4),a[1]=e.substring(4,6),a[2]=e.substring(6,8));for(var s=t.match(/%./g),l=0,u=0,c=0,h=0,p=0,l=0;l<a.length;++l)switch(s[l]){case"%d":case"%e":o=parseInt(a[l],10);break;case"%X":case"%x":r=parseInt(a[l],10)-1;break;case"%Y":case"%y":(n=parseInt(a[l],10))<100&&(n+=29<n?1900:2e3);break;case"%b":case"%B":for(u=0;u<12;++u)if(BI.Date._MN[u].substr(0,a[l].length).toLowerCase()==a[l].toLowerCase()){r=u;break}break;case"%H":case"%I":case"%k":case"%l":c=parseInt(a[l],10);break;case"%P":case"%p":/pm/i.test(a[l])&&c<12?c+=12:/am/i.test(a[l])&&12<=c&&(c-=12);break;case"%M":h=parseInt(a[l],10);case"%S":p=parseInt(a[l],10)}if(isNaN(n)&&(n=i.getFullYear()),isNaN(r)&&(r=i.getMonth()),isNaN(o)&&(o=i.getDate()),isNaN(c)&&(c=i.getHours()),isNaN(h)&&(h=i.getMinutes()),isNaN(p)&&(p=i.getSeconds()),0!=n)return BI.getDate(n,r,o,c,h,p);for(r=-1,l=o=n=0;l<a.length;++l)if(-1!=a[l].search(/[a-zA-Z]+/)){for(var d=-1,u=0;u<12;++u)if(BI.Date._MN[u].substr(0,a[l].length).toLowerCase()==a[l].toLowerCase()){d=u;break}-1!=d&&(-1!=r&&(o=r+1),r=d)}else parseInt(a[l],10)<=12&&-1==r?r=a[l]-1:31<parseInt(a[l],10)&&0==n?(n=parseInt(a[l],10))<100&&(n+=29<n?1900:2e3):0==o&&(o=a[l]);return 0==n&&(n=i.getFullYear()),-1!=r&&0!=o?BI.getDate(n,r,o,c,h,p):i},getDate:function(){var e,t=arguments;switch(arguments.length){case 0:e=new Date;break;case 1:e=new Date(t[0]);break;case 2:e=new Date(t[0],t[1]);break;case 3:e=new Date(t[0],t[1],t[2]);break;case 4:e=new Date(t[0],t[1],t[2],t[3]);break;case 5:e=new Date(t[0],t[1],t[2],t[3],t[4]);break;case 6:e=new Date(t[0],t[1],t[2],t[3],t[4],t[5]);break;case 7:e=new Date(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);break;default:e=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var i=e.getTime(),n=6e4*e.getTimezoneOffset();return new Date(i+n+BI.timeZone)}return e},getTime:function(){var e,t=arguments;switch(arguments.length){case 0:e=new Date;break;case 1:e=new Date(t[0]);break;case 2:e=new Date(t[0],t[1]);break;case 3:e=new Date(t[0],t[1],t[2]);break;case 4:e=new Date(t[0],t[1],t[2],t[3]);break;case 5:e=new Date(t[0],t[1],t[2],t[3],t[4]);break;case 6:e=new Date(t[0],t[1],t[2],t[3],t[4],t[5]);break;case 7:e=new Date(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);break;default:e=new Date}return BI.isNotNull(BI.timeZone)?e.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():e.getTime()}})}).call(this,i(10),i(56).setImmediate)},function(e,t,i){"use strict";(function(e,t){function i(e){delete s[e]}function n(e){if(l)setTimeout(n,0,e);else{var t=s[e];if(t){l=!0;try{!function(e){var t=e.callback,i=e.args;switch(i.length){case 0:t();break;case 1:t(i[0]);break;case 2:t(i[0],i[1]);break;case 3:t(i[0],i[1],i[2]);break;default:t.apply(o,i)}}(t)}finally{i(e),l=!1}}}}var r,o,a,s,l,u,c,h,p,d,g,I;(r="undefined"==typeof self?void 0===e?void 0:e:self).setImmediate||(a=1,l=!(s={}),u=r.document,I=(I=Object.getPrototypeOf&&Object.getPrototypeOf(r))&&I.setTimeout?I:r,c="[object process]"==={}.toString.call(r.process)?function(e){t.nextTick(function(){n(e)})}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1},r.postMessage("","*"),r.onmessage=t,e}}()?(d="setImmediate$"+Math.random()+"$",g=function g(e){e.source===r&&"string"==typeof e.data&&0===e.data.indexOf(d)&&n(+e.data.slice(d.length))},r.addEventListener?r.addEventListener("message",g,!1):r.attachEvent("onmessage",g),function(e){r.postMessage(d+e,"*")}):r.MessageChannel?((p=new MessageChannel).port1.onmessage=function(e){n(e.data)},function(e){p.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(h=u.documentElement,function(e){var t=u.createElement("script");t.onreadystatechange=function(){n(e),t.onreadystatechange=null,h.removeChild(t),t=null},h.appendChild(t)}):function(e){setTimeout(n,0,e)},I.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i<t.length;i++)t[i]=arguments[i+1];var n={callback:e,args:t};return s[a]=n,c(a),a++},I.clearImmediate=i)}).call(this,i(10),i(63))},function(e,t){BI.OB=function(e){this._constructor(e)},_.extend(BI.OB.prototype,{props:{},init:null,destroyed:null,_constructor:function(e){this._initProps(e),this._init(),this._initRef()},_defaultConfig:function(e){return{}},_initProps:function(e){var t=this.props;BI.isFunction(this.props)&&(t=this.props(e)),this.options=function(e){for(var t,i,n,r=e||{},o=arguments.length,a=1;a<o;a++)if(null!=(t=arguments[a]))for(i in t)r[i],r!==(n=t[i])&&n!==undefined&&(r[i]=n);return r}(this._defaultConfig(e),t,e)},_init:function(){this._initListeners(),this.init&&this.init()},_initListeners:function(){var t=this;null!=this.options.listeners&&(_.each(this.options.listeners,function(e){(e.target?e.target:t)[e.once?"once":"on"](e.eventName,_.bind(e.action,t))}),delete this.options.listeners)},_initRef:function(){this.options.ref&&this.options.ref.call(this,this)},_purgeRef:function(){this.options.ref&&(this.options.ref.call(null),this.options.ref=null)},_getEvents:function(){return _.isArray(this.events)||(this.events=[]),this.events},on:function(e,t){e=e.toLowerCase();var i=this._getEvents()[e];_.isArray(i)||(i=[],this._getEvents()[e]=i),i.push(t)},once:function(e,t){var i=function(){t.apply(this,arguments),this.un(e,i)};this.on(e,i)},un:function(e,t){var i,n;e=e.toLowerCase(),null==t?delete this._getEvents()[e]:(i=this._getEvents()[e],_.isArray(i)&&(n=[],_.each(i,function(e){e!=t&&n.push(e)}),this._getEvents()[e]=n))},purgeListeners:function(){this.events=[]},fireEvent:function(){var e=arguments[0].toLowerCase(),t=this._getEvents()[e];if(BI.isArray(t))if(BI.isArguments(arguments[1])){for(var i=0;i<t.length;i++)if(!1===t[i].apply(this,arguments[1]))return!1}else for(var n=Array.prototype.slice.call(arguments,1),i=0;i<t.length;i++)if(!1===t[i].apply(this,n))return!1;return!0},destroy:function(){this.destroyed&&this.destroyed(),this._purgeRef(),this.purgeListeners()}})},function(e,t){!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var c,e,t,i,h,n,r,o,a,s,l,p,u,d,g,I,B,E,f,m,T=T||(c=Math,t=(e={}).lib={},i=t.Base={extend:function(e){b.prototype=this;var t=new b;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},h=t.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||r).stringify(this)},concat:function(e){var t=this.words,i=e.words,n=this.sigBytes,r=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<r;o++){var a=i[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else if(65535<i.length)for(o=0;o<r;o+=4)t[n+o>>>2]=i[o>>>2];else t.push.apply(t,i);return this.sigBytes+=r,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=c.ceil(t/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],i=0;i<e;i+=4)t.push(4294967296*c.random()|0);return new h.init(t,e)}}),n=e.enc={},r=n.Hex={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],r=0;r<i;r++){var o=t[r>>>2]>>>24-r%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n<t;n+=2)i[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new h.init(i,t/2)}},o=n.Latin1={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],r=0;r<i;r++){var o=t[r>>>2]>>>24-r%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n<t;n++)i[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new h.init(i,t)}},a=n.Utf8={stringify:function(e){try{return decodeURIComponent(escape(o.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return o.parse(unescape(encodeURIComponent(e)))}},s=t.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=a.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,i=t.words,n=t.sigBytes,r=this.blockSize,o=n/(4*r),a=(o=e?c.ceil(o):c.max((0|o)-this._minBufferSize,0))*r,s=c.min(4*a,n);if(a){for(var l=0;l<a;l+=r)this._doProcessBlock(i,l);var u=i.splice(0,a);t.sigBytes-=s}return new h.init(u,s)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),t.Hasher=s.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){s.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(i){return function(e,t){return new i.init(t).finalize(e)}},_createHmacHelper:function(i){return function(e,t){return new l.HMAC.init(i,t).finalize(e)}}}),l=e.algo={},e);function b(){}p=T.lib.WordArray,T.enc.Base64={stringify:function(e){var t=e.words,i=e.sigBytes,n=this._map;e.clamp();for(var r=[],o=0;o<i;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<i;s++)r.push(n.charAt(a>>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(e){var t,i=e.length,n=this._map,r=n.charAt(64);!r||-1!=(t=e.indexOf(r))&&(i=t);for(var o,a,s=[],l=0,u=0;u<i;u++){u%4&&(o=n.indexOf(e.charAt(u-1))<<u%4*2,a=n.indexOf(e.charAt(u))>>>6-u%4*2,s[l>>>2]|=(o|a)<<24-l%4*8,l++)}return p.create(s,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(c){var e=T,t=e.lib,i=t.WordArray,n=t.Hasher,r=e.algo,V=[];!function(){for(var e=0;e<64;e++)V[e]=4294967296*c.abs(c.sin(e+1))|0}();var o=r.MD5=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var n=t+i,r=e[n];e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o=this._hash.words,a=e[t+0],s=e[t+1],l=e[t+2],u=e[t+3],c=e[t+4],h=e[t+5],p=e[t+6],d=e[t+7],g=e[t+8],I=e[t+9],B=e[t+10],E=e[t+11],f=e[t+12],_=e[t+13],m=e[t+14],T=e[t+15],b=v(b=o[0],y=o[1],N=o[2],C=o[3],a,7,V[0]),C=v(C,b,y,N,s,12,V[1]),N=v(N,C,b,y,l,17,V[2]),y=v(y,N,C,b,u,22,V[3]);b=v(b,y,N,C,c,7,V[4]),C=v(C,b,y,N,h,12,V[5]),N=v(N,C,b,y,p,17,V[6]),y=v(y,N,C,b,d,22,V[7]),b=v(b,y,N,C,g,7,V[8]),C=v(C,b,y,N,I,12,V[9]),N=v(N,C,b,y,B,17,V[10]),y=v(y,N,C,b,E,22,V[11]),b=v(b,y,N,C,f,7,V[12]),C=v(C,b,y,N,_,12,V[13]),N=v(N,C,b,y,m,17,V[14]),b=S(b,y=v(y,N,C,b,T,22,V[15]),N,C,s,5,V[16]),C=S(C,b,y,N,p,9,V[17]),N=S(N,C,b,y,E,14,V[18]),y=S(y,N,C,b,a,20,V[19]),b=S(b,y,N,C,h,5,V[20]),C=S(C,b,y,N,B,9,V[21]),N=S(N,C,b,y,T,14,V[22]),y=S(y,N,C,b,c,20,V[23]),b=S(b,y,N,C,I,5,V[24]),C=S(C,b,y,N,m,9,V[25]),N=S(N,C,b,y,u,14,V[26]),y=S(y,N,C,b,g,20,V[27]),b=S(b,y,N,C,_,5,V[28]),C=S(C,b,y,N,l,9,V[29]),N=S(N,C,b,y,d,14,V[30]),b=x(b,y=S(y,N,C,b,f,20,V[31]),N,C,h,4,V[32]),C=x(C,b,y,N,g,11,V[33]),N=x(N,C,b,y,E,16,V[34]),y=x(y,N,C,b,m,23,V[35]),b=x(b,y,N,C,s,4,V[36]),C=x(C,b,y,N,c,11,V[37]),N=x(N,C,b,y,d,16,V[38]),y=x(y,N,C,b,B,23,V[39]),b=x(b,y,N,C,_,4,V[40]),C=x(C,b,y,N,a,11,V[41]),N=x(N,C,b,y,u,16,V[42]),y=x(y,N,C,b,p,23,V[43]),b=x(b,y,N,C,I,4,V[44]),C=x(C,b,y,N,f,11,V[45]),N=x(N,C,b,y,T,16,V[46]),b=L(b,y=x(y,N,C,b,l,23,V[47]),N,C,a,6,V[48]),C=L(C,b,y,N,d,10,V[49]),N=L(N,C,b,y,m,15,V[50]),y=L(y,N,C,b,h,21,V[51]),b=L(b,y,N,C,f,6,V[52]),C=L(C,b,y,N,u,10,V[53]),N=L(N,C,b,y,B,15,V[54]),y=L(y,N,C,b,s,21,V[55]),b=L(b,y,N,C,g,6,V[56]),C=L(C,b,y,N,T,10,V[57]),N=L(N,C,b,y,p,15,V[58]),y=L(y,N,C,b,_,21,V[59]),b=L(b,y,N,C,c,6,V[60]),C=L(C,b,y,N,E,10,V[61]),N=L(N,C,b,y,l,15,V[62]),y=L(y,N,C,b,I,21,V[63]),o[0]=o[0]+b|0,o[1]=o[1]+y|0,o[2]=o[2]+N|0,o[3]=o[3]+C|0},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32;var r=c.floor(i/4294967296),o=i;t[15+(64+n>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t[14+(64+n>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e.sigBytes=4*(t.length+1),this._process();for(var a=this._hash,s=a.words,l=0;l<4;l++){var u=s[l];s[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});function v(e,t,i,n,r,o,a){var s=e+(t&i|~t&n)+r+a;return(s<<o|s>>>32-o)+t}function S(e,t,i,n,r,o,a){var s=e+(t&n|i&~n)+r+a;return(s<<o|s>>>32-o)+t}function x(e,t,i,n,r,o,a){var s=e+(t^i^n)+r+a;return(s<<o|s>>>32-o)+t}function L(e,t,i,n,r,o,a){var s=e+(i^(t|~n))+r+a;return(s<<o|s>>>32-o)+t}e.MD5=n._createHelper(o),e.HmacMD5=n._createHmacHelper(o)}(Math),d=(u=T).lib,g=d.Base,I=d.WordArray,B=u.algo,E=B.MD5,f=B.EvpKDF=g.extend({cfg:g.extend({keySize:4,hasher:E,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var i=this.cfg,n=i.hasher.create(),r=I.create(),o=r.words,a=i.keySize,s=i.iterations;o.length<a;){l&&n.update(l);var l=n.update(e).finalize(t);n.reset();for(var u=1;u<s;u++)l=n.finalize(l),n.reset();r.concat(l)}return r.sigBytes=4*a,r}}),u.EvpKDF=function(e,t,i){return f.create(i).compute(e,t)},T.lib.Cipher||function(){var e=T,t=e.lib,i=t.Base,l=t.WordArray,n=t.BufferedBlockAlgorithm,r=e.enc,o=(r.Utf8,r.Base64),a=e.algo.EvpKDF,s=t.Cipher=n.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,i){this.cfg=this.cfg.extend(i),this._xformMode=e,this._key=t,this.reset()},reset:function(){n.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(n){return{encrypt:function(e,t,i){return u(t).encrypt(n,e,t,i)},decrypt:function(e,t,i){return u(t).decrypt(n,e,t,i)}}}});function u(e){return"string"==typeof e?m:f}t.StreamCipher=s.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var c,h=e.mode={},p=t.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),d=h.CBC=((c=p.extend()).Encryptor=c.extend({processBlock:function(e,t){var i=this._cipher,n=i.blockSize;g.call(this,e,t,n),i.encryptBlock(e,t),this._prevBlock=e.slice(t,t+n)}}),c.Decryptor=c.extend({processBlock:function(e,t){var i=this._cipher,n=i.blockSize,r=e.slice(t,t+n);i.decryptBlock(e,t),g.call(this,e,t,n),this._prevBlock=r}}),c);function g(e,t,i){var n,r=this._iv;r?(n=r,this._iv=void 0):n=this._prevBlock;for(var o=0;o<i;o++)e[t+o]^=n[o]}var I=(e.pad={}).Pkcs7={pad:function(e,t){for(var i=4*t,n=i-e.sigBytes%i,r=n<<24|n<<16|n<<8|n,o=[],a=0;a<n;a+=4)o.push(r);var s=l.create(o,n);e.concat(s)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},B=(t.BlockCipher=s.extend({cfg:s.cfg.extend({mode:d,padding:I}),reset:function(){s.reset.call(this);var e,t=this.cfg,i=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode=e.call(n,this,i&&i.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),t.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),E=(e.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,i=e.salt;return(i?l.create([1398893684,1701076831]).concat(i).concat(t):t).toString(o)},parse:function(e){var t,i=o.parse(e),n=i.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=l.create(n.slice(2,4)),n.splice(0,4),i.sigBytes-=16),B.create({ciphertext:i,salt:t})}},f=t.SerializableCipher=i.extend({cfg:i.extend({format:E}),encrypt:function(e,t,i,n){n=this.cfg.extend(n);var r=e.createEncryptor(i,n),o=r.finalize(t),a=r.cfg;return B.create({ciphertext:o,key:i,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,i,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(i,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=(e.kdf={}).OpenSSL={execute:function(e,t,i,n){n=n||l.random(8);var r=a.create({keySize:t+i}).compute(e,n),o=l.create(r.words.slice(t),4*i);return r.sigBytes=4*t,B.create({key:r,iv:o,salt:n})}},m=t.PasswordBasedCipher=f.extend({cfg:f.cfg.extend({kdf:_}),encrypt:function(e,t,i,n){var r=(n=this.cfg.extend(n)).kdf.execute(i,e.keySize,e.ivSize);n.iv=r.iv;var o=f.encrypt.call(this,e,t,r.key,n);return o.mixIn(r),o},decrypt:function(e,t,i,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var r=n.kdf.execute(i,e.keySize,e.ivSize,t.salt);return n.iv=r.iv,f.decrypt.call(this,e,t,r.key,n)}})}(),T.mode.ECB=((m=T.lib.BlockCipherMode.extend()).Encryptor=m.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),m.Decryptor=m.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),m),function(){var e=T,t=e.lib.BlockCipher,i=e.algo,u=[],c=[],h=[],p=[],d=[],g=[],I=[],B=[],E=[],f=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var i=0,n=0,t=0;t<256;t++){var r=(r=n^n<<1^n<<2^n<<3^n<<4)>>>8^255&r^99;u[i]=r;var o=e[c[r]=i],a=e[o],s=e[a],l=257*e[r]^16843008*r;h[i]=l<<24|l>>>8,p[i]=l<<16|l>>>16,d[i]=l<<8|l>>>24,g[i]=l;l=16843009*s^65537*a^257*o^16843008*i;I[r]=l<<24|l>>>8,B[r]=l<<16|l>>>16,E[r]=l<<8|l>>>24,f[r]=l,i?(i=o^e[e[e[s^o]]],n^=e[e[n]]):i=n=1}}();var _=[0,1,2,4,8,16,32,64,128,27,54],n=i.AES=t.extend({_doReset:function(){for(var e=this._key,t=e.words,i=e.sigBytes/4,n=4*(1+(this._nRounds=6+i)),r=this._keySchedule=[],o=0;o<n;o++){o<i?r[o]=t[o]:(l=r[o-1],o%i?6<i&&o%i==4&&(l=u[l>>>24]<<24|u[l>>>16&255]<<16|u[l>>>8&255]<<8|u[255&l]):(l=u[(l=l<<8|l>>>24)>>>24]<<24|u[l>>>16&255]<<16|u[l>>>8&255]<<8|u[255&l],l^=_[o/i|0]<<24),r[o]=r[o-i]^l)}for(var a=this._invKeySchedule=[],s=0;s<n;s++){var l,o=n-s;l=s%4?r[o]:r[o-4],a[s]=s<4||o<=4?l:I[u[l>>>24]]^B[u[l>>>16&255]]^E[u[l>>>8&255]]^f[u[255&l]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,h,p,d,g,u)},decryptBlock:function(e,t){var i=e[t+1];e[t+1]=e[t+3],e[t+3]=i,this._doCryptBlock(e,t,this._invKeySchedule,I,B,E,f,c);i=e[t+1];e[t+1]=e[t+3],e[t+3]=i},_doCryptBlock:function(e,t,i,n,r,o,a,s){for(var l=this._nRounds,u=e[t]^i[0],c=e[t+1]^i[1],h=e[t+2]^i[2],p=e[t+3]^i[3],d=4,g=1;g<l;g++)var I=n[u>>>24]^r[c>>>16&255]^o[h>>>8&255]^a[255&p]^i[d++],B=n[c>>>24]^r[h>>>16&255]^o[p>>>8&255]^a[255&u]^i[d++],E=n[h>>>24]^r[p>>>16&255]^o[u>>>8&255]^a[255&c]^i[d++],f=n[p>>>24]^r[u>>>16&255]^o[c>>>8&255]^a[255&h]^i[d++],u=I,c=B,h=E,p=f;I=(s[u>>>24]<<24|s[c>>>16&255]<<16|s[h>>>8&255]<<8|s[255&p])^i[d++],B=(s[c>>>24]<<24|s[h>>>16&255]<<16|s[p>>>8&255]<<8|s[255&u])^i[d++],E=(s[h>>>24]<<24|s[p>>>16&255]<<16|s[u>>>8&255]<<8|s[255&c])^i[d++],f=(s[p>>>24]<<24|s[u>>>16&255]<<16|s[c>>>8&255]<<8|s[255&h])^i[d++];e[t]=I,e[t+1]=B,e[t+2]=E,e[t+3]=f},keySize:8});e.AES=t._createHelper(n)}(),_.extend(BI,{aesEncrypt:function(e,t){return t=T.enc.Utf8.parse(t),T.AES.encrypt(e,t,{mode:T.mode.ECB,padding:T.pad.Pkcs7}).ciphertext.toString(T.enc.Base64)},aesDecrypt:function(e,t){t=T.enc.Utf8.parse(t);var i=T.AES.decrypt(e,t,{mode:T.mode.ECB,padding:T.pad.Pkcs7});return T.enc.Utf8.stringify(i)}})}()},function(e,t){function i(a){return function(e,t,i){var l,n=e[t];n&&n.target==e||((l=e[t]=function(){for(var e,t=l.before,i=arguments,n=t.length;n--;){if(!1===(e=t[n].advice.apply(this,i)))return!1;i=e||i}for(var r=l.method.apply(this,i),o=l.after,a=0,s=o.length;a<s;a++){if(e=o[a].advice.call(this,r,i),!1===r)return!1;i=e||i}return r}).before=[],l.after=[],n&&(l.method=n),l.target=e);var r=(l||n)[a],o={advice:i,_index:r.length,remove:function(){r.splice(this._index,1)}};return r.push(o),o}}BI.aspect={before:i("before"),after:i("after")},BI.aspect},function(e,t){var c;c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_.extend(BI,{encode:function(e){var t,i,n,r,o,a,s,l="",u=0;for(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",i=0;i<e.length;i++){var n=e.charCodeAt(i);n<128?t+=String.fromCharCode(n):(127<n&&n<2048?t+=String.fromCharCode(n>>6|192):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128)),t+=String.fromCharCode(63&n|128))}return t}(e);u<e.length;)r=(t=e.charCodeAt(u++))>>2,o=(3&t)<<4|(i=e.charCodeAt(u++))>>4,a=(15&i)<<2|(n=e.charCodeAt(u++))>>6,s=63&n,isNaN(i)?a=s=64:isNaN(n)&&(s=64),l=l+c.charAt(r)+c.charAt(o)+c.charAt(a)+c.charAt(s);return l},decode:function(e){var t,i,n,r,o,a,s="",l=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<e.length;)t=c.indexOf(e.charAt(l++))<<2|(r=c.indexOf(e.charAt(l++)))>>4,i=(15&r)<<4|(o=c.indexOf(e.charAt(l++)))>>2,n=(3&o)<<6|(a=c.indexOf(e.charAt(l++))),s+=String.fromCharCode(t),64!=o&&(s+=String.fromCharCode(i)),64!=a&&(s+=String.fromCharCode(n));return s=function(e){for(var t="",i=0,n=0,r=0,o=0;i<e.length;)(n=e.charCodeAt(i))<128?(t+=String.fromCharCode(n),i++):191<n&&n<224?(o=e.charCodeAt(i+1),t+=String.fromCharCode((31&n)<<6|63&o),i+=2):(o=e.charCodeAt(i+1),r=e.charCodeAt(i+2),t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&r),i+=3);return t}(s)}})},function(e,t){BI.Cache={_prefix:"bi",setUsername:function(e){localStorage.setItem(BI.Cache._prefix+".username",(e+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(e){return BI.Cache._getKeyPrefix()+(e||"")},getItem:function(e){return localStorage.getItem(BI.Cache._generateKey(e))},setItem:function(e,t){localStorage.setItem(BI.Cache._generateKey(e),t)},removeItem:function(e){localStorage.removeItem(BI.Cache._generateKey(e))},clear:function(){for(var e=localStorage.length;0<=e;e--){var t=localStorage.key(e);t&&0===t.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(t)}},keys:function(){for(var e=[],t=localStorage.length;0<=t;t--){var i,n=localStorage.key(t);n&&(i=BI.Cache._getKeyPrefix(),0===n.indexOf(i)&&(e[e.length]=n.substring(i.length)))}return e},addCookie:function(e,t,i,n){var r,o=e+"="+escape(t);n&&0<n&&((r=new Date).setTime(r.getTime()+3600*n*1e3),o=o+"; expires="+r.toUTCString()),i&&(o=o+"; path="+i),document.cookie=o},getCookie:function(e){var t,i=new RegExp("(^| )"+e+"=([^;]*)(;|$)");return(t=document.cookie.match(i))?unescape(t[2]):null},deleteCookie:function(e,t){var i=new Date;i.setTime(i.getTime()-1e4);var n=e+"=v; expires="+i.toUTCString();t&&(n=n+"; path="+t),document.cookie=n}}},function(e,t){BI.CellSizeAndPositionManager=function(e,t,i){this._cellSizeGetter=t,this._cellCount=e,this._estimatedCellSize=i,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(e,t){this._cellCount=e,this._estimatedCellSize=t},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(e){if(!(e<0||e>=this._cellCount)){if(e>this._lastMeasuredIndex){for(var t=this.getSizeAndPositionOfLastMeasuredCell(),i=t.offset+t.size,n=this._lastMeasuredIndex+1;n<=e;n++){var r=this._cellSizeGetter(n);null==r||isNaN(r)||(this._cellSizeAndPositionData[n]={offset:i,size:r},i+=r)}this._lastMeasuredIndex=e}return this._cellSizeAndPositionData[e]}},getSizeAndPositionOfLastMeasuredCell:function(){return 0<=this._lastMeasuredIndex?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(e,t,i,n){var r,o=this.getSizeAndPositionOfCell(n),a=o.offset,s=a-t+o.size;switch(e){case"start":r=a;break;case"end":r=s;break;case"center":r=a-(t-o.size)/2;break;default:r=Math.max(s,Math.min(a,i))}var l=this.getTotalSize();return Math.max(0,Math.min(l-t,r))},getVisibleCellRange:function(e,t){if(0===this.getTotalSize())return{};var i=t+e,n=this._findNearestCell(t),r=this.getSizeAndPositionOfCell(n);t=r.offset+r.size;for(var o=n;t<i&&o<this._cellCount-1;)o++,t+=this.getSizeAndPositionOfCell(o).size;return{start:n,stop:o}},resetCell:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)},_binarySearch:function(e,t,i){for(var n,r;t<=e;){if(n=t+Math.floor((e-t)/2),(r=this.getSizeAndPositionOfCell(n).offset)===i)return n;r<i?t=n+1:i<r&&(e=n-1)}if(0<t)return t-1},_exponentialSearch:function(e,t){for(var i=1;e<this._cellCount&&this.getSizeAndPositionOfCell(e).offset<t;)e+=i,i*=2;return this._binarySearch(Math.min(e,this._cellCount-1),Math.floor(e/2),t)},_findNearestCell:function(e){if(!isNaN(e)){e=Math.max(0,e);var t=this.getSizeAndPositionOfLastMeasuredCell(),i=Math.max(0,this._lastMeasuredIndex);return t.offset>=e?this._binarySearch(i,0,e):this._exponentialSearch(i,e)}}},BI.ScalingCellSizeAndPositionManager=function(e,t,i,n){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(e,t,i),this._maxScrollSize=n||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(e,t){var i=this._cellSizeAndPositionManager.getTotalSize(),n=this.getTotalSize(),r=this._getOffsetPercentage(e,t,n);return Math.round(r*(n-i))},getSizeAndPositionOfCell:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(e,t,i,n){i=this._safeOffsetToOffset(t,i);var r=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(e,t,i,n);return this._offsetToSafeOffset(t,r)},getVisibleCellRange:function(e,t){return t=this._safeOffsetToOffset(e,t),this._cellSizeAndPositionManager.getVisibleCellRange(e,t)},resetCell:function(e){this._cellSizeAndPositionManager.resetCell(e)},_getOffsetPercentage:function(e,t,i){return i<=e?0:t/(i-e)},_offsetToSafeOffset:function(e,t){var i=this._cellSizeAndPositionManager.getTotalSize(),n=this.getTotalSize();if(i===n)return t;var r=this._getOffsetPercentage(e,t,i);return Math.round(r*(n-e))},_safeOffsetToOffset:function(e,t){var i=this._cellSizeAndPositionManager.getTotalSize(),n=this.getTotalSize();if(i===n)return t;var r=this._getOffsetPercentage(e,t,n);return Math.round(r*(i-e))}}},function(e,t){var l;l={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:"CJ",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"},_.extend(BI,{makeFirstPY:function(e,t){if(t=t||{},"string"!=typeof e)return""+e;for(var i,n,r=[],o=0,a=e.length;o<a;o++){var s=e.charAt(o);r.push(40869<(n=(i=s).charCodeAt(0))||n<19968?i:l[n]?l[n]:"YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJCZGJMZMGXMPRYXKJNYMSGMZJYMKMFXMLDTGFBHCJHKYLPFMDXLQJJSMTQGZSJLQDLDGJYCALCMZCSDJLLNXDJFFFFJCZFMZFFPFKHKGDPSXKTACJDHHZDDCRRCFQYJKQCCWJDXHWJLYLLZGCFCQDSMLZPBJJPLSBCJGGDCKKDEZSQCCKJGCGKDJTJDLZYCXKLQSCGJCLTFPCQCZGWPJDQYZJJBYJHSJDZWGFSJGZKQCCZLLPSPKJGQJHZZLJPLGJGJJTHJJYJZCZMLZLYQBGJWMLJKXZDZNJQSYZMLJLLJKYWXMKJLHSKJGBMCLYYMKXJQLBMLLKMDXXKWYXYSLMLPSJQQJQXYXFJTJDXMXXLLCXQBSYJBGWYMBGGBCYXPJYGPEPFGDJGBHBNSQJYZJKJKHXQFGQZKFHYGKHDKLLSDJQXPQYKYBNQSXQNSZSWHBSXWHXWBZZXDMNSJBSBKBBZKLYLXGWXDRWYQZMYWSJQLCJXXJXKJEQXSCYETLZHLYYYSDZPAQYZCMTLSHTZCFYZYXYLJSDCJQAGYSLCQLYYYSHMRQQKLDXZSCSSSYDYCJYSFSJBFRSSZQSBXXPXJYSDRCKGJLGDKZJZBDKTCSYQPYHSTCLDJDHMXMCGXYZHJDDTMHLTXZXYLYMOHYJCLTYFBQQXPFBDFHHTKSQHZYYWCNXXCRWHOWGYJLEGWDQCWGFJYCSNTMYTOLBYGWQWESJPWNMLRYDZSZTXYQPZGCWXHNGPYXSHMYQJXZTDPPBFYHZHTJYFDZWKGKZBLDNTSXHQEEGZZYLZMMZYJZGXZXKHKSTXNXXWYLYAPSTHXDWHZYMPXAGKYDXBHNHXKDPJNMYHYLPMGOCSLNZHKXXLPZZLBMLSFBHHGYGYYGGBHSCYAQTYWLXTZQCEZYDQDQMMHTKLLSZHLSJZWFYHQSWSCWLQAZYNYTLSXTHAZNKZZSZZLAXXZWWCTGQQTDDYZTCCHYQZFLXPSLZYGPZSZNGLNDQTBDLXGTCTAJDKYWNSYZLJHHZZCWNYYZYWMHYCHHYXHJKZWSXHZYXLYSKQYSPSLYZWMYPPKBYGLKZHTYXAXQSYSHXASMCHKDSCRSWJPWXSGZJLWWSCHSJHSQNHCSEGNDAQTBAALZZMSSTDQJCJKTSCJAXPLGGXHHGXXZCXPDMMHLDGTYBYSJMXHMRCPXXJZCKZXSHMLQXXTTHXWZFKHCCZDYTCJYXQHLXDHYPJQXYLSYYDZOZJNYXQEZYSQYAYXWYPDGXDDXSPPYZNDLTWRHXYDXZZJHTCXMCZLHPYYYYMHZLLHNXMYLLLMDCPPXHMXDKYCYRDLTXJCHHZZXZLCCLYLNZSHZJZZLNNRLWHYQSNJHXYNTTTKYJPYCHHYEGKCTTWLGQRLGGTGTYGYHPYHYLQYQGCWYQKPYYYTTTTLHYHLLTYTTSPLKYZXGZWGPYDSSZZDQXSKCQNMJJZZBXYQMJRTFFBTKHZKBXLJJKDXJTLBWFZPPTKQTZTGPDGNTPJYFALQMKGXBDCLZFHZCLLLLADPMXDJHLCCLGYHDZFGYDDGCYYFGYDXKSSEBDHYKDKDKHNAXXYBPBYYHXZQGAFFQYJXDMLJCSQZLLPCHBSXGJYNDYBYQSPZWJLZKSDDTACTBXZDYZYPJZQSJNKKTKNJDJGYYPGTLFYQKASDNTCYHBLWDZHBBYDWJRYGKZYHEYYFJMSDTYFZJJHGCXPLXHLDWXXJKYTCYKSSSMTWCTTQZLPBSZDZWZXGZAGYKTYWXLHLSPBCLLOQMMZSSLCMBJCSZZKYDCZJGQQDSMCYTZQQLWZQZXSSFPTTFQMDDZDSHDTDWFHTDYZJYQJQKYPBDJYYXTLJHDRQXXXHAYDHRJLKLYTWHLLRLLRCXYLBWSRSZZSYMKZZHHKYHXKSMDSYDYCJPBZBSQLFCXXXNXKXWYWSDZYQOGGQMMYHCDZTTFJYYBGSTTTYBYKJDHKYXBELHTYPJQNFXFDYKZHQKZBYJTZBXHFDXKDASWTAWAJLDYJSFHBLDNNTNQJTJNCHXFJSRFWHZFMDRYJYJWZPDJKZYJYMPCYZNYNXFBYTFYFWYGDBNZZZDNYTXZEMMQBSQEHXFZMBMFLZZSRXYMJGSXWZJSPRYDJSJGXHJJGLJJYNZZJXHGXKYMLPYYYCXYTWQZSWHWLYRJLPXSLSXMFSWWKLCTNXNYNPSJSZHDZEPTXMYYWXYYSYWLXJQZQXZDCLEEELMCPJPCLWBXSQHFWWTFFJTNQJHJQDXHWLBYZNFJLALKYYJLDXHHYCSTYYWNRJYXYWTRMDRQHWQCMFJDYZMHMYYXJWMYZQZXTLMRSPWWCHAQBXYGZYPXYYRRCLMPYMGKSJSZYSRMYJSNXTPLNBAPPYPYLXYYZKYNLDZYJZCZNNLMZHHARQMPGWQTZMXXMLLHGDZXYHXKYXYCJMFFYYHJFSBSSQLXXNDYCANNMTCJCYPRRNYTYQNYYMBMSXNDLYLYSLJRLXYSXQMLLYZLZJJJKYZZCSFBZXXMSTBJGNXYZHLXNMCWSCYZYFZLXBRNNNYLBNRTGZQYSATSWRYHYJZMZDHZGZDWYBSSCSKXSYHYTXXGCQGXZZSHYXJSCRHMKKBXCZJYJYMKQHZJFNBHMQHYSNJNZYBKNQMCLGQHWLZNZSWXKHLJHYYBQLBFCDSXDLDSPFZPSKJYZWZXZDDXJSMMEGJSCSSMGCLXXKYYYLNYPWWWGYDKZJGGGZGGSYCKNJWNJPCXBJJTQTJWDSSPJXZXNZXUMELPXFSXTLLXCLJXJJLJZXCTPSWXLYDHLYQRWHSYCSQYYBYAYWJJJQFWQCQQCJQGXALDBZZYJGKGXPLTZYFXJLTPADKYQHPMATLCPDCKBMTXYBHKLENXDLEEGQDYMSAWHZMLJTWYGXLYQZLJEEYYBQQFFNLYXRDSCTGJGXYYNKLLYQKCCTLHJLQMKKZGCYYGLLLJDZGYDHZWXPYSJBZKDZGYZZHYWYFQYTYZSZYEZZLYMHJJHTSMQWYZLKYYWZCSRKQYTLTDXWCTYJKLWSQZWBDCQYNCJSRSZJLKCDCDTLZZZACQQZZDDXYPLXZBQJYLZLLLQDDZQJYJYJZYXNYYYNYJXKXDAZWYRDLJYYYRJLXLLDYXJCYWYWNQCCLDDNYYYNYCKCZHXXCCLGZQJGKWPPCQQJYSBZZXYJSQPXJPZBSBDSFNSFPZXHDWZTDWPPTFLZZBZDMYYPQJRSDZSQZSQXBDGCPZSWDWCSQZGMDHZXMWWFYBPDGPHTMJTHZSMMBGZMBZJCFZWFZBBZMQCFMBDMCJXLGPNJBBXGYHYYJGPTZGZMQBQTCGYXJXLWZKYDPDYMGCFTPFXYZTZXDZXTGKMTYBBCLBJASKYTSSQYYMSZXFJEWLXLLSZBQJJJAKLYLXLYCCTSXMCWFKKKBSXLLLLJYXTYLTJYYTDPJHNHNNKBYQNFQYYZBYYESSESSGDYHFHWTCJBSDZZTFDMXHCNJZYMQWSRYJDZJQPDQBBSTJGGFBKJBXTGQHNGWJXJGDLLTHZHHYYYYYYSXWTYYYCCBDBPYPZYCCZYJPZYWCBDLFWZCWJDXXHYHLHWZZXJTCZLCDPXUJCZZZLYXJJTXPHFXWPYWXZPTDZZBDZCYHJHMLXBQXSBYLRDTGJRRCTTTHYTCZWMXFYTWWZCWJWXJYWCSKYBZSCCTZQNHXNWXXKHKFHTSWOCCJYBCMPZZYKBNNZPBZHHZDLSYDDYTYFJPXYNGFXBYQXCBHXCPSXTYZDMKYSNXSXLHKMZXLYHDHKWHXXSSKQYHHCJYXGLHZXCSNHEKDTGZXQYPKDHEXTYKCNYMYYYPKQYYYKXZLTHJQTBYQHXBMYHSQCKWWYLLHCYYLNNEQXQWMCFBDCCMLJGGXDQKTLXKGNQCDGZJWYJJLYHHQTTTNWCHMXCXWHWSZJYDJCCDBQCDGDNYXZTHCQRXCBHZTQCBXWGQWYYBXHMBYMYQTYEXMQKYAQYRGYZSLFYKKQHYSSQYSHJGJCNXKZYCXSBXYXHYYLSTYCXQTHYSMGSCPMMGCCCCCMTZTASMGQZJHKLOSQYLSWTMXSYQKDZLJQQYPLSYCZTCQQPBBQJZCLPKHQZYYXXDTDDTSJCXFFLLCHQXMJLWCJCXTSPYCXNDTJSHJWXDQQJSKXYAMYLSJHMLALYKXCYYDMNMDQMXMCZNNCYBZKKYFLMCHCMLHXRCJJHSYLNMTJZGZGYWJXSRXCWJGJQHQZDQJDCJJZKJKGDZQGJJYJYLXZXXCDQHHHEYTMHLFSBDJSYYSHFYSTCZQLPBDRFRZTZYKYWHSZYQKWDQZRKMSYNBCRXQBJYFAZPZZEDZCJYWBCJWHYJBQSZYWRYSZPTDKZPFPBNZTKLQYHBBZPNPPTYZZYBQNYDCPJMMCYCQMCYFZZDCMNLFPBPLNGQJTBTTNJZPZBBZNJKLJQYLNBZQHKSJZNGGQSZZKYXSHPZSNBCGZKDDZQANZHJKDRTLZLSWJLJZLYWTJNDJZJHXYAYNCBGTZCSSQMNJPJYTYSWXZFKWJQTKHTZPLBHSNJZSYZBWZZZZLSYLSBJHDWWQPSLMMFBJDWAQYZTCJTBNNWZXQXCDSLQGDSDPDZHJTQQPSWLYYJZLGYXYZLCTCBJTKTYCZJTQKBSJLGMGZDMCSGPYNJZYQYYKNXRPWSZXMTNCSZZYXYBYHYZAXYWQCJTLLCKJJTJHGDXDXYQYZZBYWDLWQCGLZGJGQRQZCZSSBCRPCSKYDZNXJSQGXSSJMYDNSTZTPBDLTKZWXQWQTZEXNQCZGWEZKSSBYBRTSSSLCCGBPSZQSZLCCGLLLZXHZQTHCZMQGYZQZNMCOCSZJMMZSQPJYGQLJYJPPLDXRGZYXCCSXHSHGTZNLZWZKJCXTCFCJXLBMQBCZZWPQDNHXLJCTHYZLGYLNLSZZPCXDSCQQHJQKSXZPBAJYEMSMJTZDXLCJYRYYNWJBNGZZTMJXLTBSLYRZPYLSSCNXPHLLHYLLQQZQLXYMRSYCXZLMMCZLTZSDWTJJLLNZGGQXPFSKYGYGHBFZPDKMWGHCXMSGDXJMCJZDYCABXJDLNBCDQYGSKYDQTXDJJYXMSZQAZDZFSLQXYJSJZYLBTXXWXQQZBJZUFBBLYLWDSLJHXJYZJWTDJCZFQZQZZDZSXZZQLZCDZFJHYSPYMPQZMLPPLFFXJJNZZYLSJEYQZFPFZKSYWJJJHRDJZZXTXXGLGHYDXCSKYSWMMZCWYBAZBJKSHFHJCXMHFQHYXXYZFTSJYZFXYXPZLCHMZMBXHZZSXYFYMNCWDABAZLXKTCSHHXKXJJZJSTHYGXSXYYHHHJWXKZXSSBZZWHHHCWTZZZPJXSNXQQJGZYZYWLLCWXZFXXYXYHXMKYYSWSQMNLNAYCYSPMJKHWCQHYLAJJMZXHMMCNZHBHXCLXTJPLTXYJHDYYLTTXFSZHYXXSJBJYAYRSMXYPLCKDUYHLXRLNLLSTYZYYQYGYHHSCCSMZCTZQXKYQFPYYRPFFLKQUNTSZLLZMWWTCQQYZWTLLMLMPWMBZSSTZRBPDDTLQJJBXZCSRZQQYGWCSXFWZLXCCRSZDZMCYGGDZQSGTJSWLJMYMMZYHFBJDGYXCCPSHXNZCSBSJYJGJMPPWAFFYFNXHYZXZYLREMZGZCYZSSZDLLJCSQFNXZKPTXZGXJJGFMYYYSNBTYLBNLHPFZDCYFBMGQRRSSSZXYSGTZRNYDZZCDGPJAFJFZKNZBLCZSZPSGCYCJSZLMLRSZBZZLDLSLLYSXSQZQLYXZLSKKBRXBRBZCYCXZZZEEYFGKLZLYYHGZSGZLFJHGTGWKRAAJYZKZQTSSHJJXDCYZUYJLZYRZDQQHGJZXSSZBYKJPBFRTJXLLFQWJHYLQTYMBLPZDXTZYGBDHZZRBGXHWNJTJXLKSCFSMWLSDQYSJTXKZSCFWJLBXFTZLLJZLLQBLSQMQQCGCZFPBPHZCZJLPYYGGDTGWDCFCZQYYYQYSSCLXZSKLZZZGFFCQNWGLHQYZJJCZLQZZYJPJZZBPDCCMHJGXDQDGDLZQMFGPSYTSDYFWWDJZJYSXYYCZCYHZWPBYKXRYLYBHKJKSFXTZJMMCKHLLTNYYMSYXYZPYJQYCSYCWMTJJKQYRHLLQXPSGTLYYCLJSCPXJYZFNMLRGJJTYZBXYZMSJYJHHFZQMSYXRSZCWTLRTQZSSTKXGQKGSPTGCZNJSJCQCXHMXGGZTQYDJKZDLBZSXJLHYQGGGTHQSZPYHJHHGYYGKGGCWJZZYLCZLXQSFTGZSLLLMLJSKCTBLLZZSZMMNYTPZSXQHJCJYQXYZXZQZCPSHKZZYSXCDFGMWQRLLQXRFZTLYSTCTMJCXJJXHJNXTNRZTZFQYHQGLLGCXSZSJDJLJCYDSJTLNYXHSZXCGJZYQPYLFHDJSBPCCZHJJJQZJQDYBSSLLCMYTTMQTBHJQNNYGKYRQYQMZGCJKPDCGMYZHQLLSLLCLMHOLZGDYYFZSLJCQZLYLZQJESHNYLLJXGJXLYSYYYXNBZLJSSZCQQCJYLLZLTJYLLZLLBNYLGQCHXYYXOXCXQKYJXXXYKLXSXXYQXCYKQXQCSGYXXYQXYGYTQOHXHXPYXXXULCYEYCHZZCBWQBBWJQZSCSZSSLZYLKDESJZWMYMCYTSDSXXSCJPQQSQYLYYZYCMDJDZYWCBTJSYDJKCYDDJLBDJJSODZYSYXQQYXDHHGQQYQHDYXWGMMMAJDYBBBPPBCMUUPLJZSMTXERXJMHQNUTPJDCBSSMSSSTKJTSSMMTRCPLZSZMLQDSDMJMQPNQDXCFYNBFSDQXYXHYAYKQYDDLQYYYSSZBYDSLNTFQTZQPZMCHDHCZCWFDXTMYQSPHQYYXSRGJCWTJTZZQMGWJJTJHTQJBBHWZPXXHYQFXXQYWYYHYSCDYDHHQMNMTMWCPBSZPPZZGLMZFOLLCFWHMMSJZTTDHZZYFFYTZZGZYSKYJXQYJZQBHMBZZLYGHGFMSHPZFZSNCLPBQSNJXZSLXXFPMTYJYGBXLLDLXPZJYZJYHHZCYWHJYLSJEXFSZZYWXKZJLUYDTMLYMQJPWXYHXSKTQJEZRPXXZHHMHWQPWQLYJJQJJZSZCPHJLCHHNXJLQWZJHBMZYXBDHHYPZLHLHLGFWLCHYYTLHJXCJMSCPXSTKPNHQXSRTYXXTESYJCTLSSLSTDLLLWWYHDHRJZSFGXTSYCZYNYHTDHWJSLHTZDQDJZXXQHGYLTZPHCSQFCLNJTCLZPFSTPDYNYLGMJLLYCQHYSSHCHYLHQYQTMZYPBYWRFQYKQSYSLZDQJMPXYYSSRHZJNYWTQDFZBWWTWWRXCWHGYHXMKMYYYQMSMZHNGCEPMLQQMTCWCTMMPXJPJJHFXYYZSXZHTYBMSTSYJTTQQQYYLHYNPYQZLCYZHZWSMYLKFJXLWGXYPJYTYSYXYMZCKTTWLKSMZSYLMPWLZWXWQZSSAQSYXYRHSSNTSRAPXCPWCMGDXHXZDZYFJHGZTTSBJHGYZSZYSMYCLLLXBTYXHBBZJKSSDMALXHYCFYGMQYPJYCQXJLLLJGSLZGQLYCJCCZOTYXMTMTTLLWTGPXYMZMKLPSZZZXHKQYSXCTYJZYHXSHYXZKXLZWPSQPYHJWPJPWXQQYLXSDHMRSLZZYZWTTCYXYSZZSHBSCCSTPLWSSCJCHNLCGCHSSPHYLHFHHXJSXYLLNYLSZDHZXYLSXLWZYKCLDYAXZCMDDYSPJTQJZLNWQPSSSWCTSTSZLBLNXSMNYYMJQBQHRZWTYYDCHQLXKPZWBGQYBKFCMZWPZLLYYLSZYDWHXPSBCMLJBSCGBHXLQHYRLJXYSWXWXZSLDFHLSLYNJLZYFLYJYCDRJLFSYZFSLLCQYQFGJYHYXZLYLMSTDJCYHBZLLNWLXXYGYYHSMGDHXXHHLZZJZXCZZZCYQZFNGWPYLCPKPYYPMCLQKDGXZGGWQBDXZZKZFBXXLZXJTPJPTTBYTSZZDWSLCHZHSLTYXHQLHYXXXYYZYSWTXZKHLXZXZPYHGCHKCFSYHUTJRLXFJXPTZTWHPLYXFCRHXSHXKYXXYHZQDXQWULHYHMJTBFLKHTXCWHJFWJCFPQRYQXCYYYQYGRPYWSGSUNGWCHKZDXYFLXXHJJBYZWTSXXNCYJJYMSWZJQRMHXZWFQSYLZJZGBHYNSLBGTTCSYBYXXWXYHXYYXNSQYXMQYWRGYQLXBBZLJSYLPSYTJZYHYZAWLRORJMKSCZJXXXYXCHDYXRYXXJDTSQFXLYLTSFFYXLMTYJMJUYYYXLTZCSXQZQHZXLYYXZHDNBRXXXJCTYHLBRLMBRLLAXKYLLLJLYXXLYCRYLCJTGJCMTLZLLCYZZPZPCYAWHJJFYBDYYZSMPCKZDQYQPBPCJPDCYZMDPBCYYDYCNNPLMTMLRMFMMGWYZBSJGYGSMZQQQZTXMKQWGXLLPJGZBQCDJJJFPKJKCXBLJMSWMDTQJXLDLPPBXCWRCQFBFQJCZAHZGMYKPHYYHZYKNDKZMBPJYXPXYHLFPNYYGXJDBKXNXHJMZJXSTRSTLDXSKZYSYBZXJLXYSLBZYSLHXJPFXPQNBYLLJQKYGZMCYZZYMCCSLCLHZFWFWYXZMWSXTYNXJHPYYMCYSPMHYSMYDYSHQYZCHMJJMZCAAGCFJBBHPLYZYLXXSDJGXDHKXXTXXNBHRMLYJSLTXMRHNLXQJXYZLLYSWQGDLBJHDCGJYQYCMHWFMJYBMBYJYJWYMDPWHXQLDYGPDFXXBCGJSPCKRSSYZJMSLBZZJFLJJJLGXZGYXYXLSZQYXBEXYXHGCXBPLDYHWETTWWCJMBTXCHXYQXLLXFLYXLLJLSSFWDPZSMYJCLMWYTCZPCHQEKCQBWLCQYDPLQPPQZQFJQDJHYMMCXTXDRMJWRHXCJZYLQXDYYNHYYHRSLSRSYWWZJYMTLTLLGTQCJZYABTCKZCJYCCQLJZQXALMZYHYWLWDXZXQDLLQSHGPJFJLJHJABCQZDJGTKHSSTCYJLPSWZLXZXRWGLDLZRLZXTGSLLLLZLYXXWGDZYGBDPHZPBRLWSXQBPFDWOFMWHLYPCBJCCLDMBZPBZZLCYQXLDOMZBLZWPDWYYGDSTTHCSQSCCRSSSYSLFYBFNTYJSZDFNDPDHDZZMBBLSLCMYFFGTJJQWFTMTPJWFNLBZCMMJTGBDZLQLPYFHYYMJYLSDCHDZJWJCCTLJCLDTLJJCPDDSQDSSZYBNDBJLGGJZXSXNLYCYBJXQYCBYLZCFZPPGKCXZDZFZTJJFJSJXZBNZYJQTTYJYHTYCZHYMDJXTTMPXSPLZCDWSLSHXYPZGTFMLCJTYCBPMGDKWYCYZCDSZZYHFLYCTYGWHKJYYLSJCXGYWJCBLLCSNDDBTZBSCLYZCZZSSQDLLMQYYHFSLQLLXFTYHABXGWNYWYYPLLSDLDLLBJCYXJZMLHLJDXYYQYTDLLLBUGBFDFBBQJZZMDPJHGCLGMJJPGAEHHBWCQXAXHHHZCHXYPHJAXHLPHJPGPZJQCQZGJJZZUZDMQYYBZZPHYHYBWHAZYJHYKFGDPFQSDLZMLJXKXGALXZDAGLMDGXMWZQYXXDXXPFDMMSSYMPFMDMMKXKSYZYSHDZKXSYSMMZZZMSYDNZZCZXFPLSTMZDNMXCKJMZTYYMZMZZMSXHHDCZJEMXXKLJSTLWLSQLYJZLLZJSSDPPMHNLZJCZYHMXXHGZCJMDHXTKGRMXFWMCGMWKDTKSXQMMMFZZYDKMSCLCMPCGMHSPXQPZDSSLCXKYXTWLWJYAHZJGZQMCSNXYYMMPMLKJXMHLMLQMXCTKZMJQYSZJSYSZHSYJZJCDAJZYBSDQJZGWZQQXFKDMSDJLFWEHKZQKJPEYPZYSZCDWYJFFMZZYLTTDZZEFMZLBNPPLPLPEPSZALLTYLKCKQZKGENQLWAGYXYDPXLHSXQQWQCQXQCLHYXXMLYCCWLYMQYSKGCHLCJNSZKPYZKCQZQLJPDMDZHLASXLBYDWQLWDNBQCRYDDZTJYBKBWSZDXDTNPJDTCTQDFXQQMGNXECLTTBKPWSLCTYQLPWYZZKLPYGZCQQPLLKCCYLPQMZCZQCLJSLQZDJXLDDHPZQDLJJXZQDXYZQKZLJCYQDYJPPYPQYKJYRMPCBYMCXKLLZLLFQPYLLLMBSGLCYSSLRSYSQTMXYXZQZFDZUYSYZTFFMZZSMZQHZSSCCMLYXWTPZGXZJGZGSJSGKDDHTQGGZLLBJDZLCBCHYXYZHZFYWXYZYMSDBZZYJGTSMTFXQYXQSTDGSLNXDLRYZZLRYYLXQHTXSRTZNGZXBNQQZFMYKMZJBZYMKBPNLYZPBLMCNQYZZZSJZHJCTZKHYZZJRDYZHNPXGLFZTLKGJTCTSSYLLGZRZBBQZZKLPKLCZYSSUYXBJFPNJZZXCDWXZYJXZZDJJKGGRSRJKMSMZJLSJYWQSKYHQJSXPJZZZLSNSHRNYPZTWCHKLPSRZLZXYJQXQKYSJYCZTLQZYBBYBWZPQDWWYZCYTJCJXCKCWDKKZXSGKDZXWWYYJQYYTCYTDLLXWKCZKKLCCLZCQQDZLQLCSFQCHQHSFSMQZZLNBJJZBSJHTSZDYSJQJPDLZCDCWJKJZZLPYCGMZWDJJBSJQZSYZYHHXJPBJYDSSXDZNCGLQMBTSFSBPDZDLZNFGFJGFSMPXJQLMBLGQCYYXBQKDJJQYRFKZTJDHCZKLBSDZCFJTPLLJGXHYXZCSSZZXSTJYGKGCKGYOQXJPLZPBPGTGYJZGHZQZZLBJLSQFZGKQQJZGYCZBZQTLDXRJXBSXXPZXHYZYCLWDXJJHXMFDZPFZHQHQMQGKSLYHTYCGFRZGNQXCLPDLBZCSCZQLLJBLHBZCYPZZPPDYMZZSGYHCKCPZJGSLJLNSCDSLDLXBMSTLDDFJMKDJDHZLZXLSZQPQPGJLLYBDSZGQLBZLSLKYYHZTTNTJYQTZZPSZQZTLLJTYYLLQLLQYZQLBDZLSLYYZYMDFSZSNHLXZNCZQZPBWSKRFBSYZMTHBLGJPMCZZLSTLXSHTCSYZLZBLFEQHLXFLCJLYLJQCBZLZJHHSSTBRMHXZHJZCLXFNBGXGTQJCZTMSFZKJMSSNXLJKBHSJXNTNLZDNTLMSJXGZJYJCZXYJYJWRWWQNZTNFJSZPZSHZJFYRDJSFSZJZBJFZQZZHZLXFYSBZQLZSGYFTZDCSZXZJBQMSZKJRHYJZCKMJKHCHGTXKXQGLXPXFXTRTYLXJXHDTSJXHJZJXZWZLCQSBTXWXGXTXXHXFTSDKFJHZYJFJXRZSDLLLTQSQQZQWZXSYQTWGWBZCGZLLYZBCLMQQTZHZXZXLJFRMYZFLXYSQXXJKXRMQDZDMMYYBSQBHGZMWFWXGMXLZPYYTGZYCCDXYZXYWGSYJYZNBHPZJSQSYXSXRTFYZGRHZTXSZZTHCBFCLSYXZLZQMZLMPLMXZJXSFLBYZMYQHXJSXRXSQZZZSSLYFRCZJRCRXHHZXQYDYHXSJJHZCXZBTYNSYSXJBQLPXZQPYMLXZKYXLXCJLCYSXXZZLXDLLLJJYHZXGYJWKJRWYHCPSGNRZLFZWFZZNSXGXFLZSXZZZBFCSYJDBRJKRDHHGXJLJJTGXJXXSTJTJXLYXQFCSGSWMSBCTLQZZWLZZKXJMLTMJYHSDDBXGZHDLBMYJFRZFSGCLYJBPMLYSMSXLSZJQQHJZFXGFQFQBPXZGYYQXGZTCQWYLTLGWSGWHRLFSFGZJMGMGBGTJFSYZZGZYZAFLSSPMLPFLCWBJZCLJJMZLPJJLYMQDMYYYFBGYGYZMLYZDXQYXRQQQHSYYYQXYLJTYXFSFSLLGNQCYHYCWFHCCCFXPYLYPLLZYXXXXXKQHHXSHJZCFZSCZJXCPZWHHHHHAPYLQALPQAFYHXDYLUKMZQGGGDDESRNNZLTZGCHYPPYSQJJHCLLJTOLNJPZLJLHYMHEYDYDSQYCDDHGZUNDZCLZYZLLZNTNYZGSLHSLPJJBDGWXPCDUTJCKLKCLWKLLCASSTKZZDNQNTTLYYZSSYSSZZRYLJQKCQDHHCRXRZYDGRGCWCGZQFFFPPJFZYNAKRGYWYQPQXXFKJTSZZXSWZDDFBBXTBGTZKZNPZZPZXZPJSZBMQHKCYXYLDKLJNYPKYGHGDZJXXEAHPNZKZTZCMXCXMMJXNKSZQNMNLWBWWXJKYHCPSTMCSQTZJYXTPCTPDTNNPGLLLZSJLSPBLPLQHDTNJNLYYRSZFFJFQWDPHZDWMRZCCLODAXNSSNYZRESTYJWJYJDBCFXNMWTTBYLWSTSZGYBLJPXGLBOCLHPCBJLTMXZLJYLZXCLTPNCLCKXTPZJSWCYXSFYSZDKNTLBYJCYJLLSTGQCBXRYZXBXKLYLHZLQZLNZCXWJZLJZJNCJHXMNZZGJZZXTZJXYCYYCXXJYYXJJXSSSJSTSSTTPPGQTCSXWZDCSYFPTFBFHFBBLZJCLZZDBXGCXLQPXKFZFLSYLTUWBMQJHSZBMDDBCYSCCLDXYCDDQLYJJWMQLLCSGLJJSYFPYYCCYLTJANTJJPWYCMMGQYYSXDXQMZHSZXPFTWWZQSWQRFKJLZJQQYFBRXJHHFWJJZYQAZMYFRHCYYBYQWLPEXCCZSTYRLTTDMQLYKMBBGMYYJPRKZNPBSXYXBHYZDJDNGHPMFSGMWFZMFQMMBCMZZCJJLCNUXYQLMLRYGQZCYXZLWJGCJCGGMCJNFYZZJHYCPRRCMTZQZXHFQGTJXCCJEAQCRJYHPLQLSZDJRBCQHQDYRHYLYXJSYMHZYDWLDFRYHBPYDTSSCNWBXGLPZMLZZTQSSCPJMXXYCSJYTYCGHYCJWYRXXLFEMWJNMKLLSWTXHYYYNCMMCWJDQDJZGLLJWJRKHPZGGFLCCSCZMCBLTBHBQJXQDSPDJZZGHGLFQYWBZYZJLTSTDHQHCTCBCHFLQMPWDSHYYTQWCNZZJTLBYMBPDYYYXSQKXWYYFLXXNCWCXYPMAELYKKJMZZZBRXYYQJFLJPFHHHYTZZXSGQQMHSPGDZQWBWPJHZJDYSCQWZKTXXSQLZYYMYSDZGRXCKKUJLWPYSYSCSYZLRMLQSYLJXBCXTLWDQZPCYCYKPPPNSXFYZJJRCEMHSZMSXLXGLRWGCSTLRSXBZGBZGZTCPLUJLSLYLYMTXMTZPALZXPXJTJWTCYYZLBLXBZLQMYLXPGHDSLSSDMXMBDZZSXWHAMLCZCPJMCNHJYSNSYGCHSKQMZZQDLLKABLWJXSFMOCDXJRRLYQZKJMYBYQLYHETFJZFRFKSRYXFJTWDSXXSYSQJYSLYXWJHSNLXYYXHBHAWHHJZXWMYLJCSSLKYDZTXBZSYFDXGXZJKHSXXYBSSXDPYNZWRPTQZCZENYGCXQFJYKJBZMLJCMQQXUOXSLYXXLYLLJDZBTYMHPFSTTQQWLHOKYBLZZALZXQLHZWRRQHLSTMYPYXJJXMQSJFNBXYXYJXXYQYLTHYLQYFMLKLJTMLLHSZWKZHLJMLHLJKLJSTLQXYLMBHHLNLZXQJHXCFXXLHYHJJGBYZZKBXSCQDJQDSUJZYYHZHHMGSXCSYMXFEBCQWWRBPYYJQTYZCYQYQQZYHMWFFHGZFRJFCDPXNTQYZPDYKHJLFRZXPPXZDBBGZQSTLGDGYLCQMLCHHMFYWLZYXKJLYPQHSYWMQQGQZMLZJNSQXJQSYJYCBEHSXFSZPXZWFLLBCYYJDYTDTHWZSFJMQQYJLMQXXLLDTTKHHYBFPWTYYSQQWNQWLGWDEBZWCMYGCULKJXTMXMYJSXHYBRWFYMWFRXYQMXYSZTZZTFYKMLDHQDXWYYNLCRYJBLPSXCXYWLSPRRJWXHQYPHTYDNXHHMMYWYTZCSQMTSSCCDALWZTCPQPYJLLQZYJSWXMZZMMYLMXCLMXCZMXMZSQTZPPQQBLPGXQZHFLJJHYTJSRXWZXSCCDLXTYJDCQJXSLQYCLZXLZZXMXQRJMHRHZJBHMFLJLMLCLQNLDXZLLLPYPSYJYSXCQQDCMQJZZXHNPNXZMEKMXHYKYQLXSXTXJYYHWDCWDZHQYYBGYBCYSCFGPSJNZDYZZJZXRZRQJJYMCANYRJTLDPPYZBSTJKXXZYPFDWFGZZRPYMTNGXZQBYXNBUFNQKRJQZMJEGRZGYCLKXZDSKKNSXKCLJSPJYYZLQQJYBZSSQLLLKJXTBKTYLCCDDBLSPPFYLGYDTZJYQGGKQTTFZXBDKTYYHYBBFYTYYBCLPDYTGDHRYRNJSPTCSNYJQHKLLLZSLYDXXWBCJQSPXBPJZJCJDZFFXXBRMLAZHCSNDLBJDSZBLPRZTSWSBXBCLLXXLZDJZSJPYLYXXYFTFFFBHJJXGBYXJPMMMPSSJZJMTLYZJXSWXTYLEDQPJMYGQZJGDJLQJWJQLLSJGJGYGMSCLJJXDTYGJQJQJCJZCJGDZZSXQGSJGGCXHQXSNQLZZBXHSGZXCXYLJXYXYYDFQQJHJFXDHCTXJYRXYSQTJXYEFYYSSYYJXNCYZXFXMSYSZXYYSCHSHXZZZGZZZGFJDLTYLNPZGYJYZYYQZPBXQBDZTZCZYXXYHHSQXSHDHGQHJHGYWSZTMZMLHYXGEBTYLZKQWYTJZRCLEKYSTDBCYKQQSAYXCJXWWGSBHJYZYDHCSJKQCXSWXFLTYNYZPZCCZJQTZWJQDZZZQZLJJXLSBHPYXXPSXSHHEZTXFPTLQYZZXHYTXNCFZYYHXGNXMYWXTZSJPTHHGYMXMXQZXTSBCZYJYXXTYYZYPCQLMMSZMJZZLLZXGXZAAJZYXJMZXWDXZSXZDZXLEYJJZQBHZWZZZQTZPSXZTDSXJJJZNYAZPHXYYSRNQDTHZHYYKYJHDZXZLSWCLYBZYECWCYCRYLCXNHZYDZYDYJDFRJJHTRSQTXYXJRJHOJYNXELXSFSFJZGHPZSXZSZDZCQZBYYKLSGSJHCZSHDGQGXYZGXCHXZJWYQWGYHKSSEQZZNDZFKWYSSTCLZSTSYMCDHJXXYWEYXCZAYDMPXMDSXYBSQMJMZJMTZQLPJYQZCGQHXJHHLXXHLHDLDJQCLDWBSXFZZYYSCHTYTYYBHECXHYKGJPXHHYZJFXHWHBDZFYZBCAPNPGNYDMSXHMMMMAMYNBYJTMPXYYMCTHJBZYFCGTYHWPHFTWZZEZSBZEGPFMTSKFTYCMHFLLHGPZJXZJGZJYXZSBBQSCZZLZCCSTPGXMJSFTCCZJZDJXCYBZLFCJSYZFGSZLYBCWZZBYZDZYPSWYJZXZBDSYUXLZZBZFYGCZXBZHZFTPBGZGEJBSTGKDMFHYZZJHZLLZZGJQZLSFDJSSCBZGPDLFZFZSZYZYZSYGCXSNXXCHCZXTZZLJFZGQSQYXZJQDCCZTQCDXZJYQJQCHXZTDLGSCXZSYQJQTZWLQDQZTQCHQQJZYEZZZPBWKDJFCJPZTYPQYQTTYNLMBDKTJZPQZQZZFPZSBNJLGYJDXJDZZKZGQKXDLPZJTCJDQBXDJQJSTCKNXBXZMSLYJCQMTJQWWCJQNJNLLLHJCWQTBZQYDZCZPZZDZYDDCYZZZCCJTTJFZDPRRTZTJDCQTQZDTJNPLZBCLLCTZSXKJZQZPZLBZRBTJDCXFCZDBCCJJLTQQPLDCGZDBBZJCQDCJWYNLLZYZCCDWLLXWZLXRXNTQQCZXKQLSGDFQTDDGLRLAJJTKUYMKQLLTZYTDYYCZGJWYXDXFRSKSTQTENQMRKQZHHQKDLDAZFKYPBGGPZREBZZYKZZSPEGJXGYKQZZZSLYSYYYZWFQZYLZZLZHWCHKYPQGNPGBLPLRRJYXCCSYYHSFZFYBZYYTGZXYLXCZWXXZJZBLFFLGSKHYJZEYJHLPLLLLCZGXDRZELRHGKLZZYHZLYQSZZJZQLJZFLNBHGWLCZCFJYSPYXZLZLXGCCPZBLLCYBBBBUBBCBPCRNNZCZYRBFSRLDCGQYYQXYGMQZWTZYTYJXYFWTEHZZJYWLCCNTZYJJZDEDPZDZTSYQJHDYMBJNYJZLXTSSTPHNDJXXBYXQTZQDDTJTDYYTGWSCSZQFLSHLGLBCZPHDLYZJYCKWTYTYLBNYTSDSYCCTYSZYYEBHEXHQDTWNYGYCLXTSZYSTQMYGZAZCCSZZDSLZCLZRQXYYELJSBYMXSXZTEMBBLLYYLLYTDQYSHYMRQWKFKBFXNXSBYCHXBWJYHTQBPBSBWDZYLKGZSKYHXQZJXHXJXGNLJKZLYYCDXLFYFGHLJGJYBXQLYBXQPQGZTZPLNCYPXDJYQYDYMRBESJYYHKXXSTMXRCZZYWXYQYBMCLLYZHQYZWQXDBXBZWZMSLPDMYSKFMZKLZCYQYCZLQXFZZYDQZPZYGYJYZMZXDZFYFYTTQTZHGSPCZMLCCYTZXJCYTJMKSLPZHYSNZLLYTPZCTZZCKTXDHXXTQCYFKSMQCCYYAZHTJPCYLZLYJBJXTPNYLJYYNRXSYLMMNXJSMYBCSYSYLZYLXJJQYLDZLPQBFZZBLFNDXQKCZFYWHGQMRDSXYCYTXNQQJZYYPFZXDYZFPRXEJDGYQBXRCNFYYQPGHYJDYZXGRHTKYLNWDZNTSMPKLBTHBPYSZBZTJZSZZJTYYXZPHSSZZBZCZPTQFZMYFLYPYBBJQXZMXXDJMTSYSKKBJZXHJCKLPSMKYJZCXTMLJYXRZZQSLXXQPYZXMKYXXXJCLJPRMYYGADYSKQLSNDHYZKQXZYZTCGHZTLMLWZYBWSYCTBHJHJFCWZTXWYTKZLXQSHLYJZJXTMPLPYCGLTBZZTLZJCYJGDTCLKLPLLQPJMZPAPXYZLKKTKDZCZZBNZDYDYQZJYJGMCTXLTGXSZLMLHBGLKFWNWZHDXUHLFMKYSLGXDTWWFRJEJZTZHYDXYKSHWFZCQSHKTMQQHTZHYMJDJSKHXZJZBZZXYMPAGQMSTPXLSKLZYNWRTSQLSZBPSPSGZWYHTLKSSSWHZZLYYTNXJGMJSZSUFWNLSOZTXGXLSAMMLBWLDSZYLAKQCQCTMYCFJBSLXCLZZCLXXKSBZQCLHJPSQPLSXXCKSLNHPSFQQYTXYJZLQLDXZQJZDYYDJNZPTUZDSKJFSLJHYLZSQZLBTXYDGTQFDBYAZXDZHZJNHHQBYKNXJJQCZMLLJZKSPLDYCLBBLXKLELXJLBQYCXJXGCNLCQPLZLZYJTZLJGYZDZPLTQCSXFDMNYCXGBTJDCZNBGBQYQJWGKFHTNPYQZQGBKPBBYZMTJDYTBLSQMPSXTBNPDXKLEMYYCJYNZCTLDYKZZXDDXHQSHDGMZSJYCCTAYRZLPYLTLKXSLZCGGEXCLFXLKJRTLQJAQZNCMBYDKKCXGLCZJZXJHPTDJJMZQYKQSECQZDSHHADMLZFMMZBGNTJNNLGBYJBRBTMLBYJDZXLCJLPLDLPCQDHLXZLYCBLCXZZJADJLNZMMSSSMYBHBSQKBHRSXXJMXSDZNZPXLGBRHWGGFCXGMSKLLTSJYYCQLTSKYWYYHYWXBXQYWPYWYKQLSQPTNTKHQCWDQKTWPXXHCPTHTWUMSSYHBWCRWXHJMKMZNGWTMLKFGHKJYLSYYCXWHYECLQHKQHTTQKHFZLDXQWYZYYDESBPKYRZPJFYYZJCEQDZZDLATZBBFJLLCXDLMJSSXEGYGSJQXCWBXSSZPDYZCXDNYXPPZYDLYJCZPLTXLSXYZYRXCYYYDYLWWNZSAHJSYQYHGYWWAXTJZDAXYSRLTDPSSYYFNEJDXYZHLXLLLZQZSJNYQYQQXYJGHZGZCYJCHZLYCDSHWSHJZYJXCLLNXZJJYYXNFXMWFPYLCYLLABWDDHWDXJMCXZTZPMLQZHSFHZYNZTLLDYWLSLXHYMMYLMBWWKYXYADTXYLLDJPYBPWUXJMWMLLSAFDLLYFLBHHHBQQLTZJCQJLDJTFFKMMMBYTHYGDCQRDDWRQJXNBYSNWZDBYYTBJHPYBYTTJXAAHGQDQTMYSTQXKBTZPKJLZRBEQQSSMJJBDJOTGTBXPGBKTLHQXJJJCTHXQDWJLWRFWQGWSHCKRYSWGFTGYGBXSDWDWRFHWYTJJXXXJYZYSLPYYYPAYXHYDQKXSHXYXGSKQHYWFDDDPPLCJLQQEEWXKSYYKDYPLTJTHKJLTCYYHHJTTPLTZZCDLTHQKZXQYSTEEYWYYZYXXYYSTTJKLLPZMCYHQGXYHSRMBXPLLNQYDQHXSXXWGDQBSHYLLPJJJTHYJKYPPTHYYKTYEZYENMDSHLCRPQFDGFXZPSFTLJXXJBSWYYSKSFLXLPPLBBBLBSFXFYZBSJSSYLPBBFFFFSSCJDSTZSXZRYYSYFFSYZYZBJTBCTSBSDHRTJJBYTCXYJEYLXCBNEBJDSYXYKGSJZBXBYTFZWGENYHHTHZHHXFWGCSTBGXKLSXYWMTMBYXJSTZSCDYQRCYTWXZFHMYMCXLZNSDJTTTXRYCFYJSBSDYERXJLJXBBDEYNJGHXGCKGSCYMBLXJMSZNSKGXFBNBPTHFJAAFXYXFPXMYPQDTZCXZZPXRSYWZDLYBBKTYQPQJPZYPZJZNJPZJLZZFYSBTTSLMPTZRTDXQSJEHBZYLZDHLJSQMLHTXTJECXSLZZSPKTLZKQQYFSYGYWPCPQFHQHYTQXZKRSGTTSQCZLPTXCDYYZXSQZSLXLZMYCPCQBZYXHBSXLZDLTCDXTYLZJYYZPZYZLTXJSJXHLPMYTXCQRBLZSSFJZZTNJYTXMYJHLHPPLCYXQJQQKZZSCPZKSWALQSBLCCZJSXGWWWYGYKTJBBZTDKHXHKGTGPBKQYSLPXPJCKBMLLXDZSTBKLGGQKQLSBKKTFXRMDKBFTPZFRTBBRFERQGXYJPZSSTLBZTPSZQZSJDHLJQLZBPMSMMSXLQQNHKNBLRDDNXXDHDDJCYYGYLXGZLXSYGMQQGKHBPMXYXLYTQWLWGCPBMQXCYZYDRJBHTDJYHQSHTMJSBYPLWHLZFFNYPMHXXHPLTBQPFBJWQDBYGPNZTPFZJGSDDTQSHZEAWZZYLLTYYBWJKXXGHLFKXDJTMSZSQYNZGGSWQSPHTLSSKMCLZXYSZQZXNCJDQGZDLFNYKLJCJLLZLMZZNHYDSSHTHZZLZZBBHQZWWYCRZHLYQQJBEYFXXXWHSRXWQHWPSLMSSKZTTYGYQQWRSLALHMJTQJSMXQBJJZJXZYZKXBYQXBJXSHZTSFJLXMXZXFGHKZSZGGYLCLSARJYHSLLLMZXELGLXYDJYTLFBHBPNLYZFBBHPTGJKWETZHKJJXZXXGLLJLSTGSHJJYQLQZFKCGNNDJSSZFDBCTWWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY".charAt(n-19968))}return function(e,t){for(var i=t.ignoreMulti,n=t.splitChar,r=[""],o=0,a=0,s=e.length;a<s;a++){var l=e[a],u=l.length;if(1==u||14<o||i)for(var c=l.substring(0,1),h=0;h<r.length;h++)r[h]+=c;else{var p=r.slice(0),r=[];for(o++,h=0;h<u;h++){for(var d=p.slice(0),g=0;g<d.length;g++)d[g]+=l.charAt(h);r=r.concat(d)}}}return r.join(n||"").toLowerCase()}(r,t)}})},function(e,t){function i(e,t){return e<t}BI.Heap=function(e,t){this._items=e||[],this._size=this._items.length,this._comparator=t||i,this._heapify()},BI.Heap.prototype={constructor:BI.Heap,empty:function(){return 0===this._size},pop:function(){if(0!==this._size){var e=this._items[0],t=this._items.pop();return this._size--,0<this._size&&(this._items[0]=t,this._sinkDown(0)),e}},push:function(e){this._items[this._size++]=e,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var e=Math.floor((this._size+1)/2);0<=e;e--)this._sinkDown(e)},_bubbleUp:function(e){for(var t=this._items[e];0<e;){var i=Math.floor((e+1)/2)-1,n=this._items[i];if(this._comparator(n,t))return;this._items[i]=t,this._items[e]=n,e=i}},_sinkDown:function(e){for(var t=this._items[e];;){var i,n,r=2*(e+1)-1,o=2*(e+1),a=-1;if(r<this._size&&(i=this._items[r],this._comparator(i,t)&&(a=r)),o<this._size&&(n=this._items[o],this._comparator(n,t)&&(-1!==a&&!this._comparator(n,this._items[a])||(a=o))),-1===a)return;this._items[e]=this._items[a],this._items[a]=t,e=a}}}},function(e,t){BI.LinkHashMap=function(){this.array=[],this.map={}},BI.LinkHashMap.prototype={constructor:BI.LinkHashMap,has:function(e){return e in this.map},add:function(e,t){void 0!==e&&(e in this.map||this.array.push(e),this.map[e]=t)},remove:function(e){if(e in this.map){delete this.map[e];for(var t=0;t<this.array.length;t++)if(this.array[t]==e){this.array.splice(t,1);break}}},size:function(){return this.array.length},each:function(e,t){t=t||window;if(null!=(e=e||null)&&"function"==typeof e)for(var i=0;i<this.array.length;i++){var n=this.array[i],r=this.map[n];if(0==e.call(t,n,r,i,this.array,this.map))break}},get:function(e){return this.map[e]},toArray:function(){var i=[];return this.each(function(e,t){i.push(t)}),i}}},function(e,t){!function(){BI.LRU=function(e){this.size=0,this.limit=e,this.head=this.tail=undefined,this._keymap={}};var e=BI.LRU.prototype;e.put=function(e,t){var i;this.size===this.limit&&(i=this.shift());var n=this.get(e,!0);return n||(n={key:e},this._keymap[e]=n,this.tail?(this.tail.newer=n).older=this.tail:this.head=n,this.tail=n,this.size++),n.value=t,i},e.shift=function(){var e=this.head;return e&&(this.head=this.head.newer,this.head.older=undefined,e.newer=e.older=undefined,this._keymap[e.key]=undefined,this.size--),e},e.get=function(e,t){var i=this._keymap[e];if(i!==undefined)return i===this.tail||(i.newer&&(i===this.head&&(this.head=i.newer),i.newer.older=i.older),i.older&&(i.older.newer=i.newer),i.newer=undefined,i.older=this.tail,this.tail&&(this.tail.newer=i),this.tail=i),t?i:i.value},e.has=function(e){return null!=this._keymap[e]}}()},function(e,t){var n,i;n=function(e){return Math.floor(e/2)},i=_global.Int32Array||function(e){for(var t=[],i=e-1;0<=i;--i)t[i]=0;return t},BI.PrefixIntervalTree=function(e){var t;for(this._size=e.length,this._half=function(e){for(var t=1;t<e;)t*=2;return t}(this._size),this._heap=new i(2*this._half),t=0;t<this._size;++t)this._heap[this._half+t]=e[t];for(t=this._half-1;0<t;--t)this._heap[t]=this._heap[2*t]+this._heap[2*t+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(e,t){var i=this._half+e;for(this._heap[i]=t,i=n(i);0!==i;i=n(i))this._heap[i]=this._heap[2*i]+this._heap[2*i+1]},get:function(e){var t=this._half+e;return this._heap[t]},getSize:function(){return this._size},sumUntil:function(e){if(0===e)return 0;for(var t=this._half+e-1,i=this._heap[t];1!==t;t=n(t))t%2==1&&(i+=this._heap[t-1]);return i},sumTo:function(e){return this.sumUntil(e+1)},sum:function(e,t){return this.sumUntil(t)-this.sumUntil(e)},greatestLowerBound:function(e){if(e<0)return-1;var t=1;if(this._heap[t]<=e)return this._size;for(;t<this._half;){var i=this._heap[2*t];e<i?t*=2:(t=2*t+1,e-=i)}return t-this._half},greatestStrictLowerBound:function(e){if(e<=0)return-1;var t=1;if(this._heap[t]<e)return this._size;for(;t<this._half;){var i=this._heap[2*t];e<=i?t*=2:(t=2*t+1,e-=i)}return t-this._half},leastUpperBound:function(e){return this.greatestStrictLowerBound(e)+1},leastStrictUpperBound:function(e){return this.greatestLowerBound(e)+1}},BI.PrefixIntervalTree.uniform=function(e,t){for(var i=[],n=e-1;0<=n;--n)i[n]=t;return new BI.PrefixIntervalTree(i)},BI.PrefixIntervalTree.empty=function(e){return BI.PrefixIntervalTree.uniform(e,0)}},function(e,t){BI.Queue=function(e){this.capacity=e,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(e){return BI.contains(this.array,e)},indexOf:function(e){return BI.contains(this.array,e)},getElementByIndex:function(e){return this.array[e]},push:function(e){this.array.push(e),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(e){this.array.unshift(e),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(e){BI.remove(this.array,e)},splice:function(){this.array.splice.apply(this.array,arguments)},slice:function(){this.array.slice.apply(this.array,arguments)},size:function(){return this.array.length},each:function(e,t){t=t||window;if(null!=(e=e||null)&&"function"==typeof e)for(var i=0;i<this.array.length;i++){if(0==e.call(t,i,this.array[i],this.array))break}},toArray:function(){return this.array},fromArray:function(e){var i=this;BI.each(e,function(e,t){i.push(t)})},clear:function(){this.array.length=0}}},function(e,t){!function(){var p=function(e,t,i,n){this.height=e,this.width=t,this.x=i,this.y=n,this._indexMap={},this._indices=[]};p.prototype={constructor:p,addCellIndex:function(e){this._indexMap[e]||(this._indexMap[e]=!0,this._indices.push(e))},getCellIndices:function(){return this._indices}};BI.SectionManager=function(e){this._sectionSize=e||100,this._cellMetadata=[],this._sections={}},BI.SectionManager.prototype={constructor:BI.SectionManager,getCellIndices:function(e,t,i,n){var r={};return BI.each(this.getSections(e,t,i,n),function(e,t){BI.each(t.getCellIndices(),function(e,t){r[t]=t})}),BI.map(BI.keys(r),function(e,t){return r[t]})},getCellMetadata:function(e){return this._cellMetadata[e]},getSections:function(e,t,i,n){for(var r=Math.floor(i/this._sectionSize),o=Math.floor((i+t-1)/this._sectionSize),a=Math.floor(n/this._sectionSize),s=Math.floor((n+e-1)/this._sectionSize),l=[],u=r;u<=o;u++)for(var c=a;c<=s;c++){var h=u+"."+c;this._sections[h]||(this._sections[h]=new p(this._sectionSize,this._sectionSize,u*this._sectionSize,c*this._sectionSize)),l.push(this._sections[h])}return l},getTotalSectionCount:function(){return BI.size(this._sections)},registerCell:function(e,i){this._cellMetadata[i]=e,BI.each(this.getSections(e.height,e.width,e.x,e.y),function(e,t){t.addCellIndex(i)})}}}()},function(e,t){BI.Tree=function(){this.root=new BI.Node(BI.UUID())},BI.Tree.prototype={constructor:BI.Tree,addNode:function(e,t,i){BI.isNull(t)?this.root.addChild(e,i):BI.isNull(e)?this.root.addChild(t,i):e.addChild(t,i)},isRoot:function(e){return e===this.root},getRoot:function(){return this.root},clear:function(){this.root.clear()},initTree:function(e){var n=this;this.clear();var r=[];for(BI.each(e,function(e,t){var i=new BI.Node(t);i.set("data",t),n.addNode(i),r.push(i)});!BI.isEmpty(r);){var o=r.shift(),t=o.get("data");BI.each(t.children,function(e,t){var i=new BI.Node(t);i.set("data",t),r.push(i),n.addNode(o,i)})}},_toJSON:function(e){var i=this,n=[];return BI.each(e.getChildren(),function(e,t){n.push(i._toJSON(t))}),BI.extend({id:e.id},BI.deepClone(e.get("data")),0<n.length?{children:n}:{})},toJSON:function(e){var i=this,n=[];return BI.each((e||this.root).getChildren(),function(e,t){n.push(i._toJSON(t))}),n},_toJSONWithNode:function(e){var i=this,n=[];return BI.each(e.getChildren(),function(e,t){n.push(i._toJSONWithNode(t))}),BI.extend({id:e.id},BI.deepClone(e.get("data")),{node:e},0<n.length?{children:n}:{})},toJSONWithNode:function(e){var i=this,n=[];return BI.each((e||this.root).getChildren(),function(e,t){n.push(i._toJSONWithNode(t))}),n},search:function(e,i,n){if(!(e instanceof BI.Node))return arguments.callee.apply(this,[this.root,e,i]);var r=this,o=null;return BI.isNull(i)?null:BI.isEqual(e[n||"id"],i)?e:(BI.any(e.getChildren(),function(e,t){if(null!==(o=r.search(t,i,n)))return!0}),o)},_traverse:function(e,t){var i=[];for(i.push(e);!BI.isEmpty(i);){var n=i.shift(),r=t&&t(n);if(!1===r)break;!0!==r&&null!=n&&(i=i.concat(n.getChildren()))}},traverse:function(e){this._traverse(this.root,e)},_recursion:function(e,r,o){var a=this;return BI.every(e.getChildren(),function(e,t){var i=BI.clone(r);i.push(t.id);var n=o&&o(t,i);return!1!==n&&(!0===n||a._recursion(t,i,o))})},recursion:function(e){this._recursion(this.root,[],e)},inOrderTraverse:function(e){this._inOrderTraverse(this.root,e)},_inOrderTraverse:function(e,t){null!=e&&(this._inOrderTraverse(e.getLeft()),t&&t(e),this._inOrderTraverse(e.getRight()))},nrInOrderTraverse:function(e){for(var t=[],i=this.root;null!=i||!BI.isEmpty(t);){for(;null!=i;)t.push(i),i=i.getLeft();i=t.pop(),e&&e(i),i=i.getRight()}},preOrderTraverse:function(e){this._preOrderTraverse(this.root,e)},_preOrderTraverse:function(e,t){null!=e&&(t&&t(e),this._preOrderTraverse(e.getLeft()),this._preOrderTraverse(e.getRight()))},nrPreOrderTraverse:function(e){for(var t=[],i=this.root;null!=i||!BI.isEmpty(t);){for(;null!=i;)e&&e(i),t.push(i),i=i.getLeft();i=(i=t.pop()).getRight()}},postOrderTraverse:function(e){this._postOrderTraverse(this.root,e)},_postOrderTraverse:function(e,t){null!=e&&(this._postOrderTraverse(e.getLeft()),this._postOrderTraverse(e.getRight()),t&&t(e))},nrPostOrderTraverse:function(e){for(var t=[],i=this.root,n=null;null!=i||!BI.isEmpty(t);){for(;null!=i;)t.push(i),i=i.getLeft();i=null==(i=BI.last(t)).getRight()||i.getRight()==n?(e&&e(i),n=i=t.pop(),null):i.getRight()}}},BI.Node=function(e){BI.isObject(e)?BI.extend(this,e):this.id=e,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(e,t){BI.isObject(e)?BI.extend(this,e):this[e]=t},get:function(e){return this[e]},isLeaf:function(){return BI.isEmpty(this.children)},getChildren:function(){return this.children},getChildrenLength:function(){return this.children.length},getFirstChild:function(){return BI.first(this.children)},getLastChild:function(){return BI.last(this.children)},setLeft:function(e){this.left=e},getLeft:function(){return this.left},setRight:function(e){this.right=e},getRight:function(){return this.right},setParent:function(e){this.parent=e},getParent:function(){return this.parent},getChild:function(e){return this.children[e]},getChildIndex:function(i){return BI.findIndex(this.children,function(e,t){return t.get("id")===i})},removeChild:function(e){this.removeChildByIndex(this.getChildIndex(e))},removeChildByIndex:function(e){var t=this.getChild(e-1),i=this.getChild(e+1);null!=t&&t.setRight(i||null),null!=i&&i.setLeft(t||null),this.children.splice(e,1)},removeAllChilds:function(){this.children=[]},addChild:function(e,t){var i=null,i=BI.isUndefined(t)?this.children.length-1:t-1;e.setParent(this),0<=i&&(this.getChild(i)&&this.getChild(i).setRight(e),e.setLeft(this.getChild(i))),BI.isUndefined(t)?this.children.push(e):this.children.splice(t,0,e)},equals:function(e){return this===e||this.id===e.id},clear:function(){this.parent=null,this.left=null,this.right=null,this.children=[]}},BI.extend(BI.Tree,{transformToArrayFormat:function(e,t){if(!e)return[];var i=[];if(BI.isArray(e))for(var n=0,r=e.length;n<r;n++){var o=BI.clone(e[n]);o.pId=null==o.pId?t:o.pId,delete o.children,i.push(o),e[n].children&&(i=i.concat(BI.Tree.transformToArrayFormat(e[n].children,o.id)))}else{var a=BI.clone(e);a.pId=null==a.pId?t:a.pId,delete a.children,i.push(a),e.children&&(i=i.concat(BI.Tree.transformToArrayFormat(e.children,a.id)))}return i},arrayFormat:function(e,t){if(!e)return[];var i=[];if(BI.isArray(e))for(var n=0,r=e.length;n<r;n++){var o=e[n];o.pId=null==o.pId?t:o.pId,i.push(o),e[n].children&&(i=i.concat(BI.Tree.arrayFormat(e[n].children,o.id)))}else{var a=e;a.pId=null==a.pId?t:a.pId,i.push(a),e.children&&(i=i.concat(BI.Tree.arrayFormat(e.children,a.id)))}return i},transformToTreeFormat:function(e){if(!e)return[];if(BI.isArray(e)){for(var t=[],i={},n=0,r=e.length;n<r;n++){if(BI.isNull(e[n].id))return e;i[e[n].id]=BI.clone(e[n])}for(n=0,r=e.length;n<r;n++)i[e[n].pId]&&e[n].id!==e[n].pId?(i[e[n].pId].children||(i[e[n].pId].children=[]),i[e[n].pId].children.push(i[e[n].id])):t.push(i[e[n].id]),delete i[e[n].id].pId;return t}return[e]},treeFormat:function(e){if(!e)return[];if(BI.isArray(e)){for(var t=[],i={},n=0,r=e.length;n<r;n++){if(BI.isNull(e[n].id))return e;i[e[n].id]=e[n]}for(n=0,r=e.length;n<r;n++)i[e[n].pId]&&e[n].id!==e[n].pId?(i[e[n].pId].children||(i[e[n].pId].children=[]),i[e[n].pId].children.push(i[e[n].id])):t.push(i[e[n].id]);return t}return[e]},traversal:function(e,i){var n;BI.isNull(e)||(n=this,BI.some(e,function(e,t){return!1===i(e,t)||void n.traversal(t.children,i)}))}})},function(e,t){BI.Vector=function(e,t){this.x=e,this.y=t},BI.Vector.prototype={constructor:BI.Vector,cross:function(e){return this.x*e.y-this.y*e.x},length:function(e){return Math.sqrt(this.x*e.x+this.y*e.y)}},BI.Region=function(e,t,i,n){this.x=e,this.y=t,this.w=i,this.h=n},BI.Region.prototype={constructor:BI.Region,isIntersects:function(e){if(this.isPointInside(e.x,e.y)||this.isPointInside(e.x+e.w,e.y)||this.isPointInside(e.x,e.y+e.h)||this.isPointInside(e.x+e.w,e.y+e.h))return!0;if(e.isPointInside(this.x,this.y)||e.isPointInside(this.x+this.w,this.y)||e.isPointInside(this.x,this.y+this.h)||e.isPointInside(this.x+this.w,this.y+this.h))return!0;if(null!=e.x&&null!=e.y){var t=new BI.Vector(this.w,this.h),i=new BI.Vector(e.x-this.x,e.y-this.y),n=new BI.Vector(i.x+e.w,i.y+e.h);if(t.cross(i)*t.cross(n)<0)return!0}return!1},isPointInside:function(e,t){return null!=this.x&&null!=this.y&&(e>=this.x&&e<=this.x+this.w&&t>=this.y&&t<=this.y+this.h)},getPosition:function(){var e=[];return e.push(this.x+this.w/2),e.push(this.y+this.h/2),e}}},function(module,exports,__webpack_require__){(function(global){!function(){var _global;function isEmpty(e){return""===e||null===e||e===undefined}function isInvalidDate(e){return"Invalid Date"==e||"NaN"==e}function _eFormat(e,t){return function(e,t){var i=e<0?(e*=-1,"-"):"",n="",r=Math[0<e&&e<1?"floor":"ceil"](Math.log(e)/Math.log(10));if(!isFinite(r))return t.replace(/#/gi,"").replace(/\.e/gi,"E");0<(e/=Math.pow(10,r))&&e<1&&(e*=10,--r);var o=function(e,t){if(!/e/gi.test(t))return 0;var i,n,r=t.split(/e/gi)[0].split(".")[0],o=r.length,a=0;for(i=0;i<o;i++)(0==(n=r.charAt(i))||"#"==n&&o-i<=e+1)&&a++;return a}(r,t);1<o&&(r-=o-1,e*=Math.pow(10,o-1)),r<0&&(n="-",r*=-1);var a=function(e){if(!/e/gi.test(e))return 0;var t=e.split(/e/gi)[0].split(".");return 1<t.length?t[1].length:0}(t),s=function(e){var t=Math.round(e);return e=(e+"").split(".")[0],t=(t+"").split(".")[0],e.length!==t.length}(e);return e*=Math.pow(10,a),e=Math.round(e),s&&(e/=10,r+="-"===n?-1:1),e=(e/=Math.pow(10,a)).toFixed(a),r=function(e,t,i){if(t+="",!/e/gi.test(e))return t;e=e.split(/e/gi)[1];for(;t.length<e.length;)t="0"+t;for(var n=!0,r=0,o=t.length;r<o;r++)n=n&&"0"===t.charAt(r);return(i=n?"":i)+t}(t,r,n),i+e+"E"+r}(e=+e,t)}function _dealNumberPrecision(e,t){if(/[eE]/.test(e)){var i,n=0,r=0;/[%‰]$/.test(t)&&(n=/[%]$/.test(t)?2:3);for(var o=t.length;r<o;r++)"0"!=(i=t.charAt(r))&&"#"!=i||n++;return Number(e).toFixed(n)}return e}function _numberFormat(e,t){if(!/[0-9]/.test(e=e+"")||!t)return e;var i=t.indexOf(";");if(-1<i)return 0<=e?_numberFormat(e+"",t.substring(0,i)):_numberFormat(-e+"",t.substr(i+1));if(+e<0&&"-"!==t.charAt(0))return _numberFormat(-e+"","-"+t);var n,r=t.split("."),o=r[0]||"",a=r[1]||"",s=(e=_dealNumberPrecision(e,a)).split("."),l=s[0]||"",u=s[1]||"";/[%‰]$/.test(t)&&(l=(l+=(u+=n=/[%]$/.test(t)?"00":"000").substr(0,n.length)).replace(/^0+/gi,""),u=u.substr(n.length).replace(/0+$/gi,""));var c=_dealWithRight(u,a);c.leftPlus&&(l=parseInt(l)+1+"",l=isNaN(l)?"1":l),c=c.num;var h=_dealWithLeft(l,o);return/[0-9]/.test(h)||(h+="0"),/[0-9]/.test(c)?h+"."+c:h+c}function _dealWithRight(e,t){for(var i="",n=0,r=0,o=t.length;r<o;r++){var a=t.charAt(r),s=e.charAt(n);switch(a){case"0":isEmpty(s)&&(s="0"),i+=s,n++;break;case"#":i+=s,n++;break;default:i+=a}}var l,u,c,h,p=e.substr(n),d={};return!isEmpty(p)&&4<p.charAt(0)&&(d.leftPlus=!0,(l=i.match(/^[0-9]+/))&&(c=(u=l[0]).length,(h=parseInt(u)+1+"").length>c?h=h.substr(1):(h=BI.leftPad(h,c,"0"),d.leftPlus=!1),i=i.replace(/^[0-9]+/,h))),d.num=i,d}function _dealWithLeft(e,t){for(var i,n="",r=e.length-1,o=-1,a=-1,s=t.length-1;0<=s;s--){var l,u=t.charAt(s),c=e.charAt(r);switch(u){case"0":isEmpty(c)&&(c="0"),a=-1,n=c+n,r--;break;case"#":a=s,n=c+n,r--;break;case",":isEmpty(c)||((l=t.match(/,[#0]+/))&&(o=l[0].length-1),n=","+n);break;default:n=u+n}}if(-1<a&&(i=e.substr(0,r+1),n=n.substr(0,a)+i+n.substr(a)),0<o){var h=n.match(/[0-9]+,/);if(h){for(var p="",d=(h=h[0]).length-1-o;0<=d;d-=o)p=h.substr(d,o)+","+p;var g=h.substr(0,d+o);isEmpty(g)||(p=g+","+p)}n=n.replace(/[0-9]+,/,p)}return n}_global="undefined"!=typeof window?window:void 0!==global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(e){if("string"!=typeof e)return e;for(var t="",i=0;i<e.length;i++){var n=e.charCodeAt(i);t+=128<=n||91===n||93===n?"["+n.toString(16)+"]":e.charAt(i)}return t},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||-1==text.indexOf("["))return text;for(var newText="",i=0;i<text.length;i++){var ch=text.charAt(i),rightIdx,subText;"["==ch&&(rightIdx=text.indexOf("]",i+1),i+1<rightIdx&&(subText=text.substring(i+1,rightIdx),0<subText.length&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx)),newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"};BI.htmlEncode=function(e){return BI.isNull(e)?"":BI.replaceAll(e+"",'&|"|<|>',function(e){return SPECIAL_TAGS[e]?SPECIAL_TAGS[e]:" "})},BI.htmlDecode=function(e){return BI.isNull(e)?"":BI.replaceAll(e+"","&|"|<|>| ",function(e){switch(e){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(e){if(BI.isPlainObject(e)){var i={};return _.each(e,function(e,t){"string"!=typeof e&&(e=BI.jsonEncode(e)),t=BI.cjkEncode(t),i[t]=BI.cjkEncode(e)}),i}return e},BI.jsonEncode=function(e){var t,i=!!{}.hasOwnProperty,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};if(null==e)return"null";if(BI.isArray(e))return function(e){for(var t,i,n=["["],r=e.length,o=0;o<r;o+=1)switch(typeof(i=e[o])){case"undefined":case"function":case"unknown":break;default:t&&n.push(","),n.push(null===i?"null":BI.jsonEncode(i)),t=!0}return n.push("]"),n.join("")}(e);if(e instanceof Date)return BI.jsonEncode({__time__:e.getTime()});if("string"==typeof e)return/["\\\x00-\x1f]/.test(t=e)?'"'+t.replace(/([\x00-\x1f\\"])/g,function(e,t){var i=n[t];return i||(i=t.charCodeAt(),"\\u00"+Math.floor(i/16).toString(16)+(i%16).toString(16))})+'"':'"'+t+'"';if("number"==typeof e)return isFinite(e)?String(e):"null";if("boolean"==typeof e)return String(e);if(BI.isFunction(e))return String(e);var r,o,a,s=["{"];for(o in e)if(!i||e.hasOwnProperty(o))switch(typeof(a=e[o])){case"undefined":case"unknown":break;default:r&&s.push(","),s.push(BI.jsonEncode(o),":",null===a?"null":BI.jsonEncode(a)),r=!0}return s.push("}"),s.join("")},BI.jsonDecode=function(e){try{var t=BI.$?BI.$.parseJSON(e):_global.JSON.parse(e);null==t&&(t={})}catch(n){try{t=new Function("return "+e)()||{}}catch(n){}null==t&&(t=[])}if(!(i=e)||"string"!=typeof i||-1==i.indexOf("__time__"))return t;var i;return function(e){if("string"==typeof e)return e;if(e&&null!=e.__time__)return new Date(e.__time__);for(var t in e){if(e[t]==e||"object"==typeof e[t]||_.isFunction(e[t]))break;e[t]=arguments.callee(e[t])}return e}(t)},BI.getEncodeURL=function(e,i){return BI.replaceAll(e,"\\{(.*?)\\}",function(e,t){return BI.encodeURIComponent(BI.isObject(i)?i[t]:i)})},BI.encodeURIComponent=function(e){return BI.specialCharsMap=BI.specialCharsMap||{},e=e||"",e=BI.replaceAll(e+"",BI.keys(BI.specialCharsMap||[]).join("|"),function(e){switch(e){case"\\":return BI.specialCharsMap["\\\\"]||e;default:return BI.specialCharsMap[e]||e}}),_global.encodeURIComponent(e)},BI.decodeURIComponent=function(e){var i={};return BI.each(BI.specialCharsMap,function(e,t){i[t]="\\\\"===e?"\\":e}),e=e||"",e=BI.replaceAll(e+"",BI.keys(i||[]).join("|"),function(e){return i[e]||e}),_global.decodeURIComponent(e)},BI.contentFormat=function(e,t){if(isEmpty(e))return"";var i,n=e.toString();return isEmpty(t)||t.match(/^T/)?n:(t.match(/^D/)?(e instanceof Date||(e="number"==typeof e?new Date(e):new Date(Date.parse((""+e).replace(/-|\./g,"/")))),isInvalidDate(e)||BI.isNull(e)||(i=t.match(/^DT/),n=BI.date2Str(e,t.substring(i?2:1)))):n=(t.match(/E/)?_eFormat:_numberFormat)(n,t),n=n.replace(/¤/g,"¥"))},BI.parseFmt=function(e){return e?(e=String(e).replace(/y{4,}/g,"%Y").replace(/y{2}/g,"%y").replace(/M{4,}/g,"%b").replace(/M{3}/g,"%B").replace(/M{2}/g,"%X").replace(/M{1}/g,"%x").replace(/a{1}/g,"%p"),e=new RegExp("d{2,}","g").test(e)?e.replace(/d{2,}/g,"%d"):e.replace(/d{1}/g,"%e"),e=new RegExp("h{2,}","g").test(e)?e.replace(/h{2,}/g,"%I"):e.replace(/h{1}/g,"%I"),e=(e=new RegExp("H{2,}","g").test(e)?e.replace(/H{2,}/g,"%H"):e.replace(/H{1}/g,"%H")).replace(/m{2,}/g,"%M").replace(/s{2,}/g,"%S")):""},BI.str2Date=function(e,t){if("string"!=typeof e||"string"!=typeof t)return null;var i=BI.parseFmt(t);return BI.parseDateTime(e,i)},BI.date2Str=function(e,t){if(!e)return"";var i=t.length,n="";if(0<i){for(var r=t.charAt(0),o=0,a=r,s=1;s<i;s++){var l=t.charAt(s);r!==l?(n+=u({"char":r,str:a,len:s-o},e),o=s,a=r=l):a+=l}n+=u({"char":r,str:a,len:i-o},e)}return n;function u(e,t){var i=e.str,n=e.len;switch(e["char"]){case"E":i=BI.Date._DN[t.getDay()];break;case"y":i=n<=3?(t.getFullYear()+"").slice(2,4):t.getFullYear();break;case"M":i=2<n?BI.Date._MN[t.getMonth()]:n<2?t.getMonth()+1:BI.leftPad(t.getMonth()+1+"",2,"0");break;case"d":i=1<n?BI.leftPad(t.getDate()+"",2,"0"):t.getDate();break;case"h":var r=t.getHours()%12;0===r&&(r=12),i=1<n?BI.leftPad(r+"",2,"0"):r;break;case"H":i=1<n?BI.leftPad(t.getHours()+"",2,"0"):t.getHours();break;case"m":i=1<n?BI.leftPad(t.getMinutes()+"",2,"0"):t.getMinutes();break;case"s":i=1<n?BI.leftPad(t.getSeconds()+"",2,"0"):t.getSeconds();break;case"a":i=t.getHours()<12?"am":"pm";break;case"z":i=BI.getTimezone(t);break;default:i=e.str}return i}},BI.object2Number=function(e){if(null==e)return 0;if("number"==typeof e)return e;var t=e+"";return(-1===t.indexOf(".")?parseInt:parseFloat)(t)},BI.object2Date=function(e){if(null==e)return new Date;if(e instanceof Date)return e;if("number"==typeof e)return new Date(e);var t=(t=e+"").replace(/-/g,"/"),i=new Date(t);return isInvalidDate(i)?new Date:i},BI.object2Time=function(e){if(null==e)return new Date;if(e instanceof Date)return e;var t=(t=e+"").replace(/-/g,"/"),i=new Date(t);return isInvalidDate(i)&&(-1!==t.indexOf("/")||-1===t.indexOf(":")||isInvalidDate(i=new Date("1970/01/01 "+t)))&&isInvalidDate(i=BI.parseDateTime(t,"HH:mm:ss"))?new Date:i}}()}).call(this,__webpack_require__(10))},function(e,t){_.extend(BI,{pushArray:function(e,t){for(var i=0;i<t.length;i++)e.push(t[i])},pushDistinct:function(e,t){BI.contains(e,t)||e.push(t)},pushDistinctArray:function(e,t){for(var i=0,n=t.length;i<n;i++)BI.pushDistinct(e,t[i])}})},function(e,t){BI.Date=BI.Date||{},BI.Date.SECOND=1e3,BI.Date.MINUTE=60*BI.Date.SECOND,BI.Date.HOUR=60*BI.Date.MINUTE,BI.Date.DAY=24*BI.Date.HOUR,BI.Date.WEEK=7*BI.Date.DAY,_.extend(BI,{getTimezone:function(e){return e.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getMonthDays:function(e,t){var i=e.getFullYear();return void 0===t&&(t=e.getMonth()),0!=i%4||0==i%100&&0!=i%400||1!=t?BI.Date._MD[t]:29},getLastDateOfMonth:function(e){return BI.getDate(e.getFullYear(),e.getMonth(),BI.getMonthDays(e))},getDayOfYear:function(e){var t=BI.getDate(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0)-BI.getDate(e.getFullYear(),0,0,0,0,0);return Math.floor(t/BI.Date.DAY)},getWeekNumber:function(e){var t=BI.getDate(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),i=t.getDay(),n=BI.StartOfWeek%7,r=(3+n)%7,o=i<n?7+i-n:i-n,a=(r=r||7)<n?7+r-n:r-n;t.setDate(t.getDate()-o+a);var s=t.valueOf();return t.setMonth(0),t.setDate(1),Math.floor((s-t.valueOf())/6048e5)+1},getQuarter:function(e){return Math.floor(e.getMonth()/3)+1},getOffsetDate:function(e,t){return BI.getDate(BI.getTime(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds())+864e5*t)},getOffsetQuarter:function(e,t){var i=BI.getDate(BI.getTime(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds())),n=i.getDate(),r=BI.getMonthDays(BI.getDate(i.getFullYear(),i.getMonth()+3*BI.parseInt(t),1));return r<n&&(n=r),i.setDate(n),i.setMonth(i.getMonth()+3*parseInt(t)),i},getQuarterStartMonth:function(e){var t=0,i=e.getMonth();return i<3&&(t=0),2<i&&i<6&&(t=3),5<i&&i<9&&(t=6),8<i&&(t=9),t},getQuarterStartDate:function(e){return BI.getDate(e.getFullYear(),BI.getQuarterStartMonth(e),1)},getQuarterEndDate:function(e){var t=BI.getQuarterStartMonth(e)+2;return BI.getDate(e.getFullYear(),t,BI.getMonthDays(e,t))},getOffsetMonth:function(e,t){var i=BI.getDate(BI.getTime(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds())),n=i.getDate(),r=BI.getMonthDays(BI.getDate(i.getFullYear(),i.getMonth()+parseInt(t),1));return r<n&&(n=r),i.setDate(n),i.setMonth(i.getMonth()+parseInt(t)),i},getWeekStartDate:function(e){var t=e.getDay(),i=BI.StartOfWeek%7;return BI.getOffsetDate(e,BI.Date._OFFSET[t<i?7+t-i:t-i])},getWeekEndDate:function(e){var t=e.getDay(),i=BI.StartOfWeek%7;return BI.getOffsetDate(e,BI.Date._OFFSET[t<i?7+t-i:t-i]+6)},print:function(e,t){for(var i=e.getMonth(),n=e.getDate(),r=e.getFullYear(),o=r+"";o.length<4;)o="0"+o;var a=BI.getWeekNumber(e),s=BI.getQuarter(e),l=e.getDay(),u={},c=e.getHours(),h=12<=c,p=h?c-12:c,d=BI.getDayOfYear(e);0==p&&(p=12);var g=e.getMinutes(),I=e.getSeconds();u["%a"]=BI.Date._SDN[l],u["%A"]=BI.Date._DN[l],u["%b"]=BI.Date._SMN[i],u["%B"]=BI.Date._MN[i],u["%C"]=1+Math.floor(r/100),u["%d"]=n<10?"0"+n:n,u["%e"]=n,u["%H"]=c<10?"0"+c:c,u["%I"]=p<10?"0"+p:p,u["%j"]=d<100?d<10?"00"+d:"0"+d:d,u["%k"]=c+"",u["%l"]=p+"",u["%X"]=i<9?"0"+(1+i):1+i,u["%x"]=i+1,u["%M"]=g<10?"0"+g:g,u["%n"]="\n",u["%p"]=h?"PM":"AM",u["%P"]=h?"pm":"am",u["%s"]=Math.floor(e.getTime()/1e3),u["%S"]=I<10?"0"+I:I,u["%t"]="\t",u["%U"]=u["%W"]=u["%V"]=a<10?"0"+a:a,u["%u"]=l+1,u["%w"]=l,u["%y"]=o.substr(2,2),u["%Y"]=o,u["%%"]="%",u["%Q"]=s;var B=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(-1===t.indexOf("%Y")&&-1===t.indexOf("%y")||-1===t.indexOf("%W")&&-1===t.indexOf("%U")&&-1===t.indexOf("%V")))switch(a){case 1:11===i&&(u["%y"]=parseInt(u["%y"])+1,u["%Y"]=parseInt(u["%Y"])+1);break;case 53:0===i&&(u["%y"]=parseInt(u["%y"])-1,u["%Y"]=parseInt(u["%Y"])-1)}if(!BI.isKhtml())return t.replace(B,function(e){return u[e]||e});for(var E=t.match(B),f=0;f<E.length;f++){var _=u[E[f]];_&&(B=new RegExp(E[f],"g"),t=t.replace(B,_))}return t}})},function(e,t){BI.Func={},_.extend(BI.Func,{createDistinctName:function(e,i){var t=i,n=1;for(i=i||"";!BI.every(e,function(e,t){return BI.isKey(t)?t!==i:t.name!==i});)i=t+n++;return i},getGBWidth:function(e){return e=(e+="").replace(/[^\x00-\xff]/g,"xx"),Math.ceil(e.length/2)},getSearchResult:function(e,i,n){var r,o,a,s=BI.isArray(e);if(e=s?BI.flatten(e):e,n=n||"text",!BI.isKey(i))return{find:BI.deepClone(e),match:s?[]:{}};i=BI.toUpperCase(i);var l=s?[]:{},u=s?[]:{};return BI.each(e,function(e,t){BI.isNull(t)||(t=BI.deepClone(t),r=BI.stripEL(t),o=BI.find([r[n],r.text,r.value,r.name,r],function(e,t){return BI.isNotNull(t)}),BI.isNull(o)||BI.isObject(o)||(a=BI.makeFirstPY(o,{splitChar:""}),o=BI.toUpperCase(o),a=BI.toUpperCase(a),-1<o.indexOf(i)?o===i?s?l.push(t):l[e]=t:s?u.push(t):u[e]=t:-1<a.indexOf(i)&&(o===i||i.length===o.length?s?l.push(t):l[e]=t:s?u.push(t):u[e]=t)))}),{match:l,find:u}}}),_.extend(BI,{beforeFunc:function(e,t){var i=e;return function(){return!1!==t.apply(e,arguments)&&i.apply(e,arguments)}},afterFunc:function(t,i){var n=t;return function(){var e=n.apply(t,arguments);return!1!==e&&(i.apply(t,arguments),e)}}})},function(e,t){_.extend(BI,{add:function(e,t){return function(e,t){var i,n,r,o;try{i=e.toString().split(".")[1].length}catch(s){i=0}try{n=t.toString().split(".")[1].length}catch(s){n=0}{var a;o=Math.abs(i-n),r=Math.pow(10,Math.max(i,n)),t=0<o?(a=Math.pow(10,o),n<i?(e=Number(e.toString().replace(".","")),Number(t.toString().replace(".",""))*a):(e=Number(e.toString().replace(".",""))*a,Number(t.toString().replace(".","")))):(e=Number(e.toString().replace(".","")),Number(t.toString().replace(".","")))}return(e+t)/r}(t,e)},sub:function(e,t){var i,n,r;try{i=e.toString().split(".")[1].length}catch(o){i=0}try{n=t.toString().split(".")[1].length}catch(o){n=0}return r=Math.pow(10,Math.max(i,n)),((e*r-t*r)/r).toFixed(n<=i?i:n)},mul:function(e,t){return function(e,t){var i=0,n=e.toString(),r=t.toString();try{i+=n.split(".")[1].length}catch(o){}try{i+=r.split(".")[1].length}catch(o){}return Number(n.replace(".",""))*Number(r.replace(".",""))/Math.pow(10,i)}(t,e)},div:function(e,t){return r(e,t);function s(e){var t=e.toString().split(/[eE]/),i=(t[0].split(".")[1]||"").length-(t[1]||0);return 0<i?i:0}function l(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));var t=s(e);return 0<t?e*Math.pow(10,t):e}function u(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];if(0<i.length)return u.apply(void 0,[u(e,t),i[0]].concat(i.slice(1)));var r=l(e),o=l(t),a=s(e)+s(t);return r*o/Math.pow(10,a)}function r(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];return 0<i.length?r.apply(void 0,[r(e,t),i[0]].concat(i.slice(1))):u(l(e)/l(t),Math.pow(10,s(t)-s(e)))}}})},function(e,t){_.extend(BI,{startWith:function(e,t){return e=e||"",!(null==t||""==t||0===e.length||t.length>e.length)&&e.substr(0,t.length)==t},endWith:function(e,t){return!(null==t||""==t||0===e.length||t.length>e.length)&&e.substring(e.length-t.length)==t},getQuery:function(e,t){var i=new RegExp("(^|&)"+t+"=([^&]*)(&|$)"),n=e.substr(e.indexOf("?")+1).match(i);return n?unescape(n[2]):null},appendQuery:function(e,t){if(!t)return e;var i=e;return-1===i.indexOf("?")&&(i+="?"),!1!==BI.endWith(i,"?")||(i+="&"),_.each(t,function(e,t){"string"==typeof t&&(i+=t+"="+e+"&")}),i=i.substr(0,i.length-1)},replaceAll:function(e,t,i){return e.replace(new RegExp(t,"gm"),i)},perfectStart:function(e,t){return BI.startWith(e,t)?e:t+e},allIndexOf:function(e,t){if("string"!=typeof t)return[];for(var i=[],n=0;0<e.length;){var r=e.indexOf(t);if(-1===r)break;i.push(n+r),e=e.substring(r+t.length,e.length),n+=r+t.length}return i}})},function(e,t){var a;a={},_.extend(BI,{addI18n:function(e){BI.extend(a,e)},i18nText:function(e){o=(o=a[e]||BI.i18n&&BI.i18n[e]||"")||e;var t=arguments.length;if(1<t){if(!(-1<o.indexOf("{R1}"))){var i=Array.prototype.slice.call(arguments),n=1;return BI.replaceAll(o,"\\{\\s*\\}",function(){return i[n++]+""})}for(var r=1;r<t;r++)var e="{R"+r+"}",o=BI.replaceAll(o,e,arguments[r]+"")}return o}})},function(e,t){!function(){var i={};BI.module=function(e,t){null!=i[e]&&_global.console&&console.error("module:["+e+"] has been registed"),i[e]=t};var n={};BI.constant=function(e,t){null!=n[e]&&_global.console&&console.error("constant:["+e+"] has been registed"),n[e]=t};var r={};BI.model=function(e,t){null!=r[e]&&_global.console&&console.error("model:["+e+"] has been registed"),r[e]=t};var o={};BI.store=function(e,t){null!=o[e]&&_global.console&&console.error("store:["+e+"] has been registed"),o[e]=t};var a={};BI.service=function(e,t){null!=a[e]&&_global.console&&console.error("service:["+e+"] has been registed"),a[e]=t};var s={};BI.provider=function(e,t){null!=s[e]&&_global.console&&console.error("provider:["+e+"] has been registed"),s[e]=t};var l={};BI.config=function(i,e){if(BI.initialized)return n[i]?n[i]=e(n[i]):s[i]?(I[i]||(I[i]=new s[i]),e(I[i])):BI.Plugin.configWidget(i,e);l[i]||(l[i]=[],BI.prepares.push(function(){for(var e=l[i],t=0;t<e.length;t++)n[i]?n[i]=e[t](n[i]):s[i]?(I[i]||(I[i]=new s[i]),e[t](I[i])):BI.Plugin.configWidget(i,e[t]);l[i]=null})),l[i].push(e)};var u={},c=[];BI.action=function(t,i){return BI.isFunction(t)?(c.push(t),function(){BI.remove(c,function(e){return c.indexOf(i)===e})}):(u[t]||(u[t]=[]),u[t].push(i),function(){BI.remove(u[t],function(e){return u[t].indexOf(i)===e}),0===u[t].length&&delete u[t]})};var h={};BI.point=function(e,t,i,n){h[e]||(h[e]={}),h[e][t]||(h[e][t]={}),h[e][t][n?"after":"before"]||(h[e][t][n?"after":"before"]=[]),h[e][t][n?"after":"before"].push(i)},BI.Modules={getModule:function(e){return i[e]?i[e]:(_global.console&&console.error("module:["+e+"] does not exists"),!1)},getAllModules:function(){return i}},BI.Constants={getConstant:function(e){return n[e]}};var p=function(o,e){e=BI.isArray(e)?e:[e],BI.each(e,function(e,t){if(h[t])for(var i in h[t]){var n=h[t][i].before;n&&BI.aspect.before(o,i,function(n){return function(){for(var e=0,t=n.length;e<t;e++)try{n[e].apply(o,arguments)}catch(i){_global.console&&console.error(i)}}}(n));var r=h[t][i].after;r&&BI.aspect.after(o,i,function(n){return function(){for(var e=0,t=n.length;e<t;e++)try{n[e].apply(o,arguments)}catch(i){_global.console&&console.error(i)}}}(r))}})};BI.Models={getModel:function(e,t){var i=new r[e](t);return i._constructor&&i._constructor(t),i.mixins&&p(i,i.mixins),p(i,e),i}};var d={};BI.Stores={getStore:function(e,t){if(d[e])return d[e];var i=d[e]=new o[e](t);return i._constructor&&i._constructor(t),p(i,e),i}};var g={};BI.Services={getService:function(e,t){return g[e]||(g[e]=new a[e](t),p(g[e],e)),g[e]}};var I={},B={};BI.Providers={getProvider:function(e,t){return I[e]||(I[e]=new s[e]),B[e]||(B[e]=new(I[e].$get())(t)),B[e]}},BI.Actions={runAction:function(e,n,r){BI.each(u[e],function(e,t){try{t(n,r)}catch(i){_global.console&&console.error(i)}})},runGlobalAction:function(){var n=[].slice.call(arguments);BI.each(c,function(e,t){try{t.apply(null,n)}catch(i){_global.console&&console.error(i)}})}},BI.getContext=function(e,t){return n[e]?BI.Constants.getConstant(e):r[e]?BI.Models.getModel(e,t):o[e]?BI.Stores.getStore(e,t):a[e]?BI.Services.getService(e,t):s[e]?BI.Providers.getProvider(e,t):void 0}}()},function(e,t){_.extend(BI,{MAX:0x1000000000000000,MIN:-0x1000000000000000,EVENT_RESPONSE_TIME:200,zIndex_layer:1e5,zIndex_popover:1e6,zIndex_popup:1e7,zIndex_masker:1e8,zIndex_tip:1e9,emptyStr:"",emptyFn:function(){},empty:null,Key:{48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/"},KeyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},Status:{SUCCESS:1,WRONG:2,START:3,END:4,WAITING:5,READY:6,RUNNING:7,OUTOFBOUNDS:8,NULL:-1},Direction:{Top:"top",Bottom:"bottom",Left:"left",Right:"right",Custom:"custom"},Axis:{Vertical:"vertical",Horizontal:"horizontal"},Selection:{Default:-2,None:-1,Single:0,Multi:1,All:2},HorizontalAlign:{Left:"left",Right:"right",Center:"center",Stretch:"stretch"},VerticalAlign:{Middle:"middle",Top:"top",Bottom:"bottom",Stretch:"stretch"},StartOfWeek:1})},function(e,t){var i;i={},BI.BufferPool={put:function(e,t){if(BI.isNotNull(i[e]))throw new Error("Buffer Pool has the key already!");i[e]=t},get:function(e){return i[e]}}},function(e,t){var n;n={},BI.SharingPool={_Shared:n,put:function(e,t){n[e]=t},cat:function(){for(var e=Array.prototype.slice.call(arguments,0),t=n,i=0;i<e.length;i++)t=t&&t[e[i]];return t},get:function(){return BI.deepClone(this.cat.apply(this,arguments))},remove:function(e){delete n[e]}}},function(e,t){BI.Req={}},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){BI.Widget=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Widget.superclass._defaultConfig.apply(this),{root:!1,tagName:"div",attributes:null,data:null,tag:null,disabled:!1,invisible:!1,invalid:!1,baseCls:"",extraCls:"",cls:"",css:null})},_constructor:function(){},beforeInit:null,beforeCreate:null,created:null,render:null,beforeMount:null,mounted:null,shouldUpdate:null,update:function(){},beforeDestroy:null,destroyed:null,_init:function(){BI.Widget.superclass._init.apply(this,arguments),this._initRoot(),this._initElementWidth(),this._initElementHeight(),this._initVisual(),this._initState(),this._initRender()},_initRender:function(){this.beforeInit?(this.__asking=!0,this.beforeInit(BI.bind(this._render,this)),!0===this.__asking&&(this.__async=!0)):this._render()},_render:function(){this.__asking=!1,this.beforeCreate&&this.beforeCreate(),this._initElement(),this._initEffects(),this.created&&this.created()},_initRoot:function(){var e=this.options;this.widgetName=e.widgetName||BI.uniqueId("widget"),this._isRoot=e.root,BI.isWidget(e.element)?(e.element instanceof BI.Widget?(this._parent=e.element,this._parent.addWidget(this.widgetName,this)):this._isRoot=!0,this.element=this.options.element.element):e.element?(this.element=BI.Widget._renderEngine.createElement(this),this._isRoot=!0):this.element=BI.Widget._renderEngine.createElement(this),this.element._isWidget=!0,(e._baseCls||e.baseCls||e.extraCls||e.cls)&&this.element.addClass((e._baseCls||"")+" "+(e.baseCls||"")+" "+(e.extraCls||"")+" "+(e.cls||"")),e.attributes&&this.element.attr(e.attributes),e.data&&this.element.data(e.data),e.css&&this.element.css(e.css),this._children={}},_initElementWidth:function(){var e=this.options;BI.isWidthOrHeight(e.width)&&this.element.css("width",e.width)},_initElementHeight:function(){var e=this.options;BI.isWidthOrHeight(e.height)&&this.element.css("height",e.height)},_initVisual:function(){this.options.invisible&&this.element.css("display","none")},_initEffects:function(){var e=this.options;(e.disabled||e.invalid)&&(this.options.disabled&&this.setEnable(!1),this.options.invalid&&this.setValid(!1))},_initState:function(){this._isMounted=!1},_initElement:function(){var i=this,e=this.render&&this.render();BI.isPlainObject(e)&&(e=[e]),BI.isArray(e)&&BI.each(e,function(e,t){BI.createWidget(t,{element:i})}),this._mount()},_setParent:function(e){this._parent=e},_mount:function(i,n,r,o){var a=this;return!!(i||!this._isMounted&&this.isVisible()&&!0!==this.__asking&&(!0===this._isRoot||this._parent&&!0===this._parent._isMounted))&&(!1!==r&&this.beforeMount&&this.beforeMount(),this._isMounted=!0,this._mountChildren&&this._mountChildren(),BI.each(this._children,function(e,t){a.isEnabled()||t._setEnable(!1),a.isValid()||t._setValid(!1),t._mount&&t._mount(!!n&&i,n,r,o)}),!1!==r&&this.mounted&&this.mounted(),this.fireEvent(BI.Events.MOUNT),o&&o(this),!0)},_mountChildren:null,isMounted:function(){return this._isMounted},setWidth:function(e){this.options.width=e,this._initElementWidth()},setHeight:function(e){this.options.height=e,this._initElementHeight()},_setEnable:function(i){!0===i?this.options.disabled=!1:!1===i&&(this.options.disabled=!0),BI.each(this._children,function(e,t){!t._manualSetEnable&&t._setEnable&&t._setEnable(i)})},_setValid:function(i){!0===i?this.options.invalid=!1:!1===i&&(this.options.invalid=!0),BI.each(this._children,function(e,t){!t._manualSetValid&&t._setValid&&t._setValid(i)})},_setVisible:function(e){!0===e?this.options.invisible=!1:!1===e&&(this.options.invisible=!0)},setEnable:function(e){this._manualSetEnable=!0,this._setEnable(e),!0===e?this.element.removeClass("base-disabled disabled"):!1===e&&this.element.addClass("base-disabled disabled")},setVisible:function(e){this._setVisible(e),!0===e?(this.element.css("display",""),this._mount()):!1===e&&this.element.css("display","none"),this.fireEvent(BI.Events.VIEW,e)},setValid:function(e){this._manualSetValid=!0,this._setValid(e),!0===e?this.element.removeClass("base-invalid invalid"):!1===e&&this.element.addClass("base-invalid invalid")},doBehavior:function(){var i=arguments;BI.each(this._children,function(e,t){t.doBehavior&&t.doBehavior.apply(t,i)})},getWidth:function(){return this.options.width},getHeight:function(){return this.options.height},isValid:function(){return!this.options.invalid},addWidget:function(e,t){var i=this;if(e instanceof BI.Widget&&(e=(t=e).getName()),BI.isKey(e)&&(e+=""),e=e||t.getName()||BI.uniqueId("widget"),this._children[e])throw new Error("name has already been existed");return t._setParent&&t._setParent(this),t.on(BI.Events.DESTROY,function(){BI.remove(i._children,this)}),this._children[e]=t},getWidgetByName:function(i){if(!BI.isKey(i)||i===this.getName())return this;i+="";var n=void 0,r={};return BI.any(this._children,function(e,t){return e===i?(n=t,!0):void(r[e]=t)}),n||BI.any(r,function(e,t){return n=t.getWidgetByName(e)}),n},removeWidget:function(e){BI.isWidget(e)?BI.remove(this._children,e):delete this._children[e]},hasWidget:function(e){return null!=this._children[e]},getName:function(){return this.widgetName},setTag:function(e){this.options.tag=e},getTag:function(){return this.options.tag},attr:function(e,t){var i=this;if(!BI.isPlainObject(e))return BI.isNotNull(t)?this.options[e]=t:this.options[e];BI.each(e,function(e,t){i.attr(e,t)})},css:function(e,t){return this.element.css(e,t)},getText:function(){},setText:function(e){},getValue:function(){},setValue:function(e){},isEnabled:function(){return!this.options.disabled},isVisible:function(){return!this.options.invisible},disable:function(){this.setEnable(!1)},enable:function(){this.setEnable(!0)},valid:function(){this.setValid(!0)},invalid:function(){this.setValid(!1)},invisible:function(){this.setVisible(!1)},visible:function(){this.setVisible(!0)},__d:function(){this.beforeDestroy&&this.beforeDestroy(),this.beforeDestroy=null,BI.each(this._children,function(e,t){t&&t._unMount&&t._unMount()}),this._children={},this._parent=null,this._isMounted=!1,this.destroyed&&this.destroyed(),this.destroyed=null},_unMount:function(){this.__d(),this.fireEvent(BI.Events.UNMOUNT),this.purgeListeners()},isolate:function(){this._parent&&this._parent.removeWidget(this),BI.DOM.hang([this])},empty:function(){BI.each(this._children,function(e,t){t&&t._unMount&&t._unMount()}),this._children={},this.element.empty()},_destroy:function(){this.__d(),this.element.destroy(),this.purgeListeners()},destroy:function(){this.__d(),this.element.destroy(),this.fireEvent(BI.Events.DESTROY),this._purgeRef(),this.purgeListeners()}}),BI.Widget.registerRenderEngine=function(e){BI.Widget._renderEngine=e},BI.Widget.registerRenderEngine({createElement:function(e){if(BI.isWidget(e)){var t=e.options;return t.element?BI.$(t.element):BI.$(document.createElement(t.tagName))}return BI.$(e)},createFragment:function(){return document.createDocumentFragment()}}),BI.mount=function(e,t,i,n){if(!0!==n)return t&&BI.Widget._renderEngine.createElement(t).append(e.element),e._mount(!0,!1,!1,i);e.element.data("__widgets",[e]);var r=e._mount(!0,!1,!1,function(e){BI.each(e._children,function(e,t){var i=t.element.data("__widgets");(i=i||[]).push(t),t.element.data("__widgets",i)}),i&&i.apply(this,arguments)}),o=BI.Widget._renderEngine.createElement;BI.DOM.patchProps(e.element,o(o(t).children()[0]));var a=function(e){e.beforeMount&&e.beforeMount(),e.mounted&&e.mounted(),BI.each(e._children,function(e,t){a(t)})};return a(e),r}},function(e,t){!function(){var i={};BI.shortcut=BI.component=function(e,t){null!=i[e]&&_global.console&&console.error("shortcut:["+e+"] has been registed"),i[e]=t};var o=function(e){var t=new i[e.type];return t._initProps(e),t._init(),t._initRef(),t};BI.createWidget=function(e,t,i){var n,r;if(BI.init(),e=e||{},t=BI.isWidget(t)?{}:t||{},BI.isEmpty(e)&&BI.isEmpty(t))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(e))return e;if(e.type||t.type)return n=BI.extend({},t,e),(r=BI.Plugin.getWidget(n.type,n)).listeners=(r.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(n.type,this)}}]),r.type===n.type?o(r):BI.createWidget(BI.extend({},e,{type:r.type},t));if(e.el&&(e.el.type||t.type))return n=BI.extend({},t,e.el),(r=BI.Plugin.getWidget(n.type,n)).listeners=(r.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(n.type,this)}}]),r.type===n.type?o(r):BI.createWidget(BI.extend({},e,{type:r.type},t));if(BI.isWidget(e.el))return e.el;throw new Error("无法根据item创建组件")},BI.createElement=function(){return BI.createWidget.apply(this,arguments).element}}()},function(e,t){var i,n;i=_global.cancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.mozCancelAnimationFrame||_global.oCancelAnimationFrame||_global.msCancelAnimationFrame||_global.clearTimeout,n=_global.requestAnimationFrame||_global.webkitRequestAnimationFrame||_global.mozRequestAnimationFrame||_global.oRequestAnimationFrame||_global.msRequestAnimationFrame||_global.setTimeout,BI.MouseMoveTracker=function(e,t,i){this._isDragging=!1,this._animationFrameID=null,this._domNode=i,this._onMove=e,this._onMoveEnd=t,this._onMouseMove=BI.bind(this._onMouseMove,this),this._onMouseUp=BI.bind(this._onMouseUp,this),this._didMouseMove=BI.bind(this._didMouseMove,this)},BI.MouseMoveTracker.prototype={constructor:BI.MouseMoveTracker,captureMouseMoves:function(e){this._eventMoveToken||this._eventUpToken||(this._eventMoveToken=BI.EventListener.listen(this._domNode,"mousemove",this._onMouseMove),this._eventUpToken=BI.EventListener.listen(this._domNode,"mouseup",this._onMouseUp)),this._isDragging||(this._deltaX=0,this._deltaY=0,this._isDragging=!0,this._x=e.clientX,this._y=e.clientY),e.preventDefault?e.preventDefault():e.returnValue=!1},releaseMouseMoves:function(){this._eventMoveToken&&this._eventUpToken&&(this._eventMoveToken.remove(),this._eventMoveToken=null,this._eventUpToken.remove(),this._eventUpToken=null),null!==this._animationFrameID&&(i(this._animationFrameID),this._animationFrameID=null),this._isDragging&&(this._isDragging=!1,this._x=null,this._y=null)},isDragging:function(){return this._isDragging},_onMouseMove:function(e){var t=e.clientX,i=e.clientY;this._deltaX+=t-this._x,this._deltaY+=i-this._y,null===this._animationFrameID&&(this._animationFrameID=n(this._didMouseMove)),this._x=t,this._y=i,e.preventDefault?e.preventDefault():e.returnValue=!1},_didMouseMove:function(){this._animationFrameID=null,this._onMove(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0},_onMouseUp:function(){this._animationFrameID&&this._didMouseMove(),this._onMoveEnd()}}},function(e,t){var p;p=_global.requestAnimationFrame||_global.webkitRequestAnimationFrame||_global.mozRequestAnimationFrame||_global.oRequestAnimationFrame||_global.msRequestAnimationFrame||_global.setTimeout,BI.WheelHandler=function(e,t,i,n){this._animationFrameID=null,this._deltaX=0,this._deltaY=0,this._didWheel=BI.bind(this._didWheel,this),"function"!=typeof t&&(t=t?function(){return!0}:function(){return!1}),"function"!=typeof i&&(i=i?function(){return!0}:function(){return!1}),"function"!=typeof n&&(n=n?function(){return!0}:function(){return!1}),this._handleScrollX=t,this._handleScrollY=i,this._stopPropagation=n,this._onWheelCallback=e,this.onWheel=BI.bind(this.onWheel,this)},BI.WheelHandler.prototype={constructor:BI.WheelHandler,onWheel:function(e){var t,i,n,r,o,a,s=(o=r=n=i=0,"detail"in(t=e)&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(i=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(i=n,n=0),r=10*i,o=10*n,"deltaY"in t&&(o=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||o)&&t.deltaMode&&(1===t.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!i&&(i=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:i,spinY:n,pixelX:r,pixelY:o}),l=this._deltaX+s.pixelX,u=this._deltaY+s.pixelY,c=this._handleScrollX(l,u),h=this._handleScrollY(u,l);(c||h)&&(this._deltaX+=c?s.pixelX:0,this._deltaY+=h?s.pixelY:0,e.preventDefault?e.preventDefault():e.returnValue=!1,0===this._deltaX&&0===this._deltaY||(this._stopPropagation()&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0),a=!0),!0===a&&null===this._animationFrameID&&(this._animationFrameID=p(this._didWheel)))},_didWheel:function(){this._animationFrameID=null,this._onWheelCallback(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0}}},function(e,t){BI.BehaviorFactory={createBehavior:function(e,t){var i;switch(e){case"highlight":i=BI.HighlightBehavior;break;case"redmark":i=BI.RedMarkBehavior}return new i(t)}},BI.Behavior=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this,arguments),{rule:function(){return!0}})},_init:function(){BI.Behavior.superclass._init.apply(this,arguments)},doBehavior:function(){}})},function(e,t){BI.Layout=BI.inherit(BI.Widget,{props:function(){return{scrollable:null,scrollx:!1,scrolly:!1,items:[]}},render:function(){this._init4Margin(),this._init4Scroll()},_init4Margin:function(){this.options.top&&this.element.css("top",this.options.top),this.options.left&&this.element.css("left",this.options.left),this.options.bottom&&this.element.css("bottom",this.options.bottom),this.options.right&&this.element.css("right",this.options.right)},_init4Scroll:function(){switch(this.options.scrollable){case!0:this.element.css("overflow","auto");break;case!1:this.element.css("overflow","hidden")}this.options.scrollx&&this.element.css({"overflow-x":"auto","overflow-y":"hidden"}),this.options.scrolly&&this.element.css({"overflow-x":"hidden","overflow-y":"auto"})},appendFragment:function(e){this.element.append(e)},_mountChildren:function(){var i=this,n=BI.Widget._renderEngine.createFragment(),r=!1;BI.each(this._children,function(e,t){t.element!==i.element&&(n.appendChild(t.element[0]),r=!0)}),!0===r&&this.appendFragment(n)},_getChildName:function(e){return e+""},_addElement:function(e,t,i){var n,r=this;return this.hasWidget(this._getChildName(e))?n=this.getWidgetByName(this._getChildName(e)):((n=BI.createWidget(t,i)).on(BI.Events.DESTROY,function(){BI.each(r._children,function(e,t){t===n&&(BI.remove(r._children,t),r.removeItemAt(0|e))})}),this.addWidget(this._getChildName(e),n)),n},_getOptions:function(e){return e instanceof BI.Widget&&(e=e.options),(e=BI.stripEL(e))instanceof BI.Widget&&(e=e.options),e},_compare:function(e,t){var u=this;return function c(e,t,i,n){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;var r=Object.prototype.toString.call(e);switch(r){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t}var o="[object Array]"===r;if(!o){if(BI.isFunction(e)&&BI.isFunction(t))return!0;e=u._getOptions(e),t=u._getOptions(t)}i=i||[];n=n||[];var a=i.length;for(;a--;)if(i[a]===e)return n[a]===t;i.push(e);n.push(t);if(o){if((a=e.length)!==t.length)return!1;for(;a--;)if(!c(e[a],t[a],i,n))return!1}else{var s,l=_.keys(e);if(a=l.length,_.keys(t).length!==a)return!1;for(;a--;)if(s=l[a],!_.has(t,s)||!c(e[s],t[s],i,n))return!1}i.pop();n.pop();return!0}(e,t)},_getWrapper:function(){return this.element},_addItemAt:function(e,t){for(var i=this.options.items.length;e<i;i--)this._children[this._getChildName(i)]=this._children[this._getChildName(i-1)];delete this._children[this._getChildName(e)],this.options.items.splice(e,0,t)},_removeItemAt:function(e){for(var t=e;t<this.options.items.length-1;t++)this._children[this._getChildName(t)]=this._children[this._getChildName(t+1)];delete this._children[this._getChildName(this.options.items.length-1)],this.options.items.splice(e,1)},addItem:function(e){return this.addItemAt(this.options.items.length,e)},prependItem:function(e){return this.addItemAt(0,e)},addItemAt:function(e,t){if(!(e<0||e>this.options.items.length)){this._addItemAt(e,t);var i=this._addElement(e,t);return 0<e?this._children[this._getChildName(e-1)].element.after(i.element):i.element.prependTo(this._getWrapper()),i._mount(),i}},removeItemAt:function(e){e=BI.isArray(e)?e:[e];for(var t=[],i=[],n={},r=0,o=this.options.items.length;r<o;r++){var a=this._children[this._getChildName(r)];BI.contains(e,r)?a&&t.push(a):(n[this._getChildName(i.length)]=a,i.push(this.options.items[r]))}this.options.items=i,this._children=n,BI.each(t,function(e,t){t._destroy()})},shouldUpdateItem:function(e,t){if(e<0||e>this.options.items.length-1)return!1;var i=this._children[this._getChildName(e)];return i.shouldUpdate?!0===i.shouldUpdate(this._getOptions(t)):null},updateItemAt:function(e,t){if(!(e<0||e>this.options.items.length-1)){var i;if(i=this._children[this._getChildName(e)].update(this._getOptions(t)))return i;var n=this._children[this._getChildName(e)];delete this._children[this._getChildName(e)],this.options.items.splice(e,1);var r=this._addElement(e,t);this.options.items.splice(e,0,t),this._children[this._getChildName(e)]=r,0<e?this._children[this._getChildName(e-1)].element.after(r.element):r.element.prependTo(this._getWrapper()),n._destroy(),r._mount()}},addItems:function(e,n){var r=this,o=this.options,a=BI.Widget._renderEngine.createFragment(),s=[];BI.each(e,function(e,t){var i=r._addElement(o.items.length,t,n);r._children[r._getChildName(o.items.length)]=i,o.items.push(t),s.push(i),a.appendChild(i.element[0])}),this._isMounted&&(this._getWrapper().append(a),BI.each(s,function(e,t){t._mount()}))},prependItems:function(e,t){e=e||[];for(var i=BI.Widget._renderEngine.createFragment(),n=[],r=e.length-1;0<=r;r--){this._addItemAt(0,e[r]);var o=this._addElement(0,e[r],t);this._children[this._getChildName(0)]=o,this.options.items.unshift(e[r]),n.push(o),i.appendChild(o.element[0])}this._isMounted&&(this._getWrapper().prepend(i),BI.each(n,function(e,t){t._mount()}))},getValue:function(){var i,n=this,r=[];return BI.each(this.options.items,function(e){var t;(i=n._children[n._getChildName(e)])&&(t=i.getValue(),t=BI.isArray(t)?t:[t],r=r.concat(t))}),r},setValue:function(t){var i,n=this;BI.each(this.options.items,function(e){(i=n._children[n._getChildName(e)])&&i.setValue(t)})},setText:function(t){var i,n=this;BI.each(this.options.items,function(e){(i=n._children[n._getChildName(e)])&&i.setText(t)})},patchItem:function(e,t,i){var n=this.shouldUpdateItem(i,t);if(!0===n||null===n&&!this._compare(e,t))return this.updateItemAt(i,t)},updateChildren:function(i,e){var n,r,s=this,t=0,o=0,a=i.length-1,l=i[0],u=i[a],c=e.length-1,h=e[0],p=e[c],d={};for(BI.each(i,function(e,t){var i=null==(t=s._getOptions(t)).key?e:t.key;BI.isKey(i)&&(d[i]=s._children[s._getChildName(e)])});t<=a&&o<=c;){BI.isNull(l)?l=i[++t]:BI.isNull(u)?u=i[--a]:g(l,h,t,o)?(n=this.patchItem(l,h,t)||n,d[null==l.key?this._getChildName(t):l.key]=this._children[this._getChildName(t)],l=i[++t],h=e[++o]):g(u,p,a,c)?(n=this.patchItem(u,p,a)||n,d[null==u.key?this._getChildName(a):u.key]=this._children[this._getChildName(a)],u=i[--a],p=e[--c]):g(l,p)?(n=this.patchItem(l,p,t)||n,d[null==l.key?this._getChildName(t):l.key]=this._children[this._getChildName(t)],B(l,u,!0),l=i[++t],p=e[--c]):h=(g(u,h)?(n=this.patchItem(u,h,a)||n,d[null==u.key?this._getChildName(a):u.key]=this._children[this._getChildName(a)],B(u,l),u=i[--a]):(r=function(e,t,i,n){var r,o;for(r=i;r<=n;++r)e[r]&&g(e[r],t)&&(o=e[r]);return o}(i,h,t,a),BI.isNull(r)?B(I(h),l):BI.each(i,function(e,t){t&&g(t,h)&&(n=s.patchItem(r,h,e)||n,d[null==r.key?s._getChildName(e):r.key]=s._children[s._getChildName(e)],i[e]=undefined,B(r,l))})),e[++o])}function g(e,t,i,n){return e=s._getOptions(e),t=s._getOptions(t),BI.isKey(e.key)?e.key===t.key:0<=i&&i===n}function I(e,t){var i=s._getOptions(e),n=null==i.key?s._getChildName(t):i.key;return d[n]=s._addElement(n,e)}function B(e,t,i,n){e=s._getOptions(e),t=t&&s._getOptions(t);var r,o,a=BI.isKey(e.key)?e.key:s._getChildName(n);t&&d[t.key]?(r=BI.isKey(t.key)?t.key:s._getChildName(n),0<(o=i?d[r].element.next():d[r].element).length?o.before(d[a].element):s._getWrapper().append(d[a].element)):s._getWrapper().append(d[a].element)}return a<t?function(e,t,i,n){for(;i<=n;++i){B(I(t[i],i),e,!1,i)}}(BI.isNull(e[c+1])?null:e[c+1],e,o,c):c<o&&function(e,t,i){for(;t<=i;++t){var n,r,o=e[t];BI.isNotNull(o)&&(n=s._getOptions(o),r=null==n.key?s._getChildName(t):n.key,delete s._children[s._getChildName(r)],d[r]._destroy())}}(i,t,a),this._children={},BI.each(e,function(e,t){var i=s._getOptions(t),n=null==i.key?s._getChildName(e):i.key;d[n]._mount(),s._children[s._getChildName(e)]=d[n]}),n},update:function(e){var t=this.options,i=e.items||[],n=this.updateChildren(t.items,i);return this.options.items=i,n},stroke:function(e){var i=this;BI.each(e,function(e,t){t&&i._addElement(e,t)})},removeWidget:function(i){var n;BI.isWidget(i)?BI.each(this._children,function(e,t){t===i&&(n=e)}):n=i,n&&this._removeItemAt(0|n)},empty:function(){BI.Layout.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.Layout.superclass.destroy.apply(this,arguments),this.options.items=[]},populate:function(e){this.options;e=e||[],this._isMounted?this.update({items:e}):(this.options.items=e,this.stroke(e))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout)},function(e,t){var r,o,a,s,l;BI.Plugin=BI.Plugin||{},a={},s={},l={},BI.extend(BI.Plugin,{getWidget:function(e,t){var i;if(r&&r(e,t),l[e])for(var n=l[e].length-1;0<=n;n--)(i=l[e][n](t))&&(t=i);if(a[e])for(n=a[e].length-1;0<=n;n--)if(i=a[e][n](t))return i;return t},config:function(e,t){r=e,o=t},configWidget:function(e,t){l[e]||(l[e]=[]),l[e].push(t)},registerWidget:function(e,t){a[e]||(a[e]=[]),0<a[e].length&&console.log("组件已经注册过了!"),a[e].push(t)},relieveWidget:function(e){delete a[e]},getObject:function(e,t){if(o&&o(e,t),s[e])for(var i,n=0,r=s[e].length;n<r;n++)(i=s[e][n](t))&&(t=i);return i||t},registerObject:function(e,t){s[e]||(s[e]=[]),0<s[e].length&&console.log("对象已经注册过了!"),s[e].push(t)},relieveObject:function(e){delete s[e]}})},function(e,t){BI.Action=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Action.superclass._defaultConfig.apply(this,arguments),{src:null,tar:null})},_init:function(){BI.Action.superclass._init.apply(this,arguments)},actionPerformed:function(e,t,i){},actionBack:function(e,t,i){}}),BI.ActionFactory={createAction:function(e,t){var i;switch(e){case"show":i=BI.ShowAction}return new i(t)}}},function(e,t){BI.ShowAction=BI.inherit(BI.Action,{_defaultConfig:function(){return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ShowAction.superclass._init.apply(this,arguments)},actionPerformed:function(e,t,i){(t=t||this.options.tar).setVisible(!0),i&&i()},actionBack:function(e,t,i){(e=e||this.options.tar).setVisible(!1),i&&i()}})},function(e,t){BI.HighlightBehavior=BI.inherit(BI.Behavior,{_defaultConfig:function(){return BI.extend(BI.HighlightBehavior.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.HighlightBehavior.superclass._init.apply(this,arguments)},doBehavior:function(e){var r=Array.prototype.slice.call(arguments,1),o=this.options;BI.each(e,function(e,t){function i(e){!0===e?t.doHighLight&&t.doHighLight.apply(t,r):t.unHighLight&&t.unHighLight.apply(t,r)}var n;t instanceof BI.Single?(n=o.rule(t.getValue(),t),BI.isFunction(n)?n(i):i(n)):t.doBehavior&&t.doBehavior.apply(t,r)})}})},function(e,t){BI.RedMarkBehavior=BI.inherit(BI.Behavior,{_defaultConfig:function(){return BI.extend(BI.RedMarkBehavior.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.RedMarkBehavior.superclass._init.apply(this,arguments)},doBehavior:function(e){var i=Array.prototype.slice.call(arguments,1),n=this.options;BI.each(e,function(e,t){t instanceof BI.Single?n.rule(t.getValue(),t)?t.doRedMark&&t.doRedMark.apply(t,i):t.doRedMark&&t.unRedMark.apply(t,i):t.doBehavior&&t.doBehavior.apply(t,i)})}})},function(e,t){BI.Controller=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Controller.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.Controller.superclass._init.apply(this,arguments)},destroy:function(){}}),BI.Controller.EVENT_CHANGE="__EVENT_CHANGE__"},function(e,t){BI.BroadcastController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.BroadcastController.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.BroadcastController.superclass._init.apply(this,arguments),this._broadcasts={}},on:function(e,t){var i=this;return this._broadcasts[e]||(this._broadcasts[e]=[]),this._broadcasts[e].push(t),function(){i.remove(e,t)}},send:function(e){var i=[].slice.call(arguments,1);BI.each(this._broadcasts[e],function(e,t){t.apply(null,i)})},remove:function(t,i){var n=this;return i?(BI.remove(this._broadcasts[t],function(e){return n._broadcasts[t].indexOf(i)===e}),this._broadcasts[t].remove(i),0===this._broadcasts[t].length&&delete this._broadcasts[t]):delete this._broadcasts[t],this}})},function(e,t){BI.BubblesController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.BubblesController.superclass._defaultConfig.apply(this,arguments),{})},_const:{bubbleHeight:18},_init:function(){BI.BubblesController.superclass._init.apply(this,arguments);var t=this;this.bubblesManager={},this.storeBubbles={},BI.Resizers.add("bubbleController"+BI.uniqueId(),function(){BI.each(t.bubblesManager,function(e){t.remove(e)}),t.bubblesManager={},t.storeBubbles={}})},_createBubble:function(e,t,i,n){return BI.createWidget({type:"bi.bubble",text:t,level:i,height:n||18,direction:e})},_getOffsetLeft:function(e,t,i){var n=0;return"center"===i?((n=t.element.offset().left+(t.element.bounds().width-this.get(e).element.bounds().width)/2)<0&&(n=0),n):"right"===i?((n=t.element.offset().left+t.element.bounds().width-this.get(e).element.bounds().width)<0&&(n=0),n):t.element.offset().left},_getOffsetTop:function(e,t,i){var n=0;return"center"===i?((n=t.element.offset().top+(t.element.bounds().height-this.get(e).element.bounds().height)/2)<0&&(n=0),n):"right"===i?((n=t.element.offset().top+t.element.bounds().height-this.get(e).element.bounds().height)<0&&(n=0),n):t.element.offset().top},_getLeftPosition:function(e,t,i){var n=BI.DOM.getLeftPosition(t,this.get(e));return n.top=this._getOffsetTop(e,t,i),n},_getBottomPosition:function(e,t,i){var n=BI.DOM.getBottomPosition(t,this.get(e));return n.left=this._getOffsetLeft(e,t,i),n},_getTopPosition:function(e,t,i){var n=BI.DOM.getTopPosition(t,this.get(e));return n.left=this._getOffsetLeft(e,t,i),n},_getRightPosition:function(e,t,i){var n=BI.DOM.getRightPosition(t,this.get(e));return n.top=this._getOffsetTop(e,t,i),n},show:function(e,t,i,n){var r=(n=n||{}).container||i,o=n.offsetStyle||{},a=n.level||"error",s=n.adjustYOffset||0,l=n.adjustXOffset||0;this.storeBubbles[e]||(this.storeBubbles[e]={}),this.storeBubbles[e].top||(this.storeBubbles[e].top=this._createBubble("top",t,a)),BI.createWidget({type:"bi.absolute",element:r,items:[{el:this.storeBubbles[e].top}]}),this.set(e,this.storeBubbles[e].top);var u=this._getTopPosition(e,i,o);return this.get(e).element.css({left:u.left+l,top:u.top-s}),this.get(e).invisible(),BI.DOM.isTopSpaceEnough(i,this.get(e),s)||(this.storeBubbles[e].left||(this.storeBubbles[e].left=this._createBubble("left",t,a,30)),BI.createWidget({type:"bi.absolute",element:r,items:[{el:this.storeBubbles[e].left}]}),this.set(e,this.storeBubbles[e].left),u=this._getLeftPosition(e,i,o),this.get(e).element.css({left:u.left-l,top:u.top-s}),this.get(e).invisible(),BI.DOM.isLeftSpaceEnough(i,this.get(e),l)||(this.storeBubbles[e].right||(this.storeBubbles[e].right=this._createBubble("right",t,a,30)),BI.createWidget({type:"bi.absolute",element:r,items:[{el:this.storeBubbles[e].right}]}),this.set(e,this.storeBubbles[e].right),u=this._getRightPosition(e,i,o),this.get(e).element.css({left:u.left+l,top:u.top-s}),this.get(e).invisible(),BI.DOM.isRightSpaceEnough(i,this.get(e),l)||(this.storeBubbles[e].bottom||(this.storeBubbles[e].bottom=this._createBubble("bottom",t,a)),BI.createWidget({type:"bi.absolute",element:r,items:[{el:this.storeBubbles[e].bottom}]}),this.set(e,this.storeBubbles[e].bottom),u=this._getBottomPosition(e,i,o),this.get(e).element.css({left:u.left+l,top:u.top+s}),this.get(e).invisible()))),this.get(e).setText(t),this.get(e).visible(),this},hide:function(e){return this.has(e)&&this.get(e).invisible(),this},add:function(e,t){return this.has(e)||this.set(e,t),this},get:function(e){return this.bubblesManager[e]},set:function(e,t){this.bubblesManager[e]=t},has:function(e){return null!=this.bubblesManager[e]},remove:function(e){return this.has(e)&&(BI.each(this.storeBubbles[e],function(e,t){t.destroy()}),delete this.storeBubbles[e],delete this.bubblesManager[e]),this}})},function(e,t){BI.LayerController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.LayerController.superclass._defaultConfig.apply(this,arguments),{render:"body"})},_init:function(){BI.LayerController.superclass._init.apply(this,arguments),this.layerManager={},this.layouts={},this.zindex=BI.zIndex_layer,BI.Resizers.add("layerController"+BI.uniqueId(),BI.bind(this._resize,this))},_resize:function(){BI.each(this.layouts,function(e,t){t.element.is(":visible")&&t.element.trigger("__resize__")})},make:function(e,t,i,n){return BI.isWidget(t)?(i=i||{}).container=t:(n=i,i=t),this.create(e,null,i,n)},create:function(e,t,i,n){if(this.has(e))return this.get(e);var r=(i=i||{}).offset||{},o=t;if(BI.isWidget(t)&&(o=t.element),BI.isNotEmptyString(o)&&(o=BI.Widget._renderEngine.createElement(o)),this.has(e))return this.get(e);var a=BI.createWidget(i.render||{},BI.extend({type:"bi.layout"},i),n),s=BI.createWidget({type:"bi.absolute",invisible:!0,items:[{el:a,left:0,right:0,top:0,bottom:0}]},n);return BI.createWidget({type:"bi.absolute",element:i.container||this.options.render,items:[{el:s,left:r.left||0,right:r.right||0,top:r.top||0,bottom:r.bottom||0}]}),o&&(s.element.addClass("bi-popup-view"),s.element.css({left:o.offset().left+(r.left||0),top:o.offset().top+(r.top||0),width:r.width||o.outerWidth()-(r.left||0)-(r.right||0)||"",height:r.height||o.outerHeight()-(r.top||0)-(r.bottom||0)||""}),s.element.on("__resize__",function(){o.is(":visible")&&s.element.css({left:o.offset().left+(r.left||0),top:o.offset().top+(r.top||0),width:r.width||o.outerWidth()-(r.left||0)-(r.right||0)||"",height:r.height||o.outerHeight()-(r.top||0)-(r.bottom||0)||""})})),this.add(e,a,s),a},hide:function(e,t){return this.has(e)&&(this._getLayout(e).invisible(),this._getLayout(e).element.hide(0,t)),this},show:function(e,t){return this.has(e)&&(this._getLayout(e).visible(),this._getLayout(e).element.css("z-index",this.zindex++).show(0,t).trigger("__resize__")),this},isVisible:function(e){return this.has(e)&&this._getLayout(e).isVisible()},add:function(e,t,i){if(this.has(e))throw new Error("name is already exist");return i.setVisible(!1),this.layerManager[e]=t,(this.layouts[e]=i).element.css("z-index",this.zindex++),this},_getLayout:function(e){return this.layouts[e]},get:function(e){return this.layerManager[e]},has:function(e){return null!=this.layerManager[e]},remove:function(e){return this.has(e)&&(this.layerManager[e].destroy(),this.layouts[e].destroy(),delete this.layerManager[e],delete this.layouts[e]),this},removeAll:function(){var i=this;return BI.each(BI.keys(this.layerManager),function(e,t){i.layerManager[t].destroy(),i.layouts[t].destroy()}),this.layerManager={},this.layouts={},this}})},function(e,t){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}})},function(e,t){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(e){return BI.isNotNull(this.floatManager[e])},create:function(e,t,i){if(this._check(e))return this;var n=BI.createWidget(t||{},{type:"bi.popover"},i);return this.add(e,n,t,i),this},add:function(e,t,i,n){var r,o=this;return i=i||{},this._check(e)||(this.floatContainer[e]=BI.createWidget({type:"bi.absolute",cls:"bi-popup-view",items:[{el:this.floatLayer[e]=BI.createWidget({type:"bi.absolute",items:[t]},n),left:0,right:0,top:0,bottom:0}]}),this.floatManager[e]=t,r=e,t.on(BI.Popover.EVENT_CLOSE,function(){o.close(r)}),BI.createWidget({type:"bi.absolute",element:i.container||this.options.render,items:[{el:this.floatContainer[e],left:0,right:0,top:0,bottom:0}]})),this},open:function(e){return this._check(e)&&(this.floatOpened[e]||(this.floatOpened[e]=!0,(t=this.floatContainer[e]).element.css("zIndex",this.zindex++),this.modal&&t.element.__hasZIndexMask__(this.zindexMap[e])&&t.element.__releaseZIndexMask__(this.zindexMap[e]),this.zindexMap[e]=this.zindex,this.modal&&t.element.__buildZIndexMask__(this.zindex++),this.get(e).setZindex(this.zindex++),this.floatContainer[e].visible(),(i=this.get(e)).show&&i.show(),n=BI.Widget._renderEngine.createElement(this.options.render).width(),r=BI.Widget._renderEngine.createElement(this.options.render).height(),(o=(n-i.element.width())/2)<0&&(o=0),(a=(r-i.element.height())/2)<0&&(a=0),i.element.css({left:o+"px",top:a+"px"}))),this;var t,i,n,r,o,a},close:function(e){return this._check(e)&&this.floatOpened[e]&&(delete this.floatOpened[e],this.floatContainer[e].invisible(),this.modal&&this.floatContainer[e].element.__releaseZIndexMask__(this.zindexMap[e])),this},get:function(e){return this.floatManager[e]},remove:function(e){return this._check(e)&&(this.floatContainer[e].destroy(),this.modal&&this.floatContainer[e].element.__releaseZIndexMask__(this.zindexMap[e]),delete this.floatManager[e],delete this.floatLayer[e],delete this.zindexMap[e],delete this.floatContainer[e],delete this.floatOpened[e]),this},removeAll:function(){var i=this;return BI.each(this.floatContainer,function(e,t){t.destroy(),i.modal&&i.floatContainer[e].element.__releaseZIndexMask__(i.zindexMap[e])}),this.floatManager={},this.floatLayer={},this.floatContainer={},this.floatOpened={},this.zindexMap={},this}})},function(e,t){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 t=this;this.resizerManger={};var e=BI.debounce(function(e){t._resize(e)},30);BI.Widget._renderEngine.createElement(_global).resize(e)},_resize:function(i){BI.each(this.resizerManger,function(e,t){t instanceof BI.$?t.is(":visible")&&t.trigger("__resize__"):t instanceof BI.Layout?t.resize():BI.isFunction(t)&&t(i)})},add:function(e,t){var i=this;return this.has(e)?this:(this.resizerManger[e]=t,function(){i.remove(e)})},get:function(e){return this.resizerManger[e]},has:function(e){return null!=this.resizerManger[e]},remove:function(e){return this.has(e)&&delete this.resizerManger[e],this}})},function(e,t){BI.TooltipsController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.TooltipsController.superclass._defaultConfig.apply(this,arguments),{})},_const:{height:18},_init:function(){BI.TooltipsController.superclass._init.apply(this,arguments),this.tooltipsManager={},this.showingTips={}},_createTooltip:function(e,t){return BI.createWidget({type:"bi.tooltip",text:e,level:t,stopEvent:!0})},hide:function(e,t){return this.has(e)&&(delete this.showingTips[e],this.get(e).element.hide(0,t),this.get(e).invisible()),this},create:function(e,t,i,n){var r;return this.has(e)||(r=this._createTooltip(t,i),this.add(e,r),BI.createWidget({type:"bi.absolute",element:n||"body",items:[{el:r}]}),r.invisible()),this.get(e)},show:function(e,t,i,n,r,o){o=o||{};var a=this;if(BI.each(this.showingTips,function(e,t){a.hide(e)}),this.showingTips={},this.has(t)||this.create(t,i,n,o.container||"body"),!o.belowMouse){var s=r.element.offset(),l=r.element.bounds();if(0===l.height||0===l.width)return;var u=s.top+l.height+5}var c=this.get(t);c.setText(i),c.element.css({left:"0px",top:"0px"}),c.visible(),c.element.height(c.element[0].scrollHeight),this.showingTips[t]=!0;var h=(e.pageX||e.clientX)+15,p=(e.pageY||e.clientY)+15;h+c.element.outerWidth()>BI.Widget._renderEngine.createElement("body").outerWidth()&&(h-=c.element.outerWidth()+15);var d=BI.Widget._renderEngine.createElement("body").outerHeight();return p+c.element.outerHeight()>d||u+c.element.outerHeight()>d?(p-=c.element.outerHeight()+15,o.belowMouse||(p=Math.min(p,s.top-c.element.outerHeight()-5))):o.belowMouse||(p=Math.max(p,u)),c.element.css({left:h<0?0:h+"px",top:p<0?0:p+"px"}),c.element.hover(function(){a.remove(t),r.element.trigger("mouseleave.title"+r.getName())}),this},add:function(e,t){return this.has(e)||this.set(e,t),this},get:function(e){return this.tooltipsManager[e]},set:function(e,t){this.tooltipsManager[e]=t},has:function(e){return null!=this.tooltipsManager[e]},remove:function(e){return this.has(e)&&(this.tooltipsManager[e].destroy(),delete this.tooltipsManager[e]),this}})},function(e,t){_.extend(BI,{Events:{KEYDOWN:"_KEYDOWN",BACKSPACE:"_BACKSPACE",SPACE:"_SPACE",ENTER:"_ENTER",CONFIRM:"_CONFIRM",ERROR:"_ERROR",PAUSE:"_PAUSE",DESTROY:"_DESTROY",MOUNT:"_MOUNT",UNMOUNT:"_UNMOUNT",CLEAR:"_CLEAR",ADD:"_ADD",EDITING:"_EDITING",EMPTY:"_EMPTY",VIEW:"_VIEW",RESIZE:"_RESIZE",BEFOREEDIT:"_BEFOREEDIT",AFTEREDIT:"_AFTEREDIT",STARTEDIT:"_STARTEDIT",STOPEDIT:"_STOPEDIT",CHANGE:"_CHANGE",EXPAND:"_EXPAND",COLLAPSE:"_COLLAPSE",CALLBACK:"_CALLBACK",CLICK:"_CLICK",STATECHANGE:"_STATECHANGE",BEFORESTATECHANGE:"_BEFORESTATECHANGE",INIT:"_INIT",AFTERINIT:"_AFTERINIT",SCROLL:"_SCROLL",STARTLOAD:"_STARTLOAD",AFTERLOAD:"_AFTERLOAD",BS:"beforesubmit",AS:"aftersubmit",SC:"submitcomplete",SF:"submitfailure",SS:"submitsuccess",BVW:"beforeverifywrite",AVW:"afterverifywrite",AV:"afterverify",BW:"beforewrite",AW:"afterwrite",WS:"writesuccess",WF:"writefailure",BA:"beforeappend",AA:"afterappend",BD:"beforedelete",AD:"beforedelete",UC:"unloadcheck",BTOPDF:"beforetopdf",ATOPDF:"aftertopdf",BTOEXCEL:"beforetoexcel",ATOEXCEL:"aftertoexcel",BTOWORD:"beforetoword",ATOWORD:"aftertoword",BTOIMAGE:"beforetoimage",ATOIMAGE:"aftertoimage",BTOHTML:"beforetohtml",ATOHTML:"aftertohtml",BIMEXCEL:"beforeimportexcel",AIMEXCEL:"afterimportexcel",BPDFPRINT:"beforepdfprint",APDFPRINT:"afterpdfprint",BFLASHPRINT:"beforeflashprint",AFLASHPRINT:"afterflashprint",BAPPLETPRINT:"beforeappletprint",AAPPLETPRINT:"afterappletprint",BSEVERPRINT:"beforeserverprint",ASERVERPRINT:"afterserverprint",BEMAIL:"beforeemail",AEMAIL:"afteremail"}})},function(e,t){BI.prepares.push(function(){BI.Date=BI.Date||{},BI.Date._DN=[BI.i18nText("BI-Basic_Sunday"),BI.i18nText("BI-Basic_Monday"),BI.i18nText("BI-Basic_Tuesday"),BI.i18nText("BI-Basic_Wednesday"),BI.i18nText("BI-Basic_Thursday"),BI.i18nText("BI-Basic_Friday"),BI.i18nText("BI-Basic_Saturday"),BI.i18nText("BI-Basic_Sunday")],BI.Date._SDN=[BI.i18nText("BI-Basic_Simple_Sunday"),BI.i18nText("BI-Basic_Simple_Monday"),BI.i18nText("BI-Basic_Simple_Tuesday"),BI.i18nText("BI-Basic_Simple_Wednesday"),BI.i18nText("BI-Basic_Simple_Thursday"),BI.i18nText("BI-Basic_Simple_Friday"),BI.i18nText("BI-Basic_Simple_Saturday"),BI.i18nText("BI-Basic_Simple_Sunday")],BI.Date._FD=1,BI.Date._MN=[BI.i18nText("BI-Basic_January"),BI.i18nText("BI-Basic_February"),BI.i18nText("BI-Basic_March"),BI.i18nText("BI-Basic_April"),BI.i18nText("BI-Basic_May"),BI.i18nText("BI-Basic_June"),BI.i18nText("BI-Basic_July"),BI.i18nText("BI-Basic_August"),BI.i18nText("BI-Basic_September"),BI.i18nText("BI-Basic_October"),BI.i18nText("BI-Basic_November"),BI.i18nText("BI-Basic_December")],BI.Date._SMN=[0,1,2,3,4,5,6,7,8,9,10,11],BI.Date._QN=["",BI.i18nText("BI-Quarter_1"),BI.i18nText("BI-Quarter_2"),BI.i18nText("BI-Quarter_3"),BI.i18nText("BI-Quarter_4")],BI.Date._MD=[31,28,31,30,31,30,31,31,30,31,30,31],BI.Date._OFFSET=[0,-1,-2,-3,-4,-5,-6]})},function(e,t){BI.ShowListener=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.ShowListener.superclass._defaultConfig.apply(this,arguments),{eventObj:BI.createWidget(),cardLayout:null,cardNameCreator:function(e){return e},cardCreator:BI.emptyFn,afterCardCreated:BI.emptyFn,afterCardShow:BI.emptyFn})},_init:function(){BI.ShowListener.superclass._init.apply(this,arguments);var o=this,a=this.options;a.eventObj&&a.eventObj.on(BI.Controller.EVENT_CHANGE,function(e,t,i){if(e===BI.Events.CLICK){if(t=t||a.eventObj.getValue(),t=BI.isArray(t)?1<t.length?t.toString():t[0]:t,BI.isNull(t))throw new Error("value cannot be null");var n,r=a.cardNameCreator(t);a.cardLayout.isCardExisted(r)||(n=a.cardCreator(r),a.cardLayout.addCardByName(r,n),a.afterCardCreated(r)),a.cardLayout.showCardByName(r),BI.nextTick(function(){a.afterCardShow(r),o.fireEvent(BI.ShowListener.EVENT_CHANGE,r)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE"},function(e,t){BI.StyleLoaderManager=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.StyleLoaderManager.superclass._init.apply(this,arguments),this.stylesManager={}},loadStyle:function(e,t){if(_global.document){var i=document,n=i.createElement("style");return i.getElementsByTagName("head")[0].appendChild(n),n.setAttribute("type","text/css"),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t)),this.stylesManager[e]=n,this}},get:function(e){return this.stylesManager[e]},has:function(e){return null!=this.stylesManager[e]},removeStyle:function(e){return this.has(e)&&(this.stylesManager[e].parentNode.removeChild(this.stylesManager[e]),delete this.stylesManager[e]),this}})},function(e,t){BI.Logic=BI.inherit(BI.OB,{createLogic:function(){return this.options||{}}}),BI.LogicFactory={Type:{Vertical:"vertical",Horizontal:"horizontal",Table:"table",HorizontalFill:"horizontal_fill"},createLogic:function(e,t){var i;switch(e){case BI.LogicFactory.Type.Vertical:i=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:i=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:i=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:i=BI.HorizontalFillLayoutLogic;break;default:i=BI.Logic}return new i(t).createLogic()},createLogicTypeByDirection:function(e){switch(e){case BI.Direction.Top:case BI.Direction.Bottom:case BI.Direction.Custom:return BI.LogicFactory.Type.Vertical;case BI.Direction.Left:case BI.Direction.Right:return BI.LogicFactory.Type.Horizontal}},createLogicItemsByDirection:function(e){var t=Array.prototype.slice.call(arguments,1),t=BI.map(t,function(e,t){return BI.isWidget(t)?{el:t,width:t.options.width,height:t.options.height}:t});switch(e){case BI.Direction.Bottom:BI.LogicFactory.Type.Vertical,t.reverse();break;case BI.Direction.Right:BI.LogicFactory.Type.Horizontal,t.reverse();break;case BI.Direction.Custom:t=t.slice(1)}return t}}},function(e,t){BI.VerticalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var e=this.options,t=e.dynamic?"bi.vertical":"bi.vtape";return{type:t,scrollable:e.scrollable,scrolly:e.scrolly,scrollx:e.scrollx,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,items:e.items}},_init:function(){BI.VerticalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var e=this.options,t=e.dynamic?"bi.vertical_adapt":"bi.htape";return{type:t,scrollable:e.scrollable,scrolly:e.scrolly,scrollx:e.scrollx,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,items:e.items}},_init:function(){BI.HorizontalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.TableLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,columns:0,rows:0,columnSize:[],rowSize:[],hgap:0,vgap:0,items:[]})},createLogic:function(){var e=this.options,t=e.dynamic?"bi.table":"bi.window";return{type:t,scrollable:e.scrollable,scrolly:e.scrolly,scrollx:e.scrollx,columns:e.columns,rows:e.rows,columnSize:e.columnSize,rowSize:e.rowSize,hgap:e.hgap,vgap:e.vgap,items:e.items}},_init:function(){BI.TableLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalFillLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalFillLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var e=this.options,i=[];return BI.each(e.items,function(e,t){i.push(t.width||0)}),{type:e.dynamic?"bi.horizontal_adapt":"bi.htape",columnSize:i,scrollable:e.scrollable,scrolly:e.scrolly,scrollx:e.scrollx,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,items:e.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}})},function(e,t){function u(e,t){for(var i=-1;++i<r;)t+=e*o[i],o[i]=t%n,t=Math.floor(t/n)}function c(e){for(var t=r,i=0;0<=--t;)i+=o[t],o[t]=Math.floor(i/e),i=i%e*n}function h(){for(var e,t=r,i="";0<=--t;){""===i&&0!==t&&0===o[t]||(e=String(o[t]),""===i?i=e:i+="0000000".slice(0,7-e.length)+e)}return i}function p(e,t,i){return 0===t?i:t%2==1?p(e,t-1,i*e):p(e*e,t/2,i)}var n,r,o;Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||(n=1e7,r=6,o=[0,0,0,0,0,0],Number.prototype.toFixed=function(e){var t,i,n,r,o,a,s,l=Number(e);if((l=l!=l?0:Math.floor(l))<0||20<l)throw new RangeError("Number.toFixed called with invalid number of decimals");if((t=Number(this))!=t)return"NaN";if(t<=-1e21||1e21<t)return String(t);if(i="",t<0&&(i="-",t=-t),n="0",1e-21<t)if(o=(r=function(e){for(var t=0;4096<=e;)t+=12,e/=4096;for(;2<=e;)t+=1,e/=2;return t}(t*p(2,69,1))-69)<0?t*p(2,-r,1):t/p(2,r,1),o*=4503599627370496,0<(r=52-r)){for(u(0,o),a=l;7<=a;)u(1e7,0),a-=7;for(u(p(10,a,1),0),a=r-1;23<=a;)c(1<<23),a-=23;c(1<<a),u(1,1),c(2),n=h()}else u(0,o),u(1<<-r,0),n=h()+"0.00000000000000000000".slice(2,2+l);return n=0<l?(s=n.length)<=l?i+"0.0000000000000000000".slice(0,l-s+2)+n:i+n.slice(0,s-l)+"."+n.slice(s-l):i+n})},function(e,t){BI.version="2.0"},function(e,t){BI.AbsoluteCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-center-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.AbsoluteCenterLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.AbsoluteCenterLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"absolute",left:i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0),right:i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0),top:i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0),bottom:i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0),margin:"auto"}),n},resize:function(){},populate:function(e){BI.AbsoluteCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_center_adapt",BI.AbsoluteCenterLayout)},function(e,t){BI.AbsoluteHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-horizontal-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.AbsoluteHorizontalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"absolute",left:i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0),right:i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0),margin:"auto"}),i.vgap+i.tgap+(t.vgap||0)+(t.tgap||0)!==0&&n.element.css("top",i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)),i.vgap+i.bgap+(t.vgap||0)+(t.bgap||0)!==0&&n.element.css("bottom",i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)),n},resize:function(){},populate:function(e){BI.AbsoluteHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_horizontal_adapt",BI.AbsoluteHorizontalLayout)},function(e,t){BI.AbsoluteVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-vertical-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.AbsoluteVerticalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.AbsoluteVerticalLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"absolute",left:t.lgap,right:t.rgap,top:i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0),bottom:i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0),margin:"auto"}),i.hgap+i.lgap+(t.hgap||0)+(t.lgap||0)!==0&&n.element.css("left",i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)),i.hgap+i.rgap+(t.hgap||0)+(t.rgap||0)!==0&&n.element.css("right",i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)),n},resize:function(){},populate:function(e){BI.AbsoluteVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_vertical_adapt",BI.AbsoluteVerticalLayout)},function(e,t){BI.CenterAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-center-adapt-layout",horizontalAlign:BI.HorizontalAlign.Center,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var e=this.options,t=this;return BI.CenterAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:e.horizontalAlign,columnSize:e.columnSize,scrollx:e.scrollx,items:e.items,ref:function(e){t.layout=e},hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}},resize:function(){},populate:function(e){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.center_adapt",BI.CenterAdaptLayout)},function(e,t){BI.HorizontalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-adapt-layout",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:BI.HorizontalAlign.Center,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var t=this,e=this.options;return BI.HorizontalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:e.horizontalAlign,columnSize:e.columnSize,items:e.items,scrollx:e.scrollx,ref:function(e){t.layout=e},hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}},resize:function(){},populate:function(e){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.horizontal_adapt",BI.HorizontalAdaptLayout)},function(e,t){BI.LeftRightVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-left-right-vertical-adapt-layout",items:{},llgap:0,lrgap:0,lhgap:0,rlgap:0,rrgap:0,rhgap:0})},render:function(){var e=this.options;BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this,arguments);var t=[];return"left"in e.items&&t.push({type:"bi.left",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:e.items.left,hgap:e.lhgap,lgap:e.llgap,rgap:e.lrgap}}]}),"right"in e.items&&t.push({type:"bi.right",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:e.items.right,textAlign:"right",hgap:e.rhgap,lgap:e.rlgap,rgap:e.rrgap}}]}),t},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(e){BI.LeftRightVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left_right_vertical_adapt",BI.LeftRightVerticalAdaptLayout),BI.LeftVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-left-vertical-adapt-layout",items:[],lgap:0,rgap:0,hgap:0})},render:function(){var e=this.options,t=this;return BI.LeftVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.left",ref:function(e){t.layout=e},items:[{el:{type:"bi.vertical_adapt",height:"100%",items:e.items,lgap:e.lgap,hgap:e.hgap,rgap:e.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(e){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.left_vertical_adapt",BI.LeftVerticalAdaptLayout),BI.RightVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-right-vertical-adapt-layout",items:[],lgap:0,rgap:0,hgap:0})},render:function(){var e=this.options,t=this;return BI.RightVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.right",ref:function(e){t.layout=e},items:[{el:{type:"bi.vertical_adapt",height:"100%",textAlign:"right",items:e.items,lgap:e.lgap,hgap:e.hgap,rgap:e.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(e){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.right_vertical_adapt",BI.RightVerticalAdaptLayout)},function(e,t){BI.TableAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-center-adapt-layout",columnSize:[],verticalAlign:BI.VerticalAlign.Top,horizontalAlign:BI.HorizontalAlign.Left,scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var e=this.options;BI.TableAdaptLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("<div>").css({position:"relative",display:"table",height:e.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:e.horizontalAlign===BI.HorizontalAlign.Center?"100%":"auto","white-space":"nowrap"}),this.populate(this.options.items)},_addElement:function(e,t){var i,n,r=this.options,o=r.columnSize[e]<=1?100*r.columnSize[e]+"%":r.columnSize[e];return this.hasWidget(this._getChildName(e))?(i=this.getWidgetByName(this._getChildName(e))).element.width(o):((n=BI.createWidget(t)).element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),i=BI.createWidget({type:"bi.default",width:o,items:[n]}),this.addWidget(this._getChildName(e),i)),i.element.css({"max-width":r.columnSize[e]<=1?o:o+"px"}),0===e&&i.element.addClass("first-element"),i.element.css({position:"relative",display:"table-cell","vertical-align":r.verticalAlign,margin:"0",padding:"0",height:"100%"}),r.vgap+r.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":r.vgap+r.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),r.hgap+r.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":(0===e?r.hgap:0)+r.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),r.hgap+r.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":r.hgap+r.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),r.vgap+r.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":r.vgap+r.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),i},appendFragment:function(e){this.$table.append(e),this.element.append(this.$table)},resize:function(){},populate:function(e){BI.TableAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table_adapt",BI.TableAdaptLayout)},function(e,t){BI.VerticalAdaptLayout=BI.inherit(BI.Layout,{props:{baseCls:"bi-vertical-adapt-layout",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0},render:function(){var t=this,e=this.options;return BI.VerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:e.horizontalAlign,columnSize:e.columnSize,items:e.items,scrollx:e.scrollx,ref:function(e){t.layout=e},hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}},resize:function(){},populate:function(e){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.vertical_adapt",BI.VerticalAdaptLayout)},function(e,t){BI.HorizontalAutoLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalAutoLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizon-auto-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalAutoLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.HorizontalAutoLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative",margin:"0px auto"}),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":(0===e?i.vgap:0)+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){},populate:function(e){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_auto",BI.HorizontalAutoLayout)},function(e,t){BI.FloatHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-horizontal-adapt-layout",items:[],hgap:0,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},render:function(){BI.FloatHorizontalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},mounted:function(){var i=this,e=this.left.element.width(),t=this.left.element.height();this.left.element.width(e).height(t).css("float","none"),BI.remove(this._children,function(e,t){t===i.container&&delete i._children[e]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.left]})},_addElement:function(e,t){var i=this.options;return this.left=BI.createWidget({type:"bi.vertical",items:[t],hgap:i.hgap,vgap:i.vgap,tgap:i.tgap,bgap:i.bgap,lgap:i.lgap,rgap:i.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]}),this.left},populate:function(e){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_float",BI.FloatHorizontalLayout)},function(e,t){BI.InlineCenterAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.InlineLayout.superclass.props.apply(this,arguments),{baseCls:"bi-inline-center-adapt-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.InlineCenterAdaptLayout.superclass.render.apply(this,arguments),this.element.css({whiteSpace:"nowrap",textAlign:"center"}),this.populate(this.options.items)},_addElement:function(e,t,i){var n=this.options,r=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return r.element.css({position:"relative","vertical-align":"middle"}),r.element.addClass("inline-center-adapt-item"),n.vgap+n.tgap+(t.tgap||0)+(t.vgap||0)!==0&&r.element.css({"margin-top":n.vgap+n.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),n.hgap+n.lgap+(t.lgap||0)+(t.hgap||0)!==0&&r.element.css({"margin-left":(0===e?n.hgap:0)+n.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),n.hgap+n.rgap+(t.rgap||0)+(t.hgap||0)!==0&&r.element.css({"margin-right":n.hgap+n.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),n.vgap+n.bgap+(t.bgap||0)+(t.vgap||0)!==0&&r.element.css({"margin-bottom":n.vgap+n.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),r},resize:function(){this.stroke(this.options.items)},addItem:function(e){throw new Error("不能添加元素")},stroke:function(i){var n=this;BI.each(i,function(e,t){t&&n._addElement(e,t,i.length)})},populate:function(e){BI.InlineCenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_center_adapt",BI.InlineCenterAdaptLayout)},function(e,t){BI.InlineVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.InlineLayout.superclass.props.apply(this,arguments),{baseCls:"bi-inline-vertical-adapt-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,textAlign:"left"})},render:function(){BI.InlineVerticalAdaptLayout.superclass.render.apply(this,arguments);var e=this.options;this.element.css({whiteSpace:"nowrap",textAlign:e.textAlign}),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","vertical-align":"middle"}),n.element.addClass("inline-vertical-adapt-item"),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":(0===e?i.hgap:0)+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.InlineVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_vertical_adapt",BI.InlineVerticalAdaptLayout)},function(e,t){BI.FlexCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-center-adapt-layout",hgap:0,vgap:0})},render:function(){BI.FlexCenterLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FlexCenterLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","flex-shrink":"0","margin-left":(0===e?i.hgap:0)+"px","margin-right":i.hgap+"px","margin-top":i.vgap+"px","margin-bottom":i.vgap+"px"}),n},resize:function(){},populate:function(e){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_center_adapt",BI.FlexCenterLayout)},function(e,t){BI.FlexHorizontalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexHorizontalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-horizontal-center-adapt-layout",verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrolly:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var t=this,e=this.options;return{type:"bi.flex_vertical",ref:function(e){t.wrapper=e},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:e.verticalAlign,rowSize:e.rowSize,scrollx:e.scrollx,scrolly:e.scrolly,scrollable:e.scrollable,hgap:e.hgap,vgap:e.vgap,tgap:e.tgap,bgap:e.bgap,items:e.items}},resize:function(){},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate(e)}}),BI.shortcut("bi.flex_horizontal_adapt",BI.FlexHorizontalCenter),BI.shortcut("bi.flex_horizontal_center_adapt",BI.FlexHorizontalCenter)},function(e,t){BI.FlexHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-horizontal-layout",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexHorizontalLayout.superclass.render.apply(this,arguments);var e=this.options;this.element.addClass("v-"+e.verticalAlign).addClass("h-"+e.horizontalAlign),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","flex-shrink":"0"}),0<i.columnSize[e]&&n.element.width(i.columnSize[e]),"fill"===i.columnSize[e]&&n.element.css("flex","1"),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":(0===e?i.hgap:0)+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){},populate:function(e){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_horizontal",BI.FlexHorizontalLayout)},function(e,t){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 t=this,e=this.options;return{type:"bi.flex_horizontal",ref:function(e){t.wrapper=e},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:e.horizontalAlign,columnSize:e.columnSize,scrollx:e.scrollx,scrolly:e.scrolly,scrollable:e.scrollable,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,hgap:e.hgap,items:e.items}},resize:function(){},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate(e)}}),BI.shortcut("bi.flex_vertical_adapt",BI.FlexVerticalCenter),BI.shortcut("bi.flex_vertical_center_adapt",BI.FlexVerticalCenter)},function(e,t){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 e=this.options;this.element.addClass("h-"+e.horizontalAlign).addClass("v-"+e.verticalAlign),this.populate(this.options.items)},_addElement:function(e,t){var i=BI.FlexVerticalLayout.superclass._addElement.apply(this,arguments),n=this.options;return i.element.css({position:"relative","flex-shrink":"0"}),0<n.rowSize[e]&&i.element.height(n.rowSize[e]),"fill"===n.rowSize[e]&&i.element.css("flex","1"),n.vgap+n.tgap+(t.tgap||0)+(t.vgap||0)!==0&&i.element.css({"margin-top":(0===e?n.vgap:0)+n.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),n.hgap+n.lgap+(t.lgap||0)+(t.hgap||0)!==0&&i.element.css({"margin-left":n.hgap+n.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),n.hgap+n.rgap+(t.rgap||0)+(t.hgap||0)!==0&&i.element.css({"margin-right":n.hgap+n.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),n.vgap+n.bgap+(t.bgap||0)+(t.vgap||0)!==0&&i.element.css({"margin-bottom":n.vgap+n.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),i},resize:function(){},populate:function(e){BI.FlexVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical",BI.FlexVerticalLayout)},function(e,t){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(e,t){var i=this.options,n=BI.FlexWrapperCenterLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","margin-left":(0===e?i.hgap:0)+"px","margin-right":i.hgap+"px","margin-top":i.vgap+"px","margin-bottom":i.vgap+"px"}),n},appendFragment:function(e){this.$wrapper.append(e),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(e){BI.FlexWrapperCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_center_adapt",BI.FlexWrapperCenterLayout)},function(e,t){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-layout clearfix",verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrollable:!0,scrolly:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var t=this,e=this.options;return{type:"bi.flex_scrollable_vertical",ref:function(e){t.wrapper=e},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:e.verticalAlign,rowSize:e.rowSize,scrollx:e.scrollx,scrolly:e.scrolly,scrollable:e.scrollable,hgap:e.hgap,vgap:e.vgap,tgap:e.tgap,bgap:e.bgap,items:e.items}},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate(e)}}),BI.shortcut("bi.flex_scrollable_horizontal_adapt",BI.FlexWrapperHorizontalCenter),BI.shortcut("bi.flex_scrollable_horizontal_center_adapt",BI.FlexWrapperHorizontalCenter)},function(e,t){BI.FlexWrapperHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-horizontal-layout clearfix",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollable:null,scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexWrapperHorizontalLayout.superclass.render.apply(this,arguments);var e=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-horizontal-layout-wrapper v-"+e.verticalAlign).addClass("h-"+e.horizontalAlign),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","flex-shrink":"0"}),0<i.columnSize[e]&&n.element.width(i.columnSize[e]),"fill"===i.columnSize[e]&&n.element.css("flex","1"),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":(0===e?i.hgap:0)+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},appendFragment:function(e){this.$wrapper.append(e),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(e){BI.FlexWrapperHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_horizontal",BI.FlexWrapperHorizontalLayout)},function(e,t){BI.FlexWrapperVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-center-adapt-layout clearfix",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,scrollable:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var t=this,e=this.options;return{type:"bi.flex_scrollable_horizontal",ref:function(e){t.wrapper=e},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:e.horizontalAlign,columnSize:e.columnSize,scrollx:e.scrollx,scrolly:e.scrolly,scrollable:e.scrollable,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,items:e.items}},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate(e)}}),BI.shortcut("bi.flex_scrollable_vertical_adapt",BI.FlexWrapperVerticalCenter),BI.shortcut("bi.flex_scrollable_vertical_center_adapt",BI.FlexWrapperVerticalCenter)},function(e,t){BI.FlexWrapperVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-layout clearfix",horizontalAlign:BI.HorizontalAlign.Left,verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrollable:null,scrolly:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexWrapperVerticalLayout.superclass.render.apply(this,arguments);var e=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-vertical-layout-wrapper h-"+e.horizontalAlign).addClass("v-"+e.verticalAlign),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","flex-shrink":"0"}),0<i.rowSize[e]&&n.element.height(i.rowSize[e]),"fill"===i.rowSize[e]&&n.element.css("flex","1"),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":(0===e?i.vgap:0)+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},appendFragment:function(e){this.$wrapper.append(e),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(e){BI.FlexWrapperVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_vertical",BI.FlexWrapperVerticalLayout)},function(e,t){BI.AbsoluteLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-layout",hgap:null,vgap:null,lgap:null,rgap:null,tgap:null,bgap:null})},render:function(){BI.AbsoluteLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),r=0,o=0,a=0,s=0;return BI.isNotNull(t.left)&&(n.element.css({left:t.left}),r+=t.left),BI.isNotNull(t.right)&&(n.element.css({right:t.right}),o+=t.right),BI.isNotNull(t.top)&&(n.element.css({top:t.top}),a+=t.top),BI.isNotNull(t.bottom)&&(n.element.css({bottom:t.bottom}),s+=t.bottom),BI.isNotNull(i.hgap)&&(r+=i.hgap,n.element.css({left:r}),o+=i.hgap,n.element.css({right:o})),BI.isNotNull(i.vgap)&&(a+=i.vgap,n.element.css({top:a}),s+=i.vgap,n.element.css({bottom:s})),BI.isNotNull(i.lgap)&&(r+=i.lgap,n.element.css({left:r})),BI.isNotNull(i.rgap)&&(o+=i.rgap,n.element.css({right:o})),BI.isNotNull(i.tgap)&&(a+=i.tgap,n.element.css({top:a})),BI.isNotNull(i.bgap)&&(s+=i.bgap,n.element.css({bottom:s})),BI.isNotNull(t.width)&&n.element.css({width:t.width}),BI.isNotNull(t.height)&&n.element.css({height:t.height}),n.element.css({position:"absolute"}),n},resize:function(){this.stroke(this.options.items)},stroke:function(e){this.options.items=e||[];var i=this;BI.each(e,function(e,t){if(t){if(!BI.isWidget(t)&&!t.el)throw new Error("el must be exist");i._addElement(e,t)}})},populate:function(e){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute",BI.AbsoluteLayout)},function(e,t){BI.AdaptiveLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AdaptiveLayout.superclass.props.apply(this,arguments),{baseCls:"bi-adaptive-layout",hgap:null,vgap:null,lgap:null,rgap:null,tgap:null,bgap:null})},render:function(){BI.AdaptiveLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.AdaptiveLayout.superclass._addElement.apply(this,arguments);n.element.css({position:"relative"});var r=0,o=0,a=0,s=0;return BI.isNotNull(t.left)&&n.element.css({left:t.left}),BI.isNotNull(t.right)&&n.element.css({right:t.right}),BI.isNotNull(t.top)&&n.element.css({top:t.top}),BI.isNotNull(t.bottom)&&n.element.css({bottom:t.bottom}),BI.isNotNull(i.hgap)&&(r+=i.hgap,n.element.css({"margin-left":r}),o+=i.hgap,n.element.css({"margin-right":o})),BI.isNotNull(i.vgap)&&(a+=i.vgap,n.element.css({"margin-top":a}),s+=i.vgap,n.element.css({"margin-bottom":s})),BI.isNotNull(i.lgap)&&(r+=i.lgap,n.element.css({"margin-left":r})),BI.isNotNull(i.rgap)&&(o+=i.rgap,n.element.css({"margin-right":o})),BI.isNotNull(i.tgap)&&(a+=i.tgap,n.element.css({"margin-top":a})),BI.isNotNull(i.bgap)&&(s+=i.bgap,n.element.css({"margin-bottom":s})),BI.isNotNull(t.width)&&n.element.css({width:t.width}),BI.isNotNull(t.height)&&n.element.css({height:t.height}),n},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.adaptive",BI.AdaptiveLayout)},function(e,t){BI.BorderLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.BorderLayout.superclass.props.apply(this,arguments),{baseCls:"bi-border-layout",items:{}})},render:function(){BI.BorderLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(e){throw new Error("cannot be added")},stroke:function(e){var t,i,n=0,r=0,o=0,a=0;"north"in e&&null!=(t=e.north)&&(t.el&&(this.hasWidget(this.getName()+"north")||(i=BI.createWidget(t),this.addWidget(this.getName()+"north",i)),this.getWidgetByName(this.getName()+"north").element.height(t.height).css({position:"absolute",top:t.top||0,left:t.left||0,right:t.right||0,bottom:"initial"})),n=(t.height||0)+(t.top||0)+(t.bottom||0)),"south"in e&&null!=(t=e.south)&&(t.el&&(this.hasWidget(this.getName()+"south")||(i=BI.createWidget(t),this.addWidget(this.getName()+"south",i)),this.getWidgetByName(this.getName()+"south").element.height(t.height).css({position:"absolute",bottom:t.bottom||0,left:t.left||0,right:t.right||0,top:"initial"})),r=(t.height||0)+(t.top||0)+(t.bottom||0)),"west"in e&&null!=(t=e.west)&&(t.el&&(this.hasWidget(this.getName()+"west")||(i=BI.createWidget(t),this.addWidget(this.getName()+"west",i)),this.getWidgetByName(this.getName()+"west").element.width(t.width).css({position:"absolute",left:t.left||0,top:n,bottom:r,right:"initial"})),o=(t.width||0)+(t.left||0)+(t.right||0)),"east"in e&&null!=(t=e.east)&&(t.el&&(this.hasWidget(this.getName()+"east")||(i=BI.createWidget(t),this.addWidget(this.getName()+"east",i)),this.getWidgetByName(this.getName()+"east").element.width(t.width).css({position:"absolute",right:t.right||0,top:n,bottom:r,left:"initial"})),a=(t.width||0)+(t.left||0)+(t.right||0)),"center"in e&&null!=(t=e.center)&&(this.hasWidget(this.getName()+"center")||(i=BI.createWidget(t),this.addWidget(this.getName()+"center",i)),this.getWidgetByName(this.getName()+"center").element.css({position:"absolute",top:n,bottom:r,left:o,right:a}))},update:function(e){},populate:function(e){BI.BorderLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.border",BI.BorderLayout)},function(e,t){BI.CardLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.CardLayout.superclass.props.apply(this,arguments),{baseCls:"bi-card-layout",items:[]})},render:function(){BI.CardLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},stroke:function(e){var n=this,r=this.options;this.showIndex=void 0,BI.each(e,function(e,i){var t;i&&(n.hasWidget(i.cardName)?t=n.getWidgetByName(i.cardName):((t=BI.createWidget(i)).on(BI.Events.DESTROY,function(){var e=BI.findIndex(r.items,function(e,t){return t.cardName==i.cardName});-1<e&&r.items.splice(e,1)}),n.addWidget(i.cardName,t)),t.element.css({position:"absolute",top:"0",right:"0",bottom:"0",left:"0"}),t.setVisible(!1))})},update:function(){},empty:function(){BI.CardLayout.superclass.empty.apply(this,arguments),this.options.items=[]},populate:function(e){BI.CardLayout.superclass.populate.apply(this,arguments),this._mount(),this.options.defaultShowName&&this.showCardByName(this.options.defaultShowName)},isCardExisted:function(i){return BI.some(this.options.items,function(e,t){return t.cardName==i&&t.el})},getCardByName:function(e){if(!this.isCardExisted(e))throw new Error("cardName is not exist");return this._children[e]},_deleteCardByName:function(i){delete this._children[i];var e=BI.findIndex(this.options.items,function(e,t){return t.cardName==i});-1<e&&this.options.items.splice(e,1)},deleteCardByName:function(e){if(!this.isCardExisted(e))throw new Error("cardName is not exist");var t=this._children[e];this._deleteCardByName(e),t&&t._destroy()},addCardByName:function(e,t){if(this.isCardExisted(e))throw new Error("cardName is already exist");var i=BI.createWidget(t,this);return i.element.css({position:"relative",top:"0",left:"0",width:"100%",height:"100%"}).appendTo(this.element),i.invisible(),this.addWidget(e,i),this.options.items.push({el:t,cardName:e}),i},showCardByName:function(n,r,o){var a=this,s=this.isCardExisted(n);null!=this.showIndex&&(this.lastShowIndex=this.showIndex),this.showIndex=n;var l=!1;BI.each(this.options.items,function(e,t){var i=a._children[t.cardName];i&&(n!=t.cardName?!l&&!s&&BI.Action&&r instanceof BI.Action?(r.actionBack(i),l=!0):i.invisible():BI.Action&&r instanceof BI.Action?r.actionPerformed(void 0,i,o):(i.visible(),o&&o()))})},showLastCard:function(){var i=this;this.showIndex=this.lastShowIndex,BI.each(this.options.items,function(e,t){i._children[t.cardName].setVisible(i.showIndex==e)})},setDefaultShowName:function(e){return this.options.defaultShowName=e,this},getDefaultShowName:function(){return this.options.defaultShowName},getAllCardNames:function(){return BI.map(this.options.items,function(e,t){return t.cardName})},getShowingCard:function(){if(BI.isKey(this.showIndex))return this.getWidgetByName(this.showIndex)},deleteAllCard:function(){var i=this;BI.each(this.getAllCardNames(),function(e,t){i.deleteCardByName(t)})},hideAllCard:function(){var i=this;BI.each(this.options.items,function(e,t){i._children[t.cardName].invisible()})},isAllCardHide:function(){var i=this,n=!0;return BI.some(this.options.items,function(e,t){if(i._children[t.cardName].isVisible())return n=!1}),n},removeWidget:function(i){var n;BI.isWidget(i)?BI.each(this._children,function(e,t){t===i&&(n=e)}):n=i,n&&this._deleteCardByName(n)}}),BI.shortcut("bi.card",BI.CardLayout)},function(e,t){BI.DefaultLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.DefaultLayout.superclass.props.apply(this,arguments),{hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[]})},render:function(){BI.DefaultLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.DefaultLayout.superclass._addElement.apply(this,arguments);return i.vgap+i.tgap+(t.tgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)!==0&&n.element.css({"margin-left":i.hgap+i.lgap+(t.lgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+"px"}),n},resize:function(){},populate:function(e){BI.DefaultLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.default",BI.DefaultLayout)},function(e,t){BI.DivisionLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.DivisionLayout.superclass.props.apply(this,arguments),{baseCls:"bi-division-layout",columns:null,rows:null,items:[]})},render:function(){BI.DivisionLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.opitons.items)},addItem:function(e){throw new Error("cannot be added")},stroke:function(e){var t=this.options,i=t.rows||t.items.length,n=t.columns||0|(t.items[0]&&t.items[0].length),r=BI.makeArray(i),o={},a={};function s(e,t,i){0===t&&e.addClass("first-row"),0===i&&e.addClass("first-col"),e.addClass(BI.isOdd(t+1)?"odd-row":"even-row"),e.addClass(BI.isOdd(i+1)?"odd-col":"even-col"),e.addClass("center-element")}function l(e,t,i){var n="";0===t&&(n+=" first-row"),0===i&&(n+=" first-col"),BI.isOdd(t+1)?n+=" odd-row":n+=" even-row",BI.isOdd(i+1)?n+=" odd-col":n+=" even-col",e.cls=(e.cls||"")+n+" center-element"}BI.each(r,function(e){r[e]=BI.makeArray(n)}),BI.each(e,function(i,n){BI.isArray(n)?BI.each(n,function(e,t){o[i]=(o[i]||0)+n.width,a[e]=(a[e]||0)+n.height,r[i][e]=t}):(o[n.row]=(o[n.row]||0)+n.width,a[n.column]=(a[n.column]||0)+n.height,r[n.row][n.column]=n)});for(var u,c,h,p=0;p<i;p++)for(var d=0,g=0;g<n;g++){if(!r[p][g])throw new Error("item be required");this.hasWidget(this.getName()+p+"_"+g)?E=this.getWidgetByName(this.getName()+p+"_"+g):(E=BI.createWidget(r[p][g]),this.addWidget(this.getName()+p+"_"+g,E));var I=100*d/o[p];E.element.css({position:"absolute",left:I+"%"}),0<g&&this.getWidgetByName(this.getName()+p+"_"+(g-1)).element.css({right:100-I+"%"}),g==t.columns-1&&E.element.css({right:"0%"}),c=p,h=g,(u=E)instanceof BI.Widget?s(u.element,c,h):u.el instanceof BI.Widget?s(u.el.element,c,h):u.el?l(u.el,c,h):l(u,c,h),d+=r[p][g].width}for(g=0;g<t.columns;g++)for(var B=0,p=0;p<t.rows;p++){var E=this.getWidgetByName(this.getName()+p+"_"+g),f=100*B/a[g];E.element.css({top:f+"%"}),0<p&&this.getWidgetByName(this.getName()+(p-1)+"_"+g).element.css({bottom:100-f+"%"}),p==t.rows-1&&E.element.css({bottom:"0%"}),B+=r[p][g].height}},update:function(){},populate:function(e){BI.DivisionLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.division",BI.DivisionLayout)},function(e,t){BI.FloatLeftLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-left-layout clearfix",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatLeftLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FloatLeftLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","float":"left"}),BI.isNotNull(t.left)&&n.element.css({left:t.left}),BI.isNotNull(t.right)&&n.element.css({right:t.right}),BI.isNotNull(t.top)&&n.element.css({top:t.top}),BI.isNotNull(t.bottom)&&n.element.css({bottom:t.bottom}),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":(0===e?i.hgap:0)+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.FloatLeftLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left",BI.FloatLeftLayout),BI.FloatRightLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatRightLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-right-layout clearfix",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatRightLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FloatRightLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","float":"right"}),BI.isNotNull(t.left)&&n.element.css({left:t.left}),BI.isNotNull(t.right)&&n.element.css({right:t.right}),BI.isNotNull(t.top)&&n.element.css({top:t.top}),BI.isNotNull(t.bottom)&&n.element.css({bottom:t.bottom}),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":(0===e?i.hgap:0)+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.FloatRightLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right",BI.FloatRightLayout)},function(e,t){BI.GridLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.GridLayout.superclass.props.apply(this,arguments),{baseCls:"bi-grid-layout",columns:null,rows:null,items:[]})},render:function(){BI.GridLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(e){for(var t=this.options,i=t.rows||t.items.length,n=t.columns||0|(t.items[0]&&t.items[0].length),r=100/n,o=100/i,a=[],s=0;s<i;s++)a[s]=[];function l(e,t,i){0===t&&e.addClass("first-row"),0===i&&e.addClass("first-col"),e.addClass(BI.isOdd(t+1)?"odd-row":"even-row"),e.addClass(BI.isOdd(i+1)?"odd-col":"even-col"),e.addClass("center-element")}function u(e,t,i){var n="";0===t&&(n+=" first-row"),0===i&&(n+=" first-col"),BI.isOdd(t+1)?n+=" odd-row":n+=" even-row",BI.isOdd(i+1)?n+=" odd-col":n+=" even-col",e.cls=(e.cls||"")+n+" center-element"}BI.each(e,function(i,e){BI.isArray(e)?BI.each(e,function(e,t){a[i][e]=BI.createWidget(t)}):a[e.row][e.column]=BI.createWidget(e)});for(var c,h,p,s=0;s<i;s++)for(var d=0;d<n;d++)a[s][d]||(a[s][d]=BI.createWidget({type:"bi.layout"})),c=a[s][d],h=s,p=d,c instanceof BI.Widget?l(c.element,h,p):c.el instanceof BI.Widget?l(c.el.element,h,p):c.el?u(c.el,h,p):u(c,h,p),a[s][d].element.css({position:"absolute",top:o*s+"%",left:r*d+"%",right:100-r*(d+1)+"%",bottom:100-o*(s+1)+"%"}),this.addWidget(a[s][d])},update:function(){},populate:function(e){BI.GridLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.grid",BI.GridLayout)},function(e,t){BI.HorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-layout",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var e=this.options;BI.HorizontalLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("<table>").attr({cellspacing:0,cellpadding:0}).css({position:"relative","white-space":"nowrap",height:e.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:e.horizontalAlign===BI.HorizontalAlign.Center||e.horizontalAlign===BI.HorizontalAlign.Stretch?"100%":"auto","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=BI.Widget._renderEngine.createElement("<tr>"),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(e,t){var i,n,r=this.options,o=r.columnSize[e]<=1?100*r.columnSize[e]+"%":r.columnSize[e];return this.hasWidget(this._getChildName(e))?(i=this.getWidgetByName(this._getChildName(e))).element.attr("width",o):((n=BI.createWidget(t)).element.css({position:"relative",margin:"0px auto"}),i=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:o},items:[n]}),this.addWidget(this._getChildName(e),i)),i.element.css({"max-width":r.columnSize[e]<=1?o:o+"px"}),0===e&&i.element.addClass("first-element"),i.element.css({position:"relative","vertical-align":r.verticalAlign,margin:"0",padding:"0",border:"none"}),r.vgap+r.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":r.vgap+r.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),r.hgap+r.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":(0===e?r.hgap:0)+r.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),r.hgap+r.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":r.hgap+r.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),r.vgap+r.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":r.vgap+r.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),i},appendFragment:function(e){this.$tr.append(e),this.element.append(this.$table)},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(e){BI.HorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal",BI.HorizontalLayout),BI.HorizontalCellLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalCellLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-cell-layout",scrollable:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalCellLayout.superclass.render.apply(this,arguments),this.element.css({display:"table","vertical-align":"top"}),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.HorizontalCellLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative",display:"table-cell","vertical-align":"middle"}),0<i.hgap+i.lgap&&n.element.css({"margin-left":i.hgap+i.lgap+"px"}),0<i.hgap+i.rgap&&n.element.css({"margin-right":i.hgap+i.rgap+"px"}),0<i.vgap+i.tgap&&n.element.css({"margin-top":i.vgap+i.tgap+"px"}),0<i.vgap+i.bgap&&n.element.css({"margin-bottom":i.vgap+i.bgap+"px"}),n},resize:function(){},populate:function(e){BI.HorizontalCellLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_cell",BI.HorizontalCellLayout)},function(e,t){BI.InlineLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.InlineLayout.superclass.props.apply(this,arguments),{baseCls:"bi-inline-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.InlineLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.InlineLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative",display:"inline-block","*display":"inline","*zoom":1}),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":(0===e?i.hgap:0)+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.InlineLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline",BI.InlineLayout)},function(e,t){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(e,t){var i,n=this.options,r=BI.LatticeLayout.superclass._addElement.apply(this,arguments);return i=n.columnSize&&n.columnSize[e]?n.columnSize[e]/BI.sum(n.columnSize)*100+"%":1/this.options.items.length*100+"%",r.element.css({position:"relative","float":"left",width:i}),r},addItem:function(e){var t=BI.LatticeLayout.superclass.addItem.apply(this,arguments);return this.resize(),t},addItemAt:function(e){var t=BI.LatticeLayout.superclass.addItemAt.apply(this,arguments);return this.resize(),t},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.LatticeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.lattice",BI.LatticeLayout)},function(e,t){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(e,t){var i,n,r=this.options,o=[],a=0,s=0;function l(e,t,i){0===t&&e.addClass("first-row"),0===i&&e.addClass("first-col"),e.addClass(BI.isOdd(t+1)?"odd-row":"even-row"),e.addClass(BI.isOdd(i+1)?"odd-col":"even-col"),e.addClass("center-element")}function u(e,t,i){var n="";0===t&&(n+=" first-row"),0===i&&(n+=" first-col"),BI.isOdd(t+1)?n+=" odd-row":n+=" even-row",BI.isOdd(i+1)?n+=" odd-col":n+=" even-col",e.cls=(e.cls||"")+n+" center-element"}function c(e,t,i){e instanceof BI.Widget?l(e.element,t,i):e.el instanceof BI.Widget?l(e.el.element,t,i):e.el?u(e.el,t,i):u(e,t,i)}for(i=0;i<t.length&&BI.isNumber(r.columnSize[i]);i++)c(t[i],this.rows,i),o.push(BI.extend({top:0,bottom:0,left:r.columnSize[i]<=1?100*a+"%":a,width:r.columnSize[i]<=1?100*r.columnSize[i]+"%":r.columnSize[i]},t[i])),a+=r.columnSize[i]+(r.columnSize[i]<1?0:r.hgap);for(n=t.length-1;i<n;n--){if(!BI.isNumber(r.columnSize[n]))throw new Error("item with fill can only be one");c(t[n],this.rows,n),o.push(BI.extend({top:0,bottom:0,right:r.columnSize[n]<=1?100*s+"%":s,width:r.columnSize[n]<=1?100*r.columnSize[n]+"%":r.columnSize[n]},t[n])),s+=r.columnSize[n]+(r.columnSize[n]<1?0:r.hgap)}0<=i&&i<t.length&&(c(t[i],this.rows,i),o.push(BI.extend({top:0,bottom:0,left:a<=1?100*a+"%":a,right:s<=1?100*s+"%":s},t[i])));var h=BI.createWidget({type:"bi.absolute",height:BI.isArray(r.rowSize)?r.rowSize[this.rows]:r.rowSize,items:o});return 0<this.rows&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":r.vgap}),h.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,h),h},resize:function(){},addItem:function(e){if(!BI.isArray(e))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},update:function(){},populate:function(e){BI.TableLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table",BI.TableLayout)},function(e,t){BI.HTapeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HTapeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-h-tape-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[{width:100,el:{type:"bi.button",text:"button1"}},{width:"fill",el:{type:"bi.button",text:"button2"}},{width:200,el:{type:"bi.button",text:"button3"}}]})},render:function(){BI.HTapeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(e){throw new Error("cannot be added")},stroke:function(n){var r=this,o=this.options;n=BI.compact(n),BI.each(n,function(e,t){var i;r.hasWidget(r.getName()+e+"")?i=r.getWidgetByName(r.getName()+e+""):(i=BI.createWidget(t),r.addWidget(r.getName()+e+"",i)),i.element.css({position:"absolute",top:(t.vgap||0)+(t.tgap||0)+o.vgap+o.tgap+"px",bottom:(t.bgap||0)+(t.vgap||0)+o.vgap+o.bgap+"px"})});var a={},s={};a[0]=0,s[n.length-1]=0,BI.any(n,function(e,t){var i=r.getWidgetByName(r.getName()+e+"");if(BI.isNull(a[e])&&(a[e]=a[e-1]+n[e-1].width+(n[e-1].lgap||0)+2*(n[e-1].hgap||0)+o.hgap+o.lgap+o.rgap),t.width<1&&0<=t.width?i.element.css({left:100*a[e]+"%",width:100*t.width+"%"}):i.element.css({left:a[e]+(t.lgap||0)+(t.hgap||0)+o.hgap+o.lgap+"px",width:BI.isNumber(t.width)?t.width:""}),!BI.isNumber(t.width))return!0}),BI.backAny(n,function(e,t){var i=r.getWidgetByName(r.getName()+e+"");if(BI.isNull(s[e])&&(s[e]=s[e+1]+n[e+1].width+(n[e+1].rgap||0)+2*(n[e+1].hgap||0)+o.hgap+o.lgap+o.rgap),t.width<1&&0<=t.width?i.element.css({right:100*s[e]+"%",width:100*t.width+"%"}):i.element.css({right:s[e]+(t.rgap||0)+(t.hgap||0)+o.hgap+o.rgap+"px",width:BI.isNumber(t.width)?t.width:""}),!BI.isNumber(t.width))return!0})},update:function(){var i;return BI.each(this._children,function(e,t){i=t.update()||i}),i},populate:function(e){BI.HTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.htape",BI.HTapeLayout),BI.VTapeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.VTapeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-v-tape-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[{height:100,el:{type:"bi.button",text:"button1"}},{height:"fill",el:{type:"bi.button",text:"button2"}},{height:200,el:{type:"bi.button",text:"button3"}}]})},render:function(){BI.VTapeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(e){throw new Error("cannot be added")},stroke:function(n){var r=this,o=this.options;n=BI.compact(n),BI.each(n,function(e,t){var i;r.hasWidget(r.getName()+e+"")?i=r.getWidgetByName(r.getName()+e+""):(i=BI.createWidget(t),r.addWidget(r.getName()+e+"",i)),i.element.css({position:"absolute",left:(t.lgap||0)+(t.hgap||0)+o.hgap+o.lgap+"px",right:+(t.hgap||0)+(t.rgap||0)+o.hgap+o.rgap+"px"})});var a={},s={};a[0]=0,s[n.length-1]=0,BI.any(n,function(e,t){var i=r.getWidgetByName(r.getName()+e+"");if(BI.isNull(a[e])&&(a[e]=a[e-1]+n[e-1].height+(n[e-1].tgap||0)+2*(n[e-1].vgap||0)+o.vgap+o.tgap+o.bgap),t.height<1&&0<=t.height?i.element.css({top:100*a[e]+"%",height:100*t.height+"%"}):i.element.css({top:a[e]+(t.vgap||0)+(t.tgap||0)+o.vgap+o.tgap+"px",height:BI.isNumber(t.height)?t.height:""}),!BI.isNumber(t.height))return!0}),BI.backAny(n,function(e,t){var i=r.getWidgetByName(r.getName()+e+"");if(BI.isNull(s[e])&&(s[e]=s[e+1]+n[e+1].height+(n[e+1].bgap||0)+2*(n[e+1].vgap||0)+o.vgap+o.tgap+o.bgap),t.height<1&&0<=t.height?i.element.css({bottom:100*s[e]+"%",height:100*t.height+"%"}):i.element.css({bottom:s[e]+(t.vgap||0)+(t.bgap||0)+o.vgap+o.bgap+"px",height:BI.isNumber(t.height)?t.height:""}),!BI.isNumber(t.height))return!0})},update:function(){},populate:function(e){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout)},function(e,t){BI.TdLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TdLayout.superclass.props.apply(this,arguments),{baseCls:"bi-td-layout",columnSize:[200,200,200],hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TdLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("<table>").attr({cellspacing:0,cellpadding:0}).css({position:"relative",width:"100%",height:"100%","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.rows=0,this.populate(this.options.items)},_addElement:function(e,t){var i=this.options;function n(e,t,i){0===t&&e.addClass("first-row"),0===i&&e.addClass("first-col"),e.addClass(BI.isOdd(t+1)?"odd-row":"even-row"),e.addClass(BI.isOdd(i+1)?"odd-col":"even-col"),e.addClass("center-element")}function r(e,t,i){var n="";0===t&&(n+=" first-row"),0===i&&(n+=" first-col"),BI.isOdd(t+1)?n+=" odd-row":n+=" even-row",BI.isOdd(i+1)?n+=" odd-col":n+=" even-col",e.cls=(e.cls||"")+n+" center-element"}for(var o,a,s,l=BI.createWidget({type:"bi.default",tagName:"tr"}),u=0;u<t.length;u++){var c=BI.createWidget(t[u]);c.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),t[u].lgap&&c.element.css({"margin-left":t[u].lgap+"px"}),t[u].rgap&&c.element.css({"margin-right":t[u].rgap+"px"}),t[u].tgap&&c.element.css({"margin-top":t[u].tgap+"px"}),t[u].bgap&&c.element.css({"margin-bottom":t[u].bgap+"px"}),o=c,a=this.rows++,s=u,o instanceof BI.Widget?n(o.element,a,s):o.el instanceof BI.Widget?n(o.el.element,a,s):o.el?r(o.el,a,s):r(o,a,s);var h=BI.createWidget({type:"bi.default",attributes:{width:i.columnSize[u]<=1?100*i.columnSize[u]+"%":i.columnSize[u]},tagName:"td",items:[c]});h.element.css({position:"relative","vertical-align":"middle",margin:"0",padding:"0",border:"none"}),l.addItem(h)}return this.addWidget(this.getName()+e,l),l},appendFragment:function(e){this.$table.append(e),this.element.append(this.$table)},resize:function(){},addItem:function(e){if(!BI.isArray(e))throw new Error("item must be array");return BI.TdLayout.superclass.addItem.apply(this,arguments)},update:function(){},populate:function(e){BI.TdLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.td",BI.TdLayout)},function(e,t){BI.VerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.VerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-vertical-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,scrolly:!0})},render:function(){BI.VerticalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.VerticalLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative"}),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":(0===e?i.vgap:0)+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.VerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vertical",BI.VerticalLayout)},function(e,t){BI.WindowLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.WindowLayout.superclass.props.apply(this,arguments),{baseCls:"bi-window-layout",columns:3,rows:2,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,columnSize:[100,"fill",200],rowSize:[100,"fill"],items:[[{el:{type:"bi.button",text:"button1"}},{el:{type:"bi.button",text:"button2"}},{el:{type:"bi.button",text:"button3"}}]]})},render:function(){BI.WindowLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(e){throw new Error("cannot be added")},stroke:function(e){var t=this.options;function n(e,t,i){0===t&&e.addClass("first-row"),0===i&&e.addClass("first-col"),e.addClass(BI.isOdd(t+1)?"odd-row":"even-row"),e.addClass(BI.isOdd(i+1)?"odd-col":"even-col"),e.addClass("center-element")}function r(e,t,i){var n="";0===t&&(n+=" first-row"),0===i&&(n+=" first-col"),BI.isOdd(t+1)?n+=" odd-row":n+=" even-row",BI.isOdd(i+1)?n+=" odd-col":n+=" even-col",e.cls=(e.cls||"")+n+" center-element"}function i(e,t,i){e instanceof BI.Widget?n(e.element,t,i):e.el instanceof BI.Widget?n(e.el.element,t,i):e.el?r(e.el,t,i):r(e,t,i)}BI.isNumber(t.rowSize)&&(t.rowSize=BI.makeArray(t.items.length,1/t.items.length)),BI.isNumber(t.columnSize)&&(t.columnSize=BI.makeArray(t.items[0].length,1/t.items[0].length));for(var o=0;o<t.rows;o++)for(var a=0;a<t.columns;a++){if(!t.items[o][a])throw new Error("item be required");this.hasWidget(this.getName()+o+"_"+a)||((B=BI.createWidget(t.items[o][a])).element.css({position:"absolute"}),this.addWidget(this.getName()+o+"_"+a,B))}var s={},l={},u={},c={};u[s[0]=0]=0,l[t.columns-1]=0;for(o=c[t.rows-1]=0;o<t.rows;o++){for(a=0;a<t.columns;a++){var h=this.getWidgetByName(this.getName()+o+"_"+a);BI.isNull(u[o])&&(u[o]=u[o-1]+(t.rowSize[o-1]<1?t.rowSize[o-1]:t.rowSize[o-1]+t.vgap+t.bgap));var p=u[o]<=1?100*u[o]+"%":u[o]+t.vgap+t.tgap+"px",d="";BI.isNumber(t.rowSize[o])&&(d=t.rowSize[o]<=1?100*t.rowSize[o]+"%":t.rowSize[o]+"px"),h.element.css({top:p,height:d}),i(h,o,a)}if(!BI.isNumber(t.rowSize[o]))break}for(o=t.rows-1;0<=o;o--){for(a=0;a<t.columns;a++){h=this.getWidgetByName(this.getName()+o+"_"+a);BI.isNull(c[o])&&(c[o]=c[o+1]+(t.rowSize[o+1]<1?t.rowSize[o+1]:t.rowSize[o+1]+t.vgap+t.tgap));var g=c[o]<=1?100*c[o]+"%":c[o]+t.vgap+t.bgap+"px",d="";BI.isNumber(t.rowSize[o])&&(d=t.rowSize[o]<=1?100*t.rowSize[o]+"%":t.rowSize[o]+"px"),h.element.css({bottom:g,height:d}),i(h,o,a)}if(!BI.isNumber(t.rowSize[o]))break}for(a=0;a<t.columns;a++){for(o=0;o<t.rows;o++){h=this.getWidgetByName(this.getName()+o+"_"+a);BI.isNull(s[a])&&(s[a]=s[a-1]+(t.columnSize[a-1]<1?t.columnSize[a-1]:t.columnSize[a-1]+t.hgap+t.rgap));var I=s[a]<=1?100*s[a]+"%":s[a]+t.hgap+t.lgap+"px",B="";BI.isNumber(t.columnSize[a])&&(B=t.columnSize[a]<=1?100*t.columnSize[a]+"%":t.columnSize[a]+"px"),h.element.css({left:I,width:B}),i(h,o,a)}if(!BI.isNumber(t.columnSize[a]))break}for(a=t.columns-1;0<=a;a--){for(o=0;o<t.rows;o++){h=this.getWidgetByName(this.getName()+o+"_"+a);BI.isNull(l[a])&&(l[a]=l[a+1]+(t.columnSize[a+1]<1?t.columnSize[a+1]:t.columnSize[a+1]+t.hgap+t.lgap));var E=l[a]<=1?100*l[a]+"%":l[a]+t.hgap+t.rgap+"px",B="";BI.isNumber(t.columnSize[a])&&(B=t.columnSize[a]<=1?100*t.columnSize[a]+"%":t.columnSize[a]+"px"),h.element.css({right:E,width:B}),i(h,o,a)}if(!BI.isNumber(t.columnSize[a]))break}},update:function(){},populate:function(e){BI.WindowLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.window",BI.WindowLayout)},function(e,t){BI.CenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.CenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-center-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.CenterLayout.superclass.render.apply(this,arguments);var t=this,n=this.options,r=[],i=n.items;return BI.each(i,function(e){r.push({column:e,row:0,el:BI.createWidget({type:"bi.default",cls:"center-element "+(0===e?"first-element ":"")+(e===i.length-1?"last-element":"")})})}),BI.each(i,function(e,t){var i;t&&((i=BI.createWidget(t)).element.css({position:"absolute",left:n.hgap+n.lgap,right:n.hgap+n.rgap,top:n.vgap+n.tgap,bottom:n.vgap+n.bgap,width:"auto",height:"auto"}),r[e].el.addItem(i))}),{type:"bi.grid",ref:function(e){t.wrapper=e},columns:r.length,rows:1,items:r}},resize:function(){},addItem:function(e){throw new Error("cannot be added")},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate.apply(this.wrapper,arguments)}}),BI.shortcut("bi.center",BI.CenterLayout)},function(e,t){BI.FloatCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-center-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatCenterLayout.superclass.render.apply(this,arguments);var t=this,n=this.options,i=n.items,r=[],o=100/i.length;return BI.each(i,function(e){var t=BI.createWidget({type:"bi.default"});t.element.addClass("center-element "+(0===e?"first-element ":"")+(e===i.length-1?"last-element":"")).css({width:o+"%",height:"100%"}),r.push({el:t})}),BI.each(i,function(e,t){var i;t&&((i=BI.createWidget(t)).element.css({position:"absolute",left:n.hgap+n.lgap,right:n.hgap+n.rgap,top:n.vgap+n.tgap,bottom:n.vgap+n.bgap,width:"auto",height:"auto"}),r[e].el.addItem(i))}),{type:"bi.left",ref:function(e){t.wrapper=e},items:r}},resize:function(){},addItem:function(e){throw new Error("cannot be added")},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate.apply(this.wrapper,arguments)}}),BI.shortcut("bi.float_center",BI.FloatCenterLayout)},function(e,t){BI.HorizontalCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-center-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalCenterLayout.superclass.render.apply(this,arguments);var t=this,n=this.options,i=n.items,r=[];return BI.each(i,function(e){r.push({column:e,row:0,el:BI.createWidget({type:"bi.default",cls:"center-element "+(0===e?"first-element ":"")+(e===i.length-1?"last-element":"")})})}),BI.each(i,function(e,t){var i;t&&((i=BI.createWidget(t)).element.css({position:"absolute",left:n.hgap+n.lgap,right:n.hgap+n.rgap,top:n.vgap+n.tgap,bottom:n.vgap+n.bgap,width:"auto"}),r[e].el.addItem(i))}),{type:"bi.grid",ref:function(e){t.wrapper=e},columns:r.length,rows:1,items:r}},resize:function(){},addItem:function(e){throw new Error("cannot be added")},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate.apply(this.wrapper,arguments)}}),BI.shortcut("bi.horizontal_center",BI.HorizontalCenterLayout)},function(e,t){BI.VerticalCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.VerticalCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-vertical-center-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.VerticalCenterLayout.superclass.render.apply(this,arguments);var t=this,n=this.options,i=n.items,r=[];return BI.each(i,function(e){r.push({column:0,row:e,el:BI.createWidget({type:"bi.default",cls:"center-element "+(0===e?"first-element ":"")+(e===i.length-1?"last-element":"")})})}),BI.each(i,function(e,t){var i;t&&((i=BI.createWidget(t)).element.css({position:"absolute",left:n.hgap+n.lgap,right:n.hgap+n.rgap,top:n.vgap+n.tgap,bottom:n.vgap+n.bgap,height:"auto"}),r[e].el.addItem(i))}),{type:"bi.grid",ref:function(e){t.wrapper=e},columns:1,rows:r.length,items:r}},resize:function(){},addItem:function(e){throw new Error("cannot be added")},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate.apply(this.wrapper,arguments)}}),BI.shortcut("bi.vertical_center",BI.VerticalCenterLayout)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){BI.Pane=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Pane.superclass._defaultConfig.apply(this,arguments),{_baseCls:"bi-pane",tipText:BI.i18nText("BI-No_Selected_Item"),overlap:!0,onLoaded:BI.emptyFn})},_assertTip:function(){var e=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:e.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var e=this.options,t=BI.isIE(),i=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(t?" wave-loading hack":""),height:30,width:30,hgap:5,vgap:2.5,items:t?[]:[{type:"bi.layout",cls:"animate-rect rect1",height:25,width:3},{type:"bi.layout",cls:"animate-rect rect2",height:25,width:3},{type:"bi.layout",cls:"animate-rect rect3",height:25,width:3}]});this.setTipVisible(!1),!0===e.overlap?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:i}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(this.getName())):BI.isNull(this._loading)&&(this._loading=i,this._loading.element.css("zIndex",1),BI.createWidget({type:"bi.absolute_center_adapt",element:this,cls:"loading-container",items:[{el:this._loading,left:0,right:0,top:0}]})),this.element.addClass("loading-status")},loaded:function(){var e=this.options;BI.Layers.remove(this.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),e.onLoaded(),this.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(e){!0===e?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(e){this.options.items=e||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED"},function(e,t){BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(e,t){t=t||{};var i=this.options,n=this.getTipType()||(this.isEnabled()?"success":"warning"),r="success"!==n&&this.getWarningTitle()||this.getTitle();BI.isKey(r)&&(BI.Tooltips.show(e,this.getName(),r,n,this,t),i.action&&BI.Actions.runAction(i.action,"hover",i,this),BI.Actions.runGlobalAction("hover",i,this))},_hideTooltip:function(){var e=this,t=BI.Tooltips.get(this.getName());BI.isNotNull(t)&&t.element.fadeOut(200,function(){BI.Tooltips.remove(e.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var e=this.options;(BI.isKey(e.title)||BI.isKey(e.warningTitle)||BI.isFunction(e.title)||BI.isFunction(e.warningTitle))&&this.enableHover({belowMouse:e.belowMouse,container:e.container})},_clearTimeOut:function(){BI.isNotNull(this.showTimeout)&&(clearTimeout(this.showTimeout),this.showTimeout=null),BI.isNotNull(this.hideTimeout)&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)},enableHover:function(t){t=t||{};var i=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(e){i._e=e,"warning"===i.getTipType()||BI.isKey(i.getWarningTitle())&&!i.isEnabled()?i.showTimeout=BI.delay(function(){BI.isNotNull(i.showTimeout)&&i._showToolTip(i._e||e,t)},200):"success"!==i.getTipType()&&!i.isEnabled()||(i.showTimeout=BI.delay(function(){BI.isNotNull(i.showTimeout)&&i._showToolTip(i._e||e,t)},500))}),this.element.on("mousemove.title"+this.getName(),function(e){i._e=e,BI.isNotNull(i.showTimeout)&&(clearTimeout(i.showTimeout),i.showTimeout=null),BI.isNull(i.hideTimeout)&&(i.hideTimeout=BI.delay(function(){BI.isNotNull(i.hideTimeout)&&i._hideTooltip()},500)),i.showTimeout=BI.delay(function(){BI.isNotNull(i.showTimeout)&&(BI.isNotNull(i.hideTimeout)&&(clearTimeout(i.hideTimeout),i.hideTimeout=null),i.element.__isMouseInBounds__(i._e||e)&&i._showToolTip(i._e||e,t))},500)}),this.element.on("mouseleave.title"+this.getName(),function(e){i._e=null,i._clearTimeOut(),i._hideTooltip()}),this._hoverBinded=!0)},disabledHover:function(){this._clearTimeOut(),this._hideTooltip(),this.element.unbind("mouseenter.title"+this.getName()).unbind("mousemove.title"+this.getName()).unbind("mouseleave.title"+this.getName()),this._hoverBinded=!1},populate:function(e){this.items=e||[]},setTitle:function(e,t){this.options.title=e,BI.isKey(e)||BI.isFunction(e)?this.enableHover(t):this.disabledHover()},setWarningTitle:function(e,t){this.options.warningTitle=e,BI.isKey(e)||BI.isFunction(e)?this.enableHover(t):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var e=this.options.title;return BI.isFunction(e)?e():e},getWarningTitle:function(){var e=this.options.warningTitle;return BI.isFunction(e)?e():e},setValue:function(e){this.options.readonly||(this.options.value=e)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.isNotNull(this.showTimeout)&&(clearTimeout(this.showTimeout),this.showTimeout=null),BI.Tooltips.remove(this.getName())}})},function(e,t){BI.Text=BI.inherit(BI.Single,{props:{baseCls:"bi-text",textAlign:"left",whiteSpace:"normal",lineHeight:null,handler:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",py:"",highLight:!1},render:function(){var e=this,t=this.options;0<t.hgap+t.lgap&&this.element.css({"padding-left":t.hgap+t.lgap+"px"}),0<t.hgap+t.rgap&&this.element.css({"padding-right":t.hgap+t.rgap+"px"}),0<t.vgap+t.tgap&&this.element.css({"padding-top":t.vgap+t.tgap+"px"}),0<t.vgap+t.bgap&&this.element.css({"padding-bottom":t.vgap+t.bgap+"px"}),BI.isNumber(t.height)&&this.element.css({lineHeight:t.height+"px"}),BI.isNumber(t.lineHeight)&&this.element.css({lineHeight:t.lineHeight+"px"}),BI.isWidthOrHeight(t.maxWidth)&&this.element.css({maxWidth:t.maxWidth}),this.element.css({textAlign:t.textAlign,whiteSpace:this._getTextWrap(),textOverflow:"nowrap"===t.whiteSpace?"ellipsis":"",overflow:"nowrap"!==t.whiteSpace&&BI.isWidthOrHeight(t.height)?"auto":""}),t.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){t.handler(e.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var i=this._getShowText();BI.isKey(i)?this.setText(i):BI.isKey(t.value)&&this.setText(t.value),BI.isKey(t.keyword)&&this.doRedMark(t.keyword),t.highLight&&this.doHighLight()},_getTextWrap:function(){switch(this.options.whiteSpace){case"nowrap":return"pre";case"normal":default:return"pre-wrap"}},_getShowText:function(){var e=this.options;return BI.isFunction(e.text)?e.text():e.text},doRedMark:function(e){var t=this.options;t.keyword=e,this.text.element.__textKeywordMarked__(this._getShowText()||t.value,e,t.py)},unRedMark:function(){var e=this.options;e.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||e.value,"",e.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(e){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(e)},setStyle:function(e){this.text.element.css(e)},setText:function(e){BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(e)?e:"",BI.isIE9Below()?this.text.element.html(BI.htmlEncode(this._getShowText())):(this.text.element[0].textContent=this._getShowText(),BI.isKey(this.options.keyword)&&this.doRedMark(this.options.keyword))}}),BI.shortcut("bi.text",BI.Text)},function(e,t){BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-basic-button"+(e.invalid?"":" cursor-pointer")+(BI.isIE()&&BI.getIEVersion()<10?" hack":""),value:"",text:"",stopEvent:!1,stopPropagation:!1,selected:!1,once:!1,forceSelected:!1,forceNotSelected:!1,disableSelected:!1,shadow:!1,isShadowShowingOnSelected:!1,trigger:null,handler:BI.emptyFn,bubble:null})},_init:function(){BI.BasicButton.superclass._init.apply(this,arguments);var e=this.options;!0===e.selected&&BI.nextTick(BI.bind(function(){this.setSelected(e.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),e.shadow&&this._createShadow(),e.level&&this.element.addClass("button-"+e.level)},_createShadow:function(){var t=this,i=this.options,n=function(){t.$mask||(t.$mask=BI.createWidget(BI.isObject(i.shadow)?i.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),t.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:t,items:[{el:t.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){t._hover||i.isShadowShowingOnSelected||(n(),t.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(e){t.element.__isMouseInBounds__(e)&&(!t.isEnabled()||t._hover||!i.isShadowShowingOnSelected&&t.isSelected()||(n(),t.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(e){t.element.__isMouseInBounds__(e)||t.isEnabled()&&!t._hover&&(n(),t.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){t.isEnabled()&&!t._hover&&(n(),t.$mask.invisible())})},bindEvent:function(){var e,i,o=this,a=this.options,s=this.handle();function l(e){a.stopEvent&&e.stopEvent(),a.stopPropagation&&e.stopPropagation()}function u(e){if(l(e),!(!o.isEnabled()||o.isOnce()&&o.isSelected())){var t;if(BI.isKey(a.bubble)||BI.isFunction(a.bubble))return BI.isNull(o.combo)&&BI.createWidget({type:"bi.absolute",element:o,items:[{el:{type:"bi.bubble_combo",trigger:"",destroyWhenHide:!0,ref:function(){o.combo=this},el:{type:"bi.layout",height:"100%"},popup:{type:"bi.text_bubble_bar_popup_view",text:n(),ref:function(){t=this},listeners:[{eventName:BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,action:function(e){o.combo.hideView(),e&&i.apply(o,arguments)}}]},listeners:[{eventName:BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,action:function(){t.populate(n())}}]},left:0,right:0,bottom:0,top:0}]}),void(o.combo.isViewVisible()?o.combo.hideView():o.combo.showView());i.apply(o,arguments)}}function n(){var e=o.options.bubble;return BI.isFunction(e)?e():e}s&&(s=s.element,e=(a.trigger||"").split(","),BI.each(e,function(e,t){switch(t){case"mouseup":var i=!1;s.mousedown(function(){i=!0}),s.mouseup(function(e){!0===i&&u(e),i=!1,l(e)});break;case"mousedown":var i=!1,n=!1;s.mousedown(function(e){BI.Widget._renderEngine.createElement(document).bind("mouseup."+o.getName(),function(e){!BI.DOM.isExist(o)||s.__isMouseInBounds__(e)||!0!==i||n||o._trigger(),i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+o.getName())}),!0!==i&&(o.isSelected()?n=!0:u(e),i=!0,l(e))}),s.mouseup(function(e){BI.DOM.isExist(o)&&!0===i&&!0===n&&u(e),n=i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+o.getName())});break;case"dblclick":s.dblclick(u);break;case"lclick":var r,i=!1;s.mousedown(function(e){BI.Widget._renderEngine.createElement(document).bind("mouseup."+o.getName(),function(e){r&&clearInterval(r),r=null,i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+o.getName())}),!0!==i&&(!o.isEnabled()||o.isOnce()&&o.isSelected()||(r=setInterval(function(){o.isEnabled()&&o.doClick()},180),i=!0,l(e)))});break;default:(a.stopEvent||a.stopPropagation)&&s.mousedown(function(e){l(e)}),s.click(u)}}),i=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1}))},_trigger:function(e){var t,i=this.options;this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())),this.isValid()&&(i.handler.call(this,this.getValue(),this,e),t=this.getValue(),this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,t,this,e),this.fireEvent(BI.BasicButton.EVENT_CHANGE,t,this),i.action&&BI.Actions.runAction(i.action,"click",i,this),BI.Actions.runGlobalAction("click",i,this)))},_doClick:function(e){this.isValid()&&this.beforeClick(e),this._trigger(e),this.isValid()&&this.doClick(e)},beforeClick:function(){},doClick:function(){},handle:function(){return this},hover:function(){this._hover=!0,this.handle().element.addClass("hover"),this.options.shadow&&this.$mask&&this.$mask.setVisible(!0)},dishover:function(){this._hover=!1,this.handle().element.removeClass("hover"),this.options.shadow&&this.$mask&&this.$mask.setVisible(!1)},setSelected:function(e){var t=this.options;(t.selected=e)?this.handle().element.addClass("active"):this.handle().element.removeClass("active"),t.shadow&&!t.isShadowShowingOnSelected&&this.$mask&&this.$mask.setVisible(!1)},isSelected:function(){return this.options.selected},isOnce:function(){return this.options.once},isForceSelected:function(){return this.options.forceSelected},isForceNotSelected:function(){return this.options.forceNotSelected},isDisableSelected:function(){return this.options.disableSelected},setText:function(e){this.options.text=e},getText:function(){return this.options.text},_setEnable:function(e){BI.BasicButton.superclass._setEnable.apply(this,arguments),!0===e?this.element.removeClass("base-disabled disabled"):!1===e&&this.element.addClass("base-disabled disabled"),e||this.options.shadow&&this.$mask&&this.$mask.setVisible(!1)},empty:function(){BI.Widget._renderEngine.createElement(document).unbind("mouseup."+this.getName()),BI.BasicButton.superclass.empty.apply(this,arguments)},destroy:function(){BI.BasicButton.superclass.destroy.apply(this,arguments)}}),BI.BasicButton.EVENT_CHANGE="BasicButton.EVENT_CHANGE"},function(e,t){BI.NodeButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.NodeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-node",open:!1})},_init:function(){BI.NodeButton.superclass._init.apply(this,arguments);var e=this;BI.nextTick(function(){e.setOpened(e.isOpened())})},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.setOpened(!this.isOpened())},isOnce:function(){return!1},isOpened:function(){return!!this.options.open},setOpened:function(e){this.options.open=!!e},triggerCollapse:function(){this.isOpened()&&(this.setOpened(!1),this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,this.getValue(),this))},triggerExpand:function(){this.isOpened()||(this.setOpened(!0),this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,this.getValue(),this))}})},function(e,t){BI.Tip=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Tip.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-tip",zIndex:BI.zIndex_tip})},_init:function(){BI.Tip.superclass._init.apply(this,arguments),this.element.css({zIndex:this.options.zIndex})}})},function(e,t){BI.ButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-button-group",behaviors:{},items:[],value:"",chooseType:BI.Selection.Single,layouts:[{type:"bi.center",hgap:0,vgap:0}]})},_init:function(){BI.ButtonGroup.superclass._init.apply(this,arguments);var e=this.options,i={};BI.each(e.behaviors,function(e,t){i[e]=BI.BehaviorFactory.createBehavior(e,{rule:t})}),this.behaviors=i,this.populate(e.items),(BI.isKey(e.value)||BI.isNotEmptyArray(e.value))&&this.setValue(e.value)},_createBtns:function(e){this.options;return BI.createWidgets(BI.createItems(e,{type:"bi.text_button"}))},_btnsCreator:function(e){var r=this,i=Array.prototype.slice.call(arguments),o=this.options,t=this._createBtns(e);return i[0]=t,BI.each(this.behaviors,function(e,t){t.doBehavior.apply(t,i)}),BI.each(t,function(e,n){n.on(BI.Controller.EVENT_CHANGE,function(e,t,i){if(e===BI.Events.CLICK){switch(o.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:r.setValue(n.getValue());break;case BI.ButtonGroup.CHOOSE_TYPE_NONE:r.setValue([])}r.fireEvent(BI.Controller.EVENT_CHANGE,arguments),r.fireEvent(BI.ButtonGroup.EVENT_CHANGE,t,i)}else r.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),n.on(BI.Events.DESTROY,function(){BI.remove(r.buttons,n)})}),t},_packageBtns:function(e){for(var i=this.options,n=i.layouts.length-1;0<n;n--)e=BI.map(e,function(e,t){return BI.extend({},i.layouts[n],{items:[BI.extend({},i.layouts[n].el,{el:t})]})});return e},_packageSimpleItems:function(i){var e=this.options;return BI.map(e.items,function(e,t){return BI.stripEL(t)===t?i[e]:BI.extend({},t,{el:i[e]})})},_packageItems:function(e,t){return BI.createItems(BI.makeArrayByArray(e,{}),BI.clone(t))},_packageLayout:function(e){for(var t=this.options,i=BI.deepClone(t.layouts[0]),n=BI.formatEL(i).el;n&&n.items&&!BI.isEmpty(n.items);)n=BI.formatEL(n.items[0]).el;return n.items=e,i},_isSimpleLayout:function(){var e=this.options;return 1===e.layouts.length&&!BI.isArray(e.items[0])},doBehavior:function(){var i=Array.prototype.slice.call(arguments);i.unshift(this.buttons),BI.each(this.behaviors,function(e,t){t.doBehavior.apply(t,i)})},prependItems:function(e){this.options;var t=this._btnsCreator.apply(this,arguments);this.buttons=BI.concat(t,this.buttons),this._isSimpleLayout()&&this.layouts&&this.layouts.prependItems?this.layouts.prependItems(t):(e=this._packageItems(e,this._packageBtns(t)),this.layouts.prependItems(this._packageLayout(e).items))},addItems:function(e){this.options;var t=this._btnsCreator.apply(this,arguments);this.buttons=BI.concat(this.buttons,t),this._isSimpleLayout()&&this.layouts&&this.layouts.addItems?this.layouts.addItems(t):(e=this._packageItems(e,this._packageBtns(t)),this.layouts.addItems(this._packageLayout(e).items))},removeItemAt:function(e){BI.removeAt(this.buttons,e),this.layouts.removeItemAt(e)},removeItems:function(i){i=BI.isArray(i)?i:[i];var n=[];BI.each(this.buttons,function(e,t){BI.deepContains(i,t.getValue())&&n.push(e)}),BI.removeAt(this.buttons,n),this.layouts.removeItemAt(n)},populate:function(e){e=e||[],this.empty(),this.options.items=e,this.buttons=this._btnsCreator.apply(this,arguments),e=this._isSimpleLayout()?this._packageSimpleItems(this.buttons):this._packageItems(e,this._packageBtns(this.buttons)),this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(e)))},setNotSelectedValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttons,function(e,t){BI.deepContains(i,t.getValue())?t.setSelected&&t.setSelected(!1):t.setSelected&&t.setSelected(!0)})},setEnabledValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttons,function(e,t){BI.deepContains(i,t.getValue())?t.setEnable(!0):t.setEnable(!1)})},setValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttons,function(e,t){BI.deepContains(i,t.getValue())?t.setSelected&&t.setSelected(!0):t.setSelected&&t.setSelected(!1)})},getNotSelectedValue:function(){var i=[];return BI.each(this.buttons,function(e,t){!t.isEnabled()||t.isSelected&&t.isSelected()||i.push(t.getValue())}),i},getValue:function(){var i=[];return BI.each(this.buttons,function(e,t){t.isEnabled()&&t.isSelected&&t.isSelected()&&i.push(t.getValue())}),i},getAllButtons:function(){return this.buttons},getAllLeaves:function(){return this.buttons},getSelectedButtons:function(){var i=[];return BI.each(this.buttons,function(e,t){t.isSelected&&t.isSelected()&&i.push(t)}),i},getNotSelectedButtons:function(){var i=[];return BI.each(this.buttons,function(e,t){t.isSelected&&!t.isSelected()&&i.push(t)}),i},getIndexByValue:function(i){var n=-1;return BI.any(this.buttons,function(e,t){if(t.isEnabled()&&t.getValue()===i)return n=e,!0}),n},getNodeById:function(i){var n;return BI.any(this.buttons,function(e,t){if(t.isEnabled()&&t.options.id===i)return n=t,!0}),n},getNodeByValue:function(i){var n;return BI.any(this.buttons,function(e,t){if(t.isEnabled()&&t.getValue()===i)return n=t,!0}),n},empty:function(){BI.ButtonGroup.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.ButtonGroup.superclass.destroy.apply(this,arguments),this.options.items=[]}}),BI.extend(BI.ButtonGroup,{CHOOSE_TYPE_SINGLE:BI.Selection.Single,CHOOSE_TYPE_MULTI:BI.Selection.Multi,CHOOSE_TYPE_ALL:BI.Selection.All,CHOOSE_TYPE_NONE:BI.Selection.None,CHOOSE_TYPE_DEFAULT:BI.Selection.Default}),BI.ButtonGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_group",BI.ButtonGroup)},function(e,t){BI.ButtonTree=BI.inherit(BI.ButtonGroup,{_defaultConfig:function(){return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-button-tree"})},_init:function(){BI.ButtonTree.superclass._init.apply(this,arguments)},setNotSelectedValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttons,function(e,t){BI.isFunction(t.setSelected)?BI.deepContains(i,t.getValue())?t.setSelected(!1):t.setSelected(!0):t.setNotSelectedValue(i)})},setEnabledValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttons,function(e,t){BI.isFunction(t.setEnabledValue)?t.setEnabledValue(i):BI.deepContains(i,t.getValue())?t.setEnable(!0):t.setEnable(!1)})},setValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttons,function(e,t){BI.isFunction(t.setSelected)?BI.deepContains(i,t.getValue())?t.setSelected(!0):t.setSelected(!1):t.setValue(i)})},getNotSelectedValue:function(){var i=[];return BI.each(this.buttons,function(e,t){!t.isEnabled()||BI.isFunction(t.setSelected)?t.isEnabled()&&t.isSelected&&!t.isSelected()&&i.push(t.getValue()):i=BI.concat(i,t.getNotSelectedValue())}),i},getValue:function(){var i=[];return BI.each(this.buttons,function(e,t){!t.isEnabled()||BI.isFunction(t.setSelected)?t.isEnabled()&&t.isSelected&&t.isSelected()&&i.push(t.getValue()):i=BI.concat(i,t.getValue())}),i},getSelectedButtons:function(){var i=[];return BI.each(this.buttons,function(e,t){!t.isEnabled()||BI.isFunction(t.setSelected)?t.isSelected&&t.isSelected()&&i.push(t):i=i.concat(t.getSelectedButtons())}),i},getNotSelectedButtons:function(){var i=[];return BI.each(this.buttons,function(e,t){!t.isEnabled()||BI.isFunction(t.setSelected)?t.isSelected&&!t.isSelected()&&i.push(t):i=i.concat(t.getNotSelectedButtons())}),i},getAllLeaves:function(){var i=[];return BI.each(this.buttons,function(e,t){!t.isEnabled()||BI.isFunction(t.setSelected)?t.isEnabled()&&i.push(t):i=i.concat(t.getAllLeaves())}),i},getIndexByValue:function(n){var r=-1;return BI.any(this.buttons,function(e,t){var i=t.getValue();if(t.isEnabled()&&(i===n||BI.contains(i,n)))return r=e,!0}),r},getNodeById:function(i){var n;return BI.any(this.buttons,function(e,t){if(t.isEnabled()){if(t.attr("id")===i)return n=t,!0;if(BI.isFunction(t.getNodeById)&&(n=t.getNodeById(i)))return!0}}),n},getNodeByValue:function(i){var n;return BI.any(this.buttons,function(e,t){if(t.isEnabled())if(BI.isFunction(t.getNodeByValue)){if(n=t.getNodeByValue(i))return!0}else if(t.attr("value")===i)return n=t,!0}),n}}),BI.ButtonTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_tree",BI.ButtonTree)},function(e,t){BI.prepares.push(function(){BI.Resizers=new BI.ResizeController,BI.Layers=new BI.LayerController,BI.Maskers=new BI.MaskersController,BI.Bubbles=new BI.BubblesController,BI.Tooltips=new BI.TooltipsController,BI.Popovers=new BI.PopoverController,BI.Broadcasts=new BI.BroadcastController,BI.StyleLoaders=new BI.StyleLoaderManager})},function(e,t){BI.CollectionView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-collection",overflowX:!0,overflowY:!0,cellSizeAndPositionGetter:BI.emptyFn,horizontalOverscanSize:0,verticalOverscanSize:0,scrollLeft:0,scrollTop:0,items:[]})},_init:function(){BI.CollectionView.superclass._init.apply(this,arguments);var e=this,t=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){e._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){!0!==e._scrollLock&&(t.scrollLeft=e.element.scrollLeft(),t.scrollTop=e.element.scrollTop(),e._calculateChildrenToRender(),e.fireEvent(BI.CollectionView.EVENT_SCROLL,{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:!0===t.overflowX&&!0===t.overflowY,scrolly:!1===t.overflowX&&!0===t.overflowY,scrollx:!0===t.overflowX&&!1===t.overflowY,items:[this.container]}),0<t.items.length&&(this._calculateSizeAndPositionData(),this._populate())},mounted:function(){var e=this.options;0===e.scrollLeft&&0===e.scrollTop||(this.element.scrollTop(e.scrollTop),this.element.scrollLeft(e.scrollLeft))},_calculateSizeAndPositionData:function(){for(var e=this.options,t=[],i=new BI.SectionManager,n=0,r=0,o=0,a=e.items.length;o<a;o++){var s=e.cellSizeAndPositionGetter(o);if(null==s.height||isNaN(s.height)||null==s.width||isNaN(s.width)||null==s.x||isNaN(s.x)||null==s.y||isNaN(s.y))throw Error();n=Math.max(n,s.y+s.height),r=Math.max(r,s.x+s.width),t[s.index=o]=s,i.registerCell(s,o)}this._cellMetadata=t,this._sectionManager=i,this._height=n,this._width=r},_cellRenderers:function(e,t,i,n){return this._lastRenderedCellIndices=this._sectionManager.getCellIndices(e,t,i,n),this._cellGroupRenderer()},_cellGroupRenderer:function(){var n=this,r=(this.options,[]);return BI.each(this._lastRenderedCellIndices,function(e,t){var i=n._sectionManager.getCellMetadata(t);r.push(i)}),r},_calculateChildrenToRender:function(){var i=this,e=this.options,t=BI.clamp(e.scrollLeft,0,this._getMaxScrollLeft()),n=BI.clamp(e.scrollTop,0,this._getMaxScrollTop()),r=Math.max(0,t-e.horizontalOverscanSize),o=Math.max(0,n-e.verticalOverscanSize),a=Math.min(this._width,t+e.width+e.horizontalOverscanSize),s=Math.min(this._height,n+e.height+e.verticalOverscanSize);if(0<a&&0<s){if(o>=this.renderRange.minY&&s<=this.renderRange.maxY&&r>=this.renderRange.minX&&a<=this.renderRange.maxX)return;for(var l=this._cellRenderers(s-o,a-r,r,o),u=[],c={},h={},p={},d={},g=0,I=l.length;g<I;g++){p[(y=l[g]).x]=y.x,p[y.x+y.width]=y.x+y.width,d[y.y]=y.y,d[y.y+y.height]=y.y+y.height}p=BI.toArray(p),d=BI.toArray(d);for(var B=BI.invert(p),E=BI.invert(d),f={},_={},m={},T={},b=function(e,t){null==e[t]&&(e[t]=Number.MAX_VALUE)},C=function(e,t){null==e[t]&&(e[t]=0)},g=0,I=l.length;g<I;g++){var N,y=l[g],V=this.renderedKeys[y.index]&&this.renderedKeys[y.index][1];0<=V?(y.width!==this.renderedCells[V]._width&&(this.renderedCells[V]._width=y.width,this.renderedCells[V].el.setWidth(y.width)),y.height!==this.renderedCells[V]._height&&(this.renderedCells[V]._height=y.height,this.renderedCells[V].el.setHeight(y.height)),this.renderedCells[V]._left!==y.x&&this.renderedCells[V].el.element.css("left",y.x+"px"),this.renderedCells[V]._top!==y.y&&this.renderedCells[V].el.element.css("top",y.y+"px"),u.push(N=this.renderedCells[V])):(N=BI.createWidget(BI.extend({type:"bi.label",width:y.width,height:y.height},e.items[y.index],{cls:(e.items[y.index].cls||"")+" container-cell"+(0===y.y?" first-row":"")+(0===y.x?" first-col":""),_left:y.x,_top:y.y})),u.push({el:N,left:y.x,top:y.y,_left:y.x,_top:y.y,_width:y.width,_height:y.height}));for(var v=0|E[y.y],S=0|E[y.y+y.height],x=v;x<=S;x++){var L=d[x];b(f,L),C(_,L),f[L]=Math.min(f[L],y.x),_[L]=Math.max(_[L],y.x+y.width)}for(var w=0|B[y.x],A=0|B[y.x+y.width],x=w;x<=A;x++){var D=p[x];b(m,D),C(T,D),m[D]=Math.min(m[D],y.y),T[D]=Math.max(T[D],y.y+y.height)}c[y.index]=[y.index,g],h[g]=N}var M={},H={},P=[];BI.each(c,function(e,t){i.renderedKeys[e]?M[e]=t:H[e]=t}),BI.each(this.renderedKeys,function(e,t){M[e]||H[e]||P.push(t[1])}),BI.each(P,function(e,t){i.renderedCells[t].el._destroy()});var Y=[];BI.each(H,function(e,t){Y.push(u[t[1]])}),this.container.addItems(Y),this.container._children=h,this.container.attr("items",u),this.renderedCells=u,this.renderedKeys=c;var k=BI.min(f),R=BI.max(_),W=BI.max(m),G=BI.min(T);this.renderRange={minX:k,minY:W,maxX:R,maxY:G}}},_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(e){var t=this.options;if(this._reRange(),e&&e!==this.options.items&&(this.options.items=e,this._calculateSizeAndPositionData()),0<t.items.length){this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender();try{this.element.scrollTop(t.scrollTop),this.element.scrollLeft(t.scrollLeft)}catch(i){}}},setScrollLeft:function(e){this.options.scrollLeft!==e&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(e||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(e){this.options.scrollTop!==e&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(e||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(e){var t=this;this.options.overflowX!==!!e&&(this.options.overflowX=!!e,BI.nextTick(function(){t.element.css({overflowX:e?"auto":"hidden"})}))},setOverflowY:function(e){var t=this;this.options.overflowY!==!!e&&(this.options.overflowY=!!e,BI.nextTick(function(){t.element.css({overflowY:e?"auto":"hidden"})}))},getScrollLeft:function(){return this.options.scrollLeft},getScrollTop:function(){return this.options.scrollTop},getMaxScrollLeft:function(){return this._getMaxScrollLeft()},getMaxScrollTop:function(){return this._getMaxScrollTop()},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(e,t){t.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(e){e&&e!==this.options.items&&this.restore(),this._populate(e)}}),BI.CollectionView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.collection_view",BI.CollectionView)},function(e,t){BI.Combo=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-combo",trigger:"click",toggle:!0,direction:"bottom",logic:{dynamic:!0},container:null,isDefaultInit:!1,destroyWhenHide:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopEvent:!1,stopPropagation:!1,adjustLength:0,adjustXOffset:0,adjustYOffset:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{},comboClass:"bi-combo-popup",hoverClass:"bi-combo-hover"})},_init:function(){BI.Combo.superclass._init.apply(this,arguments);var n=this,t=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.isEnabled()&&n.isValid()&&(e===BI.Events.EXPAND&&n._popupView(),e===BI.Events.COLLAPSE&&n._hideView(),e===BI.Events.EXPAND&&(n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),n.fireEvent(BI.Combo.EVENT_EXPAND)),e===BI.Events.COLLAPSE&&(n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),n.isViewVisible()&&n.fireEvent(BI.Combo.EVENT_COLLAPSE)),e===BI.Events.CLICK&&n.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,i))}),n.element.on("mouseenter."+n.getName(),function(e){n.isEnabled()&&n.isValid()&&n.combo.isEnabled()&&n.combo.isValid()&&n.element.addClass(t.hoverClass)}),n.element.on("mouseleave."+n.getName(),function(e){n.isEnabled()&&n.isValid()&&n.combo.isEnabled()&&n.combo.isValid()&&n.element.removeClass(t.hoverClass)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(t.logic,{items:[{el:this.combo}]})))),t.isDefaultInit&&this._assertPopupView(),BI.Resizers.add(this.getName(),BI.bind(function(){this.isViewVisible()&&this._hideView()},this))},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var n=this,r=this.options,e=(this.options.trigger||"").split(","),o=function(e){r.stopEvent&&e.stopEvent(),r.stopPropagation&&e.stopPropagation()},a=!1;function s(){n.isEnabled()&&n.isValid()&&n.combo.isEnabled()&&n.combo.isValid()&&!0===r.toggle&&(n._hideView(),n.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",n.combo),n.fireEvent(BI.Combo.EVENT_COLLAPSE)),n.popupView&&n.popupView.element.off("mouseenter."+n.getName()).off("mouseleave."+n.getName()),a=!1}BI.each(e,function(e,t){switch(t){case"hover":n.element.on("mouseenter."+n.getName(),function(e){n.isEnabled()&&n.isValid()&&n.combo.isEnabled()&&n.combo.isValid()&&(n._popupView(),n.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",n.combo),n.fireEvent(BI.Combo.EVENT_EXPAND))}),n.element.on("mouseleave."+n.getName(),function(e){n.popupView&&(n.popupView.element.on("mouseenter."+n.getName(),function(e){a=!0,n.popupView.element.on("mouseleave."+n.getName(),function(e){s()}),n.popupView.element.off("mouseenter."+n.getName())}),BI.defer(function(){a||s()},50))});break;case"click":var i=BI.debounce(function(e){n.combo.element.__isMouseInBounds__(e)&&n.isEnabled()&&n.isValid()&&n.combo.isEnabled()&&n.combo.isValid()&&(r.toggle?n._toggle():n._popupView(),n.isViewVisible()?(n.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",n.combo),n.fireEvent(BI.Combo.EVENT_EXPAND)):(n.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",n.combo),n.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});n.element.off(t+"."+n.getName()).on(t+"."+n.getName(),function(e){i(e),o(e)});break;case"click-hover":i=BI.debounce(function(e){n.combo.element.__isMouseInBounds__(e)&&n.isEnabled()&&n.isValid()&&n.combo.isEnabled()&&n.combo.isValid()&&(n._popupView(),n.isViewVisible()&&(n.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",n.combo),n.fireEvent(BI.Combo.EVENT_EXPAND)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});n.element.off("click."+n.getName()).on("click."+n.getName(),function(e){i(e),o(e)}),n.element.on("mouseleave."+n.getName(),function(e){n.popupView&&(n.popupView.element.on("mouseenter."+n.getName(),function(e){a=!0,n.popupView.element.on("mouseleave."+n.getName(),function(e){s()}),n.popupView.element.off("mouseenter."+n.getName())}),BI.defer(function(){a||s()},50))})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var n=this,e=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view",value:e.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(e,t,i){e===BI.Events.CLICK&&(n.combo.setValue(n.getValue()),n.fireEvent(BI.Combo.EVENT_CHANGE,t,i)),n.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){n.fireEvent(BI.Combo.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this.options.container||this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideIf:function(e){var t;0<this.element.find(e.target).length||this.popupView&&0<this.popupView.element.find(e.target).length||"CodeMirror-cursor"===e.target.className||0<BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length?(t=this.options.direction.split(","),(BI.contains(t,"innerLeft")||BI.contains(t,"innerRight"))&&(this.adjustWidth(),this.adjustHeight())):!1!==this.options.hideChecker.apply(this,[e])&&this._hideView()},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),!0===this.options.destroyWhenHide?(this.popupView&&this.popupView.destroy(),this.popupView=null,this._rendered=!1):this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.comboClass),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()),this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW)},_popupView:function(e){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(e),this.adjustHeight(e),this.element.addClass(this.options.comboClass),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()),BI.Widget._renderEngine.createElement(document).bind("mousedown."+this.getName(),BI.bind(this._hideIf,this)).bind("mousewheel."+this.getName(),BI.bind(this._hideIf,this)),this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW)},adjustWidth:function(e){var t,i,n=this.options;this.popupView&&!0===n.isNeedAdjustWidth&&(this.resetListWidth(""),t=this.popupView.element.outerWidth(),(i=this.element.outerWidth()||n.width)+80<t?i+=80:i<t&&(i=t),this.resetListWidth(i<100?100:i))},adjustHeight:function(e){var t=this.options,i={};if(this.popupView){var n=this.popupView.isVisible();this.popupView.visible();var r=BI.isNotNull(e)?{element:{offset:function(){return{left:e.pageX,top:e.pageY}},bounds:function(){return{x:e.offsetX,y:e.offsetY,width:0,height:24}},outerWidth:function(){return 0},outerHeight:function(){return 24}}}:this.combo;switch(t.direction){case"bottom":case"bottom,right":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight,["bottom","top","right","left"],t.offsetStyle);break;case"top":case"top,right":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight,["top","bottom","right","left"],t.offsetStyle);break;case"left":case"left,bottom":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["left","right","bottom","top"],t.offsetStyle);break;case"right":case"right,bottom":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["right","left","bottom","top"],t.offsetStyle);break;case"top,left":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight,["top","bottom","left","right"],t.offsetStyle);break;case"bottom,left":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight,["bottom","top","left","right"],t.offsetStyle);break;case"left,top":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["left","right","top","bottom"],t.offsetStyle);break;case"right,top":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["right","left","top","bottom"],t.offsetStyle);break;case"right,innerRight":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["right","left","innerRight","innerLeft","bottom","top"],t.offsetStyle);break;case"right,innerLeft":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["right","left","innerLeft","innerRight","bottom","top"],t.offsetStyle);break;case"innerRight":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["innerRight","innerLeft","right","left","bottom","top"],t.offsetStyle);break;case"innerLeft":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["innerLeft","innerRight","left","right","bottom","top"],t.offsetStyle);break;case"top,custom":case"custom,top":i=BI.DOM.getTopAdaptPosition(r,this.popupView,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":i=BI.DOM.getBottomAdaptPosition(r,this.popupView,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight);break;case"left,custom":case"custom,left":delete(i=BI.DOM.getLeftAdaptPosition(r,this.popupView,t.adjustXOffset||t.adjustLength)).top,delete i.adaptHeight;break;case"custom,right":case"right,custom":delete(i=BI.DOM.getRightAdaptPosition(r,this.popupView,t.adjustXOffset||t.adjustLength)).top,delete i.adaptHeight}"adaptHeight"in i&&this.resetListHeight(i.adaptHeight),"left"in i&&this.popupView.element.css({left:i.left}),"top"in i&&this.popupView.element.css({top:i.top}),this.position=i,this.popupView.setVisible(n)}},resetListHeight:function(e){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(e)},resetListWidth:function(e){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(e)},populate:function(e){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate.apply(this.combo,arguments)},_setEnable:function(e){BI.Combo.superclass._setEnable.apply(this,arguments),!0===e?this.element.removeClass("base-disabled disabled"):!1===e&&this.element.addClass("base-disabled disabled"),e||this.element.removeClass(this.options.hoverClass),!e&&this.isViewVisible()&&this._hideView()},setValue:function(e){this.combo.setValue(e),BI.isNull(this.popupView)?this.options.popup.value=e:this.popupView.setValue(e)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},isViewVisible:function(){return this.isEnabled()&&this.combo.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},showView:function(e){this.isEnabled()&&this.combo.isEnabled()&&!this.isViewVisible()&&this._popupView(e)},hideView:function(){this._hideView()},getView:function(){return this.popupView},getPopupPosition:function(){return this.position},toggle:function(){this._toggle()},destroyed:function(){BI.Widget._renderEngine.createElement(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()).unbind("mouseenter."+this.getName()).unbind("mousemove."+this.getName()).unbind("mouseleave."+this.getName()),BI.Resizers.remove(this.getName()),this.popupView&&this.popupView._destroy()}}),BI.Combo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Combo.EVENT_CHANGE="EVENT_CHANGE",BI.Combo.EVENT_EXPAND="EVENT_EXPAND",BI.Combo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Combo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Combo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Combo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Combo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Combo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.combo",BI.Combo)},function(e,t){BI.Expander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Expander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-expander",trigger:"click",toggle:!0,isDefaultInit:!1,el:{},popup:{},expanderClass:"bi-expander-popup",hoverClass:"bi-expander-hover"})},_init:function(){BI.Expander.superclass._init.apply(this,arguments);var n=this,e=this.options;this._expanded=!!e.el.open,this._initExpander(),this._initPullDownAction(),this.expander.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.isEnabled()&&n.isValid()&&(e===BI.Events.EXPAND&&n._popupView(),e===BI.Events.COLLAPSE&&n._hideView(),e===BI.Events.EXPAND&&(n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),n.fireEvent(BI.Expander.EVENT_EXPAND)),e===BI.Events.COLLAPSE&&(n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),n.isViewVisible()&&n.fireEvent(BI.Expander.EVENT_COLLAPSE)),e===BI.Events.CLICK&&n.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE,t,i))}),this.element.hover(function(){n.isEnabled()&&n.isValid()&&n.expander.isEnabled()&&n.expander.isValid()&&n.element.addClass(e.hoverClass)},function(){n.isEnabled()&&n.isValid()&&n.expander.isEnabled()&&n.expander.isValid()&&n.element.removeClass(e.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.expander}]}),e.isDefaultInit&&this._assertPopupView(),!0===this.expander.isOpened()&&this._popupView()},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var i=this,n=this.options,e=this.options.trigger.split(",");BI.each(e,function(e,t){switch(t){case"hover":i.element[t](function(e){i.isEnabled()&&i.isValid()&&i.expander.isEnabled()&&i.expander.isValid()&&(i._popupView(),i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",i.expander),i.fireEvent(BI.Expander.EVENT_EXPAND))},function(){i.isEnabled()&&i.isValid()&&i.expander.isEnabled()&&i.expander.isValid()&&n.toggle&&(i._hideView(),i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",i.expander),i.fireEvent(BI.Expander.EVENT_COLLAPSE))});break;case"click":t&&i.element.off(t+"."+i.getName()).on(t+"."+i.getName(),BI.debounce(function(e){i.expander.element.__isMouseInBounds__(e)&&i.isEnabled()&&i.isValid()&&i.expander.isEnabled()&&i.expander.isValid()&&(n.toggle?i._toggle():i._popupView(),i.isExpanded()?(i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",i.expander),i.fireEvent(BI.Expander.EVENT_EXPAND)):(i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",i.expander),i.fireEvent(BI.Expander.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1}))}})},_initExpander:function(){this.expander=BI.createWidget(this.options.el)},_assertPopupView:function(){var n=this,e=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.button_group",cls:"expander-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:e.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.Expander.EVENT_CHANGE,t,i)}),this.popupView.setVisible(this.isExpanded()),BI.nextTick(function(){n.fireEvent(BI.Expander.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideView:function(){this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW),this._expanded=!1,this.expander.setOpened(!1),this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.expanderClass),this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW)},_popupView:function(){this._assertPopupViewRender(),this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW),this._expanded=!0,this.expander.setOpened(!0),this.popupView.visible(),this.element.addClass(this.options.expanderClass),this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW)},populate:function(e){this.popupView&&this.popupView.populate.apply(this.popupView,arguments),this.expander.populate.apply(this.expander,arguments)},_setEnable:function(e){BI.Expander.superclass._setEnable.apply(this,arguments),e||this.element.removeClass(this.options.hoverClass),!e&&this.isViewVisible()&&this._hideView()},setValue:function(e){this.expander.setValue(e),BI.isNull(this.popupView)?this.options.popup.value=e:this.popupView.setValue(e)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},isViewVisible:function(){return this.isEnabled()&&this.expander.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},isExpanded:function(){return this._expanded},showView:function(){this.isEnabled()&&this.expander.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(e){return this.expander.options.id===e?this.expander:this.popupView&&this.popupView.getNodeById(e)},getNodeByValue:function(e){return this.expander.getValue()===e?this.expander:this.popupView&&this.popupView.getNodeByValue(e)},destroy:function(){BI.Expander.superclass.destroy.apply(this,arguments)}}),BI.Expander.EVENT_EXPAND="EVENT_EXPAND",BI.Expander.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Expander.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Expander.EVENT_CHANGE="EVENT_CHANGE",BI.Expander.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Expander.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Expander.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Expander.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Expander.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.expander",BI.Expander)},function(e,t){BI.ComboGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-combo-group bi-list-item",trigger:"click,hover",direction:"right",adjustLength:0,isDefaultInit:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.text_button",text:"",value:""},children:[],popup:{el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}}})},_init:function(){BI.ComboGroup.superclass._init.apply(this,arguments),this._populate(this.options.el)},_populate:function(e){var n=this,r=this.options,t=r.children;if(BI.isEmpty(t))throw new Error("ComboGroup构造错误");BI.each(t,function(e,t){var i=BI.formatEL(t).el.children;t=BI.formatEL(t).el,BI.isEmpty(i)||(t.el=BI.clone(t),t.children=i,t.type="bi.combo_group",t.action=r.action,t.height=r.height,t.direction=r.direction,t.isDefaultInit=r.isDefaultInit,t.isNeedAdjustHeight=r.isNeedAdjustHeight,t.isNeedAdjustWidth=r.isNeedAdjustWidth,t.adjustLength=r.adjustLength,t.popup=r.popup)}),this.combo=BI.createWidget({type:"bi.combo",element:this,container:r.container,height:r.height,trigger:r.trigger,direction:r.direction,isDefaultInit:r.isDefaultInit,isNeedAdjustWidth:r.isNeedAdjustWidth,isNeedAdjustHeight:r.isNeedAdjustHeight,adjustLength:r.adjustLength,el:e,popup:BI.extend({},r.popup,{el:BI.extend({items:t},r.popup.el)})}),this.combo.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.ComboGroup.EVENT_CHANGE,i)})},getValue:function(){return this.combo.getValue()},setValue:function(e){this.combo.setValue(e)}}),BI.ComboGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.combo_group",BI.ComboGroup)},function(e,t){BI.VirtualGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-virtual-group",items:[],layouts:[{type:"bi.center",hgap:0,vgap:0}]})},render:function(){var e=this.options;this.populate(e.items),BI.isKey(e.value)&&this.setValue(e.value)},_packageBtns:function(e){for(var n=this.options,r=this.buttonMap={},o=n.layouts.length-1;0<o;o--)e=BI.map(e,function(e,t){var i=BI.stripEL(t);return BI.extend({},n.layouts[o],{items:[BI.extend({},n.layouts[o].el,{el:BI.extend({ref:function(e){BI.isKey(r[i.value])&&(r[i.value]=e)}},i)})]})});return e},_packageLayout:function(e){for(var t=this.options,i=BI.deepClone(t.layouts[0]),n=BI.formatEL(i).el;n&&n.items&&!BI.isEmpty(n.items);)n=BI.formatEL(n.items[0]).el;return n.items=e,i},addItems:function(e){this.layouts.addItems(e)},prependItems:function(e){this.layouts.prependItems(e)},setValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttonMap,function(e,t){t&&(i.deepContains(e)?t.setSelected&&t.setSelected(!0):t.setSelected&&t.setSelected(!1))})},getNotSelectedValue:function(){var i=[];return BI.each(this.buttonMap,function(e,t){t&&(!t.isEnabled()||t.isSelected&&t.isSelected()||i.push(t.getValue()))}),i},getValue:function(){var i=[];return BI.each(this.buttonMap,function(e,t){t&&t.isEnabled()&&t.isSelected&&t.isSelected()&&i.push(t.getValue())}),i},populate:function(e){e=e||[],this.options.items=e,e=this._packageBtns(e),this.layouts?this.layouts.populate(e):this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(e)))}}),BI.VirtualGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.virtual_group",BI.VirtualGroup)},function(e,t){BI.Loader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Loader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-loader",direction:"top",isDefaultInit:!0,logic:{dynamic:!0,scrolly:!0},el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,prev:!1,next:{},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_prevLoad:function(){var e=this,t=this.options;this.prev.setLoading(),t.itemsCreator.apply(this,[{times:--this.times},function(){e.prev.setLoaded(),e.prependItems.apply(e,arguments)}])},_nextLoad:function(){var e=this,t=this.options;this.next.setLoading(),t.itemsCreator.apply(this,[{times:++this.times},function(){e.next.setLoaded(),e.addItems.apply(e,arguments)}])},_init:function(){BI.Loader.superclass._init.apply(this,arguments);var n=this,e=this.options;!1===e.itemsCreator&&(e.prev=!1,e.next=!1),!1!==e.prev&&(this.prev=BI.createWidget(BI.extend({type:"bi.loading_bar"},e.prev)),this.prev.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&n._prevLoad()})),this.button_group=BI.createWidget(e.el,{type:"bi.button_group",chooseType:0,items:e.items,behaviors:{},layouts:[{type:"bi.vertical"}],value:e.value}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.Loader.EVENT_CHANGE,i)}),!1!==e.next&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},e.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&n._nextLoad()})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(e.direction),BI.extend({scrolly:!0},e.logic,{items:BI.LogicFactory.createLogicItemsByDirection(e.direction,this.prev,this.button_group,this.next)})))),e.isDefaultInit&&BI.isEmpty(e.items)&&BI.nextTick(BI.bind(function(){e.isDefaultInit&&BI.isEmpty(e.items)&&this._populate()},this)),BI.isNotEmptyArray(e.items)&&this._populate(e.items)},hasPrev:function(){var e=this.options;return BI.isNumber(e.count)?this.count<e.count:!!e.hasPrev.apply(this,[{times:this.times,count:this.count}])},hasNext:function(){var e=this.options;return BI.isNumber(e.count)?this.count<e.count:!!e.hasNext.apply(this,[{times:this.times,count:this.count}])},prependItems:function(e){this.count+=e.length,!1!==this.next&&(this.hasPrev()?(this.options.items=this.options.items.concat(e),this.prev.setLoaded()):this.prev.setEnd()),this.button_group.prependItems.apply(this.button_group,arguments)},addItems:function(e){this.count+=e.length,BI.isObject(this.next)&&(this.hasNext()?(this.options.items=this.options.items.concat(e),this.next.setLoaded()):this.next.setEnd()),this.button_group.addItems.apply(this.button_group,arguments)},_populate:function(e){var t=this,i=this.options;return 0===arguments.length&&BI.isFunction(i.itemsCreator)?(i.itemsCreator.apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("arguments can not be null!!!");t.populate.apply(t,arguments),i.onLoaded()}]),!1):(this.options.items=e,this.times=1,this.count=0,this.count+=e.length,BI.isObject(this.next)&&(this.hasNext()?this.next.setLoaded():this.next.invisible()),BI.isObject(this.prev)&&(this.hasPrev()?this.prev.setLoaded():this.prev.invisible()),!0)},populate:function(){this._populate.apply(this,arguments)&&this.button_group.populate.apply(this.button_group,arguments)},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},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(e){return this.button_group.getIndexByValue(e)},getNodeById:function(e){return this.button_group.getNodeById(e)},getNodeByValue:function(e){return this.button_group.getNodeByValue(e)},empty:function(){this.button_group.empty(),BI.each([this.prev,this.next],function(e,t){t&&t.setVisible(!1)})},destroy:function(){BI.Loader.superclass.destroy.apply(this,arguments)}}),BI.Loader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.loader",BI.Loader)},function(e,t){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(e){return BI.createWidget()},afterCardCreated:BI.emptyFn,afterCardShow:BI.emptyFn})},render:function(){var i=this,n=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(n.direction),BI.extend({},n.logic,{items:BI.LogicFactory.createLogicItemsByDirection(n.direction,this.tab,this.layout)})))),new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardNameCreator:function(e){return i.showIndex+e},cardCreator:function(e){var t=n.cardCreator(e);return i.cardMap[e]=t},afterCardCreated:BI.bind(this.afterCardCreated,this),afterCardShow:BI.bind(this.afterCardShow,this)})},mounted:function(){var e=this.options;!1!==e.showIndex&&this.setSelect(e.showIndex)},_deleteOtherCards:function(i){var n=this;!0===this.options.single&&BI.each(this.cardMap,function(e,t){e!==i+""&&(n.layout.deleteCardByName(e),delete n.cardMap[e])})},afterCardCreated:function(e){var n=this;this.cardMap[e].on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.Navigation.EVENT_CHANGE,i)}),this.options.afterCardCreated.apply(this,arguments)},afterCardShow:function(e){this.showIndex=e,this._deleteOtherCards(e),this.options.afterCardShow.apply(this,arguments)},populate:function(){var e=this.layout.getShowingCard();if(e)return e.populate.apply(e,arguments)},_assertCard:function(e){var t;this.layout.isCardExisted(e)||(t=this.options.cardCreator(e),this.cardMap[e]=t,this.layout.addCardByName(e,t),this.afterCardCreated(e))},setSelect:function(e){this._assertCard(e),this.layout.showCardByName(e),this._deleteOtherCards(e),this.showIndex!==e&&(this.showIndex=e,BI.nextTick(BI.bind(this.afterCardShow,this,e)))},getSelect:function(){return this.showIndex},getSelectedCard:function(){if(BI.isKey(this.showIndex))return this.cardMap[this.showIndex]},setValue:function(e){var t=this.layout.getShowingCard();t&&t.setValue(e)},getValue:function(){var e=this.layout.getShowingCard();if(e)return e.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)},function(e,t){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,allowSearchBlank:!0,onSearch:function(e,t){t([])},el:{type:"bi.search_editor"},popup:{type:"bi.searcher_view"},adapter:null,masker:{offset:{}}})},_init:function(){BI.Searcher.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget(e.el,{type:"bi.search_editor"}),BI.createWidget({type:"bi.vertical",element:this,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,vgap:e.vgap,hgap:e.hgap,items:[this.editor]}),e.isDefaultInit&&this._assertPopupView();var i=BI.debounce(BI.bind(this._search,this),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});this.editor.on(BI.Controller.EVENT_CHANGE,function(e){switch(e){case BI.Events.STARTEDIT:t._startSearch();break;case BI.Events.EMPTY:t._stopSearch();break;case BI.Events.CHANGE:i();break;case BI.Events.PAUSE:t._pauseSearch()}})},_assertPopupView:function(){var r=this,o=this.options;(o.masker&&!BI.Maskers.has(this.getName())||!1===o.masker&&!this.popupView)&&(this.popupView=BI.createWidget(o.popup,{type:"bi.searcher_view",chooseType:o.chooseType}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(e,t,i){if(r.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK){if(o.isAutoSync){var n=o.adapter&&o.adapter.getValue();if(i.isSelected())switch(o.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:o.adapter&&o.adapter.setValue([i.getValue()]);break;case BI.ButtonGroup.CHOOSE_TYPE_MULTI:n.push(i.getValue()),o.adapter&&o.adapter.setValue(n)}else o.adapter&&o.adapter.setValue(BI.deepWithout(n,i.getValue()))}r.fireEvent(BI.Searcher.EVENT_CHANGE,t,i)}}),BI.nextTick(function(){r.fireEvent(BI.Searcher.EVENT_AFTER_INIT)})),o.masker&&!BI.Maskers.has(this.getName())&&BI.Maskers.create(this.getName(),o.adapter,BI.extend({container:this,render:this.popupView},o.masker),this)},_startSearch:function(){this._assertPopupView(),this._stop=!1,this._isSearching=!0,this.fireEvent(BI.Searcher.EVENT_START),this.popupView.startSearch&&this.popupView.startSearch(),BI.nextTick(function(e){BI.Maskers.show(e)},this.getName())},_pauseSearch:function(){this.options,this.getName();this._stop=!0,BI.nextTick(function(e){BI.Maskers.hide(e)},this.getName()),!0===this._isSearching&&(this.popupView&&this.popupView.pauseSearch&&this.popupView.pauseSearch(),this.fireEvent(BI.Searcher.EVENT_PAUSE)),this._isSearching=!1},_stopSearch:function(){this.options;var e=this.getName();this._stop=!0,BI.Maskers.hide(e),!0===this._isSearching&&(this.popupView&&this.popupView.stopSearch&&this.popupView.stopSearch(),this.fireEvent(BI.Searcher.EVENT_STOP)),this._isSearching=!1},_search:function(){var n=this,r=this.options,o=r.allowSearchBlank?this.editor.getValue():this._getLastSearchKeyword();if(""!==o&&!this._stop){if(r.isAutoSearch){var e=r.adapter&&(r.adapter.getItems&&r.adapter.getItems()||r.adapter.attr("items"))||[],t=BI.Func.getSearchResult(e,o),i=t.match,a=t.find;return this.popupView.populate(a,i,o),r.isAutoSync&&r.adapter&&r.adapter.getValue&&this.popupView.setValue(r.adapter.getValue()),void n.fireEvent(BI.Searcher.EVENT_SEARCHING)}this.popupView.loading&&this.popupView.loading(),r.onSearch({times:1,keyword:o,selectedValues:r.adapter&&r.adapter.getValue()},function(e,t){var i;n._stop||(0<(i=[].slice.call(arguments)).length&&i.push(o),BI.Maskers.show(n.getName()),n.popupView.populate.apply(n.popupView,i),r.isAutoSync&&r.adapter&&r.adapter.getValue&&n.popupView.setValue(r.adapter.getValue()),n.popupView.loaded&&n.popupView.loaded(),n.fireEvent(BI.Searcher.EVENT_SEARCHING))})}},_getLastSearchKeyword:function(){if(this.isValid()){var e=this.editor.getValue().match(/[\S]+/g);return BI.isNull(e)?"":e[e.length-1]}},setAdapter:function(e){this.options.adapter=e,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(e){if(!this.editor.blur)throw new Error("editor没有实现blur方法")}finally{this.editor.setValue("")}},isSearching:function(){return this._isSearching},isViewVisible:function(){return this.editor.isEnabled()&&BI.Maskers.isVisible(this.getName())},getView:function(){return this.popupView},hasMatched:function(){return this._assertPopupView(),this.popupView.hasMatched()},adjustHeight:function(){BI.Maskers.has(this.getName())&&BI.Maskers.get(this.getName()).isVisible()&&BI.Maskers.show(this.getName())},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},setValue:function(e){BI.isNull(this.popupView)?this.options.popup.value=e:this.popupView.setValue(e)},getKeyword:function(){return this._getLastSearchKeyword()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var e=this.options;return e.isAutoSync&&e.adapter&&e.adapter.getValue?e.adapter.getValue():this.isSearching()?this.popupView.getValue():e.adapter&&e.adapter.getValue?e.adapter.getValue():BI.isNull(this.popupView)?e.popup.value:this.popupView.getValue()},populate:function(e,t,i){var n=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),n.isAutoSync&&n.adapter&&n.adapter.getValue&&this.popupView.setValue(n.adapter.getValue())},empty:function(){this.popupView&&this.popupView.empty()},destroyed:function(){BI.Maskers.remove(this.getName())}}),BI.Searcher.EVENT_CHANGE="EVENT_CHANGE",BI.Searcher.EVENT_START="EVENT_START",BI.Searcher.EVENT_STOP="EVENT_STOP",BI.Searcher.EVENT_PAUSE="EVENT_PAUSE",BI.Searcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.Searcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.shortcut("bi.searcher",BI.Searcher)},function(e,t){BI.Switcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switcher",direction:BI.Direction.Top,trigger:"click",toggle:!0,el:{},popup:{},adapter:null,masker:{},switcherClass:"bi-switcher-popup",hoverClass:"bi-switcher-hover"})},_init:function(){BI.Switcher.superclass._init.apply(this,arguments);var n=this,e=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.isEnabled()&&n.isValid()&&(e===BI.Events.EXPAND&&n._popupView(),e===BI.Events.COLLAPSE&&n._hideView(),e===BI.Events.EXPAND&&(n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),n.fireEvent(BI.Switcher.EVENT_EXPAND)),e===BI.Events.COLLAPSE&&(n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),n.isViewVisible()&&n.fireEvent(BI.Switcher.EVENT_COLLAPSE)),e===BI.Events.CLICK&&n.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,t,i))}),this.element.hover(function(){n.isEnabled()&&n.switcher.isEnabled()&&n.element.addClass(e.hoverClass)},function(){n.isEnabled()&&n.switcher.isEnabled()&&n.element.removeClass(e.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),e.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var i=this,n=this.options,e=this.options.trigger.split(",");BI.each(e,function(e,t){switch(t){case"hover":i.element[t](function(e){i.isEnabled()&&i.switcher.isEnabled()&&(i._popupView(),i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",i.switcher),i.fireEvent(BI.Switcher.EVENT_EXPAND))},function(){i.isEnabled()&&i.switcher.isEnabled()&&n.toggle&&(i._hideView(),i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",i.switcher),i.fireEvent(BI.Switcher.EVENT_COLLAPSE))});break;default:t&&i.element.off(t+"."+i.getName()).on(t+"."+i.getName(),BI.debounce(function(e){i.switcher.element.__isMouseInBounds__(e)&&i.isEnabled()&&i.switcher.isEnabled()&&(n.toggle?i._toggle():i._popupView(),i.isExpanded()?(i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",i.switcher),i.fireEvent(BI.Switcher.EVENT_EXPAND)):(i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",i.switcher),i.fireEvent(BI.Switcher.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1}))}})},_initSwitcher:function(){this.switcher=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var n=this,e=this.options;this._created||(this.popupView=BI.createWidget(e.popup,{type:"bi.button_group",element:e.adapter&&BI.Maskers.create(this.getName(),e.adapter,BI.extend({container:this},e.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:e.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.Switcher.EVENT_CHANGE,t,i)}),e.direction===BI.Direction.Custom||e.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){n.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var e=this,t=this.options;t.adapter?BI.Maskers.hide(e.getName()):e.popupView&&e.popupView.setVisible(!1),BI.nextTick(function(){t.adapter?BI.Maskers.hide(e.getName()):e.popupView&&e.popupView.setVisible(!1),e.element.removeClass(t.switcherClass),e.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var t=this,i=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),i.adapter?BI.Maskers.show(this.getName()):t.popupView.setVisible(!0),BI.nextTick(function(e){i.adapter?BI.Maskers.show(e):t.popupView.setVisible(!0),t.element.addClass(i.switcherClass),t.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(e){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(e){BI.Switcher.superclass._setEnable.apply(this,arguments),!e&&this.isViewVisible()&&this._hideView()},setValue:function(e){this.switcher.setValue(e),BI.isNull(this.popupView)?this.options.popup.value=e:this.popupView.setValue(e)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},setAdapter:function(e){this.options.adapter=e,BI.Maskers.remove(this.getName())},isViewVisible:function(){return this.isEnabled()&&this.switcher.isEnabled()&&(this.options.adapter?BI.Maskers.isVisible(this.getName()):this.popupView&&this.popupView.isVisible())},isExpanded:function(){return this.isViewVisible()},showView:function(){this.isEnabled()&&this.switcher.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(e){return this.switcher.attr("id")===e?this.switcher:this.popupView&&this.popupView.getNodeById(e)},getNodeByValue:function(e){return this.switcher.getValue()===e?this.switcher:this.popupView&&this.popupView.getNodeByValue(e)},empty:function(){this.popupView&&this.popupView.empty()}}),BI.Switcher.EVENT_EXPAND="EVENT_EXPAND",BI.Switcher.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Switcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Switcher.EVENT_CHANGE="EVENT_CHANGE",BI.Switcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Switcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Switcher.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Switcher.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Switcher.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.switcher",BI.Switcher)},function(e,t){BI.Tab=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Tab.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tab",direction:"top",single:!1,logic:{dynamic:!1},showIndex:!1,tab:!1,cardCreator:function(e){return BI.createWidget()}})},render:function(){var n=this,i=this.options;BI.isObject(i.tab)&&(this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.tab.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})),this.cardMap={},this.layout=BI.createWidget({type:"bi.card"}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(i.direction),BI.extend({},i.logic,{items:BI.LogicFactory.createLogicItemsByDirection(i.direction,this.tab,this.layout)})))),new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardCreator:function(e){var t=i.cardCreator.apply(n,arguments);return n.cardMap[e]=t},afterCardShow:function(e){n._deleteOtherCards(e),n.curr=e}}).on(BI.ShowListener.EVENT_CHANGE,function(e){n.fireEvent(BI.Tab.EVENT_CHANGE,e,n)})},_deleteOtherCards:function(i){var n=this;!0===this.options.single&&BI.each(this.cardMap,function(e,t){e!==i+""&&(n.layout.deleteCardByName(e),delete n.cardMap[e])})},_assertCard:function(e){var t;this.layout.isCardExisted(e)||(t=this.options.cardCreator(e),this.cardMap[e]=t,this.layout.addCardByName(e,t))},mounted:function(){var e=this.options;!1!==e.showIndex&&this.setSelect(e.showIndex)},setSelect:function(e){this.tab&&this.tab.setValue(e),this._assertCard(e),this.layout.showCardByName(e),this._deleteOtherCards(e),this.curr!==e&&(this.curr=e)},removeTab:function(i){var n=this;this.options;BI.any(this.cardMap,function(e,t){if(BI.isEqual(e,i+""))return n.layout.deleteCardByName(e),delete n.cardMap[e],!0})},getSelect:function(){return this.curr},getSelectedTab:function(){return this.layout.getShowingCard()},getTab:function(e){return this._assertCard(e),this.layout.getCardByName(e)},setValue:function(e){var t=this.layout.getShowingCard();t&&t.setValue(e)},getValue:function(){var e=this.layout.getShowingCard();if(e)return e.getValue()},populate:function(){var e=this.layout.getShowingCard();if(e)return e.populate&&e.populate.apply(e,arguments)},empty:function(){this.layout.deleteAllCard(),this.cardMap={}},destroy:function(){this.cardMap={},BI.Tab.superclass.destroy.apply(this,arguments)}}),BI.Tab.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.tab",BI.Tab)},function(e,t){BI.EL=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EL.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-el",el:{},layout:{}})},_init:function(){BI.EL.superclass._init.apply(this,arguments);var e=this,t=this.options;this.ele=BI.createWidget(t.el),BI.createWidget(t.layout,{type:"bi.adaptive",element:this,items:[this.ele]}),this.ele.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(e){this.ele.setValue(e)},getValue:function(){return this.ele.getValue()},populate:function(){this.ele.populate.apply(this,arguments)}}),BI.shortcut("bi.el",BI.EL)},function(e,t){var s,l,u,c;BI.Msg=(u=[],c=[],{alert:function(e,t,i){this._show(!1,e,t,i)},confirm:function(e,t,i){this._show(!0,e,t,i)},prompt:function(e,t,i,n,r){},toast:function(e,t,i){t=t||{},i=i||BI.Widget._renderEngine.createElement("body");var n=t.level||"normal",r=!!BI.isNull(t.autoClose)||t.autoClose,o=BI.isFunction(t.callback)?t.callback:BI.emptyFn,a=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:n,autoClose:r,text:e,listeners:[{eventName:BI.Toast.EVENT_DESTORY,action:function(){BI.remove(c,a.element);var i=10;BI.each(c,function(e,t){t.css({top:i}),i+=t.outerHeight()+10}),o()}}]}),s=10;BI.each(c,function(e,t){s+=t.outerHeight()+10}),BI.createWidget({type:"bi.absolute",element:i,items:[{el:a,left:"50%",top:s}]}),c.push(a.element),a.element.css({"margin-left":-1*a.element.outerWidth()/2}),a.element.removeClass("bi-message-leave").addClass("bi-message-enter"),r&&BI.delay(function(){a.element.removeClass("bi-message-enter").addClass("bi-message-leave"),a.destroy()},5e3)},_show:function(e,t,i,n){BI.isNull(s)&&(s=BI.Widget._renderEngine.createElement('<div class="bi-z-index-mask">').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body")),l=BI.Widget._renderEngine.createElement('<div class="bi-message-depend">').css({position:"absolute",zIndex:BI.zIndex_tip-1,top:0,left:0,right:0,bottom:0}).appendTo("body");var r=function(){u[u.length-1].destroy(),u.pop(),0===u.length&&(s.remove(),s=null)},o=[];!0===e&&o.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_Cancel"),level:"ignore",handler:function(){r(),BI.isFunction(n)&&n.apply(null,[!1])}}}),o.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_OK"),handler:function(){r(),BI.isFunction(n)&&n.apply(null,[!0])}}});var a={element:l,type:"bi.center_adapt",items:[{type:"bi.border",cls:"bi-card",items:{north:{el:{type:"bi.border",cls:"bi-message-title bi-background",items:{center:{el:{type:"bi.label",cls:"bi-font-bold",text:t||BI.i18nText("BI-Basic_Prompt"),textAlign:"left",hgap:20,height:40}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",handler:function(){r(),BI.isFunction(n)&&n.apply(null,[!1])}},width:60}}},height:40},center:{el:{type:"bi.label",vgap:10,hgap:20,whiteSpace:"normal",text:i}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",lgap:10,items:o},top:0,left:20,right:20,bottom:0}]},height:44}},width:450,height:200}]};u[u.length]=BI.createWidget(a)}})},function(e,t){BI.GridView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.GridView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-grid-view",overflowX:!0,overflowY:!0,overscanColumnCount:0,overscanRowCount:0,rowHeightGetter:BI.emptyFn,columnWidthGetter:BI.emptyFn,scrollLeft:0,scrollTop:0,items:[]})},_init:function(){BI.GridView.superclass._init.apply(this,arguments);var e=this,t=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){e._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){!0!==e._scrollLock&&(t.scrollLeft=e.element.scrollLeft(),t.scrollTop=e.element.scrollTop(),e._calculateChildrenToRender(),e.fireEvent(BI.GridView.EVENT_SCROLL,{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:!0===t.overflowX&&!0===t.overflowY,scrolly:!1===t.overflowX&&!0===t.overflowY,scrollx:!0===t.overflowX&&!1===t.overflowY,items:[this.container]}),0<t.items.length&&this._populate()},mounted:function(){var e=this.options;0===e.scrollLeft&&0===e.scrollTop||(this.element.scrollTop(e.scrollTop),this.element.scrollLeft(e.scrollLeft))},_getOverscanIndices:function(e,t,i,n){return{overscanStartIndex:Math.max(0,i-t),overscanStopIndex:Math.min(e-1,n+t)}},_calculateChildrenToRender:function(){var i=this,e=this.options,t=e.width,n=e.height,r=BI.clamp(e.scrollLeft,0,this._getMaxScrollLeft()),o=BI.clamp(e.scrollTop,0,this._getMaxScrollTop()),a=e.overscanColumnCount,s=e.overscanRowCount;if(0<n&&0<t){var l=this._columnSizeAndPositionManager.getVisibleCellRange(t,r),u=this._rowSizeAndPositionManager.getVisibleCellRange(n,o);if(BI.isEmpty(l)||BI.isEmpty(u))return;var c=this._columnSizeAndPositionManager.getOffsetAdjustment(t,r),h=this._rowSizeAndPositionManager.getOffsetAdjustment(n,o);this._renderedColumnStartIndex=l.start,this._renderedColumnStopIndex=l.stop,this._renderedRowStartIndex=u.start,this._renderedRowStopIndex=u.stop;var p=this._getOverscanIndices(this.columnCount,a,this._renderedColumnStartIndex,this._renderedColumnStopIndex),d=this._getOverscanIndices(this.rowCount,s,this._renderedRowStartIndex,this._renderedRowStopIndex),g=p.overscanStartIndex,I=p.overscanStopIndex,B=d.overscanStartIndex,E=d.overscanStopIndex,f=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(B),_=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(g),m=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(E),T=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(I),b=f.offset+h,C=_.offset+c,N=m.offset+h+m.size,y=T.offset+c+T.size;if(b>=this.renderRange.minY&&N<=this.renderRange.maxY&&C>=this.renderRange.minX&&y<=this.renderRange.maxX)return;for(var V=[],v={},S={},x=this._getMaxScrollLeft(),L=this._getMaxScrollTop(),w=0,A=0,D=0,M=B;M<=E;M++)for(var H=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(M),P=g;P<=I;P++){var Y,k=M+"-"+P,R=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(P),W=this.renderedKeys[k]&&this.renderedKeys[k][2];0<=W?(R.size!==this.renderedCells[W]._width&&(this.renderedCells[W]._width=R.size,this.renderedCells[W].el.setWidth(R.size)),H.size!==this.renderedCells[W]._height&&(this.renderedCells[W]._height=H.size,this.renderedCells[W].el.setHeight(H.size)),this.renderedCells[W]._left!==R.offset+c&&this.renderedCells[W].el.element.css("left",R.offset+c+"px"),this.renderedCells[W]._top!==H.offset+h&&this.renderedCells[W].el.element.css("top",H.offset+h+"px"),V.push(Y=this.renderedCells[W])):(Y=BI.createWidget(BI.extend({type:"bi.label",width:R.size,height:H.size},e.items[M][P],{cls:(e.items[M][P].cls||"")+" grid-cell"+(0===M?" first-row":"")+(0===P?" first-col":""),_rowIndex:M,_columnIndex:P,_left:R.offset+c,_top:H.offset+h}),this),V.push({el:Y,left:R.offset+c,top:H.offset+h,_left:R.offset+c,_top:H.offset+h,_width:R.size,_height:H.size})),x=Math.min(x,R.offset+c),w=Math.max(w,R.offset+c+R.size),L=Math.min(L,H.offset+h),A=Math.max(A,H.offset+h+H.size),v[k]=[M,P,D],S[D]=Y,D++}var G={},F={},O=[];BI.each(v,function(e,t){i.renderedKeys[e]?G[e]=t:F[e]=t}),BI.each(this.renderedKeys,function(e,t){G[e]||F[e]||O.push(t[2])}),BI.each(O,function(e,t){i.renderedCells[t].el._destroy()});var Z=[];BI.each(F,function(e,t){Z.push(V[t[2]])}),this.container.addItems(Z,this),this.container._children=S,this.container.attr("items",V),this.renderedCells=V,this.renderedKeys=v,this.renderRange={minX:x,minY:L,maxX:w,maxY:A}}},_getRealMaxScrollLeft:function(){var t=this.options,i=0;return BI.count(0,this.columnCount,function(e){i+=t.columnWidthGetter(e)}),Math.max(0,i-this.options.width+(this.options.overflowX?BI.DOM.getScrollWidth():0))},_getMaxScrollLeft:function(){return Math.max(0,this._columnSizeAndPositionManager.getTotalSize()-this.options.width+(this.options.overflowX?BI.DOM.getScrollWidth():0))},_getMaxScrollTop:function(){return Math.max(0,this._rowSizeAndPositionManager.getTotalSize()-this.options.height+(this.options.overflowY?BI.DOM.getScrollWidth():0))},_populate:function(e){var t=this.options;this._reRange(),this.columnCount=0,this.rowCount=0,e&&e!==this.options.items&&(this.options.items=e),BI.isNumber(t.columnCount)?this.columnCount=t.columnCount:0<t.items.length&&(this.columnCount=t.items[0].length),BI.isNumber(t.rowCount)?this.rowCount=t.rowCount:this.rowCount=t.items.length,this.container.setWidth(this.columnCount*t.estimatedColumnSize),this.container.setHeight(this.rowCount*t.estimatedRowSize),this._columnSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.columnCount,t.columnWidthGetter,t.estimatedColumnSize),this._rowSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.rowCount,t.rowHeightGetter,t.estimatedRowSize),this._calculateChildrenToRender();try{this.element.scrollTop(t.scrollTop),this.element.scrollLeft(t.scrollLeft)}catch(i){}},setScrollLeft:function(e){this.options.scrollLeft!==e&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(e||0,0,this._getRealMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(e){this.options.scrollTop!==e&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(e||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setColumnCount:function(e){this.options.columnCount=e},setRowCount:function(e){this.options.rowCount=e},setOverflowX:function(e){var t=this;this.options.overflowX!==!!e&&(this.options.overflowX=!!e,BI.nextTick(function(){t.element.css({overflowX:e?"auto":"hidden"})}))},setOverflowY:function(e){var t=this;this.options.overflowY!==!!e&&(this.options.overflowY=!!e,BI.nextTick(function(){t.element.css({overflowY:e?"auto":"hidden"})}))},getScrollLeft:function(){return this.options.scrollLeft},getScrollTop:function(){return this.options.scrollTop},getMaxScrollLeft:function(){return this._getMaxScrollLeft()},getMaxScrollTop:function(){return this._getMaxScrollTop()},setEstimatedColumnSize:function(e){this.options.estimatedColumnSize=e},setEstimatedRowSize:function(e){this.options.estimatedRowSize=e},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(e,t){t.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(e){e&&e!==this.options.items&&this.restore(),this._populate(e)}}),BI.GridView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_view",BI.GridView)},function(e,t){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 r=this,e=this.options;this.startX=0,this.startY=0,this.tracker=new BI.MouseMoveTracker(function(e,t){r._calculateSize();var i=BI.Widget._renderEngine.createElement("body").width(),n=BI.Widget._renderEngine.createElement("body").height();r.startX+=e,r.startY+=t,r.element.css({left:BI.clamp(r.startX,0,i-r.element.width())+"px",top:BI.clamp(r.startY,0,n-r.element.height())+"px"}),BI.Resizers._resize()},function(){r.tracker.releaseMouseMoves()},_global);var t=[{el:{type:"bi.htape",cls:"bi-message-title bi-header-background",ref:function(e){r.dragger=e},items:[{type:"bi.absolute",items:[{el:BI.isPlainObject(e.header)?BI.createWidget(e.header,{extraCls:"bi-font-bold"}):{type:"bi.label",cls:"bi-font-bold",height:this._constant.HEADER_HEIGHT,text:e.header,title:e.header,textAlign:"left"},left:20,top:0,right:0,bottom:0}]},{el:e.closable?{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){r.close()}}:{type:"bi.layout"},width:56}],height:this._constant.HEADER_HEIGHT},height:this._constant.HEADER_HEIGHT},{el:e.logic.dynamic?{type:"bi.vertical",scrolly:!1,cls:"popover-body",ref:function(){r.body=this},hgap:20,tgap:10,items:[{el:BI.createWidget(e.body)}]}:{type:"bi.absolute",items:[{el:BI.createWidget(e.body),left:20,top:10,right:20,bottom:0}]}}];e.footer&&t.push({el:{type:"bi.absolute",items:[{el:BI.createWidget(e.footer),left:20,top:0,right:20,bottom:0}],height:44},height:44});var i=this._calculateSize();return BI.extend({type:e.logic.dynamic?"bi.vertical":"bi.vtape",items:t,width:i.width},e.logic.dynamic?{type:"bi.vertical",scrolly:!1}:{type:"bi.vtape",height:i.height})},mounted:function(){var e,t,i,n=this,r=this.options;this.dragger.element.mousedown(function(e){var t=n.element.offset();n.startX=t.left,n.startY=t.top,n.tracker.captureMouseMoves(e)}),r.logic.dynamic&&(e=this._calculateSize(),t=this.element.height(),i=BI.clamp(t,e.height,600)-(r.footer?84:44),this.body.element.height(i))},_calculateSize:function(){var e=this.options,t={};if(BI.isNotNull(e.size))switch(e.size){case this._constant.SIZE.SMALL:t.width=450,t.height=200;break;case this._constant.SIZE.BIG:t.width=900,t.height=500;break;default:t.width=550,t.height=500}return{width:e.width||t.width,height:e.height||t.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(e){this.element.css({"z-index":e})},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 t=this,e=this.options;e.footer||(e.footer={type:"bi.right_vertical_adapt",lgap:10,items:[{type:"bi.button",text:this.options.btns[1],value:1,level:"ignore",handler:function(e){t.fireEvent(BI.Popover.EVENT_CANCEL,e),t.close(e)}},{type:"bi.button",text:this.options.btns[0],warningTitle:e.warningTitle,value:0,handler:function(e){t.fireEvent(BI.Popover.EVENT_CONFIRM,e),t.close(e)}}]})}}),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"},function(e,t){BI.PopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this,arguments),{_baseCls:"bi-popup-view",maxWidth:"auto",minWidth:100,minHeight:24,lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,innerVGap:0,direction:BI.Direction.Top,stopEvent:!1,stopPropagation:!1,logic:{dynamic:!0},tool:!1,tabs:[],buttons:[],el:{type:"bi.button_group",items:[],chooseType:0,behaviors:{},layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.PopupView.superclass._init.apply(this,arguments);var t=this,e=this.options,i=function(e){e.stopPropagation()},n=function(e){return e.stopEvent(),!1};this.element.css({"z-index":BI.zIndex_popup,"min-width":e.minWidth+"px","max-width":e.maxWidth+"px"}).bind({click:i}),this.element.bind("mousewheel",i),e.stopPropagation&&this.element.bind({mousedown:i,mouseup:i,mouseover:i}),e.stopEvent&&this.element.bind({mousedown:n,mouseup:n,mouseover:n}),this.tool=this._createTool(),this.tab=this._createTab(),this.view=this._createView(),this.toolbar=this._createToolBar(),this.view.on(BI.Controller.EVENT_CHANGE,function(e){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&t.fireEvent(BI.PopupView.EVENT_CHANGE)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(e.direction),BI.extend({},e.logic,{scrolly:!1,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,vgap:e.vgap,hgap:e.hgap,items:BI.LogicFactory.createLogicItemsByDirection(e.direction,BI.extend({cls:"list-view-outer bi-card list-view-shadow"},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(e.direction),BI.extend({},e.logic,{items:BI.LogicFactory.createLogicItemsByDirection(e.direction,this.tool,this.tab,this.view,this.toolbar)}))))}))))},_createView:function(){var e=this.options;return this.button_group=BI.createWidget(e.el,{type:"bi.button_group",value:e.value}),this.button_group.element.css({"min-height":e.minHeight+"px","padding-top":e.innerVGap+"px","padding-bottom":e.innerVGap+"px"}),this.button_group},_createTool:function(){var e=this.options;if(!1!==e.tool)return BI.createWidget(e.tool)},_createTab:function(){var e=this.options;if(0!==e.tabs.length)return BI.createWidget({type:"bi.center",cls:"list-view-tab",height:25,items:e.tabs,value:e.value})},_createToolBar:function(){var e=this.options;if(0!==e.buttons.length)return BI.createWidget({type:"bi.center",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(e.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.view},populate:function(e){this.view.populate.apply(this.view,arguments)},resetWidth:function(e){this.options.width=e,this.element.width(e)},resetHeight:function(e){var t=e-(this.toolbar?this.toolbar.attr("height")||24:0)-(this.tab?this.tab.attr("height")||24:0)-(this.tool&&this.tool.attr("height")||24)*(this.tool&&this.tool.isVisible()?1:0)-2*this.options.innerVGap;this.view.resetHeight?this.view.resetHeight(t):this.view.element.css({"max-height":t+"px"})},setValue:function(e){this.tab&&this.tab.setValue(e),this.view.setValue(e)},getValue:function(){return this.view.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView)},function(e,t){BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var e=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-searcher-view bi-card",tipText:BI.i18nText("BI-No_Select"),chooseType:BI.Selection.Single,matcher:{type:"bi.button_group",behaviors:{redmark:function(){return!0}},items:[],layouts:[{type:"bi.vertical"}]},searcher:{type:"bi.button_group",behaviors:{redmark:function(){return!0}},items:[],layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.SearcherView.superclass._init.apply(this,arguments);var n=this,e=this.options;this.matcher=BI.createWidget(e.matcher,{type:"bi.button_group",chooseType:e.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:e.value}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.SearcherView.EVENT_CHANGE,t,i)}),this.spliter=BI.createWidget({type:"bi.vertical",height:1,hgap:10,items:[{type:"bi.layout",height:1,cls:"searcher-view-spliter bi-background"}]}),this.searcher=BI.createWidget(e.searcher,{type:"bi.button_group",chooseType:e.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:e.value}),this.searcher.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.SearcherView.EVENT_CHANGE,t,i)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.matcher,this.spliter,this.searcher]})},startSearch:function(){},stopSearch:function(){},setValue:function(e){this.matcher.setValue(e),this.searcher.setValue(e)},getValue:function(){return this.matcher.getValue().concat(this.searcher.getValue())},populate:function(e,t,i){e=e||[],t=t||[],this.setTipVisible(e.length+t.length===0),this.spliter.setVisible(BI.isNotEmptyArray(t)&&BI.isNotEmptyArray(e)),this.matcher.populate(t,i),this.searcher.populate(e,i)},empty:function(){this.searcher.empty(),this.matcher.empty()},hasMatched:function(){return 0<this.matcher.getAllButtons().length}}),BI.SearcherView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.searcher_view",BI.SearcherView)},function(e,t){BI.ListView=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-list-view",overscanHeight:100,blockSize:10,scrollTop:0,el:{},items:[]}},init:function(){this.renderedIndex=-1,this.cache={}},render:function(){var e=this,t=this.options;return{type:"bi.vertical",items:[BI.extend({type:"bi.vertical",scrolly:!1,ref:function(){e.container=this}},t.el)],element:this}},mounted:function(){var i=this,t=this.options;this._populate(),this.element.scroll(function(e){t.scrollTop=i.element.scrollTop(),i._calculateBlocksToRender()});var n=this.element.width(),r=this.element.height();BI.ResizeDetector.addResizeListener(this,function(){var e=i.element.width(),t=i.element.height();e===n&&t===r||(n=e,r=t,i._calculateBlocksToRender())})},_renderMoreIf:function(){for(var e,t=this,i=this.options,n=this.element.height(),r=i.scrollTop+n+i.overscanHeight,o=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+i.blockSize||0,a=this.renderedIndex+1,s=function(){return t.container.element.height()};(e=s())<r&&o<i.items.length;){var l=i.items.slice(o,o+i.blockSize);this.container.addItems(l,this);var u=s()-e;this.cache[a]={index:o,scrollTop:e,height:u},this.renderedIndex=a,a++,o+=i.blockSize}},_calculateBlocksToRender:function(){this.options;this._renderMoreIf()},_populate:function(e){var t=this.options;e&&this.options.items!==e&&(this.options.items=e),this._calculateBlocksToRender(),this.element.scrollTop(t.scrollTop)},restore:function(){this.renderedIndex=-1,this.container.empty(),this.cache={}},populate:function(e){e&&this.options.items!==e&&this.restore(),this._populate(e)},destroyed:function(){this.restore()}}),BI.shortcut("bi.list_view",BI.ListView)},function(e,t){BI.VirtualList=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-virtual-list",overscanHeight:100,blockSize:10,scrollTop:0,items:[]}},init:function(){this.renderedIndex=-1,this.cache={}},render:function(){var e=this;this.options;return{type:"bi.vertical",items:[{type:"bi.layout",ref:function(){e.topBlank=this}},{type:"bi.vertical",scrolly:!1,ref:function(){e.container=this}},{type:"bi.layout",ref:function(){e.bottomBlank=this}}],element:this}},mounted:function(){var t=this,i=this.options;this._populate(),this.element.scroll(function(e){i.scrollTop=t.element.scrollTop(),t._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){t._calculateBlocksToRender()})},_renderMoreIf:function(){for(var e,t=this,i=this.options,n=this.element.height(),r=i.scrollTop+n+i.overscanHeight,o=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+i.blockSize||0,a=this.renderedIndex+1,s=function(){return t.container.element.height()+t.topBlank.element.height()+t.bottomBlank.element.height()};(e=s())<r&&o<i.items.length;){var l=i.items.slice(o,o+i.blockSize);this.container.addItems(l,this);var u=s()-e;this.cache[a]={index:o,scrollTop:e,height:u},this.tree.set(a,u),this.renderedIndex=a,a++,o+=i.blockSize}},_calculateBlocksToRender:function(){var e=this.options;this._renderMoreIf();for(var t=this.element.height(),i=e.scrollTop-e.overscanHeight,n=e.scrollTop+t+e.overscanHeight,r=this.tree.greatestLowerBound(i),o=this.tree.leastUpperBound(n),a=[],s=0;s<r;s++){var l=this.cache[s].index;if(!this.cache[s].destroyed){for(var u=l;u<l+e.blockSize&&u<e.items.length;u++)a.push(this.container._children[u]),this.container._children[u]=null;this.cache[s].destroyed=!0}}for(s=o+1;s<=this.renderedIndex;s++){l=this.cache[s].index;if(!this.cache[s].destroyed){for(u=l;u<l+e.blockSize&&u<e.items.length;u++)a.push(this.container._children[u]),this.container._children[u]=null;this.cache[s].destroyed=!0}}for(var c=BI.Widget._renderEngine.createFragment(),h=BI.Widget._renderEngine.createFragment(),p=c,s=r<0?0:r;s<=o&&s<=this.renderedIndex;s++){l=this.cache[s].index;if(this.cache[s].destroyed||(p=h),!0===this.cache[s].destroyed){for(u=l;u<l+e.blockSize&&u<e.items.length;u++){var d=this.container._addElement(u,BI.extend({root:!0},BI.stripEL(e.items[u])),this);p.appendChild(d.element[0])}this.cache[s].destroyed=!1}}this.container.element.prepend(c),this.container.element.append(h),this.topBlank.setHeight(this.cache[r<0?0:r].scrollTop);var g=this.cache[Math.min(o,this.renderedIndex)];this.bottomBlank.setHeight(this.tree.sumTo(this.renderedIndex)-g.scrollTop-g.height),BI.each(a,function(e,t){t&&t._destroy()})},_populate:function(e){var t=this.options;e&&this.options.items!==e&&(this.options.items=e),this.tree=BI.PrefixIntervalTree.empty(Math.ceil(t.items.length/t.blockSize)),this._calculateBlocksToRender(),this.element.scrollTop(t.scrollTop)},_clearChildren:function(){BI.each(this.container._children,function(e,t){t&&t._destroy()}),this.container._children={},this.container.attr("items",[])},restore:function(){this.renderedIndex=-1,this._clearChildren(),this.cache={},this.options.scrollTop=0,this.topBlank.setHeight(0),this.bottomBlank.setHeight(0)},populate:function(e){e&&this.options.items!==e&&this.restore(),this._populate(e)},destroyed:function(){this.restore()}}),BI.shortcut("bi.virtual_list",BI.VirtualList)},function(e,t){BI.Pager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Pager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-pager",behaviors:{},layouts:[{type:"bi.horizontal",hgap:10,vgap:0}],dynamicShow:!0,dynamicShowFirstLast:!1,dynamicShowPrevNext:!1,pages:!1,curr:function(){return 1},groups:0,jump:BI.emptyFn,first:!1,last:!1,prev:"上一页",next:"下一页",firstPage:1,lastPage:function(){return 1},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_init:function(){BI.Pager.superclass._init.apply(this,arguments);this.currPage=BI.result(this.options,"curr"),this._populate()},_populate:function(){var r=this,o=this.options,e=[],t={};this.empty();var i,a=BI.result(o,"pages"),n=BI.result(this,"currPage"),s=BI.result(o,"groups"),l=BI.result(o,"first"),u=BI.result(o,"last"),c=BI.result(o,"prev"),h=BI.result(o,"next");!1===a?(s=0,u=l=!1):a<s&&(s=a),t.index=Math.ceil((n+(1<s&&s!==a?1:0))/(0===s?1:s)),(!o.dynamicShow&&!o.dynamicShowPrevNext||1<n)&&!1!==c&&(BI.isKey(c)?e.push({text:c,value:"prev",disabled:!1===a?!1===o.hasPrev(n):!(1<n&&!1!==c)}):e.push(BI.extend({disabled:!1===a?!1===o.hasPrev(n):!(1<n&&!1!==c)},c))),(!o.dynamicShow&&!o.dynamicShowFirstLast||1<t.index&&0!==s)&&l&&(e.push({text:l,value:"first",disabled:!(1<t.index&&0!==s)}),1<t.index&&0!==s&&e.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),t.poor=Math.floor((s-1)/2),t.start=1<t.index?n-t.poor:1,t.end=1<t.index?(i=n+(s-t.poor-1),a<i?a:i):s,t.end-t.start<s-1&&(t.start=t.end-s+1);var p=t.start,d=t.end;for(l&&u&&1<t.index&&0!==s&&s<a&&t.end<a&&0!==s&&(p++,d--);p<=d;p++)p===n?e.push({text:p,value:p,selected:!0}):e.push({text:p,value:p});(!o.dynamicShow&&!o.dynamicShowFirstLast||s<a&&t.end<a&&0!==s)&&u&&(s<a&&t.end<a&&0!==s&&e.push({type:"bi.label",cls:"page-ellipsis",text:"…"}),e.push({text:u,value:"last",disabled:!(s<a&&t.end<a&&0!==s)})),t.flow=!c&&0===s,(!o.dynamicShow&&!o.dynamicShowPrevNext&&h||n!==a&&h||t.flow)&&e.push(BI.isKey(h)?!1===a?{text:h,value:"next",disabled:!1===o.hasNext(n)}:t.flow&&n===a?{text:h,value:"next",disabled:!0}:{text:h,value:"next",disabled:!(n!==a&&h||t.flow)}:BI.extend({disabled:!1===a?!1===o.hasNext(n):!(n!==a&&h||t.flow)},h)),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(e,{cls:"bi-list-item-select bi-border-radius",height:23,hgap:10}),behaviors:o.behaviors,layouts:o.layouts}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(e,t,i){if(e===BI.Events.CLICK){var n=r.button_group.getValue()[0];switch(n){case"first":r.currPage=1;break;case"last":r.currPage=a;break;case"prev":r.currPage--;break;case"next":r.currPage++;break;default:r.currPage=n}o.jump.apply(r,[{pages:a,curr:r.currPage}]),r._populate(),r.fireEvent(BI.Pager.EVENT_CHANGE,i)}r.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.fireEvent(BI.Pager.EVENT_AFTER_POPULATE)},getCurrentPage:function(){return this.currPage},setAllPages:function(e){this.options.pages=e},hasPrev:function(e){e=e||1;var t=this.options;return!1===this.options.pages?t.hasPrev(e):1<e},hasNext:function(e){e=e||1;var t=this.options,i=this.options.pages;return!1===i?t.hasNext(e):e<i},setValue:function(e){var t,i,n=this.options;e=(e=e||0)<1?1:e,!1===n.pages?(t=BI.result(n,"lastPage"),i=1,this.currPage=t<e?t:e<(i=BI.result(n,"firstPage"))?i:e):(e=e>n.pages?n.pages:e,this.currPage=e),this._populate()},getValue:function(){var e=this.button_group.getValue()[0];switch(e){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return e}},attr:function(e,t){BI.Pager.superclass.attr.apply(this,arguments),"curr"===e&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.Pager.EVENT_CHANGE="EVENT_CHANGE",BI.Pager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.pager",BI.Pager)},function(e,t){BI.A=BI.inherit(BI.Text,{_defaultConfig:function(){var e=BI.A.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-a display-block",href:"",target:"_blank",el:null,tagName:"a"})},_init:function(){var e=this.options;BI.A.superclass._init.apply(this,arguments),this.element.attr({href:e.href,target:e.target}),e.el&&BI.createWidget(e.el,{element:this})}}),BI.shortcut("bi.a",BI.A)},function(e,t){BI.LoadingBar=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.LoadingBar.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-loading-bar bi-tips",height:30,handler:BI.emptyFn})},_init:function(){BI.LoadingBar.superclass._init.apply(this,arguments);var t=this;this.loaded=BI.createWidget({type:"bi.text_button",cls:"loading-text bi-list-item-simple",text:BI.i18nText("BI-Load_More"),width:120,handler:this.options.handler}),this.loaded.on(BI.Controller.EVENT_CHANGE,function(e){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.loading=BI.createWidget({type:"bi.layout",width:this.options.height,height:this.options.height,cls:"loading-background cursor-default"});var e=BI.createWidget({type:"bi.center_adapt",items:[this.loaded]}),i=BI.createWidget({type:"bi.center_adapt",items:[this.loading]});this.cardLayout=BI.createWidget({type:"bi.card",element:this,items:[{el:e,cardName:"loaded"},{el:i,cardName:"loading"}]}),this.invisible()},_reset:function(){this.visible(),this.loaded.setText(BI.i18nText("BI-Load_More")),this.loaded.enable()},setLoaded:function(){this._reset(),this.cardLayout.showCardByName("loaded")},setEnd:function(){this.setLoaded(),this.loaded.setText(BI.i18nText("BI-No_More_Data")),this.loaded.disable()},setLoading:function(){this._reset(),this.cardLayout.showCardByName("loading")}}),BI.shortcut("bi.loading_bar",BI.LoadingBar)},function(e,t){BI.IconButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.IconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-icon-button horizon-center",iconWidth:null,iconHeight:null})},_init:function(){BI.IconButton.superclass._init.apply(this,arguments);var e=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:e.iconWidth,height:e.iconHeight}),BI.isNumber(e.height)&&0<e.height&&BI.isNull(e.iconWidth)&&BI.isNull(e.iconHeight)?(this.element.css("lineHeight",e.height+"px"),BI.createWidget({type:"bi.default",element:this,items:[this.icon]})):(this.element.css("lineHeight","1"),BI.createWidget({element:this,type:"bi.center_adapt",items:[this.icon]}))},doClick:function(){BI.IconButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconButton.EVENT_CHANGE,this)}}),BI.IconButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_button",BI.IconButton)},function(e,t){BI.ImageButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.ImageButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-image-button",src:"",iconWidth:"100%",iconHeight:"100%"})},_init:function(){BI.ImageButton.superclass._init.apply(this,arguments);var e=this.options;this.image=BI.createWidget({type:"bi.img",width:e.iconWidth,height:e.iconHeight,src:e.src}),BI.isNumber(e.iconWidth)||BI.isNumber(e.iconHeight)?BI.createWidget({type:"bi.center_adapt",element:this,items:[this.image]}):BI.createWidget({type:"bi.adaptive",element:this,items:[this.image],scrollable:!1})},setWidth:function(e){BI.ImageButton.superclass.setWidth.apply(this,arguments),this.options.width=e},setHeight:function(e){BI.ImageButton.superclass.setHeight.apply(this,arguments),this.options.height=e},setImageWidth:function(e){this.image.setWidth(e)},setImageHeight:function(e){this.image.setHeight(e)},getImageWidth:function(){return this.image.element.width()},getImageHeight:function(){return this.image.element.height()},setSrc:function(e){this.options.src=e,this.image.setSrc(e)},getSrc:function(){return this.image.getSrc()},doClick:function(){BI.ImageButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.ImageButton.EVENT_CHANGE,this)}}),BI.ImageButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.image_button",BI.ImageButton)},function(e,t){BI.Button=BI.inherit(BI.BasicButton,{_const:{iconWidth:18},_defaultConfig:function(e){var t=BI.Button.superclass._defaultConfig.apply(this,arguments);return BI.extend(t,{baseCls:(t.baseCls||"")+" bi-button"+(BI.isIE()&&BI.isIE9Below()?" hack":""),minWidth:!0===e.block||!0===e.clear?0:80,height:24,shadow:!0!==e.clear,isShadowShowingOnSelected:!0,readonly:!0,iconCls:"",level:"common",block:!1,clear:!1,ghost:!1,textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:e.clear?0:10,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},_init:function(){BI.Button.superclass._init.apply(this,arguments);var e=this.options;!BI.isNumber(e.height)||e.clear||e.block?e.clear||e.block?this.element.css({lineHeight:e.height+"px"}):this.element.css({lineHeight:e.height-2+"px"}):this.element.css({height:e.height+"px",lineHeight:e.height-2+"px"}),BI.isKey(e.iconCls)?(this.icon=BI.createWidget({type:"bi.icon_label",cls:e.iconCls,width:this._const.iconWidth,height:e.height-2,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),this.text=BI.createWidget({type:"bi.label",text:e.text,textWidth:BI.isNotNull(e.textWidth)?e.textWidth-this._const.iconWidth:null,textHeight:e.textHeight,value:e.value,height:e.height-2}),BI.createWidget({type:"bi.center_adapt",element:this,hgap:e.hgap,vgap:e.vgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:e.textAlign,whiteSpace:e.whiteSpace,textWidth:e.textWidth,textHeight:e.textHeight,hgap:e.hgap,vgap:e.vgap,tgap:e.tgap,bgap:e.bgap,lgap:e.lgap,rgap:e.rgap,element:this,text:e.text,value:e.value}),!0===e.block&&this.element.addClass("block"),!0===e.clear&&this.element.addClass("clear"),!0===e.ghost&&this.element.addClass("ghost"),0<e.minWidth&&this.element.css({"min-width":e.minWidth+"px"})},doClick:function(){BI.Button.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Button.EVENT_CHANGE,this)},setText:function(e){BI.Button.superclass.setText.apply(this,arguments),this.text.setText(e)},setValue:function(e){BI.Button.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(e)},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)},destroy:function(){BI.Button.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.button",BI.Button),BI.Button.EVENT_CHANGE="EVENT_CHANGE"},function(e,t){BI.TextButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.TextButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-button",textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:0,lgap:0,rgap:0,vgap:0,text:"",py:""})},_init:function(){BI.TextButton.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:e.textAlign,whiteSpace:e.whiteSpace,textWidth:e.textWidth,textHeight:e.textHeight,width:e.width,height:e.height,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword})},doClick:function(){BI.TextButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextButton.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)},setText:function(e){BI.TextButton.superclass.setText.apply(this,arguments),e=BI.isArray(e)?e.join(","):e,this.text.setText(e)},setStyle:function(e){this.text.setStyle(e)},setValue:function(e){BI.TextButton.superclass.setValue.apply(this,arguments),this.isReadOnly()||(e=BI.isArray(e)?e.join(","):e,this.text.setValue(e))}}),BI.TextButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_button",BI.TextButton)},function(e,t){BI.BlankIconIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-blank-icon-text-item",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",blankWidth:0,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.BlankIconIconTextItem.superclass._init.apply(this,arguments);var e=this.options,t=(this._const,BI.createWidget({type:"bi.layout",width:e.blankWidth,height:e.height}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:e.iconCls1,forceNotSelected:!0,width:e.height,height:e.height}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:e.iconCls2,forceNotSelected:!0,width:e.height,height:e.height}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",t,this.icon1,this.icon2,this.text)}))))},doClick:function(){BI.BlankIconIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconIconTextItem.EVENT_CHANGE,this.getValue(),this)},setSelected:function(e){BI.BlankIconIconTextItem.superclass.setSelected.apply(this,arguments),this.icon1.setSelected(e),this.icon2.setSelected(e)},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.BlankIconIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_icon_text_item",BI.BlankIconIconTextItem)},function(e,t){BI.BlankIconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-blank-icon-text-icon-item",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",blankWidth:0,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.BlankIconTextIconItem.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height});var t=BI.createWidget({type:"bi.icon_label",cls:e.iconCls1,width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:e.iconCls2,width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.layout",width:e.blankWidth},t,this.text,{type:"bi.layout",width:e.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)},function(e,t){BI.BlankIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.BlankIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.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 e=this.options,t=(this._const,BI.createWidget({type:"bi.layout",width:e.blankWidth}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",t,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)},function(e,t){BI.IconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.IconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.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 e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height});var t=BI.createWidget({type:"bi.icon_label",cls:e.iconCls1,width:e.leftIconWrapperWidth,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),i=BI.createWidget({type:"bi.layout",width:e.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:e.iconCls2,width:e.rightIconWrapperWidth,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",t,this.text,i)}))))},doClick:function(){BI.IconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextIconItem.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.IconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_icon_item",BI.IconTextIconItem)},function(e,t){BI.IconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.IconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-icon-text-item",direction:BI.Direction.Left,logic:{dynamic:!1},iconWrapperWidth:null,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextItem.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:e.iconWrapperWidth||e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(e.direction),BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection(e.direction,this.icon,this.text)}))))},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()},doClick:function(){BI.IconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextItem.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)}}),BI.IconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_item",BI.IconTextItem)},function(e,t){BI.TextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.TextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-icon-item",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextIconItem.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.text,this.icon)}))))},doClick:function(){BI.TextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextIconItem.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.TextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_icon_item",BI.TextIconItem)},function(e,t){BI.TextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.TextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-item",textAlign:"left",whiteSpace:"nowrap",textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:e.textAlign,whiteSpace:e.whiteSpace,textHeight:"nowrap"==e.whiteSpace?e.height:e.textHeight,height:e.height,hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py})},doClick:function(){BI.TextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextItem.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.TextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_item",BI.TextItem)},function(e,t){BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-icon-text-icon-node",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.IconTextIconNode.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height});var t=BI.createWidget({type:"bi.icon_label",cls:e.iconCls1,width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),i=BI.createWidget({type:"bi.layout",width:e.height,height:e.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:e.iconCls2,width:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",t,this.text,i)}))))},doClick:function(){BI.IconTextIconNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextIconNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.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.IconTextIconNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_icon_node",BI.IconTextIconNode)},function(e,t){BI.IconTextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-icon-text-node",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextNode.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon,this.text)}))))},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()},doClick:function(){BI.IconTextNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)}}),BI.IconTextNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_node",BI.IconTextNode)},function(e,t){BI.TextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-icon-node",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextIconNode.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.text,this.icon)}))))},doClick:function(){BI.TextIconNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextIconNode.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)}}),BI.TextIconNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_icon_node",BI.TextIconNode)},function(e,t){BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-node",textAlign:"left",whiteSpace:"nowrap",textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextNode.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:e.textAlign,whiteSpace:e.whiteSpace,textHeight:"nowrap"==e.whiteSpace?e.height:e.textHeight,height:e.height,hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py})},doClick:function(){BI.TextNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.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.TextNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_node",BI.TextNode)},function(e,t){BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-editor bi-focus-shadow",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,tipType:"warning",inputType:"text",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:""})},_init:function(){BI.Editor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"<input type='"+e.inputType+"'/>",root:!0,value:e.value,watermark:e.watermark,validationChecker:e.validationChecker,quitChecker:e.quitChecker,allowBlank:e.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&this._assertWaterMark();var i=[];this.watermark&&i.push({el:this.watermark,left:3,right:3,top:0,bottom:0}),i.push({el:this.editor,left:0,right:0,top:0,bottom:0});var n=[{el:{type:"bi.absolute",ref:function(e){t.contentWrapper=e},items:i},left:e.hgap+e.lgap,right:e.hgap+e.rgap,top:e.vgap+e.tgap,bottom:e.vgap+e.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:n}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){t._checkError(),t.element.addClass("bi-editor-focus"),t.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){t._setErrorVisible(!1),t.element.removeClass("bi-editor-focus"),t.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){t.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){t.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(e){e.keyCode!==BI.KeyCode.TAB&&t.watermark&&t.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){t._checkWaterMark(),t._setErrorVisible(!1),t.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){t._checkWaterMark(),t.fireEvent(BI.Editor.EVENT_ERROR,arguments),t._setErrorVisible(t.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){t._checkWaterMark();var e=t._setErrorVisible(!0);e&&e.element.fadeOut(100,function(){e.element.fadeIn(100)}),t.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){t._checkWaterMark(),t.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){t.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){t.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){t.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){t.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){t.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){t.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){t.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){t.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM,function(){t.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM,arguments)}),this.element.click(function(e){return e.stopPropagation(),!1}),(BI.isKey(this.options.value)||BI.isEmptyString(this.options.value))&&this._checkError(),this._checkWaterMark()},_checkToolTip:function(){var e=this.options.errorText;BI.isFunction(e)&&(e=e(this.editor.getValue())),BI.isKey(e)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(e))},_assertWaterMark:function(){var t=this,e=this.options;BI.isNull(this.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,height:e.height-2*(e.vgap+e.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(e){t.isEnabled()?t.editor.isEditing()||t.editor.focus():t.editor.isEditing()&&t.editor.blur(),e.stopEvent()}}),this.watermark.element.bind("click",function(e){t.isEnabled()?t.editor.isEditing()||t.editor.focus():t.editor.isEditing()&&t.editor.blur(),e.stopEvent()}))},_checkError:function(){this._setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var e=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(e.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(e){this.options.errorText=e},getErrorText:function(){return this.options.errorText},setWaterMark:function(e){this.options.watermark=e,BI.isNull(this.watermark)&&(this._assertWaterMark(),BI.createWidget({type:"bi.absolute",element:this.contentWrapper,items:[{el:this.watermark,left:3,right:3,top:0,bottom:0}]})),BI.isKey(e)&&this.watermark.setText(e)},_setErrorVisible:function(e){var t=this.options.errorText;if(BI.isFunction(t)&&(t=t(BI.trim(this.editor.getValue()))),!this.disabledError&&BI.isKey(t))return BI.Bubbles[e?"show":"hide"](this.getName(),t,this,{adjustYOffset:2}),this._checkToolTip(),BI.Bubbles.get(this.getName())},disableError:function(){this.disabledError=!0,this._checkError()},enableError:function(){this.disabledError=!1,this._checkError()},disableWaterMark:function(){this.disabledWaterMark=!0,this._checkWaterMark()},enableWaterMark:function(){this.disabledWaterMark=!1,this._checkWaterMark()},focus:function(){this.element.addClass("text-editor-focus"),this.editor.focus()},blur:function(){this.element.removeClass("text-editor-focus"),this.editor.blur()},selectAll:function(){this.editor.selectAll()},onKeyDown:function(e){this.editor.onKeyDown(e)},setValue:function(e){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(e),this._checkError(),this._checkWaterMark()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},getValue:function(){return this.isValid()?BI.trim(this.editor.getValue()):BI.trim(this.editor.getLastValidValue())},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()},destroyed:function(){BI.Bubbles.remove(this.getName())}}),BI.Editor.EVENT_CHANGE="EVENT_CHANGE",BI.Editor.EVENT_FOCUS="EVENT_FOCUS",BI.Editor.EVENT_BLUR="EVENT_BLUR",BI.Editor.EVENT_CLICK="EVENT_CLICK",BI.Editor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.Editor.EVENT_SPACE="EVENT_SPACE",BI.Editor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.Editor.EVENT_START="EVENT_START",BI.Editor.EVENT_PAUSE="EVENT_PAUSE",BI.Editor.EVENT_STOP="EVENT_STOP",BI.Editor.EVENT_CONFIRM="EVENT_CONFIRM",BI.Editor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.Editor.EVENT_VALID="EVENT_VALID",BI.Editor.EVENT_ERROR="EVENT_ERROR",BI.Editor.EVENT_ENTER="EVENT_ENTER",BI.Editor.EVENT_RESTRICT="EVENT_RESTRICT",BI.Editor.EVENT_REMOVE="EVENT_REMOVE",BI.Editor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.editor",BI.Editor)},function(e,t){BI.MultifileEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var e=this,t=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:t.name,url:t.url,multiple:t.multiple,accept:t.accept,maxSize:t.maxSize,title:t.title}),this.file.on(BI.File.EVENT_CHANGE,function(){e.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){e.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments)}),this.file.on(BI.File.EVENT_ERROR,function(){e.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){e.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){e.fireEvent(BI.MultifileEditor.EVENT_UPLOADED,arguments)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.adaptive",scrollable:!1,items:[this.file]},top:0,right:0,left:0,bottom:0}]})},select:function(){this.file.select()},getValue:function(){return this.file.getValue()},upload:function(){this.file.upload()},reset:function(){this.file.reset()}}),BI.MultifileEditor.EVENT_CHANGE="EVENT_CHANGE",BI.MultifileEditor.EVENT_UPLOADSTART="EVENT_UPLOADSTART",BI.MultifileEditor.EVENT_ERROR="EVENT_ERROR",BI.MultifileEditor.EVENT_PROGRESS="EVENT_PROGRESS",BI.MultifileEditor.EVENT_UPLOADED="EVENT_UPLOADED",BI.shortcut("bi.multifile_editor",BI.MultifileEditor)},function(e,t){BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},render:function(){var e=this.options,t=this;this.content=BI.createWidget({type:"bi.layout",tagName:"textarea",width:"100%",height:"100%",cls:"bi-textarea textarea-editor-content display-block"}),this.content.element.css({resize:"none"}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.adaptive",items:[this.content]},left:4,right:4,top:4,bottom:4}]}),this.content.element.on("input propertychange",function(e){t._checkWaterMark(),t.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){t.isValid()&&(t._focus(),t.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),BI.Widget._renderEngine.createElement(document).bind("mousedown."+t.getName(),function(e){BI.DOM.isExist(t)&&!t.element.__isMouseInBounds__(e)&&(BI.Widget._renderEngine.createElement(document).unbind("mousedown."+t.getName()),t.content.element.blur())})}),this.content.element.blur(function(){t.isValid()&&(t._blur(),t.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+t.getName())}),BI.isKey(e.value)&&this.setValue(e.value),BI.isNotNull(e.style)&&this.setStyle(e.style),this._checkWaterMark()},_checkWaterMark:function(){var e=this,t=this.options,i=this.getValue();BI.isNotEmptyString(i)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(t.watermark)&&(this.watermark?(this.watermark.setText(t.watermark),this.watermark.setValid(!t.invalid),this.watermark.setEnable(!t.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark cursor-default textarea-watermark",textAlign:"left",whiteSpace:"normal",text:t.watermark,invalid:t.invalid,disabled:t.disabled,hgap:4,vgap:4}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){e.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:0,top:0,right:0}]})))},_focus:function(){this.content.element.addClass("textarea-editor-focus"),this._checkWaterMark()},_blur:function(){this.content.element.removeClass("textarea-editor-focus"),this._checkWaterMark()},focus:function(){this._focus(),this.content.element.focus()},blur:function(){this._blur(),this.content.element.blur()},getValue:function(){return this.content.element.val()},setValue:function(e){this.content.element.val(e),this._checkWaterMark()},setStyle:function(e){this.style=e,this.element.css(e),this.content.element.css(BI.extend({},e,{color:e.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(e.backgroundColor)?BI.DOM.rgb2hex(e.backgroundColor):e.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(e){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)},_setEnable:function(e){BI.TextAreaEditor.superclass._setEnable.apply(this,[e]),this.content&&(this.content.element[0].disabled=!e)}}),BI.TextAreaEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextAreaEditor.EVENT_BLUR="EVENT_BLUR",BI.TextAreaEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.textarea_editor",BI.TextAreaEditor)},function(e,t){BI.Html=BI.inherit(BI.Single,{props:{baseCls:"bi-html",textAlign:"left",whiteSpace:"normal",lineHeight:null,handler:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",highLight:!1},render:function(){var e=this,t=this.options;0<t.hgap+t.lgap&&this.element.css({"padding-left":t.hgap+t.lgap+"px"}),0<t.hgap+t.rgap&&this.element.css({"padding-right":t.hgap+t.rgap+"px"}),0<t.vgap+t.tgap&&this.element.css({"padding-top":t.vgap+t.tgap+"px"}),0<t.vgap+t.bgap&&this.element.css({"padding-bottom":t.vgap+t.bgap+"px"}),BI.isNumber(t.height)&&this.element.css({lineHeight:t.height+"px"}),BI.isNumber(t.lineHeight)&&this.element.css({lineHeight:t.lineHeight+"px"}),BI.isWidthOrHeight(t.maxWidth)&&this.element.css({maxWidth:t.maxWidth}),this.element.css({textAlign:t.textAlign,whiteSpace:t.whiteSpace,textOverflow:"nowrap"===t.whiteSpace?"ellipsis":"",overflow:"nowrap"===t.whiteSpace?"":"auto"}),t.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){t.handler(e.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(t.text)?this.setText(t.text):BI.isKey(t.value)&&this.setText(t.value),t.highLight&&this.doHighLight()},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(e){BI.Html.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(e)},setStyle:function(e){this.text.element.css(e)},setText:function(e){BI.Html.superclass.setText.apply(this,arguments),this.options.text=e,this.text.element.html(e)}}),BI.shortcut("bi.html",BI.Html)},function(e,t){BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{tagName:"i",baseCls:(e.baseCls||"")+" x-icon b-font horizon-center display-block"})},_init:function(){BI.Icon.superclass._init.apply(this,arguments),BI.isIE9Below&&BI.isIE9Below()&&this.element.addClass("hack")}}),BI.shortcut("bi.icon",BI.Icon)},function(e,t){BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{tagName:"iframe",baseCls:(e.baseCls||"")+" bi-iframe",src:"",name:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var e=this.options;e.attributes.frameborder="0",e.attributes.src=e.src,e.attributes.name=e.name,BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(e){this.options.src=e,this.element.attr("src",e)},getSrc:function(){return this.options.src},setName:function(e){this.options.name=e,this.element.attr("name",e)},getName:function(){return this.options.name}}),BI.shortcut("bi.iframe",BI.Iframe)},function(e,t){BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{tagName:"img",baseCls:(e.baseCls||"")+" bi-img display-block",src:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var e=this.options;e.attributes.src=e.src,BI.Img.superclass._init.apply(this,arguments)},setSrc:function(e){this.options.src=e,this.element.attr("src",e)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img)},function(e,t){BI.ImageCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var e=BI.ImageCheckbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.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)},function(e,t){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 t=this,e=this.options;return{type:"bi.center_adapt",items:[{type:"bi.default",ref:function(e){t.checkbox=e},cls:"checkbox-content",width:e.iconWidth-2,height:e.iconHeight-2}]}},_setEnable:function(e){BI.Checkbox.superclass._setEnable.apply(this,arguments),!0===e?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(e){BI.Checkbox.superclass.setSelected.apply(this,arguments),e?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(e,t){BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-input display-block overflow-dot",tagName:"input",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1})},_init:function(){BI.Input.superclass._init.apply(this,arguments);var i=this,t=!1,n=null,r=!1,o=BI.debounce(function(e){i.onKeyDown(e,t),i._keydown_=!1},300),a=BI.debounce(BI.bind(this._click,this),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});this._focusDebounce=BI.debounce(BI.bind(this._focus,this),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1}),this._blurDebounce=BI.debounce(BI.bind(this._blur,this),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1}),this.element.keydown(function(e){r=!1,t=e.ctrlKey||e.metaKey,n=e.keyCode,i.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(e){n=null,r&&e.keyCode===BI.KeyCode.ENTER||(i._keydown_=!0,o(e.keyCode))}).on("input propertychange",function(e){var t=e.originalEvent;!BI.isNull(t.propertyName)&&"value"!==t.propertyName||(r=!0,i._keydown_=!0,o(n),n=null)}).click(function(e){e.stopPropagation(),a()}).mousedown(function(e){i.element.val(i.element.val())}).focus(function(e){i._focusDebounce()}).focusout(function(e){i._blurDebounce()}),(BI.isKey(this.options.value)||BI.isEmptyString(this.options.value))&&this.setValue(this.options.value)},_focus:function(){this.element.addClass("bi-input-focus"),this._checkValidationOnValueChange(),this._isEditing=!0,""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this.fireEvent(BI.Input.EVENT_FOCUS)},_blur:function(){var t=this;function e(){var e;t.isValid()||!1===t.options.quitChecker.apply(t,[BI.trim(t.getValue())])||(t.element.val(t._lastValidValue?t._lastValidValue:""),t._checkValidationOnValueChange(),t._defaultState()),t.element.removeClass("bi-input-focus"),t._isEditing=!1,t._start=!1,t.isValid()&&(e=t._lastValidValue,t._lastValidValue=t.getValue(),t.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,t.getValue(),t),t.fireEvent(BI.Input.EVENT_CONFIRM),t._lastValidValue!==e&&t.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)),t.fireEvent(BI.Input.EVENT_BLUR)}!0===t._keydown_?BI.delay(e,300):e()},_click:function(){!0!==this._isEditing&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(e,t){this.isValid()&&BI.trim(this._lastChangedValue)===BI.trim(this.getValue())||this._checkValidationOnValueChange(),this.isValid()&&""!==BI.trim(this.getValue())&&((BI.trim(this.getValue())===this._lastValue||this._start&&null!=this._lastValue&&""!==this._lastValue)&&(!0!==this._pause||/(\s|\u00A0)$/.test(this.getValue()))||(this._start=!0,this._pause=!1,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STARTEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_START))),e==BI.KeyCode.ENTER&&(this.isValid()||!1!==this.options.quitChecker.apply(this,[BI.trim(this.getValue())])?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),e==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),e==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),e!=BI.KeyCode.BACKSPACE&&e!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN,arguments);var i=this._lastValue;BI.trim(this.getValue())!==BI.trim(this._lastValue||"")&&this._valueChange(),BI.isEndWithBlank(this.getValue())?(this._pause=!0,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.PAUSE,"",this),this.fireEvent(BI.Input.EVENT_PAUSE),this._defaultState()):e!==BI.KeyCode.BACKSPACE&&e!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===i||""===BI.trim(i)||(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_STOP))},_defaultState:function(){""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this._lastValue=this.getValue(),this._lastSubmitValue=null},_valueChange:function(){this.isValid()&&BI.trim(this.getValue())!==this._lastSubmitValue&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,this.getValue(),this),this.fireEvent(BI.Input.EVENT_CHANGE),this._lastSubmitValue=BI.trim(this.getValue())),""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this._lastValue=this.getValue()},_checkValidationOnValueChange:function(){var e=this.options,t=this.getValue();this.setValid(!0===e.allowBlank&&""==BI.trim(t)||BI.isNotEmptyString(BI.trim(t))&&!1!==e.validationChecker.apply(this,[BI.trim(t)]))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!0==!this._isEditing&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");!0===this._isEditing&&(this.element.blur(),this._blurDebounce())},selectAll:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能select");this.element.select(),this._isEditing=!0},setValue:function(e){this.element.val(e),BI.nextTick(BI.bind(function(){this._checkValidationOnValueChange(),this._defaultState(),this.isValid()&&(this._lastValidValue=this._lastSubmitValue=this.getValue())},this))},getValue:function(){return this.element.val()||""},isEditing:function(){return this._isEditing},getLastValidValue:function(){return this._lastValidValue},getLastChangedValue:function(){return this._lastChangedValue},_setValid:function(){BI.Input.superclass._setValid.apply(this,arguments),this.isValid()?(this._lastChangedValue=this.getValue(),this.element.removeClass("bi-input-error"),this.fireEvent(BI.Input.EVENT_VALID,BI.trim(this.getValue()),this)):(this._lastChangedValue===this.getValue()&&(this._lastChangedValue=null),this.element.addClass("bi-input-error"),this.fireEvent(BI.Input.EVENT_ERROR,BI.trim(this.getValue()),this))},_setEnable:function(e){BI.Input.superclass._setEnable.apply(this,[e]),this.element[0].disabled=!e}}),BI.Input.EVENT_CHANGE="EVENT_CHANGE",BI.Input.EVENT_FOCUS="EVENT_FOCUS",BI.Input.EVENT_CLICK="EVENT_CLICK",BI.Input.EVENT_BLUR="EVENT_BLUR",BI.Input.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.Input.EVENT_QUICK_DOWN="EVENT_QUICK_DOWN",BI.Input.EVENT_SPACE="EVENT_SPACE",BI.Input.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.Input.EVENT_START="EVENT_START",BI.Input.EVENT_PAUSE="EVENT_PAUSE",BI.Input.EVENT_STOP="EVENT_STOP",BI.Input.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.Input.EVENT_CONFIRM="EVENT_CONFIRM",BI.Input.EVENT_REMOVE="EVENT_REMOVE",BI.Input.EVENT_EMPTY="EVENT_EMPTY",BI.Input.EVENT_VALID="EVENT_VALID",BI.Input.EVENT_ERROR="EVENT_ERROR",BI.Input.EVENT_ENTER="EVENT_ENTER",BI.Input.EVENT_RESTRICT="EVENT_RESTRICT",BI.shortcut("bi.input",BI.Input)},function(e,t){BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var e=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-radio radio-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})},_init:function(){BI.ImageRadio.superclass._init.apply(this,arguments)},doClick:function(){BI.ImageRadio.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.ImageRadio.EVENT_CHANGE)}}),BI.ImageRadio.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_radio",BI.ImageRadio)},function(e,t){BI.Radio=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-radio",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:14,iconHeight:14},render:function(){var t=this,e=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(e){t.radio=e},width:e.iconWidth,height:e.iconHeight}]}},_setEnable:function(e){BI.Radio.superclass._setEnable.apply(this,arguments),!0===e?this.radio.element.removeClass("base-disabled disabled"):this.radio.element.addClass("base-disabled disabled")},doClick:function(){BI.Radio.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Radio.EVENT_CHANGE)},setSelected:function(e){BI.Radio.superclass.setSelected.apply(this,arguments),e?this.radio.element.addClass("bi-high-light-background"):this.radio.element.removeClass("bi-high-light-background")}}),BI.Radio.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.radio",BI.Radio)},function(e,t){BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(e){var t=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(t,{textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",highLight:!1})},_createJson:function(){var e=this.options;return{type:"bi.text",textAlign:e.textAlign,whiteSpace:e.whiteSpace,lineHeight:e.textHeight,text:e.text,value:e.value,py:e.py,keyword:e.keyword,highLight:e.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var e=this.options,t=this._createJson();return t.textAlign="left",BI.isNumber(e.width)&&0<e.width?BI.isNumber(e.textWidth)&&0<e.textWidth?(t.maxWidth=e.textWidth,BI.isNumber(e.height)&&0<e.height?void BI.createWidget({type:"bi.center_adapt",height:e.height,scrollable:"normal"===e.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(t)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===e.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(t)}]})):"normal"==e.whiteSpace?(BI.extend(t,{hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}),this.text=BI.createWidget(t),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===e.whiteSpace,element:this,items:[this.text]})):BI.isNumber(e.height)&&0<e.height?(this.element.css({"line-height":e.height+"px"}),t.textAlign=e.textAlign,void(this.text=BI.createWidget(BI.extend(t,{element:this,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap})))):(BI.extend(t,{hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,maxWidth:"100%"}),this.text=BI.createWidget(t),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===e.whiteSpace,element:this,items:[this.text]})):BI.isNumber(e.textWidth)&&0<e.textWidth?(t.maxWidth=e.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===e.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(t)}]})):"normal"==e.whiteSpace?(BI.extend(t,{hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}),this.text=BI.createWidget(t),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(e.height)&&0<e.height?(this.element.css({"line-height":e.height+"px"}),t.textAlign=e.textAlign,void(this.text=BI.createWidget(BI.extend(t,{element:this,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap})))):(BI.extend(t,{hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}),this.text=BI.createWidget(BI.extend(t,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var e=this.options,t="right"===e.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",i=this._createJson();return BI.isNumber(e.width)&&0<e.width?BI.isNumber(e.textWidth)&&0<e.textWidth?(i.width=e.textWidth,BI.isNumber(e.height)&&0<e.height?void BI.createWidget({type:t,height:e.height,scrollable:"normal"===e.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(i)}]}):void BI.createWidget({type:t,scrollable:"normal"===e.whiteSpace,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,element:this,items:[{el:this.text=BI.createWidget(i)}]})):BI.isNumber(e.height)&&0<e.height?(this.text=BI.createWidget(BI.extend(i,{element:this,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap})),void("normal"!==e.whiteSpace&&this.element.css({"line-height":e.height-2*e.vgap+"px"}))):(i.width=e.width-2*e.hgap-e.lgap-e.rgap,void BI.createWidget({type:t,scrollable:"normal"===e.whiteSpace,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,element:this,items:[{el:this.text=BI.createWidget(i)}]})):BI.isNumber(e.textWidth)&&0<e.textWidth?(i.width=e.textWidth,void BI.createWidget({type:t,scrollable:"normal"===e.whiteSpace,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,element:this,items:[{el:this.text=BI.createWidget(i)}]})):BI.isNumber(e.height)&&0<e.height?("normal"!==e.whiteSpace&&this.element.css({"line-height":e.height-2*e.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(i,{element:this,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap})))):(BI.extend(i,{hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}),this.text=BI.createWidget(BI.extend(i,{maxWidth:"100%"})),void BI.createWidget({type:t,element:this,scrollable:"normal"===e.whiteSpace,items:[this.text]}))},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)},setText:function(e){this.options.text=e,this.text.setText(e)},getText:function(){return this.options.text},setStyle:function(e){this.text.setStyle(e)},setValue:function(e){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(e)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}})},function(e,t){BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var e=this.options;return{type:"bi.html",textAlign:e.textAlign,whiteSpace:e.whiteSpace,lineHeight:e.textHeight,text:e.text,value:e.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel)},function(e,t){BI.IconLabel=BI.inherit(BI.Single,{props:{baseCls:"bi-icon-label horizon-center",iconWidth:null,iconHeight:null},_init:function(){BI.IconLabel.superclass._init.apply(this,arguments);var e=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:e.iconWidth,height:e.iconHeight}),BI.isNumber(e.height)&&0<e.height&&BI.isNull(e.iconWidth)&&BI.isNull(e.iconHeight)?(this.element.css("lineHeight",e.height+"px"),BI.createWidget({type:"bi.default",element:this,items:[this.icon]})):(this.element.css("lineHeight","1"),BI.createWidget({element:this,type:"bi.center_adapt",items:[this.icon]}))}}),BI.shortcut("bi.icon_label",BI.IconLabel)},function(e,t){BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var e=this.options;return{type:"bi.text",textAlign:e.textAlign,whiteSpace:e.whiteSpace,lineHeight:e.textHeight,text:e.text,value:e.value,py:e.py,keyword:e.keyword,highLight:e.highLight}},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)}}),BI.shortcut("bi.label",BI.Label)},function(e,t){BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var e=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var e=this.options;return{type:"bi.a",textAlign:e.textAlign,whiteSpace:e.whiteSpace,lineHeight:e.textHeight,text:e.text,keyword:e.keyword,value:e.value,py:e.py,href:e.href,target:e.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link)},function(e,t){BI.Bubble=BI.inherit(BI.Tip,{_defaultConfig:function(){return BI.extend(BI.Bubble.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-bubble",direction:"top",text:"",level:"error",height:18})},_init:function(){BI.Bubble.superclass._init.apply(this,arguments);var e=function(e){return e.stopPropagation(),e.stopEvent(),!1};this.element.bind({click:e,mousedown:e,mouseup:e,mouseover:e,mouseenter:e,mouseleave:e,mousemove:e}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var e=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+e.level,text:e.text,hgap:5,height:18})},_top:function(){return BI.createWidget({type:"bi.vertical",items:[{el:this._createBubbleText(),height:18},{el:{type:"bi.layout"},height:3}]})},_bottom:function(){return BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout"},height:3},{el:this._createBubbleText(),height:18}]})},_left:function(){return BI.createWidget({type:"bi.right",items:[{el:{type:"bi.layout",width:3,height:18}},{el:this._createBubbleText()}]})},_right:function(){return BI.createWidget({type:"bi.left",items:[{el:{type:"bi.layout",width:3,height:18}},{el:this._createBubbleText()}]})},setText:function(e){this.text.setText(e)}}),BI.shortcut("bi.bubble",BI.Bubble)},function(e,t){BI.Toast=BI.inherit(BI.Tip,{_const:{minWidth:200,hgap:10},_defaultConfig:function(){return BI.extend(BI.Toast.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-toast",text:"",level:"success"})},_init:function(){BI.Toast.superclass._init.apply(this,arguments);var e=this,t=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+t.level);var i=function(e){return e.stopPropagation(),e.stopEvent(),!1};this.element.bind({click:i,mousedown:i,mouseup:i,mouseover:i,mouseenter:i,mouseleave:i,mousemove:i});var n="close-font";switch(t.level){case"success":n="toast-success-font";break;case"error":n="toast-error-font";break;case"warning":n="toast-warning-font";break;case"normal":default:n="toast-message-font"}var r=[{type:"bi.icon_label",cls:n+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:t.text,textHeight:16,textAlign:"left"},rgap:t.autoClose?this._const.hgap:0}],o=[36,""];!1===t.autoClose&&(r.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){e.destroy()},width:36}),o.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:r,vgap:7,columnSize:o})},setText:function(e){this.text.setText(e)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast)},function(e,t){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 t=this.options;this.element.addClass("tooltip-"+t.level);var e=function(e){t.stopPropagation&&e.stopPropagation(),t.stopEvent&&e.stopEvent()};this.element.bind({click:e,mousedown:e,mouseup:e,mouseover:e,mouseenter:e,mouseleave:e,mousemove:e});var i=(t.text+"").split("\n");1<i.length?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(i,function(e,t){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:t,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:t.text,textHeight:18,hgap:this._const.hgap})},setWidth:function(e){this.element.width(e-2*this._const.hgap)},setText:function(e){this.text&&this.text.setText(e)},setLevel:function(e){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+e)}}),BI.shortcut("bi.tooltip",BI.Tooltip)},function(e,t){BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}})},function(e,t){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(e){var r=this,o=this.options;e=BI.Tree.transformToTreeFormat(e);var a=[];return BI.each(e,function(e,i){var t,n;BI.isNotEmptyArray(i.children)||!0===i.isParent?(t=BI.extend({type:"bi.expander",el:{value:i.value},popup:{type:"bi.custom_tree"}},BI.deepClone(o.expander),{id:i.id,pId:i.pId}),n=BI.stripEL(i),BI.isWidget(n)?t.el=n:(delete(n=BI.clone(n)).children,BI.extend(t.el,n)),t.popup.expander=BI.deepClone(o.expander),t.items=t.popup.items=i.children,t.itemsCreator=t.popup.itemsCreator=function(e){if(BI.isNotNull(e.node))return o.itemsCreator.apply(r,arguments);var t=Array.prototype.slice.call(arguments,0);return t[0].node=i,o.itemsCreator.apply(r,t)},BI.isNull(t.popup.el)&&(t.popup.el=BI.deepClone(o.el)),a.push(t)):a.push(i)}),a},initTree:function(e){var n=this,t=this.options;this.tree=BI.createWidget(t.el,{element:this,items:this._formatItems(e),itemsCreator:function(e,i){t.itemsCreator.apply(this,[e,function(e){var t=Array.prototype.slice.call(arguments,0);t[0]=n._formatItems(e),i.apply(null,t)}])},value:t.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.CustomTree.EVENT_CHANGE,t,i)})},stroke:function(e){this.populate.apply(this,arguments)},populate:function(e){var t=Array.prototype.slice.call(arguments,0);0<arguments.length&&(t[0]=this._formatItems(e)),this.tree.populate.apply(this.tree,t)},setValue:function(e){this.tree&&this.tree.setValue(e)},getValue:function(){return this.tree?this.tree.getValue():[]},getAllButtons:function(){return this.tree?this.tree.getAllButtons():[]},getAllLeaves:function(){return this.tree?this.tree.getAllLeaves():[]},getNodeById:function(e){return this.tree&&this.tree.getNodeById(e)},getNodeByValue:function(e){return this.tree&&this.tree.getNodeByValue(e)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree)},function(e,t){BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{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 e=this,t=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:t.iconCls,height:t.height,iconWidth:t.iconWidth,iconHeight:t.iconHeight,stopEvent:t.stopEvent,stopPropagation:t.stopPropagation,selected:t.selected,once:t.once,forceSelected:t.forceSelected,forceNotSelected:t.forceNotSelected,disableSelected:t.disableSelected,shadow:t.shadow,isShadowShowingOnSelected:t.isShadowShowingOnSelected,trigger:t.trigger,handler:t.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){e.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(e){this.button.setSelected(e)},setIcon:function(e){var t=this.options;t.iconCls!==e&&(this.element.removeClass(t.iconCls).addClass(e),t.iconCls=e)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton)},function(e,t){BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var e=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.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)},function(e,t){BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var e=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{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)},function(e,t){BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{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)},function(e,t){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 t=this,e=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:e.height,height:e.height,hgap:e.hgap,rgap:e.rgap,text:e.text,keyword:e.keyword,value:e.value,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&t.setSelected(t.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:e.iconWrapperWidth},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.MultiSelectItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE,this.getValue(),this)},setSelected:function(e){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(e)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem)},function(e,t){BI.SingleSelectIconTextItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-icon-text-item bi-list-item-active",iconCls:"",height:24})},_init:function(){BI.SingleSelectIconTextItem.superclass._init.apply(this,arguments);var e=this,t=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:t.iconCls,once:t.once,iconWrapperWidth:t.iconWrapperWidth,selected:t.selected,height:t.height,iconHeight:t.iconHeight,iconWidth:t.iconWidth,text:t.text,keyword:t.keyword,value:t.value,py:t.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(e){this.text.setSelected(e)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectIconTextItem.superclass.doClick.apply(this,arguments)}}),BI.shortcut("bi.single_select_icon_text_item",BI.SingleSelectIconTextItem)},function(e,t){BI.SingleSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-item bi-list-item-active",hgap:10,height:24,textAlign:"left"})},_init:function(){BI.SingleSelectItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:e.textAlign,whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,keyword:e.keyword,value:e.value,title:e.title||e.text,warningTitle:e.warningTitle,py:e.py})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(e){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem)},function(e,t){BI.SingleSelectRadioItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item",logic:{dynamic:!1},hgap:10,height:24})},_init:function(){BI.SingleSelectRadioItem.superclass._init.apply(this,arguments);var e=this.options;this.radio=BI.createWidget({type:"bi.radio",once:e.once}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,keyword:e.keyword,value:e.value,py:e.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:16},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectRadioItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.SingleSelectRadioItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(e){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(e)}}),BI.SingleSelectRadioItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem)},function(e,t){BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconWrapperWidth:16})},_init:function(){var t=this,e=this.options;BI.ArrowNode.superclass._init.apply(this,arguments),this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:e.iconWrapperWidth,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.ArrowNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isOpened())},setText:function(e){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(e)},setOpened:function(e){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(e)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode)},function(e,t){BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-first-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){BI.FirstPlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.FirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(e){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode)},function(e,t){BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:"",iconWrapperWidth:16})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var i=BI.createWidget({type:"bi.icon_label",width:24,cls:e.iconCls,iconWidth:e.iconWidth,iconHeight:e.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var n=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),r=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:e.iconWrapperWidth,el:this.checkbox},{width:16,el:i},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(n,BI.extend(e.logic,{items:r,rgap:5}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.IconArrowNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(e){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode)},function(e,t){BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-last-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){BI.LastPlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.LastPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(e){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode)},function(e,t){BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-mid-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){BI.MidPlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.MidPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(e){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode)},function(e,t){BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-icon-arrow-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24,iconHeight:16,iconWidth:16,iconCls:""})},_init:function(){BI.MultiLayerIconArrowNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:e.iconCls,cls:"bi-list-item-none",id:e.id,pId:e.pId,open:e.open,height:e.height,iconHeight:e.iconHeight,iconWidth:e.iconWidth,hgap:e.hgap,text:e.text,value:e.value,py:e.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(e){t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var i=[];BI.count(0,e.layer,function(){i.push({type:"bi.layout",width:15,height:e.height})}),i.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(e.layer,15),items:[i]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(e){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(e)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(e)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode)},function(e,t){BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){BI.PlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.PlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(e){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode)},function(e,t){BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var e=this;return{type:"bi.absolute",ref:function(){e.layout=this},items:[{el:{type:"bi.text_button",cls:"circle-button bi-card"},width:18,height:18,top:2,left:this.options.selected?24:2}]}},setSelected:function(e){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=e?24:2,this.layout.resize()},doClick:function(){BI.Switch.superclass.doClick.apply(this,arguments),this.fireEvent(BI.Switch.EVENT_CHANGE)}}),BI.Switch.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.switch",BI.Switch)},function(e,t){BI.FirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:24})},_init:function(){BI.FirstTreeLeafItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword});var t=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),i=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===e.layer?"":{width:12,el:{type:"bi.layout",cls:e.pNode&&e.pNode.isLastNode?"":"base-line-conn-background",width:12,height:e.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:e.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(t,BI.extend(e.logic,{items:i}))))},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)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem)},function(e,t){BI.IconTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.IconTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},height:24,iconWidth:16,iconHeight:16,iconCls:""})},_init:function(){BI.IconTreeLeafItem.superclass._init.apply(this,arguments);var e=this.options,t=BI.createWidget({type:"bi.center_adapt",width:24,cls:e.iconCls,items:[{type:"bi.icon",width:e.iconWidth,height:e.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:16,el:t},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n,hgap:5}))))},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)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem)},function(e,t){BI.LastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:24})},_init:function(){BI.LastTreeLeafItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword});var t=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),i=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===e.layer?"":{width:12,el:{type:"bi.layout",cls:e.pNode&&e.pNode.isLastNode?"":"base-line-conn-background",width:12,height:e.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:e.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(t,BI.extend(e.logic,{items:i}))))},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)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem)},function(e,t){BI.MidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:24})},_init:function(){BI.MidTreeLeafItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword});var t=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),i=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===e.layer?"":{width:12,el:{type:"bi.layout",cls:e.pNode&&e.pNode.isLastNode?"":"base-line-conn-background",width:12,height:e.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:e.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(t,BI.extend(e.logic,{items:i}))))},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)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem)},function(e,t){BI.MultiLayerIconTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerIconTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-icon-tree-leaf-item bi-list-item-active",layer:0,height:24,iconCls:"",iconHeight:16,iconWidth:16})},_init:function(){BI.MultiLayerIconTreeLeafItem.superclass._init.apply(this,arguments);var t=this,e=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:e.iconCls,id:e.id,pId:e.pId,isFront:!0,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var i=[];BI.count(0,e.layer,function(){i.push({type:"bi.layout",width:15,height:e.height})}),i.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(e.layer,15),items:[i]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerIconTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(e){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(e)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem)},function(e,t){BI.TreeTextLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tree-text-leaf-item bi-list-item-active",id:"",pId:"",height:24,hgap:0,lgap:0,rgap:0})},_init:function(){BI.TreeTextLeafItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,lgap:e.lgap,rgap:e.hgap,text:e.text,value:e.value,py:e.py}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text}]})},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)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.tree_text_leaf_item",BI.TreeTextLeafItem)},function(e,t){BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var e=this,t=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:t.text,value:t.value,ref:function(){e.text=this}},left:t.lgap,right:t.rgap,top:0,bottom:0}]}},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)},setSelected:function(e){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(e)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem)},function(e,t){BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(e,t,i){var n=this.options,o={},r=BI.getDate(),a=n.min.match(/\d+/g),s=n.max.match(/\d+/g);e<(0|a[0])&&(e=0|a[0]),e>(0|s[0])&&(e=0|s[0]),r.setFullYear(e,t,i),o.ymd=[r.getFullYear(),r.getMonth(),r.getDate()];var l=BI.Date._MD.slice(0);l[1]=BI.isLeapYear(o.ymd[0])?29:28,r.setFullYear(o.ymd[0],o.ymd[1],1),o.FDay=r.getDay();var u=(7-BI.StartOfWeek+o.FDay)%7;o.PDay=l[0===t?11:t-1]-u+1,o.NDay=1;var c=[];return BI.each(BI.range(42),function(e){var t,i={},n=o.ymd[0],r=o.ymd[1]+1;e<u?(i.lastMonth=!0,t=e+o.PDay,1===r&&--n,r=1===r?12:r-1):u<=e&&e<u+l[o.ymd[1]]?(t=e-u+1)===o.ymd[2]&&(i.currentDay=!0):(i.nextMonth=!0,t=o.NDay++,12===r&&(n+=1),r=12===r?1:r+1),BI.checkDateVoid(n,r,t,a,s)[0]&&(i.disabled=!0),i.text=t,c.push(i)}),c},_init:function(){BI.Calendar.superclass._init.apply(this,arguments);var e=this,t=this.options,i=BI.map(this._getWeekLabel(),function(e,t){return{type:"bi.label",height:24,text:t}}),n=BI.createWidget({type:"bi.button_group",height:44,items:i,layouts:[{type:"bi.center",hgap:5,vgap:10}]});this.days=BI.createWidget({type:"bi.button_group",items:BI.createItems(this._getItems(),{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},t.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(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},t.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",n,this.days)}))))},_getWeekLabel:function(){return BI.map(BI.range(0,7),function(e,t){return BI.Date._SDN[(t+BI.StartOfWeek)%7]})},isFrontDate:function(){var e=this.options,t=(this._const,e.year),i=e.month,n=BI.getDate(),r=n.getDay();t|=0,n.setFullYear(t,i,1);var o=BI.getOffsetDate(n,-1*(r+1));return!!BI.checkDateVoid(o.getFullYear(),o.getMonth(),o.getDate(),e.min,e.max)[0]},isFinalDate:function(){var e=this.options,t=(this._const,e.year),i=e.month,n=BI.getDate(),r=n.getDay();t|=0,n.setFullYear(t,i,1);var o=BI.getOffsetDate(n,42-r);return!!BI.checkDateVoid(o.getFullYear(),o.getMonth(),o.getDate(),e.min,e.max)[0]},_getItems:function(){var n=this.options,e=this._dateCreator(n.year,n.month-1,n.day),t=[];return t.push(e.slice(0,7)),t.push(e.slice(7,14)),t.push(e.slice(14,21)),t.push(e.slice(21,28)),t.push(e.slice(28,35)),t.push(e.slice(35,42)),BI.map(t,function(e,t){return BI.map(t,function(e,t){var i=t.lastMonth?n.month-1:t.nextMonth?n.month+1:n.month;return BI.extend(t,{type:"bi.calendar_date_item",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,value:n.year+"-"+i+"-"+t.text,disabled:t.lastMonth||t.nextMonth||t.disabled,lgap:5,rgap:5})})})},_populate:function(){this.days.populate(this._getItems())},setMinDate:function(e){var t=this.options;BI.isNotEmptyString(t.min)&&(t.min=e,this._populate())},setMaxDate:function(e){var t=this.options;BI.isNotEmptyString(t.max)&&(t.max=e,this._populate())},setValue:function(e){this.days.setValue([e.year+"-"+e.month+"-"+e.day])},getValue:function(){var e=this.days.getValue()[0].match(/\d+/g);return{year:0|e[0],month:0|e[1],day:0|e[2]}}}),BI.extend(BI.Calendar,{getPageByDateJSON:function(e){var t=BI.getDate().getFullYear(),i=BI.getDate().getMonth(),n=12*(e.year-t);return n+=e.month-1-i},getDateJSONByPage:function(e){var t=e;t+=BI.getDate().getMonth();var i=BI.parseInt(t/12);t<0&&t%12!=0&&i--;var n=0<=t?t%12:(12+t%12)%12;return{year:BI.getDate().getFullYear()+i,month:1+n}}}),BI.shortcut("bi.calendar",BI.Calendar)},function(e,t){BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(e){var t=this.options;e|=0;var i=BI.YearCalendar.getStartYear(e),n=[],r=BI.parseDateTime(t.min,"%Y-%X-%d"),o=BI.parseDateTime(t.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(e){var t={};BI.checkDateVoid(i+e,1,1,BI.print(BI.getDate(r.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(o.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(t.disabled=!0),t.text=i+e,n.push(t)}),n},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var e=this,t=this.options;this.currentYear=BI.getDate().getFullYear(),this.years=BI.createWidget({type:"bi.button_group",behaviors:t.behaviors,items:BI.createItems(this._getItems(),{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},t.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},t.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var e=this.options,t=e.year;return t|=0,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(t)-1,1,1,e.min,e.max)[0]},isFinalYear:function(){var e=this.options,t=(this._const,e.year);return t|=0,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(t)+1,1,1,e.min,e.max)[0]},_getItems:function(){var e=this.options,i=this._yearCreator(e.year||this.currentYear),t=i.length,n=BI.makeArray(t,""),r=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(i,function(e,t){n[e]=i[r[e]]});var o=[];return o.push(n.slice(0,2)),o.push(n.slice(2,4)),o.push(n.slice(4,6)),o.push(n.slice(6,8)),o.push(n.slice(8,10)),o.push(n.slice(10,12)),BI.map(o,function(e,t){return BI.map(t,function(e,t){return BI.extend(t,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:t.text,disabled:t.disabled})})})},_populate:function(){this.years.populate(this._getItems())},setMinDate:function(e){var t=this.options;BI.isNotEmptyString(t.min)&&(t.min=e,this._populate())},setMaxDate:function(e){var t=this.options;BI.isNotEmptyString(this.options.max)&&(t.max=e,this._populate())},setValue:function(e){this.years.setValue([e])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(e){return e-((e-BI.getDate().getFullYear()+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(e){return BI.YearCalendar.getStartYear(e)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(e){var t=BI.getDate().getFullYear();return((e=BI.YearCalendar.getStartYear(e))-t+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar)},function(e,t){BI.ArrowTreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-arrow-group-node-checkbox"})},setSelected:function(e){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),e?this.element.removeClass("expander-right-font").addClass("expander-down-font"):this.element.removeClass("expander-down-font").addClass("expander-right-font")}}),BI.shortcut("bi.arrow_group_node_checkbox",BI.ArrowTreeGroupNodeCheckbox)},function(e,t){BI.CheckingMarkNode=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.CheckingMarkNode.superclass._defaultConfig.apply(this,arguments),{extraCls:"check-mark-font"})},_init:function(){BI.CheckingMarkNode.superclass._init.apply(this,arguments),this.setSelected(this.options.selected)},setSelected:function(e){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),!0===e?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode)},function(e,t){BI.FirstTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type2",iconWidth:24,iconHeight:24})},setSelected:function(e){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),!0===e?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox)},function(e,t){BI.LastTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type4",iconWidth:24,iconHeight:24})},setSelected:function(e){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),!0===e?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox)},function(e,t){BI.MidTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type3",iconWidth:24,iconHeight:24})},setSelected:function(e){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),!0===e?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox)},function(e,t){BI.TreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type1",iconWidth:24,iconHeight:24})},setSelected:function(e){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),e?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox)},function(e,t){BI.BubbleCombo=BI.inherit(BI.Widget,{_const:{TRIANGLE_LENGTH:6},_defaultConfig:function(){return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-bubble-combo",trigger:"click",toggle:!0,direction:"bottom,left",isDefaultInit:!1,destroyWhenHide:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopPropagation:!1,adjustLength:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{}})},_init:function(){BI.BubbleCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:t.trigger,toggle:t.toggle,container:t.container,direction:t.direction,isDefaultInit:t.isDefaultInit,destroyWhenHide:t.destroyWhenHide,isNeedAdjustHeight:t.isNeedAdjustHeight,isNeedAdjustWidth:t.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:t.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:t.hideChecker,offsetStyle:t.offsetStyle,el:t.el,popup:BI.extend({type:"bi.bubble_popup_view"},t.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){e.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){e.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){e.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){e.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){e.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){e.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){e._showTriangle(),e.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){e._hideTriangle(),e.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){e.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(e){var t={},i={},n=this.options.adjustLength,r=this.element.offset(),o=r.left,a=r.left+this.element.outerWidth(),s=r.top,l=r.top+this.element.outerHeight();switch(e){case"left":t={top:s,height:this.element.outerHeight(),left:o-n-this._const.TRIANGLE_LENGTH},i={width:this._const.TRIANGLE_LENGTH};break;case"right":t={top:s,height:this.element.outerHeight(),left:a+n},i={width:this._const.TRIANGLE_LENGTH};break;case"top":t={left:o,width:this.element.outerWidth(),top:s-n-this._const.TRIANGLE_LENGTH},i={height:this._const.TRIANGLE_LENGTH};break;case"bottom":t={left:o,width:this.element.outerWidth(),top:l+n},i={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(i,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+e}]}),t.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[t]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){switch(this.combo.getPopupPosition().dir){case"left,top":case"left,bottom":this._createLeftTriangle();break;case"right,top":case"right,bottom":this._createRightTriangle();break;case"top,left":case"top,right":this._createTopTriangle();break;case"bottom,left":case"bottom,right":this._createBottomTriangle()}},_hideTriangle:function(){this.triangle&&this.triangle.destroy(),this.triangle=null},hideView:function(){this._hideTriangle(),this.combo&&this.combo.hideView()},showView:function(){this.combo&&this.combo.showView()},isViewVisible:function(){return this.combo.isViewVisible()}}),BI.BubbleCombo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.BubbleCombo.EVENT_CHANGE="EVENT_CHANGE",BI.BubbleCombo.EVENT_EXPAND="EVENT_EXPAND",BI.BubbleCombo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.BubbleCombo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.BubbleCombo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.BubbleCombo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.bubble_combo",BI.BubbleCombo)},function(e,t){BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var e=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:e.baseCls+" bi-bubble-popup-view",minWidth:220,maxWidth:300,minHeight:90})},_init:function(){BI.BubblePopupView.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.bubble_popup_view",BI.BubblePopupView),BI.BubblePopupBarView=BI.inherit(BI.BubblePopupView,{_defaultConfig:function(){return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-bubble-bar-popup-view",buttons:[{value:!1,text:BI.i18nText("BI-Basic_Cancel"),ghost:!0},{text:BI.i18nText(BI.i18nText("BI-Basic_Sure")),value:!0}]})},_init:function(){BI.BubblePopupBarView.superclass._init.apply(this,arguments)},_createToolBar:function(){var e=this.options,i=this,n=[];return BI.each(e.buttons,function(e,t){BI.isWidget(t)?n.push(t):n.push(BI.extend({type:"bi.button",height:24,handler:function(e){i.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,e)}},t))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:n}]})},_createView:function(){var e=this.options,t=BI.createWidget({type:"bi.button_group",items:[e.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return t.element.css("min-height",e.minHeight-44),t}}),BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.bubble_bar_popup_view",BI.BubblePopupBarView),BI.TextBubblePopupBarView=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-text-bubble-bar-popup-view",text:"",buttons:[{level:"ignore",value:!1,stopPropagation:!0,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,stopPropagation:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var i=this,e=this.options,t=BI.map(e.buttons,function(e,t){return BI.isWidget(t)?t:BI.extend({type:"bi.button",height:24,handler:function(e){i.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,e)}},t)});return{type:"bi.bubble_bar_popup_view",minWidth:e.minWidth,maxWidth:e.maxWidth,minHeight:e.minHeight,ref:function(){i.popup=this},el:{type:"bi.label",text:e.text,whiteSpace:"normal",textAlign:"left",ref:function(){i.text=this}},buttons:t}},populate:function(e){this.text.setText(e||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView)},function(e,t){BI.EditorIconCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-check-editor-combo",width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:""})},_init:function(){BI.EditorIconCheckCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:t.items,height:t.height,validationChecker:t.validationChecker,quitChecker:t.quitChecker,allowBlank:t.allowBlank,watermark:t.watermark,errorText:t.errorText,value:t.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){e.popup.setValue(this.getValue()),e.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE,arguments)}),this.trigger.on(BI.EditorTrigger.EVENT_FOCUS,function(){e.fireEvent(BI.EditorIconCheckCombo.EVENT_FOCUS,arguments)}),this.trigger.on(BI.EditorTrigger.EVENT_EMPTY,function(){e.fireEvent(BI.EditorIconCheckCombo.EVENT_EMPTY,arguments)}),this.trigger.on(BI.EditorTrigger.EVENT_VALID,function(){e.fireEvent(BI.EditorIconCheckCombo.EVENT_VALID,arguments)}),this.trigger.on(BI.EditorTrigger.EVENT_ERROR,function(){e.fireEvent(BI.EditorIconCheckCombo.EVENT_ERROR,arguments)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:t.chooseType,items:t.items,value:t.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.editorIconCheckCombo.hideView(),e.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:t.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(e){this.editorIconCheckCombo.setValue(e)},getValue:function(){return this.trigger.getValue()},populate:function(e){this.options.items=e,this.editorIconCheckCombo.populate(e)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.EditorIconCheckCombo.EVENT_FOCUS="EVENT_FOCUS",BI.EditorIconCheckCombo.EVENT_EMPTY="EVENT_EMPTY",BI.EditorIconCheckCombo.EVENT_VALID="EVENT_VALID",BI.EditorIconCheckCombo.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo)},function(e,t){BI.IconCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-combo",width:24,height:24,el:{},popup:{},minWidth:100,maxWidth:"auto",maxHeight:300,direction:"bottom",adjustLength:3,adjustXOffset:0,adjustYOffset:0,offsetStyle:"left",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget(t.el,{type:"bi.icon_combo_trigger",iconCls:t.iconCls,title:t.title,items:t.items,width:t.width,height:t.height,iconWidth:t.iconWidth,iconHeight:t.iconHeight,value:t.value}),this.popup=BI.createWidget(t.popup,{type:"bi.icon_combo_popup",chooseType:t.chooseType,items:t.items,value:t.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.iconCombo.hideView(),e.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:t.direction,trigger:t.trigger,container:t.container,adjustLength:t.adjustLength,adjustXOffset:t.adjustXOffset,adjustYOffset:t.adjustYOffset,offsetStyle:t.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:t.maxWidth,maxHeight:t.maxHeight,minWidth:t.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e)},getValue:function(){var e=this.popup.getValue();return BI.isNull(e)?[]:BI.isArray(e)?e:[e]},populate:function(e){this.options.items=e,this.iconCombo.populate(e)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo)},function(e,t){BI.IconComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi.icon-combo-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconComboPopup.superclass._init.apply(this,arguments);var e=this.options,n=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(e.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:e.chooseType,layouts:[{type:"bi.vertical"}],value:e.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.IconComboPopup.EVENT_CHANGE,t,i)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(e){BI.IconComboPopup.superclass.populate.apply(this,arguments),e=BI.createItems(e,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(e)},getValue:function(){return this.popup.getValue()},setValue:function(e){this.popup.setValue(e)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup)},function(e,t){BI.IconComboTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-combo-trigger",el:{},items:[],iconCls:"",width:24,height:24,isShowDown:!0,value:""})},_init:function(){BI.IconComboTrigger.superclass._init.apply(this,arguments);var e=this.options,t="";BI.isKey(e.value)&&(t=this._digest(e.value,e.items)),this.button=BI.createWidget(e.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:t,disableSelected:!0,width:e.isShowDown?e.width-12:e.width,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight,selected:BI.isNotEmptyString(t)}),this.down=BI.createWidget({type:"bi.icon_button",disableSelected:!0,cls:"icon-combo-down-icon trigger-triangle-font font-size-12",width:12,height:8,selected:BI.isNotEmptyString(t)}),this.down.setVisible(e.isShowDown),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.button,left:0,right:0,top:0,bottom:0},{el:this.down,right:3,bottom:0}]})},_digest:function(i,e){var n="";return i=BI.isArray(i)?i[0]:i,BI.any(e,function(e,t){if(i===t.value)return n=t.iconCls,!0}),n},populate:function(e){var t=this.options;this.options.items=e||[],this.button.setIcon(t.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(e){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var t=this.options,i=this._digest(e,this.options.items);e=BI.isArray(e)?e[0]:e,BI.isNotEmptyString(i)?(this.button.setIcon(i),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(t.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger)},function(e,t){BI.IconTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-text-value-combo",height:24,iconHeight:null,iconWidth:null,value:"",attributes:{tabIndex:0}})},_init:function(){BI.IconTextValueCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:t.items,height:t.height,text:t.text,iconCls:t.iconCls,value:t.value,iconHeight:t.iconHeight,iconWidth:t.iconWidth,iconWrapperWidth:t.iconWrapperWidth,title:t.title,warningTitle:t.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:t.items,value:t.value,iconHeight:t.iconHeight,iconWidth:t.iconWidth,iconWrapperWidth:t.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.textIconCombo.hideView(),e.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:t.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240,minHeight:25}}),BI.isKey(t.value)&&this.setValue(t.value)},_checkError:function(i){var e;BI.isNotNull(i)&&(i=BI.isArray(i)?i:[i],e=BI.find(this.options.items,function(e,t){return BI.contains(i,t.value)}),BI.isNull(e)?(this.trigger.options.tipType="warning",this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.options.tipType="success",this.element.removeClass("combo-error")))},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e),this._checkError(e)},getValue:function(){var e=this.popup.getValue();return BI.isNull(e)?[]:BI.isArray(e)?e:[e]},populate:function(e){this.options.items=e,this.textIconCombo.populate(e)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo)},function(e,t){BI.IconTextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-text-icon-popup",behaviors:{redmark:function(){return!0}}})},_init:function(){BI.IconTextValueComboPopup.superclass._init.apply(this,arguments);var e=this.options,n=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(e.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:e.iconHeight,iconWidth:e.iconWidth,iconWrapperWidth:e.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:e.behaviors,value:e.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,t,i)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(e,t){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var i=this.options;e=BI.createItems(e,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:i.iconWrapperWidth,iconHeight:i.iconHeight,iconWidth:i.iconWidth}),this.popup.populate(e,t)},getValue:function(){return this.popup.getValue()},setValue:function(e){this.popup.setValue(e)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup)},function(e,t){BI.SearchTextValueCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-search-text-value-combo",height:24,text:"",items:[],tipType:"",warningTitle:"",attributes:{tabIndex:0}},render:function(){var t=this,e=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:e.container,adjustLength:2,toggle:!1,ref:function(){t.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){t.trigger=this},items:e.items,height:e.height-2,text:e.text,value:e.value,tipType:e.tipType,warningTitle:e.warningTitle,title:e.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){t.setValue(this.getValue()),t.combo.hideView(),t.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:e.value,items:e.items,ref:function(){t.popup=this,t.trigger.getSearcher().setAdapter(t.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){t.setValue(this.getValue()),t.combo.hideView(),t.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:e.value,maxHeight:252,minHeight:25},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){t.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(e){return 0===t.triggerBtn.element.find(e.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){t.triggerBtn=this},width:e.height,height:e.height,handler:function(){t.combo.isViewVisible()?t.combo.hideView():t.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var e=this.options;BI.isKey(e.value)&&this._checkError(e.value)},_checkError:function(i){var e;BI.isNotNull(i)&&(i=BI.isArray(i)?i:[i],e=BI.find(this.options.items,function(e,t){return BI.contains(i,t.value)}),BI.isNull(e)?(this.element.removeClass("combo-error").addClass("combo-error"),this.trigger.attr("tipType","warning")):(this.element.removeClass("combo-error"),this.trigger.attr("tipType","success")))},populate:function(e){this.options.items=e,this.combo.populate(e)},setValue:function(e){this.combo.setValue(e),this._checkError(e)},getValue:function(){var e=this.combo.getValue();return BI.isNull(e)?[]:BI.isArray(e)?e:[e]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo)},function(e,t){BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var n=this,e=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){n.popup=this},items:BI.createItems(e.items,{type:"bi.single_select_item",textAlign:e.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:e.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,t,i)}}]}]}},mounted:function(){this.check()},populate:function(e,t,i){var n=BI.concat(e,t);BI.SearchTextValueComboPopup.superclass.populate.apply(this,n),n=BI.createItems(n,{type:"bi.single_select_item",height:24}),this.popup.populate(n,i)},getValue:function(){return this.popup.getValue()},setValue:function(e){this.popup.setValue(e)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup)},function(e,t){BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var e=this,o=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){e.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){e.editor=this},defaultText:o.text,text:this._digest(o.value,o.items),value:o.value,height:o.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(e,t){var i=e.keyword,n=BI.Func.getSearchResult(o.items,i),r=n.match;t(n.find,r)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){e.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(e){this.editor.setState(e)},_digest:function(i,e){var t=this.options;i=BI.isArray(i)?i:[i];var n=[],r=BI.Tree.transformToArrayFormat(e);return BI.each(r,function(e,t){BI.deepContains(i,t.value)&&!BI.contains(n,t.text||t.value)&&n.push(t.text||t.value)}),0<n.length?n.join(","):BI.isFunction(t.text)?t.text():t.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(e){this.options.items=e},setValue:function(e){this._setState(this._digest(e,this.options.items))},getValue:function(){return this.searcher.getValue()}}),BI.SearchTextValueTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SearchTextValueTrigger.EVENT_STOP="EVENT_STOP",BI.SearchTextValueTrigger.EVENT_START="EVENT_START",BI.SearchTextValueTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_trigger",BI.SearchTextValueTrigger)},function(e,t){BI.TextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-value-check-combo",width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:"",attributes:{tabIndex:0}})},_init:function(){BI.TextValueCheckCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:t.items,height:t.height,text:t.text,value:t.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:t.chooseType,items:t.items,value:t.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.textIconCheckCombo.hideView(),e.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:t.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(t.value)&&this.setValue(t.value)},setTitle:function(e){this.trigger.setTitle(e)},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e)},setWarningTitle:function(e){this.trigger.setWarningTitle(e)},getValue:function(){var e=this.popup.getValue();return BI.isNull(e)?[]:BI.isArray(e)?e:[e]},populate:function(e){this.options.items=e,this.textIconCheckCombo.populate(e)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo)},function(e,t){BI.TextValueCheckComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueCheckComboPopup.superclass._init.apply(this,arguments);var e=this.options,n=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(e.items),chooseType:e.chooseType,layouts:[{type:"bi.vertical"}],value:e.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,t,i)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(e){return BI.map(e,function(e,t){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},t)})},populate:function(e){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(e))},getValue:function(){return this.popup.getValue()},setValue:function(e){this.popup.setValue(e)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup)},function(e,t){BI.TextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-value-combo",height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:"",value:"",attributes:{tabIndex:0}})},_init:function(){BI.TextValueCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:t.items,height:t.height,text:t.text,value:t.value,warningTitle:t.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:t.chooseType,value:t.value,items:t.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.textIconCombo.hideView(),e.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:t.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240,minHeight:25}}),BI.isKey(t.value)&&this._checkError(t.value)},_checkError:function(i){var e;BI.isNotNull(i)&&(i=BI.isArray(i)?i:[i],e=BI.find(this.options.items,function(e,t){return BI.contains(i,t.value)}),BI.isNull(e)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error")))},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e),this._checkError(e)},getValue:function(){var e=this.popup.getValue();return BI.isNull(e)?[]:BI.isArray(e)?e:[e]},populate:function(e){this.options.items=e,this.textIconCombo.populate(e)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo)},function(e,t){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 e=this,t=this.options;this.trigger=BI.createWidget(t.el,{type:"bi.small_select_text_trigger",items:t.items,height:t.height,text:t.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:t.chooseType,items:t.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.SmallTextValueCombo.hideView(),e.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:t.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240,minHeight:25}})},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e)},getValue:function(){return this.popup.getValue()},populate:function(e){this.options.items=e,this.SmallTextValueCombo.populate(e)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo)},function(e,t){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 e=this.options,n=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(e.items,{type:"bi.single_select_item",textAlign:e.textAlign,height:24}),chooseType:e.chooseType,layouts:[{type:"bi.vertical"}],value:e.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,t,i)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(e){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),e=BI.createItems(e,{type:"bi.single_select_item",height:24}),this.popup.populate(e)},getValue:function(){return this.popup.getValue()},setValue:function(e){this.popup.setValue(e)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup)},function(e,t){BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget({type:"bi.editor",height:e.height,watermark:e.watermark,allowBlank:!0,errorText:e.errorText,validationChecker:e.validationChecker,quitChecker:e.quitChecker,value:e.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){t.setValue(""),t.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),t.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(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t._checkClear(),t.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,e)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){t.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){t.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t._checkClear(),t.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){t.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(e.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid())return this.editor.getValue()},setValue:function(e){this.editor.setValue(e),BI.isKey(e)&&this.clear.visible()},isValid:function(){return this.editor.isValid()}}),BI.ClearEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ClearEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ClearEditor.EVENT_BLUR="EVENT_BLUR",BI.ClearEditor.EVENT_CLICK="EVENT_CLICK",BI.ClearEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ClearEditor.EVENT_SPACE="EVENT_SPACE",BI.ClearEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.ClearEditor.EVENT_CLEAR="EVENT_CLEAR",BI.ClearEditor.EVENT_START="EVENT_START",BI.ClearEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ClearEditor.EVENT_STOP="EVENT_STOP",BI.ClearEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ClearEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.ClearEditor.EVENT_VALID="EVENT_VALID",BI.ClearEditor.EVENT_ERROR="EVENT_ERROR",BI.ClearEditor.EVENT_ENTER="EVENT_ENTER",BI.ClearEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ClearEditor.EVENT_REMOVE="EVENT_REMOVE",BI.ClearEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.clear_editor",BI.ClearEditor)},function(e,t){BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-shelter-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24,textAlign:"left"})},_init:function(){BI.ShelterEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget({type:"bi.editor",height:e.height,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,value:e.value,validationChecker:e.validationChecker,quitChecker:e.quitChecker,allowBlank:e.allowBlank,watermark:e.watermark,errorText:e.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:e.title,warningTitle:e.warningTitle,tipType:e.tipType,textAlign:e.textAlign,height:e.height,hgap:e.hgap}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.text.on(BI.Controller.EVENT_CHANGE,function(){(arguments[2]=t).fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){t.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t._showHint(),t._checkText(),t.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t._showHint(),t._checkText(),t.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){t.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t._checkText(),t.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),t._checkText()},_checkText:function(){var e=this.options;""===this.editor.getValue()?(this.text.setValue(e.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark")),BI.isKey(e.keyword)&&this.text.doRedMark(e.keyword)},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},setTitle:function(e){this.text.setTitle(e)},setWarningTitle:function(e){this.text.setWarningTitle(e)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(e){this.editor.setErrorText(e)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setTextStyle:function(e){this.text.setStyle(e)},setValue:function(e){this.options;this.editor.setValue(e),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(e){this._showHint(),this.text.setValue(e)}}),BI.ShelterEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ShelterEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ShelterEditor.EVENT_BLUR="EVENT_BLUR",BI.ShelterEditor.EVENT_CLICK="EVENT_CLICK",BI.ShelterEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ShelterEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.ShelterEditor.EVENT_START="EVENT_START",BI.ShelterEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ShelterEditor.EVENT_STOP="EVENT_STOP",BI.ShelterEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ShelterEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.ShelterEditor.EVENT_VALID="EVENT_VALID",BI.ShelterEditor.EVENT_ERROR="EVENT_ERROR",BI.ShelterEditor.EVENT_ENTER="EVENT_ENTER",BI.ShelterEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ShelterEditor.EVENT_SPACE="EVENT_SPACE",BI.ShelterEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.shelter_editor",BI.ShelterEditor)},function(e,t){BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-sign-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24})},_init:function(){BI.SignEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget({type:"bi.editor",height:e.height,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,value:e.value,validationChecker:e.validationChecker,quitChecker:e.quitChecker,allowBlank:e.allowBlank,watermark:e.watermark,errorText:e.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:e.title,warningTitle:e.warningTitle,tipType:e.tipType,textAlign:"left",height:e.height,hgap:e.hgap,handler:function(){t._showInput(),t.editor.focus(),t.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){t.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t._showHint(),t._checkText(),t.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t._showHint(),t._checkText(),t.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){t.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t._checkText(),t.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),t._checkText()},_checkText:function(){var e=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(e.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(e.keyword)&&this.text.doRedMark(e.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(e){this.text.setTitle(e)},setWarningTitle:function(e){this.text.setWarningTitle(e)},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(e){this.editor.setErrorText(e)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(e){this.editor.setValue(e),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(e){this._showHint(),this.text.setValue(e)}}),BI.SignEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignEditor.EVENT_BLUR="EVENT_BLUR",BI.SignEditor.EVENT_CLICK="EVENT_CLICK",BI.SignEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignEditor.EVENT_START="EVENT_START",BI.SignEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignEditor.EVENT_STOP="EVENT_STOP",BI.SignEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SignEditor.EVENT_VALID="EVENT_VALID",BI.SignEditor.EVENT_ERROR="EVENT_ERROR",BI.SignEditor.EVENT_ENTER="EVENT_ENTER",BI.SignEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignEditor.EVENT_SPACE="EVENT_SPACE",BI.SignEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_editor",BI.SignEditor)},function(e,t){BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24,defaultText:"",text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget({type:"bi.editor",height:e.height,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,value:e.value,validationChecker:e.validationChecker,quitChecker:e.quitChecker,allowBlank:e.allowBlank,watermark:e.watermark,errorText:e.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark tip-text-style",textAlign:"left",height:e.height,text:e.text,hgap:e.hgap,handler:function(){t._showInput(),t.editor.focus(),t.editor.setValue("")},title:BI.isNotNull(e.tipText)?e.tipText:function(){var e="";return BI.isString(t.stateValue)&&(e=t.stateValue),BI.isArray(t.stateValue)&&1===t.stateValue.length&&(e=t.stateValue[0]),e},warningTitle:e.warningTitle,tipType:e.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){t.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t._showHint(),t.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t._showHint(),t.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){t.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(e.text)&&this.setState(e.text)},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){!1===this.options.disabled&&(this._showInput(),this.editor.focus())},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},_setText:function(e){this.text.setText(e),this.text.setTitle(e)},isValid:function(){return this.editor.isValid()},setErrorText:function(e){this.editor.setErrorText(e)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(e){this.editor.setValue(e)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(e){var t=this.options;if(BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=e,!BI.isNumber(e))return BI.isString(e)?(this._setText(e),void(BI.isKey(t.defaultText)&&t.defaultText===e?this.text.element.addClass("bi-water-mark"):this.text.element.removeClass("bi-water-mark"))):void(BI.isArray(e)&&(BI.isEmpty(e)?(this._setText(BI.isKey(t.defaultText)?t.defaultText:t.text),BI.isKey(t.defaultText)?this.text.element.addClass("bi-water-mark"):this.text.element.removeClass("bi-water-mark")):(1===e.length?this._setText(e[0]):this._setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("bi-water-mark"))));e===BI.Selection.All?(this._setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("bi-water-mark")):e===BI.Selection.Multi?(this._setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("bi-water-mark")):(this._setText(BI.isKey(t.defaultText)?t.defaultText:t.text),BI.isKey(t.defaultText)?this.text.element.addClass("bi-water-mark"):this.text.element.removeClass("bi-water-mark"))},setTipType:function(e){this.text.options.tipType=e},getText:function(){return this.text.getText()}}),BI.StateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.StateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.StateEditor.EVENT_BLUR="EVENT_BLUR",BI.StateEditor.EVENT_CLICK="EVENT_CLICK",BI.StateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.StateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.StateEditor.EVENT_START="EVENT_START",BI.StateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.StateEditor.EVENT_STOP="EVENT_STOP",BI.StateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.StateEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.StateEditor.EVENT_VALID="EVENT_VALID",BI.StateEditor.EVENT_ERROR="EVENT_ERROR",BI.StateEditor.EVENT_ENTER="EVENT_ENTER",BI.StateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.StateEditor.EVENT_SPACE="EVENT_SPACE",BI.StateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.state_editor",BI.StateEditor)},function(e,t){BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-simple-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,mouseOut:!1,allowBlank:!0,watermark:"",errorText:"",height:24,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.SimpleStateEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget({type:"bi.editor",height:e.height,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,value:e.value,validationChecker:e.validationChecker,quitChecker:e.quitChecker,allowBlank:e.allowBlank,watermark:e.watermark,errorText:e.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark",textAlign:"left",text:e.text,height:e.height,hgap:e.hgap,handler:function(){t._showInput(),t.editor.focus(),t.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){t.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t._showHint(),t.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t._showHint(),t.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(e.text)&&this.setState(e.text)},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},_setText:function(e){this.text.setText(e),this.text.setTitle(e)},isValid:function(){return this.editor.isValid()},setErrorText:function(e){this.editor.setErrorText(e)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(e){this.editor.setValue(e)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(e){var t=this.options;BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(e)?e===BI.Selection.All||e===BI.Selection.Multi?(this._setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("bi-water-mark")):(this._setText(t.text),this.text.element.addClass("bi-water-mark")):BI.isArray(e)&&1!==e.length?BI.isEmpty(e)?(this._setText(t.text),this.text.element.addClass("bi-water-mark")):(this._setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("bi-water-mark")):(this._setText(e),this.text.element.removeClass("bi-water-mark"))},getText:function(){return this.text.getText()}}),BI.SimpleStateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SimpleStateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SimpleStateEditor.EVENT_BLUR="EVENT_BLUR",BI.SimpleStateEditor.EVENT_CLICK="EVENT_CLICK",BI.SimpleStateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SimpleStateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SimpleStateEditor.EVENT_START="EVENT_START",BI.SimpleStateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SimpleStateEditor.EVENT_STOP="EVENT_STOP",BI.SimpleStateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SimpleStateEditor.EVENT_VALID="EVENT_VALID",BI.SimpleStateEditor.EVENT_ERROR="EVENT_ERROR",BI.SimpleStateEditor.EVENT_ENTER="EVENT_ENTER",BI.SimpleStateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SimpleStateEditor.EVENT_SPACE="EVENT_SPACE",BI.SimpleStateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.simple_state_editor",BI.SimpleStateEditor)},function(e,t){BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var e=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var e=this.options,i=this;if(0!==e.buttons.length){var n=[];return BI.each(e.buttons,function(e,t){n.push({text:t,value:e})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(n,{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(e,t){i.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,e,t)}),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)},function(e,t){BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var e=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var e=this,t=this.options,i=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return i.on(BI.IconButton.EVENT_CHANGE,function(){e.setVisible(!1),e.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:t.title,height:25,lgap:10}},{el:i,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)},function(e,t){BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var e=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.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 n=this,i=this.options;this.button_group=BI.createWidget(i.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:i.items,itemsCreator:function(e,t){1===e.times&&(n.empty(),BI.nextTick(function(){n.loading()})),i.itemsCreator(e,function(){t.apply(n,arguments),1===e.times&&BI.nextTick(function(){n.loaded(),n.check()})})},hasNext:i.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.ListPane.EVENT_CHANGE,t,i)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:i.lgap,rgap:i.rgap,tgap:i.tgap,bgap:i.bgap,vgap:i.vgap,hgap:i.hgap},i.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(e){this.options.items=e.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(e){this.options.items=this.options.items.concat(e),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(e){e=e||[],BI.removeAt(this.options.items,e),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(e){var t=this;this.options;0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");t.populate.apply(t,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),this.button_group.populate.apply(this.button_group,arguments))},empty:function(){this.button_group.empty()},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},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(e){return this.button_group.getIndexByValue(e)},getNodeById:function(e){return this.button_group.getNodeById(e)},getNodeByValue:function(e){return this.button_group.getNodeByValue(e)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane)},function(e,t){BI.Panel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-panel bi-border",title:"",titleButtons:[],el:{},logic:{dynamic:!1}})},_init:function(){BI.Panel.superclass._init.apply(this,arguments);var e=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var i=this,e=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:e.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:e.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(e,t){i.fireEvent(BI.Panel.EVENT_CHANGE,e,t)}),{el:{type:"bi.left_right_vertical_adapt",cls:"panel-title bi-header-background bi-border-bottom",height:29,items:{left:[this.text],right:[this.button_group]},lhgap:10,rhgap:10},height:29}},setTitle:function(e){this.text.setValue(e)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel)},function(e,t){BI.LinearSegmentButton=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-line-segment-button bi-list-item-effect",once:!0,readonly:!0,hgap:10,height:25},render:function(){var e=this,t=this.options;return[{type:"bi.label",text:t.text,height:t.height,value:t.value,hgap:t.hgap,ref:function(){e.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){e.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(e){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),e?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(e){this.text.setText(e)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton)},function(e,t){BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],layouts:[{type:"bi.center"}],height:29},render:function(){var e=this,t=this.options;return{type:"bi.button_group",items:BI.createItems(t.items,{type:"bi.linear_segment_button",height:t.height-1}),layouts:t.layouts,listeners:[{eventName:"__EVENT_CHANGE__",action:function(){e.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){e.fireEvent("EVENT_CHANGE")}}],ref:function(){e.buttonGroup=this}}},setValue:function(e){this.buttonGroup.setValue(e)},setEnabledValue:function(e){this.buttonGroup.setEnabledValue(e)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment)},function(e,t){BI.SelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,toolbar:{type:"bi.multi_select_bar",iconWrapperWidth:36},el:{type:"bi.list_pane"}})},_init:function(){BI.SelectList.superclass._init.apply(this,arguments);var n=this,e=this.options;this.toolbar=BI.createWidget(e.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.allSelected=this.isSelected(),e===BI.Events.CLICK&&(n.setAllSelected(n.allSelected),n.fireEvent(BI.SelectList.EVENT_CHANGE,t,i)),n.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(e.el,{type:"bi.list_pane",items:e.items,itemsCreator:function(t,i){1===t.times&&n.toolbar.setVisible(!1),e.itemsCreator(t,function(e){i.apply(n,arguments),1===t.times&&(n.toolbar.setVisible(e&&0<e.length),n.toolbar.setEnable(n.isEnabled()&&e&&0<e.length)),n._checkAllSelected()})},onLoaded:e.onLoaded,hasNext:e.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(e,t,i){e===BI.Events.CLICK&&(n._checkAllSelected(),n.fireEvent(BI.SelectList.EVENT_CHANGE,t,i)),n.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(e.direction),BI.extend({scrolly:!0},e.logic,{items:BI.LogicFactory.createLogicItemsByDirection(e.direction,this.toolbar,this.list)})))),e.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(e.value)&&this.setValue(e.value)},_checkAllSelected:function(){var e=this.list.getValue().length,t=this.getAllLeaves().length-e,i=this.list.hasNext(),n=this.toolbar.isSelected(),r=(r=0<e&&(0<t||!n&&i))||0<t&&i&&n;this.toolbar.setHalfSelected(r),r||this.toolbar.setSelected(0<e&&t<=0&&(!i||n))},setAllSelected:function(i){BI.each(this.getAllButtons(),function(e,t){(t.setSelected||t.setAllSelected).apply(t,[i])}),this.allSelected=!!i,this.toolbar.setSelected(i),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(e){this.toolbar.setVisible(e)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(e){this.list.prependItems.apply(this.list,arguments)},addItems:function(e){this.list.addItems.apply(this.list,arguments)},setValue:function(e){var t=e.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(t),this.list[t?"setNotSelectedValue":"setValue"](e.value),this._checkAllSelected()},getValue:function(){return!1===this.isAllSelected()?{type:BI.ButtonGroup.CHOOSE_TYPE_MULTI,value:this.list.getValue(),assist:this.list.getNotSelectedValue()}:{type:BI.ButtonGroup.CHOOSE_TYPE_ALL,value:this.list.getNotSelectedValue(),assist:this.list.getValue()}},empty:function(){this.list.empty()},populate:function(e){this.toolbar.setVisible(!BI.isEmptyArray(e)),this.toolbar.setEnable(this.isEnabled()&&!BI.isEmptyArray(e)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(e){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(e)},resetHeight:function(e){var t=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(e-t):this.list.element.css({"max-height":e-t+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments),this._checkAllSelected()},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(e){return this.list.getIndexByValue(e)},getNodeById:function(e){return this.list.getNodeById(e)},getNodeByValue:function(e){return this.list.getNodeByValue(e)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList)},function(e,t){BI.LazyLoader=BI.inherit(BI.Widget,{_const:{PAGE:100},_defaultConfig:function(){return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-lazy-loader",el:{},items:[]})},_init:function(){var i=this,e=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var t=e.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:e.el,itemsCreator:function(e,t){t(i._getNextItems(e))},hasNext:function(e){return e.count<t}}),this.loader.on(BI.Loader.EVENT_CHANGE,function(e){i.fireEvent(BI.LazyLoader.EVENT_CHANGE,e)})},_getNextItems:function(e){var t=this.options,i=t.items.length-this._const.PAGE*(e.times-1),n=BI.takeRight(t.items,i);return BI.take(n,this._const.PAGE)},populate:function(e){this.loader.populate(e)},addItems:function(e){this.loader.addItems(e)},empty:function(){this.loader.empty()},setNotSelectedValue:function(){this.loader.setNotSelectedValue.apply(this.loader,arguments)},getNotSelectedValue:function(){return this.loader.getNotSelectedValue()},setValue:function(){this.loader.setValue.apply(this.loader,arguments)},getValue:function(){return this.loader.getValue.apply(this.loader,arguments)},getAllButtons:function(){return this.loader.getAllButtons()},getAllLeaves:function(){return this.loader.getAllLeaves()},getSelectedButtons:function(){return this.loader.getSelectedButtons()},getNotSelectedButtons:function(){return this.loader.getNotSelectedButtons()},getIndexByValue:function(e){return this.loader.getIndexByValue(e)},getNodeById:function(e){return this.loader.getNodeById(e)},getNodeByValue:function(e){return this.loader.getNodeByValue(e)}}),BI.LazyLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.lazy_loader",BI.LazyLoader)},function(e,t){BI.ListLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-list-loader",isDefaultInit:!0,el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,next:{},hasNext:BI.emptyFn})},_nextLoad:function(){var e=this,t=this.options;this.next.setLoading(),t.itemsCreator.apply(this,[{times:++this.times},function(){e.next.setLoaded(),e.addItems.apply(e,arguments)}])},_init:function(){BI.ListLoader.superclass._init.apply(this,arguments);var n=this,e=this.options;!1===e.itemsCreator&&(e.next=!1),this.button_group=BI.createWidget(e.el,{type:"bi.button_group",element:this,chooseType:0,items:e.items,behaviors:{},layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.ListLoader.EVENT_CHANGE,i)}),!1!==e.next&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},e.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&n._nextLoad()})),BI.createWidget({type:"bi.vertical",element:this,items:[this.next]}),e.isDefaultInit&&BI.isEmpty(e.items)&&BI.nextTick(BI.bind(function(){this.populate()},this)),BI.isNotEmptyArray(e.items)&&this.populate(e.items)},hasNext:function(){var e=this.options;return BI.isNumber(e.count)?this.count<e.count:!!e.hasNext.apply(this,[{times:this.times,count:this.count}])},addItems:function(e){this.count+=e.length,BI.isObject(this.next)&&(this.options.items=this.options.items.concat(e),this.hasNext()?this.next.setLoaded():this.next.setEnd()),this.button_group.addItems.apply(this.button_group,arguments),this.next.element.appendTo(this.element)},populate:function(e){var t=this,i=this.options;0===arguments.length&&BI.isFunction(i.itemsCreator)?i.itemsCreator.apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");t.populate.apply(t,arguments),i.onLoaded()}]):(this.options.items=e,this.times=1,this.count=0,this.count+=e.length,BI.isObject(this.next)&&(this.hasNext()?this.next.setLoaded():this.next.invisible()),BI.DOM.hang([this.next]),this.button_group.populate.apply(this.button_group,arguments),this.next.element.appendTo(this.element))},empty:function(){BI.DOM.hang([this.next]),this.button_group.empty(),this.next.element.appendTo(this.element),BI.each([this.next],function(e,t){t&&t.setVisible(!1)})},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},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(e){return this.button_group.getIndexByValue(e)},getNodeById:function(e){return this.button_group.getNodeById(e)},getNodeByValue:function(e){return this.button_group.getNodeByValue(e)}}),BI.ListLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_loader",BI.ListLoader)},function(e,t){BI.SortList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SortList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sort-list",isDefaultInit:!0,el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,next:{},hasNext:BI.emptyFn})},_init:function(){BI.SortList.superclass._init.apply(this,arguments);var n=this,i=this.options;this.loader=BI.createWidget({type:"bi.list_loader",element:this,isDefaultInit:i.isDefaultInit,el:i.el,items:this._formatItems(i.items),itemsCreator:function(e,t){i.itemsCreator(e,function(e){t(n._formatItems(e))})},onLoaded:i.onLoaded,count:i.count,next:i.next,hasNext:i.hasNext}),this.loader.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.SortList.EVENT_CHANGE,t,i)}),this.loader.element.sortable({containment:i.containment||this.element,connectWith:i.connectWith||".bi-sort-list",items:".sort-item",cursor:i.cursor||"drag",tolerance:i.tolerance||"intersect",placeholder:{element:function(e){var t=BI.createWidget({type:"bi.layout",cls:"bi-sortable-holder",height:e.outerHeight()});return t.element.css({"margin-left":e.css("margin-left"),"margin-right":e.css("margin-right"),"margin-top":e.css("margin-top"),"margin-bottom":e.css("margin-bottom"),margin:e.css("margin")}),t.element},update:function(){}},start:function(e,t){},stop:function(e,t){n.fireEvent(BI.SortList.EVENT_CHANGE)},over:function(e,t){}})},_formatItems:function(e){return BI.each(e,function(e,t){(t=BI.stripEL(t)).cls=t.cls?t.cls+" sort-item":"sort-item",t.attributes={sorted:t.value}}),e},hasNext:function(){return this.loader.hasNext()},addItems:function(e){this.loader.addItems(e)},populate:function(e){e=e&&this._formatItems(e),this.loader.populate.apply(this.loader,arguments)},empty:function(){this.loader.empty()},setNotSelectedValue:function(){this.loader.setNotSelectedValue.apply(this.loader,arguments)},getNotSelectedValue:function(){return this.loader.getNotSelectedValue()},setValue:function(){this.loader.setValue.apply(this.loader,arguments)},getValue:function(){return this.loader.getValue()},getAllButtons:function(){return this.loader.getAllButtons()},getAllLeaves:function(){return this.loader.getAllLeaves()},getSelectedButtons:function(){return this.loader.getSelectedButtons()},getNotSelectedButtons:function(){return this.loader.getNotSelectedButtons()},getIndexByValue:function(e){return this.loader.getIndexByValue(e)},getNodeById:function(e){return this.loader.getNodeById(e)},getNodeByValue:function(e){return this.loader.getNodeByValue(e)},getSortedValues:function(){return this.loader.element.sortable("toArray",{attribute:"sorted"})}}),BI.SortList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.sort_list",BI.SortList)},function(e,t){BI.LoadingPane=BI.inherit(BI.Pane,{_mount:function(){BI.Pane.superclass._mount.apply(this,arguments)&&this.beforeInit&&(this.__asking=!0,this.loading(),this.beforeInit(BI.bind(this.__loaded,this)))},_initRender:function(){this.beforeInit?this.__async=!0:this._render()},__loaded:function(){this.__asking=!1,this.loaded(),this._render()}})},function(e,t){BI.AllCountPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-all-count-pager",pagerDirection:"vertical",height:24,pages:1,curr:1,count:1})},_init:function(){BI.AllCountPager.superclass._init.apply(this,arguments);var t=this,e=this.options,i=this._getPagerIconCls();this.editor=BI.createWidget({type:"bi.small_text_editor",cls:"pager-editor bi-border-radius",validationChecker:function(e){return 0===t.rowCount.getValue()&&"0"===e||BI.isPositiveInteger(e)},hgap:4,vgap:0,value:e.curr,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),width:40,height:24,invisible:e.pages<=1}),this.pager=BI.createWidget({type:"bi.pager",width:58,layouts:[{type:"bi.horizontal",lgap:5}],dynamicShow:!1,pages:e.pages,curr:e.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Previous_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:22,width:22,cls:"bi-border bi-border-radius all-pager-prev bi-list-item-select2 "+i.preCls},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Next_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:22,width:22,cls:"bi-border bi-border-radius all-pager-next bi-list-item-select2 "+i.nextCls},hasPrev:e.hasPrev,hasNext:e.hasNext,firstPage:e.firstPage,lastPage:e.lastPage,invisible:e.pages<=1}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){t.pager.setValue(BI.parseInt(t.editor.getValue())),t.fireEvent(BI.AllCountPager.EVENT_CHANGE)}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){t.fireEvent(BI.AllCountPager.EVENT_CHANGE)}),this.pager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){t.editor.setValue(t.pager.getCurrentPage())}),this.allPages=BI.createWidget({type:"bi.label",title:e.pages,text:"/"+e.pages,lgap:5,invisible:e.pages<=1}),this.rowCount=BI.createWidget({type:"bi.label",cls:"row-count",height:e.height,hgap:5,text:e.count,title:e.count});var n=BI.createWidget({type:"bi.left",height:e.height,scrollable:!1,items:[{type:"bi.label",height:e.height,text:BI.i18nText("BI-Basic_Total"),width:15},this.rowCount,{type:"bi.label",height:e.height,text:BI.i18nText("BI-Tiao_Data"),width:50,textAlign:"left"}]});BI.createWidget({type:"bi.left_right_vertical_adapt",element:this,items:{left:[n],right:[this.editor,this.allPages,this.pager]}})},alwaysShowPager:!0,_getPagerIconCls:function(){switch(this.options.pagerDirection){case"horizontal":return{preCls:"row-pre-page-h-font ",nextCls:"row-next-page-h-font "};case"vertical":default:return{preCls:"column-pre-page-h-font ",nextCls:"column-next-page-h-font "}}},setAllPages:function(e){this.allPages.setText("/"+e),this.allPages.setTitle(e),this.options.pages=e,this.pager.setAllPages(e),this.editor.setEnable(1<=e),this.setPagerVisible(1<e)},setValue:function(e){this.pager.setValue(e)},setVPage:function(e){this.pager.setValue(e)},setCount:function(e){this.rowCount.setText(e),this.rowCount.setTitle(e)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(e){this.editor.setVisible(e),this.allPages.setVisible(e),this.pager.setVisible(e)},populate:function(){this.pager.populate(),this.setPagerVisible(1<this.options.pages)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager)},function(e,t){BI.DirectionPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-direction-pager",height:24,horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}})},_init:function(){BI.DirectionPager.superclass._init.apply(this,arguments);var e=this.options;e.vertical,e.horizontal;this._createVPager(),this._createHPager(),this.layout=BI.createWidget({type:"bi.absolute",scrollable:!1,element:this,items:[{el:this.vpager,top:0,right:86},{el:this.vlabel,top:0,right:110},{el:this.hpager,top:0,right:0},{el:this.hlabel,top:0,right:24}]})},_createVPager:function(){var e=this,t=this.options.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:t.curr,title:t.curr,invisible:!0}),this.vpager=BI.createWidget({type:"bi.pager",width:72,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24}],invisible:!0,dynamicShow:!1,pages:t.pages,curr:t.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Up_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:22,width:22,cls:"bi-border bi-border-radius direction-pager-prev column-pre-page-h-font bi-list-item-select2"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Down_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:22,width:22,cls:"bi-border bi-border-radius direction-pager-next column-next-page-h-font bi-list-item-select2"},hasPrev:t.hasPrev,hasNext:t.hasNext,firstPage:t.firstPage,lastPage:t.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){e.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){e.vlabel.setValue(this.getCurrentPage()),e.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var e=this,t=this.options.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:t.curr,title:t.curr,invisible:!0}),this.hpager=BI.createWidget({type:"bi.pager",width:72,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24}],invisible:!0,dynamicShow:!1,pages:t.pages,curr:t.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Left_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:22,width:22,cls:"bi-border bi-border-radius direction-pager-prev row-pre-page-h-font bi-list-item-select2"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Right_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:22,width:22,cls:"bi-border bi-border-radius direction-pager-next row-next-page-h-font bi-list-item-select2"},hasPrev:t.hasPrev,hasNext:t.hasNext,firstPage:t.firstPage,lastPage:t.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){e.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){e.hlabel.setValue(this.getCurrentPage()),e.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(e){this.vpager.setValue(e),this.vlabel.setValue(e),this.vlabel.setTitle(e)},setHPage:function(e){this.hpager.setValue(e),this.hlabel.setValue(e),this.hlabel.setTitle(e)},hasVNext:function(){return this.vpager.hasNext()},hasHNext:function(){return this.hpager.hasNext()},hasVPrev:function(){return this.vpager.hasPrev()},hasHPrev:function(){return this.hpager.hasPrev()},setHPagerVisible:function(e){this.hpager.setVisible(e),this.hlabel.setVisible(e)},setVPagerVisible:function(e){this.vpager.setVisible(e),this.vlabel.setVisible(e)},populate:function(){this.vpager.populate(),this.hpager.populate();var e=!1,t=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),t=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),e=!0):this.setVPagerVisible(!1),this.setVisible(t||e);var i=[86,110,0,24],n=this.layout.attr("items");!0===e&&!0===t?(n[0].right=i[0],n[1].right=i[1],n[2].right=i[2],n[3].right=i[3]):!0===e?(n[0].right=i[2],n[1].right=i[3]):!0===t&&(n[2].right=i[2],n[3].right=i[3]),this.layout.attr("items",n),this.layout.resize()},clear:function(){this.vpager.attr("curr",1),this.hpager.attr("curr",1)}}),BI.DirectionPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.direction_pager",BI.DirectionPager)},function(e,t){BI.DetailPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-detail-pager",behaviors:{},layouts:[{type:"bi.horizontal",hgap:10,vgap:0}],dynamicShow:!0,dynamicShowFirstLast:!1,dynamicShowPrevNext:!1,pages:!1,curr:function(){return 1},groups:0,jump:BI.emptyFn,first:!1,last:!1,prev:"上一页",next:"下一页",firstPage:1,lastPage:function(){return 1},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_init:function(){BI.DetailPager.superclass._init.apply(this,arguments);var e=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){e._lock=!1},300),this._populate()},_populate:function(){var r=this,o=this.options,e=[],t={};this.empty();var i,a=BI.result(o,"pages"),n=BI.result(this,"currPage"),s=BI.result(o,"groups"),l=BI.result(o,"first"),u=BI.result(o,"last"),c=BI.result(o,"prev"),h=BI.result(o,"next");!1===a?(s=0,u=l=!1):a<s&&(s=a),t.index=Math.ceil((n+(1<s&&s!==a?1:0))/(0===s?1:s)),(!o.dynamicShow&&!o.dynamicShowPrevNext||1<n)&&!1!==c&&(BI.isKey(c)?e.push({text:c,value:"prev",disabled:!1===a?!1===o.hasPrev(n):!(1<n&&!1!==c)}):e.push(BI.extend({disabled:!1===a?!1===o.hasPrev(n):!(1<n&&!1!==c)},c))),(!o.dynamicShow&&!o.dynamicShowFirstLast||1<t.index&&0!==s)&&l&&(e.push({text:l,value:"first",disabled:!(1<t.index&&0!==s)}),1<t.index&&0!==s&&e.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),t.poor=Math.floor((s-1)/2),t.start=1<t.index?n-t.poor:1,t.end=1<t.index?(i=n+(s-t.poor-1),a<i?a:i):s,t.end-t.start<s-1&&(t.start=t.end-s+1);var p=t.start,d=t.end;for(l&&u&&1<t.index&&0!==s&&s<a&&t.end<a&&0!==s&&(p++,d--);p<=d;p++)p===n?e.push({text:p,value:p,selected:!0}):e.push({text:p,value:p});(!o.dynamicShow&&!o.dynamicShowFirstLast||s<a&&t.end<a&&0!==s)&&u&&(s<a&&t.end<a&&0!==s&&e.push({type:"bi.label",cls:"page-ellipsis",text:"…"}),e.push({text:u,value:"last",disabled:!(s<a&&t.end<a&&0!==s)})),t.flow=!c&&0===s,(!o.dynamicShow&&!o.dynamicShowPrevNext&&h||n!==a&&h||t.flow)&&e.push(BI.isKey(h)?!1===a?{text:h,value:"next",disabled:!1===o.hasNext(n)}:t.flow&&n===a?{text:h,value:"next",disabled:!0}:{text:h,value:"next",disabled:!(n!==a&&h||t.flow)}:BI.extend({disabled:!1===a?!1===o.hasNext(n):!(n!==a&&h||t.flow)},h)),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(e,{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(e,t,i){if(!0!==r._lock){if(r._lock=!0,r._debouce(),e===BI.Events.CLICK){var n=r.button_group.getValue()[0];switch(n){case"first":r.currPage=1;break;case"last":r.currPage=a;break;case"prev":r.currPage--;break;case"next":r.currPage++;break;default:r.currPage=n}o.jump.apply(r,[{pages:a,curr:r.currPage}]),r._populate(),r.fireEvent(BI.DetailPager.EVENT_CHANGE,i)}r.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}),this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE)},getCurrentPage:function(){return this.currPage},setAllPages:function(e){this.options.pages=e},hasPrev:function(e){e=e||1;var t=this.options;return!1===this.options.pages?t.hasPrev(e):1<e},hasNext:function(e){e=e||1;var t=this.options,i=this.options.pages;return!1===i?t.hasNext(e):e<i},setValue:function(e){var t,i,n=this.options;e=(e=e||0)<1?1:e,!1===n.pages?(t=BI.result(n,"lastPage"),i=1,this.currPage=t<e?t:e<(i=BI.result(n,"firstPage"))?i:e):(e=e>n.pages?n.pages:e,this.currPage=e),this._populate()},getValue:function(){var e=this.button_group.getValue()[0];switch(e){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return e}},attr:function(e,t){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===e&&(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)},function(e,t){BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:e.height,whiteSpace:e.whiteSpace,text:e.text,value:e.value,hgap:e.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(e){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(e)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton)},function(e,t){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 i=this,e=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:e.value,items:BI.createItems(e.items,{type:"bi.segment_button",height:e.height-2,whiteSpace:e.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(e,t){i.fireEvent(BI.Segment.EVENT_CHANGE,e,t)})},_setEnable:function(e){BI.Segment.superclass._setEnable.apply(this,arguments),!0===e?this.element.removeClass("base-disabled disabled"):!1===e&&this.element.addClass("base-disabled disabled")},setValue:function(e){this.buttonGroup.setValue(e)},setEnabledValue:function(e){this.buttonGroup.setEnabledValue(e)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment)},function(e,t){BI.MultiSelectBar=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-bar",height:25,text:BI.i18nText("BI-Select_All"),isAllCheckedBySelectedValue:BI.emptyFn,disableSelected:!0,isHalfCheckedBySelectedValue:function(e){return 0<e.length},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var e=this,t=this.options,i=!0===t.selected,n=!t.selected&&t.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){e.setSelected(e.isSelected())},selected:i,invisible:n}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){e.setSelected(!0)},invisible:i||!n}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,e.isSelected(),e)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,e.isSelected(),e)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,e.isSelected(),e)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,e.isSelected(),e)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:t.height,height:t.height,hgap:t.hgap,text:t.text,keyword:t.keyword,value:t.value,py:t.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:t.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(e){this.checkbox.setSelected(!!e)},beforeClick:function(){var e=this.isHalfSelected(),t=this.isSelected();!0===e?this.setSelected(!0):this.setSelected(!t)},setSelected:function(e){this.checkbox.setSelected(e),this.setHalfSelected(!1)},setHalfSelected:function(e){this.halfSelected=!!e,!0===e?(this.checkbox.setSelected(!1),this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!this.isSelected()&&!!this.halfSelected},isSelected:function(){return this.checkbox.isSelected()},setValue:function(e){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var t=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(t),t||this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this,arguments))},doClick:function(){BI.MultiSelectBar.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,this.isSelected(),this)}}),BI.MultiSelectBar.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar)},function(e,t){BI.LevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-level-tree",el:{chooseType:0},expander:{},items:[],value:""})},_init:function(){BI.LevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(n,r,o){var a=this;return BI.each(n,function(e,t){var i={layer:r};BI.isKey(t.id)||(t.id=BI.UUID()),i.pNode=o,!0===t.isParent||!0===t.parent||BI.isNotEmptyArray(t.children)?(i.type="bi.mid_plus_group_node",e===n.length-1&&(i.type="bi.last_plus_group_node",i.isLastNode=!0),0!==e||o||(i.type="bi.first_plus_group_node"),0===e&&e===n.length-1&&(i.type="bi.plus_group_node"),BI.defaults(t,i),a._formatItems(t.children,r+1,t)):(i.type="bi.mid_tree_leaf_item",0!==e||o||(i.type="bi.first_tree_leaf_item"),e===n.length-1&&(i.type="bi.last_tree_leaf_item"),BI.defaults(t,i))}),n},_assertId:function(e){BI.each(e,function(e,t){BI.isKey(t.id)||(t.id=BI.UUID())})},initTree:function(e){var n=this,t=this.options;this.empty(),this._assertId(e),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},t.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(e),0),value:t.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},t.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.LevelTree.EVENT_CHANGE,t,i)})},stroke:function(e){this.tree.stroke.apply(this.tree,arguments)},populate:function(e,t){e=this._formatItems(BI.Tree.transformToTreeFormat(e),0),this.tree.populate(e,t)},setValue:function(e){this.tree.setValue(e)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(e){return this.tree.getNodeById(e)},getNodeByValue:function(e){return this.tree.getNodeByValue(e)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree)},function(e,t){BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var e=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-editor-trigger bi-border",height:24,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:""})},_init:function(){this.options.height-=2,BI.EditorTrigger.superclass._init.apply(this,arguments);var e=this,t=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:t.height,value:t.value,validationChecker:t.validationChecker,quitChecker:t.quitChecker,allowBlank:t.allowBlank,watermark:t.watermark,errorText:t.errorText,title:function(){return e.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){e.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){e.fireEvent(BI.EditorTrigger.EVENT_FOCUS,arguments)}),this.editor.on(BI.SignEditor.EVENT_EMPTY,function(){e.fireEvent(BI.EditorTrigger.EVENT_EMPTY,arguments)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){e.fireEvent(BI.EditorTrigger.EVENT_VALID,arguments)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){e.fireEvent(BI.EditorTrigger.EVENT_ERROR,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:t.triggerWidth||t.height},width:t.triggerWidth||t.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(e){this.editor.setValue(e)},setText:function(e){this.editor.setState(e)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.EditorTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.EditorTrigger.EVENT_EMPTY="EVENT_EMPTY",BI.EditorTrigger.EVENT_VALID="EVENT_VALID",BI.EditorTrigger.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.editor_trigger",BI.EditorTrigger)},function(e,t){BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-trigger",extraCls:"pull-down-font",el:{},height:24})},_init:function(){var e=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(e.el,{type:"bi.trigger_icon_button",element:this,width:e.width,height:e.height,extraCls:e.extraCls})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger)},function(e,t){BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var e=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null,textCls:""})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var t=this,e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label"+(BI.isKey(e.textCls)?" "+e.textCls:""),textAlign:"left",height:e.height,text:e.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:e.triggerWidth||e.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(e){t.wrapper=e},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:e.iconCls,ref:function(e){t.icon=e},iconHeight:e.iconHeight,iconWidth:e.iconWidth,disableSelected:!0},width:BI.isEmptyString(e.iconCls)?0:e.iconWrapperWidth||e.height},{el:this.text,lgap:BI.isEmptyString(e.iconCls)?5:0},{el:this.trigerButton,width:e.triggerWidth||e.height}]})},setValue:function(e){this.text.setValue(e)},setIcon:function(e){var t=this.options;this.icon.setIcon(e);var i=this.wrapper.attr("items")[0],n=this.wrapper.attr("items")[1];BI.isNull(e)||BI.isEmptyString(e)?0!==i.width&&(i.width=0,n.lgap=5,this.wrapper.resize()):i.width!==(t.iconWrapperWidth||t.height)&&(i.width=t.iconWrapperWidth||t.height,n.lgap=0,this.wrapper.resize())},setTextCls:function(e){var t=this.options,i=t.textCls;t.textCls=e,this.text.element.removeClass(i).addClass(e)},setText:function(e){this.text.setText(e)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger)},function(e,t){BI.SelectIconTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SelectIconTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-text-trigger bi-border",height:24,iconHeight:null,iconWidth:null,iconCls:""})},_init:function(){this.options.height-=2,BI.SelectIconTextTrigger.superclass._init.apply(this,arguments);var e=this.options,t=this._digist(e.value,e.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:t.text,textCls:t.textCls,iconCls:t.iconCls,height:e.height,iconHeight:e.iconHeight,iconWidth:e.iconWidth,iconWrapperWidth:e.iconWrapperWidth})},_digist:function(i,e){var n,t=this.options;i=BI.isArray(i)?i:[i];var r=BI.Tree.transformToArrayFormat(e);return BI.any(r,function(e,t){if(BI.deepContains(i,t.value))return n={text:t.text||t.value,iconCls:t.iconCls},!0}),BI.isNotNull(n)?{text:n.text,textCls:"",iconCls:n.iconCls}:{text:BI.isFunction(t.text)?t.text():t.text,textCls:"bi-water-mark",iconCls:t.iconCls}},setValue:function(e){var t=this._digist(e,this.options.items);this.trigger.setText(t.text),this.trigger.setIcon(t.iconCls),this.trigger.setTextCls(t.textCls)},populate:function(e){this.options.items=e}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger)},function(e,t){BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var e=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-trigger",height:24,textCls:""})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var e=this,t=this.options,i=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label"+(BI.isKey(t.textCls)?" "+t.textCls:""),textAlign:"left",height:t.height,text:t.text,title:function(){return e.text.getText()},tipType:t.tipType,warningTitle:t.warningTitle,hgap:i.hgap,readonly:t.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:t.triggerWidth||t.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:t.triggerWidth||t.height}]})},setTextCls:function(e){var t=this.options,i=t.textCls;t.textCls=e,this.text.element.removeClass(i).addClass(e)},setText:function(e){this.text.setText(e)},setTipType:function(e){this.text.options.tipType=e}}),BI.shortcut("bi.text_trigger",BI.TextTrigger)},function(e,t){BI.SelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-text-trigger bi-border bi-focus-shadow",height:24})},_init:function(){this.options.height-=2,BI.SelectTextTrigger.superclass._init.apply(this,arguments);var e=this.options,t=this._digest(e.value,e.items);this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:e.height,readonly:e.readonly,text:t.text,textCls:t.textCls,tipType:e.tipType,warningTitle:e.warningTitle})},_digest:function(i,e){var t=this.options;i=BI.isArray(i)?i:[i];var n=[],r=BI.Tree.transformToArrayFormat(e);return BI.each(r,function(e,t){BI.deepContains(i,t.value)&&!BI.contains(n,t.text||t.value)&&n.push(t.text||t.value)}),0<n.length?{textCls:"",text:n.join(",")}:{textCls:"bi-water-mark",text:BI.isFunction(t.text)?t.text():t.text}},setValue:function(e){var t=this._digest(e,this.options.items);this.trigger.setTextCls(t.textCls),this.trigger.setText(t.text)},setTipType:function(e){this.trigger.setTipType(e)},populate:function(e){this.options.items=e}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger)},function(e,t){BI.SmallSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-small-select-text-trigger bi-border",height:20})},_init:function(){this.options.height-=2,BI.SmallSelectTextTrigger.superclass._init.apply(this,arguments);var e=this.options,t=this._digest(e.value,e.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:e.height-2,text:t.text,cls:t.cls})},_digest:function(i,e){var t=this.options;i=BI.isArray(i)?i:[i];var n=[],r=BI.Tree.transformToArrayFormat(e);return BI.each(r,function(e,t){BI.deepContains(i,t.value)&&!BI.contains(n,t.text||t.value)&&n.push(t.text||t.value)}),0<n.length?{cls:"",text:n.join(",")}:{cls:"bi-water-mark",text:t.text}},setValue:function(e){var t=this._digest(e,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(t.cls),this.trigger.setText(t.text)},populate:function(e){this.options.items=e}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger)},function(e,t){BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var e=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var e=this.options,t=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:e.height,text:e.text,hgap:t.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:e.triggerWidth||e.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:e.triggerWidth||e.height}]})},setValue:function(e){this.text.setValue(e)},setText:function(e){this.text.setText(e)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger)},function(e,t){BI.MonthDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.MonthDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",height:24,container:null})},_init:function(){BI.MonthDateCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:t.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:t.container,element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){e.combo.hideView(),e.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){e.doBehavior()})},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo)},function(e,t){BI.YearDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.YearDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",min:"1900-01-01",max:"2099-12-31",behaviors:{},height:24,container:null})},_init:function(){BI.YearDateCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:t.behaviors,min:t.min,max:t.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.combo.hideView(),e.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:t.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){e.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){e.doBehavior()})},setMinDate:function(e){this.popup.setMinDate(e)},setMaxDate:function(e){this.popup.setMaxDate(e)},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo)},function(e,t){BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var e=this,t=this.options;this._year=BI.getDate().getFullYear(),this._month=BI.getDate().getMonth()+1,this.left=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24}),this.left.on(BI.IconButton.EVENT_CHANGE,function(){1===e._month?e.setValue({year:e.year.getValue()-1,month:12}):e.setValue({year:e.year.getValue(),month:e.month.getValue()-1}),e.fireEvent(BI.DatePicker.EVENT_CHANGE),e._checkLeftValid(),e._checkRightValid()}),this.right=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:24,height:24}),this.right.on(BI.IconButton.EVENT_CHANGE,function(){12===e._month?e.setValue({year:e.year.getValue()+1,month:1}):e.setValue({year:e.year.getValue(),month:e.month.getValue()+1}),e.fireEvent(BI.DatePicker.EVENT_CHANGE),e._checkLeftValid(),e._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:t.behaviors,min:t.min,max:t.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){e.setValue({year:e.year.getValue(),month:e.month.getValue()}),e.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:t.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){e.setValue({year:e.year.getValue(),month:e.month.getValue()}),e.fireEvent(BI.DatePicker.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:{type:"bi.center_adapt",items:[this.left]},width:24},{type:"bi.center_adapt",items:[{el:{type:"bi.horizontal",width:120,rgap:10,items:[{el:this.year,lgap:10},this.month]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:24}]}),this.setValue({year:this._year,month:this._month})},_checkLeftValid:function(){var e=this.options,t=!(1===this._month&&this._year===BI.parseDateTime(e.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(t),t},_checkRightValid:function(){var e=this.options,t=!(12===this._month&&this._year===BI.parseDateTime(e.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(t),t},setMinDate:function(e){this.year.setMinDate(e)},setMaxDate:function(e){this.year.setMaxDate(e)},setValue:function(e){this._year=BI.parseInt(e.year),this._month=BI.parseInt(e.month),this.year.setValue(e.year),this.month.setValue(e.month),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.DatePicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_picker",BI.DatePicker)},function(e,t){BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-year-picker",behaviors:{},height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.YearPicker.superclass._init.apply(this,arguments);var e=this,t=this.options;this._year=BI.getDate().getFullYear(),this.left=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25}),this.left.on(BI.IconButton.EVENT_CHANGE,function(){e.setValue(e.year.getValue()-1),e.fireEvent(BI.YearPicker.EVENT_CHANGE),e._checkLeftValid(),e._checkRightValid()}),this.right=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25}),this.right.on(BI.IconButton.EVENT_CHANGE,function(){e.setValue(e.year.getValue()+1),e.fireEvent(BI.YearPicker.EVENT_CHANGE),e._checkLeftValid(),e._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:t.min,behaviors:t.behaviors,max:t.max,width:50}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){e.setValue(e.year.getValue()),e.fireEvent(BI.YearPicker.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:{type:"bi.center_adapt",items:[this.left]},width:25},{type:"bi.center_adapt",items:[{el:this.year}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var e=this.options,t=!(this._year===BI.parseDateTime(e.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(t),t},_checkRightValid:function(){var e=this.options,t=!(this._year===BI.parseDateTime(e.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(t),t},setMinDate:function(e){this.options.min=e,this.year.setMinDate(e),this._checkLeftValid(),this._checkRightValid()},setMaxDate:function(e){this.options.max=e,this.year.setMaxDate(e),this._checkLeftValid(),this._checkRightValid()},setValue:function(e){this._year=e,this.year.setValue(e),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker)},function(e,t){BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(e){var t=BI.Calendar.getDateJSONByPage(e);return BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:t.year,month:t.month,day:1})},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this._day=this.today.getDate(),this.selectedTime=t.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:t.behaviors,min:t.min,max:t.max}),this.calendar=BI.createWidget({direction:"top",logic:{dynamic:!0},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this),afterCardCreated:function(){},afterCardShow:function(){this.setValue(e.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){e.selectedTime=e.datePicker.getValue(),e.selectedTime.day=1,e.calendar.setSelect(BI.Calendar.getPageByDateJSON(e.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){e.selectedTime=e.calendar.getValue(),e.setValue(e.selectedTime),e.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}]})},_checkMin:function(){var e=this.calendar.getSelectedCard();BI.isNotNull(e)&&e.setMinDate(this.options.min)},_checkMax:function(){var e=this.calendar.getSelectedCard();BI.isNotNull(e)&&e.setMaxDate(this.options.max)},setMinDate:function(e){BI.isNotEmptyString(this.options.min)&&(this.options.min=e,this.datePicker.setMinDate(e),this._checkMin())},setMaxDate:function(e){BI.isNotEmptyString(this.options.max)&&(this.options.max=e,this.datePicker.setMaxDate(e),this._checkMax())},setValue:function(e){this.datePicker.setValue(e),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(e)),this.calendar.setValue(e),this.selectedTime=e},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup)},function(e,t){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 t=this,e=this.options,i=[1,7,2,8,3,9,4,10,5,11,6,12],n=[];n.push(i.slice(0,2)),n.push(i.slice(2,4)),n.push(i.slice(4,6)),n.push(i.slice(6,8)),n.push(i.slice(8,10)),n.push(i.slice(10,12)),n=BI.map(n,function(e,t){return BI.map(t,function(e,t){return{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:t,text:t}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:e.behaviors,items:BI.createItems(n,{}),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:e.value}),this.month.on(BI.Controller.EVENT_CHANGE,function(e){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&t.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(e){e=BI.parseInt(e),this.month.setValue([e])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup)},function(e,t){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(e){var t=this.options,i=this._year,n=BI.createWidget({type:"bi.year_calendar",behaviors:t.behaviors,min:t.min,max:t.max,logic:{dynamic:!0},year:i+12*e});return n.setValue(this._year),n},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var t=this,e=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),this.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:[this.backBtn,this.preBtn]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(t.selectedYear);var e=this.getSelectedCard();e&&t.backBtn.setEnable(!e.isFrontYear()),e&&t.preBtn.setEnable(!e.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){t.selectedYear=this.getValue(),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments),t.fireEvent(BI.YearPopup.EVENT_CHANGE,t.selectedYear)}),BI.isKey(e.value)&&this.setValue(e.value)},_checkMin:function(){var e=this.navigation.getSelectedCard();BI.isNotNull(e)&&(e.setMinDate(this.options.min),this.backBtn.setEnable(!e.isFrontYear()),this.preBtn.setEnable(!e.isFinalYear()))},_checkMax:function(){var e=this.navigation.getSelectedCard();BI.isNotNull(e)&&(e.setMaxDate(this.options.max),this.backBtn.setEnable(!e.isFrontYear()),this.preBtn.setEnable(!e.isFinalYear()))},setMinDate:function(e){BI.isNotEmptyString(this.options.min)&&(this.options.min=e,this._checkMin())},setMaxDate:function(e){BI.isNotEmptyString(this.options.max)&&(this.options.max=e,this._checkMax())},getValue:function(){return this.selectedYear},setValue:function(e){var t=this.options;e=BI.parseInt(e);var i=BI.parseDateTime(t.min,"%Y-%X-%d"),n=BI.parseDateTime(t.max,"%Y-%X-%d");BI.checkDateVoid(e,1,1,BI.print(BI.getDate(i.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(n.getFullYear(),0,1),"%Y-%X-%d"))[0]?(e=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(e)),this.navigation.setValue("")):(this.selectedYear=e,this.navigation.setSelect(BI.YearCalendar.getPageByYear(e)),this.navigation.setValue(e))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup)},function(e,t){BI.DateTriangleTrigger=BI.inherit(BI.Trigger,{_const:{height:24,iconWidth:12,iconHeight:12},_defaultConfig:function(){return BI.extend(BI.DateTriangleTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-triangle-trigger pull-down-ha-font cursor-pointer",height:24})},_init:function(){BI.DateTriangleTrigger.superclass._init.apply(this,arguments);var e=this.options,t=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:e.text,value:e.value,height:t.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(e){this.text.setValue(e)},getValue:function(){return this.text.getValue()},setText:function(e){this.text.setText(e)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger)},function(e,t){BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var n=this,e=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=e.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:e.behaviors,min:e.min,max:e.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var e=n.datePicker.getValue(),t=BI.getMonthDays(BI.getDate(e.year,e.month-1,1)),i=n.selectedTime.day||0;t<i&&(i=t),n.selectedTime={year:e.year,month:e.month},0!==i&&(n.selectedTime.day=i),n.calendar.setSelect(BI.Calendar.getPageByDateJSON(n.selectedTime)),n.calendar.setValue(n.selectedTime),0!==i&&n.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.calendar=BI.createWidget({direction:"custom",type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){n.selectedTime=n.calendar.getValue(),n.calendar.empty(),n.setValue(n.selectedTime),n.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(e.selectedTime),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.datePicker,height:40},this.calendar],hgap:10}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},_createNav:function(e){var t=BI.Calendar.getDateJSONByPage(e);return BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:t.year,month:t.month,day:this.selectedTime.day})},_getNewCurrentDate:function(){var e=BI.getDate();return{year:e.getFullYear(),month:e.getMonth()+1}},_setCalenderValue:function(e){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(e)),this.calendar.setValue(e),this.selectedTime=e},_setDatePicker:function(e){BI.isNull(e)||BI.isNull(e.year)||BI.isNull(e.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(e)},_setCalendar:function(e){BI.isNull(e)||BI.isNull(e.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(e)},setValue:function(e){this._setDatePicker(e),this._setCalendar(e)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_pane_card",BI.StaticDatePaneCard)},function(e,t){BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var i=this,t=this.options;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-split-bottom",height:30,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDatePane.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDatePane.Dynamic}],{textAlign:"center"}),listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){var e=this.getValue()[0];switch(i.dateTab.setSelect(e),e){case BI.DynamicDatePane.Static:var t=BI.DynamicDateHelper.getCalculation(i.dynamicPane.getValue());i.ymd.setValue({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()});break;case BI.DynamicDatePane.Dynamic:i.dynamicPane.setValue({year:0})}i.fireEvent("EVENT_CHANGE")}}],ref:function(){i.switcher=this}},height:30},{type:"bi.tab",ref:function(){i.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(e){switch(e){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",behaviors:t.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){i.fireEvent("EVENT_CHANGE")}}],ref:function(){i.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){i._checkValue(i.getValue())&&i.fireEvent("EVENT_CHANGE")}}],ref:function(){i.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(e){return BI.isNull(e)||BI.isEmptyObject(e)||BI.isEmptyString(e)},_checkValue:function(e){switch(e.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(e.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(e){var t,i=(e=e||{}).type||BI.DynamicDateCombo.Static,n=e.value||e;switch(this.switcher.setValue(i),this.dateTab.setSelect(i),i){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(n);break;case BI.DynamicDateCombo.Static:default:this._checkValueValid(n)?(t=BI.getDate(),this.ymd.setValue({year:t.getFullYear(),month:t.getMonth()+1})):this.ymd.setValue(n)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.shortcut("bi.dynamic_date_pane",BI.DynamicDatePane),BI.extend(BI.DynamicDatePane,{Static:1,Dynamic:2})},function(e,t){BI.DateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:290,popupWidth:270,comboAdjustHeight:1,border:1},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border bi-border-radius",width:200,height:24,minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){BI.DateTimeCombo.superclass._init.apply(this,arguments);var e=this,t=this.options,i=BI.getDate();this.storeValue=BI.isNotNull(t.value)?t.value:{year:i.getFullYear(),month:i.getMonth()+1,day:i.getDate(),hour:i.getHours(),minute:i.getMinutes(),second:i.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:t.minDate,max:t.maxDate,value:t.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",behaviors:t.behaviors,min:t.minDate,max:t.maxDate,value:t.value}),e.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){e.setValue(e.storeValue),e.hidePopupView(),e.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){e.storeValue=e.popup.getValue(),e.setValue(e.storeValue),e.hidePopupView(),e.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:t.container,toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,width:this.constants.popupWidth,stopPropagation:!1},hideChecker:function(e){return 0===n.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){e.popup.setValue(e.storeValue),e.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var n=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});n.on(BI.IconButton.EVENT_CHANGE,function(){e.combo.isViewVisible()||e.combo.showView()}),BI.createWidget({type:"bi.htape",element:this,items:[{type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:n,top:0,right:0}]}]})},setValue:function(e){this.storeValue=e,this.popup.setValue(e),this.trigger.setValue(e)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()}}),BI.DateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.DateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.date_time_combo",BI.DateTimeCombo)},function(e,t){BI.DateTimePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-popup",width:268,height:374})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var t=this,e=this.options;this.cancelButton=BI.createWidget({type:"bi.text_button",cls:"multidate-popup-button bi-border-top bi-border-right",shadow:!0,text:BI.i18nText("BI-Basic_Cancel")}),this.cancelButton.on(BI.TextButton.EVENT_CHANGE,function(){t.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",cls:"multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){t.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",behaviors:e.behaviors,min:t.options.min,max:t.options.max}),t.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){t.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:{type:"bi.center_adapt",cls:"bi-split-top",items:[{type:"bi.dynamic_date_time_select",ref:function(e){t.timeSelect=e}}]},height:50},{el:this.dateButton,height:30}]}),this.setValue(e.value)},setValue:function(e){var t,i=e;BI.isNull(i)?(t=BI.getDate(),this.dateCombo.setValue({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}),this.timeSelect.setValue({hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds()})):(this.dateCombo.setValue({year:i.year,month:i.month,day:i.day}),this.timeSelect.setValue({hour:i.hour,minute:i.minute,second:i.second}))},getValue:function(){return BI.extend({year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day},this.timeSelect.getValue())}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup)},function(e,t){BI.DateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){return BI.extend(BI.DateTimeTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24,width:200})},_init:function(){BI.DateTimeTrigger.superclass._init.apply(this,arguments);var e=this.options,t=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:e.height,width:e.width,hgap:t.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text},{el:BI.createWidget(),width:e.height}]}),this.setValue(e.value)},_printTime:function(e){return e<10?"0"+e:e},setValue:function(e){var t,i,n=e;i=BI.isNull(n)?(n=BI.getDate(),BI.print(n,"%Y-%X-%d %H:%M:%S")):(t=BI.getDate(n.year,n.month-1,n.day,n.hour,n.minute,n.second),BI.print(t,"%Y-%X-%d %H:%M:%S")),this.text.setText(i),this.text.setTitle(i)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger)},function(e,t){BI.StaticDateTimePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-date-time-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDateTimePaneCard.superclass._init.apply(this,arguments);var n=this,e=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=e.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:e.behaviors,min:e.min,max:e.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var e=n.datePicker.getValue(),t=BI.getMonthDays(BI.getDate(e.year,e.month-1,1)),i=n.selectedTime.day||0;t<i&&(i=t),n.selectedTime=BI.extend(n.selectedTime,{year:e.year,month:e.month}),0!==i&&(n.selectedTime.day=i),n.calendar.setSelect(BI.Calendar.getPageByDateJSON(n.selectedTime)),n.calendar.setValue(n.selectedTime),0!==i&&n.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.calendar=BI.createWidget({direction:"custom",type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){n.selectedTime=BI.extend(n.calendar.getValue(),n.timeSelect.getValue()),n.calendar.empty(),n.setValue(n.selectedTime),n.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.vtape",element:this,hgap:10,items:[{el:this.datePicker,height:40},this.calendar,{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){n.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){n.selectedTime=BI.extend(n.calendar.getValue(),n.timeSelect.getValue()),n.fireEvent("EVENT_CHANGE")}}]},height:40}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]}),this.setValue(e.selectedTime)},_createNav:function(e){var t=BI.Calendar.getDateJSONByPage(e);return BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:t.year,month:t.month,day:this.selectedTime.day})},_getNewCurrentDate:function(){var e=BI.getDate();return{year:e.getFullYear(),month:e.getMonth()+1}},_setCalenderValue:function(e){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(e)),this.calendar.setValue(e),this.selectedTime=BI.extend({},this.timeSelect.getValue(),e)},_setDatePicker:function(e){BI.isNull(e)||BI.isNull(e.year)||BI.isNull(e.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(e)},_setCalendar:function(e){BI.isNull(e)||BI.isNull(e.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(e)},setValue:function(e){e=e||{},this._setDatePicker(e),this._setCalendar(e),this.timeSelect.setValue({hour:e.hour,minute:e.minute,second:e.second})},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_time_pane_card",BI.StaticDateTimePaneCard)},function(e,t){BI.DynamicDateTimePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var i=this,t=this.options;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-split-bottom",height:30,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateTimePane.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDateTimePane.Dynamic}],{textAlign:"center"}),listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){var e=this.getValue()[0];switch(i.dateTab.setSelect(e),e){case BI.DynamicDateTimePane.Static:var t=BI.DynamicDateHelper.getCalculation(i.dynamicPane.getValue());i.ymd.setValue({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()});break;case BI.DynamicDateTimePane.Dynamic:i.dynamicPane.setValue({year:0})}}}],ref:function(){i.switcher=this}},height:30},{type:"bi.tab",ref:function(){i.dateTab=this},showIndex:BI.DynamicDateTimePane.Static,cardCreator:function(e){switch(e){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",behaviors:t.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){i.fireEvent("EVENT_CHANGE")}}],ref:function(){i.ymd=this}};case BI.DynamicDateTimePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){i._checkValue(i.getValue())&&i.fireEvent("EVENT_CHANGE")}}],ref:function(){i.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(e){return BI.isNull(e)||BI.isEmptyObject(e)||BI.isEmptyString(e)},_checkValue:function(e){switch(e.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(e.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(e){var t,i=(e=e||{}).type||BI.DynamicDateTimePane.Static,n=e.value||e;switch(this.switcher.setValue(i),this.dateTab.setSelect(i),i){case BI.DynamicDateTimePane.Dynamic:this.dynamicPane.setValue(n);break;case BI.DynamicDateTimePane.Static:default:this._checkValueValid(n)?(t=BI.getDate(),this.ymd.setValue({year:t.getFullYear(),month:t.getMonth()+1})):this.ymd.setValue(n)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.shortcut("bi.dynamic_date_time_pane",BI.DynamicDateTimePane),BI.extend(BI.DynamicDateTimePane,{Static:1,Dynamic:2})},function(e,t){BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-combo",height:24,items:[],adjustLength:0,direction:"bottom",trigger:"click",container:null,stopPropagation:!1,el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var i=this,e=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:e.items,chooseType:e.chooseType,value:e.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(e){i.fireEvent(BI.DownListCombo.EVENT_CHANGE,e),i.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(e,t){i.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,e,t),i.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:e.trigger,isNeedAdjustWidth:!1,container:e.container,adjustLength:e.adjustLength,direction:e.direction,stopPropagation:e.stopPropagation,el:BI.createWidget(e.el,{type:"bi.icon_trigger",extraCls:e.iconCls,width:e.width,height:e.height}),popup:{el:this.popupview,stopPropagation:e.stopPropagation,maxHeight:1e3,minWidth:140}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){i.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(e){this.downlistcombo.showView(e)},populate:function(e){this.popupview.populate(e)},setValue:function(e){this.popupview.setValue(e)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.down_list_combo",BI.DownListCombo)},function(e,t){BI.DownListGroup=BI.inherit(BI.Widget,{constants:{iconCls:"check-mark-ha-font"},_defaultConfig:function(){return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-group",items:[{el:{}}]})},_init:function(){BI.DownListGroup.superclass._init.apply(this,arguments);var e=this.options,t=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:e.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:e.value}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(e){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&t.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(e){this.downlistgroup.setValue(e)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup)},function(e,t){BI.DownListItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-down-list-item bi-list-item-active",cls:"",height:24,logic:{dynamic:!0},selected:!1,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.DownListItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:36,height:e.height,items:[{el:{type:"bi.icon",width:e.iconWidth,height:e.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,this.icon,this.text)}))))},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()},doClick:function(){BI.DownListItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.DownListItem.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)}}),BI.DownListItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_item",BI.DownListItem)},function(e,t){BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-down-list-group-item",logic:{dynamic:!1},iconCls1:"dot-e-font",iconCls2:"pull-right-e-font"})},_init:function(){BI.DownListGroupItem.superclass._init.apply(this,arguments);var e=this.options,t=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:e.text,value:e.value,height:e.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:e.iconCls1,width:36,disableSelected:!0,selected:this._digest(e.value)}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:e.iconCls2,width:24,forceNotSelected:!0});var i=BI.createWidget({type:"bi.layout",width:24});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.icon2,top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,i)})))),this.element.hover(function(){t.isEnabled()&&t.hover()},function(){t.isEnabled()&&t.dishover()})},_digest:function(e){var i=this.options;return e=BI.isArray(e)?e:[e],BI.any(e,function(e,t){return BI.contains(i.childValues,t)})},hover:function(){BI.DownListGroupItem.superclass.hover.apply(this,arguments),this.icon1.element.addClass("hover"),this.icon2.element.addClass("hover")},dishover:function(){BI.DownListGroupItem.superclass.dishover.apply(this,arguments),this.icon1.element.removeClass("hover"),this.icon2.element.removeClass("hover")},doClick:function(){BI.DownListGroupItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE,this.getValue())},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(e){this.icon1.setSelected(this._digest(e))}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem)},function(e,t){BI.DownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:24,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var e=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.DownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={},this.items=BI.deepClone(this.options.items);var o=this,e=this.options,t=this._createChildren(this.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(t,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(e.value),chooseType:e.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(e,t){var i,n,r=e;BI.isNotNull(o.childValueMap[e])?(r=o.childValueMap[e],o.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,r,o.fatherValueMap[e])):o.fireEvent(BI.DownListPopup.EVENT_CHANGE,r,t),BI.contains(o.singleValues,r)||(i=o.getValue(),n=[],BI.each(i,function(e,t){t.value!=r&&n.push(t)}),o.setValue(n))}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createChildren:function(r){var o=this,a=[];return BI.each(r,function(e,t){var i,n={type:"bi.down_list_group",items:[]};BI.each(t,function(e,r){BI.isNotEmptyArray(r.children)&&!BI.isEmpty(r.el)?(r.type="bi.combo_group",r.isDefaultInit=!0,r.cls="down-list-group",r.trigger="hover",r.isNeedAdjustWidth=!1,r.el.title=r.el.title||r.el.text,r.el.type="bi.down_list_group_item",r.el.logic={dynamic:!0},r.el.height=o.constants.height,r.el.iconCls2=o.constants.nextIcon,r.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5,maxHeight:378},r.el.childValues=[],BI.each(r.children,function(e,t){var i=BI.deepClone(r.el.value),n=BI.deepClone(t.value);o.singleValues.push(t.value),t.type="bi.down_list_item",t.extraCls=" child-down-list-item",t.title=t.title||t.text,t.textRgap=10,t.isNeedAdjustWidth=!1,t.logic={dynamic:!0},t.father=i,o.fatherValueMap[o._createChildValue(i,n)]=i,o.childValueMap[o._createChildValue(i,n)]=n,t.value=o._createChildValue(i,n),r.el.childValues.push(t.value)})):(r.type="bi.down_list_item",r.title=r.title||r.text,r.textRgap=10,r.isNeedAdjustWidth=!1,r.logic={dynamic:!0});var t={};t.el=r,n.items.push(t)}),o._isGroup(n.items)&&BI.each(n.items,function(e,t){o.singleValues.push(t.el.value)}),a.push(n),o._needSpliter(e,r.length)&&(i=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}),a.push(i))}),a},_isGroup:function(e){return 1<e.length},_needSpliter:function(e,t){return e<t-1},_createChildValue:function(e,t){return e+"_"+t},_digest:function(e){var n=this,r=[];return BI.each(e,function(e,t){var i=BI.isNotNull(t.childValue)?n._createChildValue(t.value,t.childValue):t.value;r.push(i)}),r},_checkValues:function(l){var u=[];return BI.each(this.items,function(s,e){BI.each(e,function(e,t){var i,n,r,o,a;BI.isNotNull(t.children)?(i=BI.map(t.children,"value"),r=i,o=l[s],a="",BI.some(r,function(e,i){return BI.some(o,function(e,t){if(i===t)return a=i,!0})}),n=a,BI.isNotEmptyString(n)&&u.push(n)):t.value===l[s][0]&&u.push(l[s][0])})}),u},populate:function(e){BI.DownListPopup.superclass.populate.apply(this,arguments),this.items=BI.deepClone(e),this.childValueMap={},this.fatherValueMap={},this.singleValues=[];var t=this._createChildren(this.items),i=BI.createItems(t,{},{adjustLength:-2});this.popup.populate(i)},setValue:function(e){this.popup.setValue(this._digest(e))},_getValue:function(){var i=[];return BI.each(this.popup.getAllButtons(),function(e,t){e%2==0&&i.push(t.getValue())}),i},getValue:function(){var r=this,o=[],e=this._checkValues(this._getValue());return BI.each(e,function(e,t){var i,n={};BI.isNotNull(r.childValueMap[t])?(i=r.fatherValueMap[t],n.childValue=r.childValueMap[t],n.value=i):n.value=t,o.push(n)}),o}}),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(e,t){BI.DynamicDateHelper={},BI.extend(BI.DynamicDateHelper,{getCalculation:function(e){var t=BI.getDate();return this.getCalculationByDate(t,e)},getCalculationByDate:function(e,t){if(BI.isNotNull(t.year)&&(e=BI.getDate(e.getFullYear()+BI.parseInt(t.year),e.getMonth(),e.getDate())),BI.isNotNull(t.quarter)&&(e=BI.getOffsetQuarter(e,BI.parseInt(t.quarter))),BI.isNotNull(t.month)&&(e=BI.getOffsetMonth(e,BI.parseInt(t.month))),BI.isNotNull(t.week)&&(e=BI.getOffsetDate(e,7*BI.parseInt(t.week))),BI.isNotNull(t.day)&&(e=BI.getOffsetDate(e,BI.parseInt(t.day))),BI.isNotNull(t.workDay))if(BI.isNotNull(BI.holidays))for(var i=Math.abs(t.workDay),n=0;n<i;n++)e=BI.getOffsetDate(e,t.workDay<0?-1:1),BI.isNotNull(BI.holidays[BI.print(e,"%Y-%X-%d")])&&n--;else e=BI.getOffsetDate(e,BI.parseInt(t.workDay));return BI.isNotNull(t.position)&&t.position!==BI.DynamicDateCard.OFFSET.CURRENT&&(e=this.getBeginDate(e,t)),BI.getDate(e.getFullYear(),e.getMonth(),e.getDate())},getBeginDate:function(e,t){return BI.isNotNull(t.day)?t.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(e.getFullYear(),e.getMonth(),1):BI.getDate(e.getFullYear(),e.getMonth(),BI.getLastDateOfMonth(e).getDate()):BI.isNotNull(t.week)?t.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getWeekStartDate(e):BI.getWeekEndDate(e):BI.isNotNull(t.month)?t.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(e.getFullYear(),e.getMonth(),1):BI.getDate(e.getFullYear(),e.getMonth(),BI.getLastDateOfMonth(e).getDate()):BI.isNotNull(t.quarter)?t.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getQuarterStartDate(e):BI.getQuarterEndDate(e):BI.isNotNull(t.year)?t.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(e.getFullYear(),0,1):BI.getDate(e.getFullYear(),11,31):e}})},function(e,t){BI.DynamicDateCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-card"},render:function(){var e=this;return this.position=BI.DynamicDateCard.OFFSET.CURRENT,{type:"bi.vertical",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:12,lgap:10},tgap:10,bgap:5},{type:"bi.button_group",ref:function(){e.checkgroup=this},chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,lgap:4,value:[BI.DynamicDateCard.TYPE.YEAR],items:BI.createItems([{text:BI.i18nText("BI-Basic_Year"),value:BI.DynamicDateCard.TYPE.YEAR},{text:BI.i18nText("BI-Basic_Single_Quarter"),value:BI.DynamicDateCard.TYPE.QUARTER},{text:BI.i18nText("BI-Basic_Month"),value:BI.DynamicDateCard.TYPE.MONTH},{text:BI.i18nText("BI-Basic_Week"),value:BI.DynamicDateCard.TYPE.WEEK},{text:BI.i18nText("BI-Basic_Day"),value:BI.DynamicDateCard.TYPE.DAY}],{type:"bi.multi_select_item",logic:{dynamic:!0}}),layouts:[{type:"bi.left",rgap:4}],listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){0!==e.checkgroup.getValue().length&&e.workDayBox.setSelected(!1);var n={};BI.each(e.resultPane.getAllButtons(),function(e,t){var i=t.getValue();BI.isNotNull(i.dateType)&&(n[i.dateType]={value:i.value,offset:i.offset})}),e.resultPane.populate(e._getParamJson(BI.map(e.checkgroup.getValue(),function(e,t){var i={dateType:t};return BI.has(n,t)&&(i.value=n[t].value,i.offset=n[t].offset),i}))),e.position=BI.DynamicDateCard.OFFSET.CURRENT,e.fireEvent("EVENT_CHANGE")}}]},{type:"bi.vertical_adapt",lgap:2,items:[{el:{type:"bi.multi_select_item",ref:function(){e.workDayBox=this},logic:{dynamic:!0},text:BI.i18nText("BI-Basic_Work_Day"),value:BI.DynamicDateCard.TYPE.WORK_DAY,listeners:[{eventName:BI.MultiSelectItem.EVENT_CHANGE,action:function(){this.isSelected()&&e.checkgroup.setValue(),e.resultPane.populate(this.isSelected()?e._getParamJson([{dateType:BI.DynamicDateCard.TYPE.WORK_DAY}]):[]),e.position=BI.DynamicDateCard.OFFSET.CURRENT,e.fireEvent("EVENT_CHANGE")}}]}}],ref:function(){e.workDay=this}},{type:"bi.button_group",items:this._getParamJson([{dateType:BI.DynamicDateCard.TYPE.YEAR}]),ref:function(){e.resultPane=this},layouts:[{type:"bi.vertical",bgap:10,hgap:10}]}]}},_getParamJson:function(e,t){var i,n=this,r=BI.map(e,function(e,t){return{el:{type:"bi.dynamic_date_param_item",dateType:t.dateType,value:t.value,offset:t.offset,listeners:[{eventName:"EVENT_CHANGE",action:function(){n.fireEvent("EVENT_CHANGE")}}]},tgap:0===e?5:0}});return 1===e.length&&e[0].dateType===BI.DynamicDateCard.TYPE.DAY?((i=this._getText(BI.DynamicDateCard.TYPE.MONTH))[0].text=BI.i18nText("BI-Basic_Empty"),r.push({type:"bi.text_value_combo",height:24,items:i,container:null,value:t||BI.DynamicDateCard.OFFSET.CURRENT,listeners:[{eventName:"EVENT_CHANGE",action:function(){n.position=this.getValue()[0],n.fireEvent("EVENT_CHANGE")}}]})):0!==e.length&&BI.last(e).dateType!==BI.DynamicDateCard.TYPE.DAY&&BI.last(e).dateType!==BI.DynamicDateCard.TYPE.WORK_DAY&&r.push({type:"bi.text_value_combo",height:24,container:null,items:this._getText(BI.last(e).dateType),value:t||BI.DynamicDateCard.OFFSET.CURRENT,listeners:[{eventName:"EVENT_CHANGE",action:function(){n.position=this.getValue()[0],n.fireEvent("EVENT_CHANGE")}}]}),r},_getText:function(e){switch(e){case BI.DynamicDateCard.TYPE.YEAR:return[{text:BI.i18nText("BI-Basic_Current_Day"),value:BI.DynamicDateCard.OFFSET.CURRENT},{text:BI.i18nText("BI-Basic_Year_Begin"),value:BI.DynamicDateCard.OFFSET.BEGIN},{text:BI.i18nText("BI-Basic_Year_End"),value:BI.DynamicDateCard.OFFSET.END}];case BI.DynamicDateCard.TYPE.QUARTER:return[{text:BI.i18nText("BI-Basic_Current_Day"),value:BI.DynamicDateCard.OFFSET.CURRENT},{text:BI.i18nText("BI-Basic_Quarter_Begin"),value:BI.DynamicDateCard.OFFSET.BEGIN},{text:BI.i18nText("BI-Basic_Quarter_End"),value:BI.DynamicDateCard.OFFSET.END}];case BI.DynamicDateCard.TYPE.MONTH:return[{text:BI.i18nText("BI-Basic_Current_Day"),value:BI.DynamicDateCard.OFFSET.CURRENT},{text:BI.i18nText("BI-Basic_Month_Begin"),value:BI.DynamicDateCard.OFFSET.BEGIN},{text:BI.i18nText("BI-Basic_Month_End"),value:BI.DynamicDateCard.OFFSET.END}];case BI.DynamicDateCard.TYPE.WEEK:default:return[{text:BI.i18nText("BI-Basic_Current_Day"),value:BI.DynamicDateCard.OFFSET.CURRENT},{text:BI.i18nText("BI-Basic_Week_Begin"),value:BI.DynamicDateCard.OFFSET.BEGIN},{text:BI.i18nText("BI-Basic_Week_End"),value:BI.DynamicDateCard.OFFSET.END}]}},_createValue:function(e,t){return{dateType:e,value:Math.abs(t),offset:0<t?1:0}},setValue:function(e){e=e||{},this.position=e.position||BI.DynamicDateCard.OFFSET.CURRENT;var t=[],i=[];BI.isNotNull(e.year)&&(t.push(BI.DynamicDateCard.TYPE.YEAR),i.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,e.year))),BI.isNotNull(e.quarter)&&(t.push(BI.DynamicDateCard.TYPE.QUARTER),i.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,e.quarter))),BI.isNotNull(e.month)&&(t.push(BI.DynamicDateCard.TYPE.MONTH),i.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,e.month))),BI.isNotNull(e.week)&&(t.push(BI.DynamicDateCard.TYPE.WEEK),i.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,e.week))),BI.isNotNull(e.day)&&(t.push(BI.DynamicDateCard.TYPE.DAY),i.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,e.day))),BI.isNotNull(e.workDay)&&(t.push(BI.DynamicDateCard.TYPE.WORK_DAY),i.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,e.workDay))),this.checkgroup.setValue(t),this.workDayBox.setSelected(BI.isNotNull(e.workDay)),this.resultPane.populate(this._getParamJson(i,e.position))},getValue:function(){var e,n=this,r={},t=this.checkgroup.getValue(),i=this.resultPane.getAllButtons();return 0!==t.length&&BI.each(i,function(e,t){var i=t.getValue();switch(i.dateType){case BI.DynamicDateCard.TYPE.YEAR:r.year=0===i.offset?-i.value:i.value;break;case BI.DynamicDateCard.TYPE.QUARTER:r.quarter=0===i.offset?-i.value:i.value;break;case BI.DynamicDateCard.TYPE.MONTH:r.month=0===i.offset?-i.value:i.value;break;case BI.DynamicDateCard.TYPE.WEEK:r.week=0===i.offset?-i.value:i.value;break;case BI.DynamicDateCard.TYPE.DAY:r.day=0===i.offset?-i.value:i.value}BI.isNull(i.dateType)&&(r.position=n.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()&&(e=i[0].getValue(),r.workDay=0===e.offset?-e.value:e.value),r}}),BI.shortcut("bi.dynamic_date_card",BI.DynamicDateCard),BI.extend(BI.DynamicDateCard,{TYPE:{YEAR:1,QUARTER:2,MONTH:3,WEEK:4,DAY:5,WORK_DAY:6},OFFSET:{CURRENT:1,BEGIN:2,END:3}})},function(e,t){BI.DynamicDateCombo=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 i=this,e=this.options;this.storeTriggerValue="";var t=BI.getDate();return this.storeValue=e.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:e.height,height:e.height,ref:function(){i.changeIcon=this}},width:e.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:e.container,ref:function(){i.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,destroyWhenHide:!0,el:{type:"bi.dynamic_date_trigger",min:e.minDate,max:e.maxDate,format:e.format,allowEdit:e.allowEdit,watermark:e.watermark,height:e.height,value:e.value,ref:function(){i.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){i.combo.isViewVisible()&&i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN,arguments)}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){i.combo.isViewVisible()||i.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){i.storeTriggerValue=i.trigger.getKey(),i.combo.isViewVisible()||i.combo.showView(),i.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_BLUR,action:function(){i.fireEvent(BI.DynamicDateCombo.EVENT_BLUR)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){i.storeValue={type:BI.DynamicDateCombo.Static,value:{year:t.getFullYear(),month:t.getMonth()+1}},i.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){i.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){i.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){var e,t;i.combo.isViewVisible()||(e=i.storeTriggerValue,t=i.trigger.getKey(),BI.isNotEmptyString(t)&&!BI.isEqual(t,e)?(i.storeValue=i.trigger.getValue(),i.setValue(i.trigger.getValue())):BI.isEmptyString(t)&&(i.storeValue=null,i.trigger.setValue()),i._checkDynamicValue(i.storeValue),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM))}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",behaviors:e.behaviors,min:e.minDate,max:e.maxDate,ref:function(){i.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){i.setValue(),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var e=BI.getDate();i.setValue({type:BI.DynamicDateCombo.Static,value:{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}}),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var e=i.popup.getValue();i._checkValue(e)&&i.setValue(e),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},hideChecker:function(e){return 0===i.triggerBtn.element.find(e.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){i.popup.setValue(i.storeValue),i.popup.setMinDate(e.minDate),i.popup.setMaxDate(e.maxDate),i.fireEvent(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW)}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:e.height,height:e.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){i.combo.isViewVisible()||i.combo.showView()}}],ref:function(){i.triggerBtn=this}},top:0,right:0}]}],ref:function(e){i.comboWrapper=e}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(e){var t=this.options,i=null;switch(BI.isNotNull(e)&&(i=e.type),i){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=t.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(e){switch(e.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(e.value);case BI.DynamicDateCombo.Static:default:return!0}},_defaultState:function(){},setMinDate:function(e){this.options.minDate=e,this.trigger.setMinDate(e),this.popup&&this.popup.setMinDate(e)},setMaxDate:function(e){this.options.maxDate=e,this.trigger.setMaxDate(e),this.popup&&this.popup.setMaxDate(e)},setValue:function(e){this.storeValue=e,this.trigger.setValue(e),this._checkDynamicValue(e)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateCombo.EVENT_BLUR="EVENT_BLUR",BI.DynamicDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateCombo.EVENT_VALID="EVENT_VALID",BI.DynamicDateCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_date_combo",BI.DynamicDateCombo),BI.extend(BI.DynamicDateCombo,{Static:1,Dynamic:2})},function(e,t){BI.DynamicDateParamItem=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-param-item",dateType:BI.DynamicDateCard.TYPE.YEAR,value:0,offset:0,height:24},render:function(){var e=this,t=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(e){return BI.isNaturalNumber(e)},value:t.value,ref:function(){e.editor=this},errorText:function(e){return BI.isEmptyString(e)?BI.i18nText("BI-Basic_Please_Input_Content"):BI.i18nText("BI-Please_Input_Natural_Number")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){e.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:t.dateType===BI.DynamicDateCard.TYPE.WORK_DAY?60:20},{type:"bi.text_value_combo",height:24,items:[{text:BI.i18nText("BI-Basic_Front"),value:0},{text:BI.i18nText("BI-Basic_Behind"),value:1}],ref:function(){e.offsetCombo=this},container:null,value:t.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var e="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:e=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:e=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:e=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:e=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:e=BI.i18nText("BI-Basic_Day");break;case BI.DynamicDateCard.TYPE.WORK_DAY:default:e=BI.i18nText("BI-Basic_Work_Day")}return e},setValue:function(e){(e=e||{}).value=e.value||0,e.offset=e.offset||0,this.editor.setValue(e.value),this.offsetCombo.setValue(e.offset)},getValue:function(){return{dateType:this.options.dateType,value:this.editor.getValue(),offset:this.offsetCombo.getValue()[0]}}}),BI.DynamicDateParamItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_date_param_item",BI.DynamicDateParamItem)},function(e,t){BI.DynamicDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-dynamic-date-popup",width:248,height:344},_init:function(){BI.DynamicDatePopup.superclass._init.apply(this,arguments);var e=this,t=this.options,i=this.constants;this.storeValue={type:BI.DynamicDateCombo.Static},BI.createWidget({element:this,type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),textHeight:i.buttonHeight-1,listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,textHeight:i.buttonHeight-1,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){e.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:i.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(t.value)},_getTabJson:function(){var t=this,i=this.options;return{type:"bi.tab",ref:function(){t.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDateCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(e){switch(e){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){t._setInnerValue(t.year,e)}}],ref:function(){t.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",behaviors:i.behaviors,min:t.options.min,max:t.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){t.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){t.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){switch(t.dateTab.getSelect()){case BI.DynamicDateCombo.Static:var e=BI.DynamicDateHelper.getCalculation(t.dynamicPane.getValue());t.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),t._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:t.storeValue&&t.storeValue.type===BI.DynamicDateCombo.Dynamic?t.dynamicPane.setValue(t.storeValue.value):t.dynamicPane.setValue({year:0}),t._setInnerValue()}}}]}},_setInnerValue:function(){var e;this.dateTab.getSelect()===BI.DynamicDateCombo.Static?(this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0)):(e=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue()),e=BI.print(e,"%Y-%X-%d"),this.textButton.setValue(e),this.textButton.setEnable(!1))},_checkValueValid:function(e){return BI.isNull(e)||BI.isEmptyObject(e)||BI.isEmptyString(e)},setMinDate:function(e){this.options.min!==e&&(this.options.min=e,this.ymd.setMinDate(e))},setMaxDate:function(e){this.options.max!==e&&(this.options.max=e,this.ymd.setMaxDate(e))},setValue:function(e){this.storeValue=e;var t,i=(e=e||{}).type||BI.DynamicDateCombo.Static,n=e.value||e;switch(this.dateTab.setSelect(i),i){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(n),this._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this._checkValueValid(n)?(t=BI.getDate(),this.ymd.setValue({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()})):this.ymd.setValue(n),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicDatePopup.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.shortcut("bi.dynamic_date_popup",BI.DynamicDatePopup)},function(e,t){BI.DynamicDateTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:6,yearFullMonthLength:7,compareFormat:"%Y-%X-%d"},props:{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:24,format:"",allowEdit:!0,watermark:""},_init:function(){BI.DynamicDateTrigger.superclass._init.apply(this,arguments);var n=this,r=this.options,e=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:r.height,validationChecker:function(e){var t=n._getStandardDateStr(e),i=t.match(/\d+/g);return BI.isKey(r.format)||n._autoAppend(e,i),n._dateCheck(t)&&BI.checkDateLegal(t)&&n._checkVoid({year:0|i[0],month:0|i[1],day:0|i[2]})},quitChecker:function(){return!1},hgap:e.hgap,vgap:e.vgap,allowBlank:!0,watermark:BI.isKey(r.watermark)?r.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var e="";return BI.isKey(r.format)||(e=n.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),e},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){n.storeTriggerValue=n.getKey(),n.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_BLUR,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var e,t=n.editor.getValue();BI.isNotNull(t)&&n.editor.setState(t),BI.isNotEmptyString(t)&&!BI.isEqual(n.storeTriggerValue,n.getKey())&&(e=n._getStandardDateStr(t).match(/\d+/g),n.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|e[0],month:0|e[1],day:0|e[2]}}),n.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){n.editor.isValid()&&n.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),r.allowEdit||BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.text",title:BI.bind(this._getTitle,this)},left:0,right:24,top:0,bottom:0}]}),this.setValue(r.value)},_getTitle:function(){var e=this.storeValue||{},t=e.type||BI.DynamicDateCombo.Static,i=e.value;switch(t){case BI.DynamicDateCombo.Dynamic:var n=this._getText(i),r=BI.getDate(),r=BI.DynamicDateHelper.getCalculation(i),o=BI.print(r,this._getFormatString());return BI.isEmptyString(n)?o:n+":"+o;case BI.DynamicDateCombo.Static:default:return BI.isNull(i)||BI.isNull(i.day)?"":BI.print(BI.getDate(i.year,i.month-1,i.day),this._getFormatString())}},_getStandardDateStr:function(e){var t=this._const,i=[0,1,2],n=this._getFormatString().match(/%./g);BI.each(n,function(e,t){switch(t){case"%Y":case"%y":i[0]=e;break;case"%X":case"%x":i[1]=e;break;case"%d":case"%e":default:i[2]=e}});var r=BI.parseDateTime(e,this._getFormatString());BI.print(r,this._getFormatString())===e&&(e=BI.print(r,t.compareFormat),i=[0,1,2]);var o=e.match(/\d+/g),a=[];return BI.each(o,function(e){a[e]=o[i[e]]}),a.length===i.length&&2===a[0].length?BI.print(BI.parseDateTime(a.join("-"),t.compareFormat),t.compareFormat):a.join("-")},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(e){return BI.print(BI.parseDateTime(e,"%Y-%x-%d"),"%Y-%x-%d")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d")===e||BI.print(BI.parseDateTime(e,"%Y-%x-%e"),"%Y-%x-%e")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%e"),"%Y-%X-%e")===e},_checkVoid:function(e){return!BI.checkDateVoid(e.year,e.month,e.day,this.options.min,this.options.max)[0]},_autoAppend:function(e,t){if(BI.isNotNull(t)&&BI.checkDateLegal(e))switch(e.length){case this._const.yearLength:this._yearCheck(e)&&this.editor.setValue(e+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var i=e.split("-")[1];(BI.isNotNull(i)&&2===i.length||this._monthCheck(e))&&this.editor.setValue(e+"-")}},_yearCheck:function(e){var t=BI.print(BI.parseDateTime(e,this._getFormatString()),this._const.compareFormat);return BI.print(BI.parseDateTime(e,"%Y"),"%Y")===e&&t>=this.options.min&&t<=this.options.max},_monthCheck:function(e){var t=BI.parseDateTime(e,this._getFormatString()),i=BI.print(t,this._const.compareFormat);return 0<=t.getMonth()&&(BI.print(BI.parseDateTime(e,"%Y-%X"),"%Y-%X")===e||BI.print(BI.parseDateTime(e,"%Y-%x"),"%Y-%x")===e)&&i>=this.options.min&&i<=this.options.max},_setInnerValue:function(e){var t=BI.print(e,this._getFormatString());this.editor.setState(t),this.editor.setValue(t)},_getText:function(e){var t="",i="";return BI.isNotNull(e.year)&&(0!==BI.parseInt(e.year)&&(t+=Math.abs(e.year)+BI.i18nText("BI-Basic_Year")+(e.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Year"),e.position)),BI.isNotNull(e.quarter)&&(0!==BI.parseInt(e.quarter)&&(t+=Math.abs(e.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(e.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Single_Quarter"),e.position)),BI.isNotNull(e.month)&&(0!==BI.parseInt(e.month)&&(t+=Math.abs(e.month)+BI.i18nText("BI-Basic_Month")+(e.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Month"),e.position)),BI.isNotNull(e.week)&&(0!==BI.parseInt(e.week)&&(t+=Math.abs(e.week)+BI.i18nText("BI-Basic_Week")+(e.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Week"),e.position)),BI.isNotNull(e.day)&&(0!==BI.parseInt(e.day)&&(t+=Math.abs(e.day)+BI.i18nText("BI-Basic_Day")+(e.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=1===BI.size(e)?n(BI.i18nText("BI-Basic_Month"),e.position):""),BI.isNotNull(e.workDay)&&0!==BI.parseInt(e.workDay)&&(t+=Math.abs(e.workDay)+BI.i18nText("BI-Basic_Work_Day")+(e.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),t+i;function n(e,t){switch(t){case BI.DynamicDateCard.OFFSET.BEGIN:return e+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return e+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}},setValue:function(e){var t,i,n,r=BI.getDate();switch(this.storeValue=e,BI.isNotNull(e)&&(t=e.type||BI.DynamicDateCombo.Static,i=e.value||e),t){case BI.DynamicDateCombo.Dynamic:var o=this._getText(i),r=BI.DynamicDateHelper.getCalculation(i);this._setInnerValue(r,o);break;case BI.DynamicDateCombo.Static:default:BI.isNull(i)||BI.isNull(i.day)?(this.editor.setState(""),this.editor.setValue("")):(n=BI.print(BI.getDate(i.year,i.month-1,i.day),this._getFormatString()),this.editor.setState(n),this.editor.setValue(n))}},setMinDate:function(e){BI.isNotEmptyString(this.options.min)&&(this.options.min=e)},setMaxDate:function(e){BI.isNotEmptyString(this.options.max)&&(this.options.max=e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),BI.DynamicDateTrigger.EVENT_BLUR="EVENT_BLUR",BI.DynamicDateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTrigger.EVENT_START="EVENT_START",BI.DynamicDateTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicDateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTrigger.EVENT_CHANGE="EVENT_CHANGE",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)},function(e,t){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 i=this,e=this.options;this.storeTriggerValue="";var t=BI.getDate();return this.storeValue=e.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:e.height,height:e.height,ref:function(){i.changeIcon=this}},width:e.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",destroyWhenHide:!0,container:e.container,ref:function(){i.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:e.minDate,max:e.maxDate,allowEdit:e.allowEdit,watermark:e.watermark,format:e.format,height:e.height,value:e.value,ref:function(){i.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){i.combo.isViewVisible()&&i.combo.hideView(),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN,arguments)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){i.combo.isViewVisible()||i.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){i.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){i.storeTriggerValue=i.trigger.getKey(),i.combo.isViewVisible()||i.combo.showView(),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_BLUR,action:function(){i.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){i.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:t.getFullYear(),month:t.getMonth()+1}},i.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){i.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){i.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){var e,t;i.combo.isViewVisible()||(e=i.storeTriggerValue,t=i.trigger.getKey(),BI.isNotEmptyString(t)&&!BI.isEqual(t,e)?(i.storeValue=i.trigger.getValue(),i.setValue(i.trigger.getValue())):BI.isEmptyString(t)&&(i.storeValue=null,i.trigger.setValue()),i._checkDynamicValue(i.storeValue),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM))}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:e.behaviors,min:e.minDate,max:e.maxDate,ref:function(){i.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){i.setValue(),i.combo.hideView(),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var e=BI.getDate();i.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:0,minute:0,second:0}}),i.combo.hideView(),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var e=i.popup.getValue();i._checkValue(e)&&i.setValue(e),i.combo.hideView(),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.combo.hideView(),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){i.popup.setValue(i.storeValue),i.popup.setMinDate(e.minDate),i.popup.setMaxDate(e.maxDate),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(e){return 0===i.triggerBtn.element.find(e.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:e.height,height:e.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){i.combo.isViewVisible()||i.combo.showView()}}],ref:function(){i.triggerBtn=this}},top:0,right:0}]}],ref:function(e){i.comboWrapper=e}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(e){var t=this.options,i=null;switch(BI.isNotNull(e)&&(i=e.type),i){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=t.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(e){switch(e.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(e.value);case BI.DynamicDateCombo.Static:default:return!0}},setMinDate:function(e){this.options.minDate=e,this.trigger.setMinDate(e),this.popup&&this.popup.setMinDate(e)},setMaxDate:function(e){this.options.maxDate=e,this.trigger.setMaxDate(e),this.popup&&this.popup.setMaxDate(e)},setValue:function(e){this.storeValue=e,this.trigger.setValue(e),this._checkDynamicValue(e)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()},isValid:function(){return this.trigger.isValid()}}),BI.DynamicDateTimeCombo.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.DynamicDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTimeCombo.EVENT_BLUR="EVENT_BLUR",BI.DynamicDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimeCombo.EVENT_VALID="EVENT_VALID",BI.DynamicDateTimeCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_date_time_combo",BI.DynamicDateTimeCombo),BI.extend(BI.DynamicDateTimeCombo,{Static:1,Dynamic:2})},function(e,t){BI.DynamicDateTimePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-dynamic-date-time-popup",width:248,height:385},_init:function(){BI.DynamicDateTimePopup.superclass._init.apply(this,arguments);var e=this,t=this.options,i=this.constants;this.storeValue={type:BI.DynamicDateCombo.Static},BI.createWidget({element:this,type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:i.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",textHeight:i.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){e.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:i.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(t.value)},_getTabJson:function(){var t=this,i=this.options;return{type:"bi.tab",ref:function(){t.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDateCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(e){switch(e){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){t._setInnerValue(t.year,e)}}],ref:function(){t.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",behaviors:i.behaviors,min:t.options.min,max:t.options.max,ref:function(){t.ymd=this}},{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){t.timeSelect=this}},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){switch(t.dateTab.getSelect()){case BI.DynamicDateCombo.Static:var e=BI.DynamicDateHelper.getCalculation(t.dynamicPane.getValue());t.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),t.timeSelect.setValue(),t._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:t.storeValue&&t.storeValue.type===BI.DynamicDateCombo.Dynamic?t.dynamicPane.setValue(t.storeValue.value):t.dynamicPane.setValue({year:0}),t._setInnerValue()}}}]}},_setInnerValue:function(){var e;this.dateTab.getSelect()===BI.DynamicDateCombo.Static?(this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0)):(e=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue()),e=BI.print(e,"%Y-%X-%d"),this.textButton.setValue(e),this.textButton.setEnable(!1))},_checkValueValid:function(e){return BI.isNull(e)||BI.isEmptyObject(e)||BI.isEmptyString(e)},setMinDate:function(e){this.options.min!==e&&(this.options.min=e,this.ymd.setMinDate(e))},setMaxDate:function(e){this.options.max!==e&&(this.options.max=e,this.ymd.setMaxDate(e))},setValue:function(e){this.storeValue=e;var t,i=(e=e||{}).type||BI.DynamicDateCombo.Static,n=e.value||e;switch(this.dateTab.setSelect(i),i){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(n),this._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this._checkValueValid(n)?(t=BI.getDate(),this.ymd.setValue({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}),this.timeSelect.setValue()):(this.ymd.setValue(n),this.timeSelect.setValue({hour:n.hour,minute:n.minute,second:n.second})),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0)}},getValue:function(){var e=this.dateTab.getSelect();return{type:e,value:e===BI.DynamicDateTimeCombo.Static?BI.extend(this.ymd.getValue(),this.timeSelect.getValue()):this.dynamicPane.getValue()}}}),BI.DynamicDateTimePopup.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.shortcut("bi.dynamic_date_time_popup",BI.DynamicDateTimePopup)},function(e,t){BI.DynamicDateTimeSelect=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-select"},render:function(){var t=this;return{type:"bi.center_adapt",items:[{type:"bi.vertical_adapt",items:[{el:{type:"bi.number_editor",ref:function(){t.hour=this},validationChecker:function(e){return BI.isNaturalNumber(e)&&BI.parseInt(e)<24},errorText:function(e){return BI.isNumeric(e)?BI.i18nText("BI-Basic_Input_From_To_Number",'"00-23"'):BI.i18nText("BI-Numerical_Interval_Input_Data")},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){var e=this.getValue();t._checkHour(e),this.setValue(t._formatValueToDoubleDigit(e)),t.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var e=t._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.HOUR);this.setValue(e)}}],width:60,height:24}},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){t.minute=this},validationChecker:function(e){return BI.isNaturalNumber(e)&&BI.parseInt(e)<60},errorText:function(e){return BI.isNumeric(e)?BI.i18nText("BI-Basic_Input_From_To_Number",'"00-59"'):BI.i18nText("BI-Numerical_Interval_Input_Data")},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){var e=this.getValue();t._checkMinute(e),this.setValue(t._formatValueToDoubleDigit(e),BI.DynamicDateTimeSelect.MINUTE),t.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var e=t._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.MINUTE);this.setValue(e)}}],width:60,height:24},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){t.second=this},validationChecker:function(e){return BI.isNaturalNumber(e)&&BI.parseInt(e)<60},errorText:function(e){return BI.isNumeric(e)?BI.i18nText("BI-Basic_Input_From_To_Number",'"00-59"'):BI.i18nText("BI-Numerical_Interval_Input_Data")},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){var e=this.getValue();t._checkSecond(e),this.setValue(t._formatValueToDoubleDigit(e)),t.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}}],width:60,height:24}]}]}},_checkBorder:function(e){e=e||{},this._checkHour(e.hour),this._checkMinute(e.minute),this._checkSecond(e.second)},_checkHour:function(e){this.hour.setDownEnable(0<BI.parseInt(e)),this.hour.setUpEnable(BI.parseInt(e)<23)},_checkMinute:function(e){this.minute.setDownEnable(0<BI.parseInt(e)),this.minute.setUpEnable(BI.parseInt(e)<59)},_checkSecond:function(e){this.second.setDownEnable(0<BI.parseInt(e)),this.second.setUpEnable(BI.parseInt(e)<59)},_autoSwitch:function(e,t){var i=0,n=e+"";switch(t){case BI.DynamicDateTimeSelect.HOUR:i=2;break;case BI.DynamicDateTimeSelect.MINUTE:i=5}if(1===n.length&&BI.parseInt(n)>i&&(n="0"+n),2===n.length)switch(t){case BI.DynamicDateTimeSelect.HOUR:this.hour.isEditing()&&this.minute.focus();break;case BI.DynamicDateTimeSelect.MINUTE:this.minute.isEditing()&&this.second.focus();break;case BI.DynamicDateTimeSelect.SECOND:}return n},_formatValueToDoubleDigit:function(e){(BI.isNull(e)||BI.isEmptyString(e))&&(e=0);var t=BI.parseInt(e);return t<10&&(t="0"+t),t},_assertValue:function(e){return(e=e||{}).hour=this._formatValueToDoubleDigit(e.hour)||"00",e.minute=this._formatValueToDoubleDigit(e.minute)||"00",e.second=this._formatValueToDoubleDigit(e.second)||"00",e},getValue:function(){return{hour:BI.parseInt(this.hour.getValue()),minute:BI.parseInt(this.minute.getValue()),second:BI.parseInt(this.second.getValue())}},setValue:function(e){e=this._assertValue(e),this.hour.setValue(e.hour),this.minute.setValue(e.minute),this.second.setValue(e.second),this._checkBorder(e)}}),BI.DynamicDateTimeSelect.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.dynamic_date_time_select",BI.DynamicDateTimeSelect),BI.extend(BI.DynamicDateTimeSelect,{HOUR:1,MINUTE:2,SECOND:3})},function(e,t){BI.DynamicDateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:6,yearFullMonthLength:7,compareFormat:"%Y-%X-%d %H:%M:%S"},props:{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24,format:"",allowEdit:!0,watermark:""},_init:function(){BI.DynamicDateTimeTrigger.superclass._init.apply(this,arguments);var n=this,r=this.options,e=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:r.height,validationChecker:function(e){var t=n._getStandardDateStr(e),i=t.match(/\d+/g);return BI.isKey(r.format)||n._autoAppend(e,i),n._dateCheck(t)&&BI.checkDateLegal(t)&&n._checkVoid({year:0|i[0],month:0|i[1],day:0|i[2]})},quitChecker:function(){return!1},hgap:e.hgap,vgap:e.vgap,allowBlank:!0,watermark:BI.isKey(r.watermark)?r.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var e="";return BI.isKey(r.format)||(e=n.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),e},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){n.storeTriggerValue=n.getKey(),n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_BLUR,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var e,t=n.editor.getValue();BI.isNotNull(t)&&n.editor.setState(t),BI.isNotEmptyString(t)&&!BI.isEqual(n.storeTriggerValue,n.getKey())&&(e=n._getStandardDateStr(t).match(/\d+/g),n.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|e[0],month:0|e[1],day:0|e[2],hour:0|e[3],minute:0|e[4],second:0|e[5]}}),n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_START,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),r.allowEdit||BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.text",title:BI.bind(this._getTitle,this)},left:0,right:24,top:0,bottom:0}]}),this.setValue(r.value)},_getTitle:function(){var e=this.storeValue||{},t=e.type||BI.DynamicDateCombo.Static,i=e.value;switch(t){case BI.DynamicDateCombo.Dynamic:var n=this._getText(i),r=BI.DynamicDateHelper.getCalculation(i),o=BI.print(r,this._getFormatString());return BI.isEmptyString(n)?o:n+":"+o;case BI.DynamicDateCombo.Static:default:return BI.isNull(i)||BI.isNull(i.day)?"":BI.print(BI.getDate(i.year,i.month-1,i.day,i.hour||0,i.minute||0,i.second||0),this._getFormatString())}},_getStandardDateStr:function(e){var t=this._const,i=[],n=!1,r=this._getFormatString().match(/%./g);BI.each(r,function(e,t){switch(t){case"%Y":case"%y":i[0]=e;break;case"%X":case"%x":i[1]=e;break;case"%d":case"%e":i[2]=e;break;case"%S":n=!0}});var o=BI.parseDateTime(e,this._getFormatString());BI.print(o,this._getFormatString())===e&&(e=BI.print(o,t.compareFormat),i=[0,1,2]);var a=e.match(/\d+/g)||[],s=[];BI.each(a.slice(0,3),function(e){s[e]=a[i[e]]});var l=a.slice(3);BI.each(l,function(e,t){BI.isNumeric(t)&&1===t.length&&(l[e]="0"+t)}),2!==l.length||n||l.push("00");var u=l.join(":"),c=s.slice(0,3).join("-");return BI.isNotEmptyString(u)&&(c+=" "+u),c},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(e){return BI.print(BI.parseDateTime(e,"%Y-%x-%d %H:%M:%S"),"%Y-%x-%d %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%x-%e %H:%M:%S"),"%Y-%x-%e %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%e %H:%M:%S"),"%Y-%X-%e %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%x-%d"),"%Y-%x-%d")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d")===e||BI.print(BI.parseDateTime(e,"%Y-%x-%e"),"%Y-%x-%e")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%e"),"%Y-%X-%e")===e},_checkVoid:function(e){return!BI.checkDateVoid(e.year,e.month,e.day,this.options.min,this.options.max)[0]},_autoAppend:function(e,t){if(BI.isNotNull(t)&&BI.checkDateLegal(e))switch(e.length){case this._const.yearLength:this._yearCheck(e)&&this.editor.setValue(e+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var i=e.split("-")[1];(BI.isNotNull(i)&&2===i.length||this._monthCheck(e))&&this.editor.setValue(e+"-")}},_yearCheck:function(e){var t=BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(e,"%Y"),"%Y")===e&&t>=this.options.min&&t<=this.options.max},_monthCheck:function(e){var t=BI.parseDateTime(e,"%Y-%X-%d"),i=BI.print(t,"%Y-%X-%d");return 0<t.getMonth()&&(BI.print(BI.parseDateTime(e,"%Y-%X"),"%Y-%X")===e||BI.print(BI.parseDateTime(e,"%Y-%x"),"%Y-%x")===e)&&i>=this.options.min&&i<=this.options.max},_setInnerValue:function(e){var t=BI.print(e,this._getFormatString());this.editor.setState(t),this.editor.setValue(t)},_getText:function(e){var t="",i="";return BI.isNotNull(e.year)&&(0!==BI.parseInt(e.year)&&(t+=Math.abs(e.year)+BI.i18nText("BI-Basic_Year")+(e.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Year"),e.position)),BI.isNotNull(e.quarter)&&(0!==BI.parseInt(e.quarter)&&(t+=Math.abs(e.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(e.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Single_Quarter"),e.position)),BI.isNotNull(e.month)&&(0!==BI.parseInt(e.month)&&(t+=Math.abs(e.month)+BI.i18nText("BI-Basic_Month")+(e.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Month"),e.position)),BI.isNotNull(e.week)&&(0!==BI.parseInt(e.week)&&(t+=Math.abs(e.week)+BI.i18nText("BI-Basic_Week")+(e.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Week"),e.position)),BI.isNotNull(e.day)&&(0!==BI.parseInt(e.day)&&(t+=Math.abs(e.day)+BI.i18nText("BI-Basic_Day")+(e.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=1===BI.size(e)?n(BI.i18nText("BI-Basic_Month"),e.position):""),BI.isNotNull(e.workDay)&&0!==BI.parseInt(e.workDay)&&(t+=Math.abs(e.workDay)+BI.i18nText("BI-Basic_Work_Day")+(e.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),t+i;function n(e,t){switch(t){case BI.DynamicDateCard.OFFSET.BEGIN:return e+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return e+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}},setMinDate:function(e){BI.isNotEmptyString(this.options.min)&&(this.options.min=e)},setMaxDate:function(e){BI.isNotEmptyString(this.options.max)&&(this.options.max=e)},setValue:function(e){var t,i,n,r=BI.getDate();switch(this.storeValue=e,BI.isNotNull(e)&&(t=e.type||BI.DynamicDateCombo.Static,i=e.value||e),t){case BI.DynamicDateCombo.Dynamic:var o=this._getText(i),r=BI.DynamicDateHelper.getCalculation(i);this._setInnerValue(r,o);break;case BI.DynamicDateCombo.Static:default:BI.isNull(i)||BI.isNull(i.day)?(this.editor.setState(""),this.editor.setValue("")):(n=BI.print(BI.getDate(i.year,i.month-1,i.day,i.hour||0,i.minute||0,i.second||0),this._getFormatString()),this.editor.setState(n),this.editor.setValue(n))}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue},isValid:function(){return this.editor.isValid()}}),BI.DynamicDateTimeTrigger.EVENT_BLUR="EVENT_BLUR",BI.DynamicDateTimeTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTimeTrigger.EVENT_START="EVENT_START",BI.DynamicDateTimeTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicDateTimeTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimeTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicDateTimeTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_date_time_trigger",BI.DynamicDateTimeTrigger)},function(e,t){BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-search-editor bi-border bi-focus-shadow",height:24,errorText:"",watermark:BI.i18nText("BI-Basic_Search"),validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){this.options.height-=2,BI.SearchEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget({type:"bi.editor",height:e.height,watermark:e.watermark,allowBlank:!0,hgap:1,errorText:e.errorText,validationChecker:e.validationChecker,quitChecker:e.quitChecker,value:e.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"close-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){t.setValue(""),t.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),t.fireEvent(BI.SearchEditor.EVENT_CHANGE),t.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.icon_label",cls:"search-font"},width:24},{el:t.editor},{el:this.clear,width:24}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t._checkClear(),t.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,e)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){t.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){t.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t._checkClear(),t.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){t.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid())return this.editor.getValue()},getKeywords:function(){var e=this.editor.getLastChangedValue(),t=e.match(/[\S]+/g);return BI.isEndWithBlank(e)?t.concat([" "]):t},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(e){this.editor.setValue(e),BI.isKey(e)&&this.clear.visible()},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()}}),BI.SearchEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SearchEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SearchEditor.EVENT_BLUR="EVENT_BLUR",BI.SearchEditor.EVENT_CLICK="EVENT_CLICK",BI.SearchEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SearchEditor.EVENT_SPACE="EVENT_SPACE",BI.SearchEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.SearchEditor.EVENT_CLEAR="EVENT_CLEAR",BI.SearchEditor.EVENT_START="EVENT_START",BI.SearchEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SearchEditor.EVENT_STOP="EVENT_STOP",BI.SearchEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SearchEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SearchEditor.EVENT_VALID="EVENT_VALID",BI.SearchEditor.EVENT_ERROR="EVENT_ERROR",BI.SearchEditor.EVENT_ENTER="EVENT_ENTER",BI.SearchEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SearchEditor.EVENT_REMOVE="EVENT_REMOVE",BI.SearchEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.search_editor",BI.SearchEditor)},function(e,t){BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var e=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-small-search-editor",height:20})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor)},function(e,t){BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-text-editor bi-border bi-focus-shadow",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",height:24})},_init:function(){BI.TextEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;BI.isNumber(e.height)&&this.element.css({height:e.height-2}),BI.isNumber(e.width)&&this.element.css({width:e.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:e.height-2,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,value:e.value,title:e.title,tipType:e.tipType,validationChecker:e.validationChecker,quitChecker:e.quitChecker,allowBlank:e.allowBlank,watermark:e.watermark,errorText:e.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(e){t.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(e){t.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(e){t.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(e){this.editor.setErrorText(e)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(e){this.editor.setValue(e)},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)},function(e,t){BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var e=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-small-text-editor",height:20})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor)},function(e,t){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 r=this,e=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:e.EDITOR_WIDTH,validationChecker:function(e){return r._checkValidation(e)}}),this.labelOne.element.hover(function(){r.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){r.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var e=r.valueOne,t=BI.parseFloat(this.getValue());r.valueOne=t;var i=r._getPercentByValue(t),n=BI.parseFloat(i.toFixed(1));r._setSliderOnePosition(n),r._setBlueTrack(),r._checkLabelPosition(e,r.valueTwo,r.valueOne,r.valueTwo),r.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:e.EDITOR_WIDTH,validationChecker:function(e){return r._checkValidation(e)}}),this.labelTwo.element.hover(function(){r.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){r.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var e=r.valueTwo,t=BI.parseFloat(this.getValue());r.valueTwo=t;var i=r._getPercentByValue(t),n=BI.parseFloat(i.toFixed(1));r._setSliderTwoPosition(n),r._setBlueTrack(),r._checkLabelPosition(r.valueOne,e,r.valueOne,r.valueTwo),r.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._draggable(this.sliderTwo,!1),this._setVisible(!1),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:e.TRACK_HEIGHT}]}],hgap:7,height:e.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]}},_rePosBySizeAfterMove:function(e,t){var i=this.options,n=100*e/this._getGrayTrackLength(),r=BI.parseFloat(n.toFixed(1)),o=this._getValueByPercent(r),o=this._assertValue(o);o=!1===i.digit?o:o.toFixed(i.digit);var a=this.valueOne,s=this.valueTwo;t?(this._setSliderOnePosition(r),this.labelOne.setValue(o),this.valueOne=o,this._checkLabelPosition(a,s,o,this.valueTwo)):(this._setSliderTwoPosition(r),this.labelTwo.setValue(o),this.valueTwo=o,this._checkLabelPosition(a,s,this.valueOne,o)),this._setBlueTrack()},_rePosBySizeAfterStop:function(e,t){var i=100*e/this._getGrayTrackLength(),n=BI.parseFloat(i.toFixed(1));t?this._setSliderOnePosition(n):this._setSliderTwoPosition(n)},_draggable:function(t,i){var n=this,r=(this.options,!1),o=0,a=0,s=0,l=new BI.MouseMoveTracker(function(e){l.isDragging()&&(r=!0,o=u(s+(a+=e)),t.element.addClass("dragging"),n._rePosBySizeAfterMove(o,i))},function(){!0===r&&(o=u(o),n._rePosBySizeAfterStop(o,i),a=o=0,s=o,r=!1),t.element.removeClass("dragging"),l.releaseMouseMoves(),n.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);function u(e){return BI.clamp(e,0,n._getGrayTrackLength())}t.element.on("mousedown",function(e){t.isEnabled()&&(u(s=this.offsetLeft),l.captureMouseMoves(e))})},_createLabelWrapper:function(){var e=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.labelOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.labelTwo,top:0,left:"100%"}]}],rgap:e.EDITOR_R_GAP,height:e.SLIDER_HEIGHT},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var e=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.sliderOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.sliderTwo,top:0,left:"100%"}]}],hgap:e.SLIDER_WIDTH_HALF,height:e.SLIDER_HEIGHT},top:20,left:0,width:"100%"}},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(e){var t=this.options,i=!1,n=(e+"").split(".")[1];return BI.isEmptyString(n)||BI.isNumeric(e)&&!(BI.isNull(e)||e<this.min||e>this.max)&&(i=!(!1!==t.digit&&!BI.isInteger(e))||(n=n||"").length===t.digit),i},_checkOverlap:function(){var e=this.labelOne.element[0].offsetLeft,t=this.labelTwo.element[0].offsetLeft;e<=t?t-e<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):e-t<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_checkLabelPosition:function(e,t,i,n,r){var o;e=BI.parseFloat(e),t=BI.parseFloat(t),i=BI.parseFloat(i),n=BI.parseFloat(n),(e<=t&&n<i||t<=e&&i<n)&&(o=BI.parseFloat(this.sliderOne.element[0].style.left)<BI.parseFloat(this.sliderTwo.element[0].style.left),this._resetLabelPosition(!o))},_resetLabelPosition:function(e){this.labelOne.element.css({left:e?"100%":"0%"}),this.labelTwo.element.css({left:e?"0%":"100%"})},_setSliderOnePosition:function(e){this.sliderOne.element.css({left:e+"%"})},_setSliderTwoPosition:function(e){this.sliderTwo.element.css({left:e+"%"})},_setBlueTrackLeft:function(e){this.blueTrack.element.css({left:e+"%"})},_setBlueTrackWidth:function(e){this.blueTrack.element.css({width:e+"%"})},_setBlueTrack:function(){var e=this._getPercentByValue(this.labelOne.getValue()),t=this._getPercentByValue(this.labelTwo.getValue());e<=t?(this._setBlueTrackLeft(e),this._setBlueTrackWidth(t-e)):(this._setBlueTrackLeft(t),this._setBlueTrackWidth(e-t))},_setAllPosition:function(e,t){this._setSliderOnePosition(e),this._setSliderTwoPosition(t),this._setBlueTrack()},_setVisible:function(e){this.sliderOne.setVisible(e),this.sliderTwo.setVisible(e),this.labelOne.setVisible(e),this.labelTwo.setVisible(e)},_setErrorText:function(){var e=BI.i18nText("BI-Basic_Please_Enter_Number_Between",this.min,this.max);this.labelOne.setErrorText(e),this.labelTwo.setErrorText(e)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(e){if(0===e)return this.min;if(100===e)return this.max;var t=this.calculation.accurateSubtraction(this.max,this.min),i=this.calculation.accurateMultiplication(t,e),n=this.calculation.accurateDivisionTenExponent(i,2);if(this.precision<0){var r=BI.parseFloat(this.calculation.accurateAddition(n,this.min)),o=Math.round(this.calculation.accurateDivisionTenExponent(r,-this.precision));return this.calculation.accurateMultiplication(o,Math.pow(10,-this.precision))}return BI.parseFloat(this.calculation.accurateAddition(n,this.min).toFixed(this.precision))},_getPercentByValue:function(e){return 100*(e-this.min)/(this.max-this.min)},_setDraggableEnable:function(e){this.sliderOne.setEnable(e),this.sliderTwo.setEnable(e)},_getPrecision:function(){var e=this.calculation.accurateSubtraction(this.max,this.min).toPrecision(4),t=[];if(-1<e.indexOf("e")){t=e.split("e");return BI.size(t[0].split(".")[1])-BI.parseInt(t[1].substring(1))}return 1<(t=e.split(".")).length?t[1].length:0},_assertValue:function(e){return e<=this.min?this.min:e>=this.max?this.max:e},_setEnable:function(e){BI.IntervalSlider.superclass._setEnable.apply(this,[e]),e?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.valueOne<=this.valueTwo?{min:this.valueOne,max:this.valueTwo}:{min:this.valueTwo,max:this.valueOne}},setMinAndMax:function(e){var t=BI.parseFloat(e.min),i=BI.parseFloat(e.max);!isNaN(t)&&!isNaN(i)&&t<=i&&(this.min=t,this.max=i,this.valueOne=t,this.valueTwo=i,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),i===t&&this._setDraggableEnable(!1)},setValue:function(e){var t=this.options,i=BI.parseFloat(e.min),n=BI.parseFloat(e.max),i=!1===t.digit?i:BI.parseFloat(i.toFixed(t.digit)),n=!1===t.digit?n:BI.parseFloat(n.toFixed(t.digit));isNaN(i)||isNaN(n)||(this._checkValidation(i)&&(this.valueOne=this.valueOne<=this.valueTwo?i:n),this._checkValidation(n)&&(this.valueTwo=this.valueOne<=this.valueTwo?n:i),i<this.min&&(this.valueOne=this.min),n>this.max&&(this.valueTwo=this.max))},reset:function(){this._setVisible(!1),this.enable=!1,this.valueOne="",this.valueTwo="",this.min=NaN,this.max=NaN,this._setBlueTrackWidth(0)},populate:function(){var e=this.options;isNaN(this.min)||isNaN(this.max)||(this.enable=!0,this._setVisible(!0),this._setErrorText(),(BI.isNumeric(this.valueOne)||BI.isNotEmptyString(this.valueOne))&&(BI.isNumeric(this.valueTwo)||BI.isNotEmptyString(this.valueTwo))?(this.labelOne.setValue(!1===e.digit?this.valueOne:BI.parseFloat(this.valueOne).toFixed(e.digit)),this.labelTwo.setValue(!1===e.digit?this.valueTwo:BI.parseFloat(this.valueTwo).toFixed(e.digit)),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)),this._resetLabelPosition(this.valueOne>this.valueTwo))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider)},function(e,t){BI.AccurateCalculationModel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this,arguments),{baseCls:""})},_init:function(){BI.AccurateCalculationModel.superclass._init.apply(this,arguments)},_getMagnitude:function(e){for(var t="1",i=0;i<e;i++)t+="0";return BI.parseInt(t)},_formatDecimal:function(e,t){if(e.numDecimalLength!==t.numDecimalLength){var i,n=e.numDecimalLength-t.numDecimalLength;0<n?i=t:(i=e,n=0-n);for(var r=0;r<n;r++)"0"===i.numDecimal&&0===r||(i.numDecimal+="0")}},_stringNumberFactory:function(e){var t,i,n=e.toString().split("."),r=n[0];return i=1===n.length?(t="0",0):(t=n[1],n[1].length),{numInteger:r,numDecimal:t,numDecimalLength:i}},_accurateSubtraction:function(e,t){var i=this._stringNumberFactory(e),n=this._stringNumberFactory(t),r=BI.parseInt(i.numInteger)-BI.parseInt(n.numInteger);this._formatDecimal(i,n);var o,a=function(e,t){if(e.numDecimal.length>=t.numDecimal.length)return e.numDecimal.length;return t.numDecimal.length}(i,n);o=BI.parseInt(i.numDecimal)>=BI.parseInt(n.numDecimal)?l((BI.parseInt(i.numDecimal)-BI.parseInt(n.numDecimal)).toString(),a):(r--,l((this._getMagnitude(a)+BI.parseInt(i.numDecimal)-BI.parseInt(n.numDecimal)).toString(),a));var s=r+"."+o;return BI.parseFloat(s);function l(e,t){for(var i=t-e.length,n=0;n<i;n++)e="0"+e;return e}},_accurateAddition:function(e,t){var i=this._stringNumberFactory(e),n=this._stringNumberFactory(t),r=BI.parseInt(i.numInteger)+BI.parseInt(n.numInteger);this._formatDecimal(i,n);var o=(BI.parseInt(i.numDecimal)+BI.parseInt(n.numDecimal)).toString();"0"!==o&&(o=o.length<=i.numDecimal.length?function(e,t){for(var i=t-e.length,n=0;n<i;n++)e="0"+e;return e}(o,i.numDecimal.length):(r++,o.slice(1)));var a=r+"."+o;return BI.parseFloat(a)},_accurateMultiplication:function(e,t){var i=this._stringNumberFactory(e),n=this._stringNumberFactory(t),r=BI.parseInt(i.numInteger)*BI.parseInt(n.numInteger),o=this._accurateDivisionTenExponent(BI.parseInt(i.numDecimal)*BI.parseInt(n.numInteger),i.numDecimalLength),a=this._accurateDivisionTenExponent(BI.parseInt(i.numInteger)*BI.parseInt(n.numDecimal),n.numDecimalLength),s=this._accurateDivisionTenExponent(BI.parseInt(i.numDecimal)*BI.parseInt(n.numDecimal),i.numDecimalLength+n.numDecimalLength);return this._accurateAddition(this._accurateAddition(this._accurateAddition(r,o),a),s)},_accurateDivisionTenExponent:function(e,t){var i,n,r=this._stringNumberFactory(e);n=r.numInteger.length>t?(i=r.numInteger.slice(0,r.numInteger.length-t),r.numInteger.slice(-t)):(i="0",function(e,t){for(var i=t-e.length,n=0;n<i;n++)e="0"+e;return e}(r.numInteger,t));var o=i+"."+n+r.numDecimal;return BI.parseFloat(o)},accurateSubtraction:function(e,t){return 0<=e&&0<=t?t<=e?this._accurateSubtraction(e,t):-this._accurateSubtraction(t,e):0<=e&&t<0?this._accurateAddition(e,-t):e<0&&0<=t?-this._accurateAddition(-e,t):e<0&&t<0?t<=e?this._accurateSubtraction(-t,-e):this._accurateSubtraction(-e,-t):void 0},accurateAddition:function(e,t){return 0<=e&&0<=t?this._accurateAddition(e,t):0<=e&&t<0?this.accurateSubtraction(e,-t):e<0&&0<=t?this.accurateSubtraction(t,-e):e<0&&t<0?-this._accurateAddition(-e,-t):void 0},accurateMultiplication:function(e,t){return 0<=e&&0<=t?this._accurateMultiplication(e,t):0<=e&&t<0?-this._accurateMultiplication(e,-t):e<0&&0<=t?-this._accurateMultiplication(-e,t):e<0&&t<0?this._accurateMultiplication(-e,-t):void 0},accurateDivisionTenExponent:function(e,t){return 0<=e?this._accurateDivisionTenExponent(e,t):-this._accurateDivisionTenExponent(-e,t)}})},function(e,t){BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-down-list-combo",height:24,items:[],adjustLength:0,direction:"bottom",trigger:"click",container:null,stopPropagation:!1,el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var i=this,e=this.options;this.popupview=BI.createWidget({type:"bi.multi_layer_down_list_popup",items:e.items,chooseType:e.chooseType,value:e.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(e){i.fireEvent(BI.DownListCombo.EVENT_CHANGE,e),i.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(e,t){i.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,e,t),i.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:e.trigger,isNeedAdjustWidth:!1,container:e.container,adjustLength:e.adjustLength,direction:e.direction,stopPropagation:e.stopPropagation,el:BI.createWidget(e.el,{type:"bi.icon_trigger",extraCls:e.iconCls?e.iconCls:"pull-down-font",width:e.width,height:e.height}),popup:{el:this.popupview,stopPropagation:e.stopPropagation,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){i.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(e){this.downlistcombo.showView(e)},populate:function(e){this.popupview.populate(e)},setValue:function(e){this.popupview.setValue(e)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_layer_down_list_combo",BI.DownListCombo)},function(e,t){BI.MultiLayerDownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var e=BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.MultiLayerDownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var s=this,e=this.options,t=this._createPopupItems(e.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(t,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(e.value),chooseType:e.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(e,t){var i,n,r,o,a=e;BI.isNotNull(s.childValueMap[e])?(a=s.childValueMap[e],n=((i=s.fatherValueMap[e])+"").split("_"),s.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE,a,1<n.length?n:i)):s.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE,a,t),BI.contains(s.singleValues,a)||(r=s.getValue(),o=[],BI.each(r,function(e,t){t.value!=a&&o.push(t)}),s.setValue(o))}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createPopupItems:function(r){var o=this,a=[];return BI.each(r,function(e,t){var i,n={type:"bi.down_list_group",items:[]};BI.each(t,function(e,r){BI.isNotEmptyArray(r.children)&&!BI.isEmpty(r.el)?(r.type="bi.combo_group",r.cls="down-list-group",r.trigger="hover",r.isNeedAdjustWidth=!1,r.el.title=r.el.title||r.el.text,r.el.type="bi.down_list_group_item",r.el.logic={dynamic:!0},r.el.height=o.constants.height,r.el.iconCls2=o.constants.nextIcon,r.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5},r.el.childValues=[],BI.each(r.children,function(e,t){t=t.el?BI.extend(t.el,{children:t.children}):t;var i=BI.deepClone(r.el.value),n=BI.deepClone(t.value);o.singleValues.push(t.value),t.type="bi.down_list_item",t.extraCls=" child-down-list-item",t.title=t.title||t.text,t.textRgap=10,t.isNeedAdjustWidth=!1,t.logic={dynamic:!0},t.father=i,o.fatherValueMap[o._createChildValue(i,n)]=i,o.childValueMap[o._createChildValue(i,n)]=n,t.value=o._createChildValue(i,n),r.el.childValues.push(t.value),BI.isNotEmptyArray(t.children)&&(t.type="bi.down_list_group_item",o._createChildren(t),t.height=o.constants.height,t.iconCls2=o.constants.nextIcon,r.el.childValues=BI.concat(r.el.childValues,t.childValues))})):(r.type="bi.down_list_item",r.title=r.title||r.text,r.textRgap=10,r.isNeedAdjustWidth=!1,r.logic={dynamic:!0});var t={};t.el=r,n.items.push(t)}),o._isGroup(n.items)&&BI.each(n.items,function(e,t){o.singleValues.push(t.el.value)}),a.push(n),o._needSpliter(e,r.length)&&(i=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",vgap:5,lgap:10}),a.push(i))}),a},_createChildren:function(r){var o=this;r.childValues=[],BI.each(r.children,function(e,t){var i=BI.deepClone(r.value),n=BI.deepClone(t.value);t.type="bi.down_list_item",t.title=t.title||t.text,t.textRgap=10,t.isNeedAdjustWidth=!1,t.logic={dynamic:!0},t.father=i,o.fatherValueMap[o._createChildValue(i,n)]=i,o.childValueMap[o._createChildValue(i,n)]=n,t.value=o._createChildValue(i,n),r.childValues.push(t.value)})},_isGroup:function(e){return 1<e.length},_needSpliter:function(e,t){return e<t-1},_createChildValue:function(e,t){var i=e;return BI.isArray(e)&&(i=e.join("_")),i+"_"+t},_digest:function(e){var n=this,r=[];return BI.each(e,function(e,t){var i=BI.isNotNull(t.childValue)?n._createChildValue(t.value,t.childValue):t.value;r.push(i)}),r},_checkValues:function(u){var e=this.options,c=[];return BI.each(e.items,function(l,e){BI.each(e,function(e,t){var i,n,r,o,a;BI.isNotNull(t.children)?(i=function s(e){var i=[];BI.isNotNull(e.children)?BI.each(e.children,function(e,t){i=BI.concat(i,s(t))}):i.push(e.value);return i}(t),r=i,o=u[l],a="",BI.some(r,function(e,i){return BI.some(o,function(e,t){if(i===t)return a=i,!0})}),n=a,BI.isNotEmptyString(n)&&c.push(n)):t.value===u[l][0]&&c.push(u[l][0])})}),c},populate:function(e){BI.MultiLayerDownListPopup.superclass.populate.apply(this,arguments);this.childValueMap={},this.fatherValueMap={},this.singleValues=[];var t=this._createPopupItems(e),i=BI.createItems(t,{},{adjustLength:-2});this.popup.populate(i)},setValue:function(e){this.popup.setValue(this._digest(e))},_getValue:function(){var i=[];return BI.each(this.popup.getAllButtons(),function(e,t){e%2==0&&i.push(t.getValue())}),i},getValue:function(){var o=this,a=[],e=this._checkValues(this._getValue());return BI.each(e,function(e,t){var i,n,r={};BI.isNotNull(o.childValueMap[t])?(i=o.fatherValueMap[t],r.childValue=o.childValueMap[t],n=(i+"").split("_"),r.value=1<n.length?n:i):r.value=t,a.push(r)}),a}}),BI.MultiLayerDownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.multi_layer_down_list_popup",BI.MultiLayerDownListPopup)},function(e,t){BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-combo",isDefaultInit:!1,height:24,text:"",itemsCreator:BI.emptyFn,items:[],value:"",attributes:{tabIndex:0},allowEdit:!1,allowSearchValue:!1,allowInsertValue:!1})},render:function(){var t=this,e=this.options,i=e.itemsCreator===BI.emptyFn?this._getSyncConfig():this._getAsyncConfig();return e.allowEdit||e.itemsCreator!==BI.emptyFn?{type:"bi.absolute",items:[{el:i,left:0,right:0,top:0,bottom:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(e){t.triggerBtn=e},width:e.height,height:e.height,handler:function(){t.combo.isViewVisible()?t.combo.hideView():t.combo.showView()}},right:0,bottom:0,top:0}]}:i},_getBaseConfig:function(){var t=this,e=this.options;return{type:"bi.combo",container:e.container,destroyWhenHide:e.destroyWhenHide,adjustLength:2,ref:function(e){t.combo=e},popup:{el:{type:"bi.multilayer_select_tree_popup",isDefaultInit:e.isDefaultInit,itemsCreator:e.itemsCreator,items:e.items,ref:function(e){t.trigger&&t.trigger.getSearcher().setAdapter(e)},listeners:[{eventName:BI.MultiLayerSelectTreePopup.EVENT_CHANGE,action:function(){t.setValue(this.getValue()),t.combo.hideView(),t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)}}],onLoaded:function(){BI.nextTick(function(){t.combo.adjustWidth(),t.combo.adjustHeight()})}},value:e.value,maxHeight:400,minHeight:240},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW)}}]}},_getSearchConfig:function(){var t=this,i=this.options;return{el:{type:"bi.multilayer_select_tree_trigger",container:i.container,allowInsertValue:i.allowInsertValue,allowSearchValue:i.allowSearchValue,allowEdit:i.allowEdit,cls:"multilayer-select-tree-trigger",ref:function(e){t.trigger=e},items:i.items,itemsCreator:i.itemsCreator,valueFormatter:i.valueFormatter,watermark:i.watermark,height:i.height-2,text:i.text,value:i.value,tipType:i.tipType,warningTitle:i.warningTitle,title:i.title,listeners:[{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE,action:function(){t.setValue(this.getValue()),t.combo.hideView(),t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS,action:function(){t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_FOCUS)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_BLUR,action:function(){t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BLUR)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING,action:function(){t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,action:function(){var e=t.trigger.getSearcher().getKeyword();t.combo.setValue([e]),t.combo.hideView()}}]},toggle:!i.allowEdit,hideChecker:function(e){return!(i.container&&t.trigger.getSearcher().isSearching()&&0<t.trigger.getSearcher().getView().element.find(e.target).length)&&0===t.triggerBtn.element.find(e.target).length},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){t.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW)}}]}},_getSyncConfig:function(){var e=this.options,t=this._getBaseConfig();return BI.extend(t,e.allowEdit?this._getSearchConfig():{el:{type:"bi.single_tree_trigger",text:e.text,height:e.height,items:e.items,value:e.value}})},_getAsyncConfig:function(){var e=this._getBaseConfig();return BI.extend(e,this._getSearchConfig())},setValue:function(e){e=BI.isArray(e)?e:[e],this.combo.setValue(e)},getValue:function(){return this.combo.getValue()},populate:function(e){this.combo.populate(e)}}),BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiLayerSelectTreeCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiLayerSelectTreeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo)},function(e,t){BI.MultiLayerSelectTreeInsertSearchPane=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[],value:""}},render:function(){var i=this,n=this.options;return this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:n.isDefaultInit,items:n.items,itemsCreator:n.itemsCreator===BI.emptyFn?BI.emptyFn:function(e,t){n.itemsCreator(e,function(e){t(e),i.setKeyword(n.keywordGetter())})},keywordGetter:n.keywordGetter,value:n.value,scrollable:null,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.MultiLayerSelectLevelTree.EVENT_CHANGE,action:function(){i.fireEvent(BI.MultiLayerSelectTreeInsertSearchPane.EVENT_CHANGE)}}]}),{type:"bi.vertical",scrolly:!1,scrollable:!0,vgap:5,items:[{type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:24,cls:"bi-high-light",hgap:5,ref:function(e){i.addNotMatchTip=e},handler:function(){i.fireEvent(BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM,n.keywordGetter())}},this.tree]}},setKeyword:function(e){var t=BI.isEmptyArray(this.tree.getAllLeaves());this.addNotMatchTip.setVisible(t),t&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",e))},getValue:function(){return this.tree.getValue()},setValue:function(e){e=BI.isArray(e)?e:[e],this.tree.setValue(e)},populate:function(e){this.tree.populate(e)}}),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)},function(e,t){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 e=this.options;BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.storeValue=e.value,this.initTree(this.options.items),this.check()},_formatItems:function(n,r,o){var a=this,s=this.options.keywordGetter();return BI.each(n,function(e,t){var i={};t.layer=r,BI.isKey(t.id)||(t.id=BI.UUID()),t.keyword=t.keyword||s,i.pNode=o,!0===t.isParent||!0===t.parent||BI.isNotEmptyArray(t.children)?(i.type="bi.multilayer_select_tree_mid_plus_group_node",e===n.length-1&&(i.type="bi.multilayer_select_tree_last_plus_group_node",i.isLastNode=!0),0!==e||o||(i.type="bi.multilayer_select_tree_first_plus_group_node"),0!==e||e!==n.length-1||o||(i.type="bi.multilayer_select_tree_plus_group_node"),BI.defaults(t,i),a._formatItems(t.children,r+1,t)):(i.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==e||o||(i.type="bi.multilayer_single_tree_first_tree_leaf_item"),e===n.length-1&&(i.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(t,i))}),n},_assertId:function(e){BI.each(e,function(e,t){t.id=t.id||BI.UUID()})},initTree:function(e){var n=this,r=this.options,o=!1;this.empty(),this._assertId(e),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{type:"bi.select_tree_expander",isDefaultInit:r.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(e),0),itemsCreator:function(t,i){1!==t.times||t.node||BI.nextTick(function(){n.loading()}),r.itemsCreator(t,function(e){o=e.hasNext,1!==t.times||t.node||n._populate(e.items),i(n._formatItems(BI.Tree.transformToTreeFormat(e.items),t.node?t.node.layer+1:0,t.node)),n.setValue(n.storeValue),1!==t.times||t.node||BI.nextTick(function(){n.loaded()})})},value:r.value,el:{type:"bi.loader",isDefaultInit:r.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:r.chooseType,behaviors:r.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return o}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(e,t){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&(n.setValue(t),n.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:r.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(e){this._populate(e),BI.isNull(e)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(e),0))},setValue:function(e){this.options.chooseType===BI.Selection.None||(this.storeValue=e,this.tree.setValue(e))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:BI.isNull(this.storeValue)?[]:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(e){return this.tree.getNodeById(e)},getNodeByValue:function(e){return this.tree.getNodeByValue(e)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree)},function(e,t){BI.MultiLayerSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[],value:"",onLoaded:BI.emptyFn,minHeight:240})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:t.isDefaultInit,items:t.items,itemsCreator:t.itemsCreator,keywordGetter:t.keywordGetter,value:t.value,scrollable:null,onLoaded:function(){e.tree.check(),t.onLoaded()}}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){e.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)}),this.tree.css("min-height",t.minHeight-10)},getValue:function(){return this.tree.getValue()},setValue:function(e){e=BI.isArray(e)?e:[e],this.tree.setValue(e)},populate:function(e){this.tree.populate(e)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup)},function(e,t){BI.MultiLayerSelectTreeTrigger=BI.inherit(BI.Trigger,{props:function(){return{extraCls:"bi-multi-layer-select-tree-trigger bi-border bi-focus-shadow bi-border-radius",height:24,valueFormatter:function(e){return e},itemsCreator:BI.emptyFn,watermark:BI.i18nText("BI-Basic_Search"),allowSearchValue:!1,title:BI.bind(this._getShowText,this)}},render:function(){var n=this,r=this.options;r.itemsCreator===BI.emptyFn&&this._initData();var e={type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){n.searcher=this},masker:BI.isNotNull(r.container)?{offset:{},container:r.container}:{offset:{}},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){n.editor=this},defaultText:r.text,text:this._digest(r.value),value:r.value,height:r.height,tipText:"",watermark:r.watermark,listeners:[{eventName:BI.StateEditor.EVENT_FOCUS,action:function(){n.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS)}},{eventName:BI.StateEditor.EVENT_BLUR,action:function(){n.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_BLUR)}},{eventName:BI.StateEditor.EVENT_CHANGE,action:function(){n.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING)}}]},popup:{type:r.allowInsertValue?"bi.multilayer_select_tree_insert_search_pane":"bi.multilayer_select_tree_popup",itemsCreator:r.itemsCreator===BI.emptyFn?BI.emptyFn:function(e,t){e.keyword=n.editor.getValue(),r.itemsCreator(e,t)},keywordGetter:function(){return n.editor.getValue()},cls:"bi-card",listeners:[{eventName:BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM,action:function(){n.options.text=n.getSearcher().getKeyword(),n.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM)}}],ref:function(e){n.popup=e}},onSearch:function(e,t){var i=e.keyword;r.itemsCreator===BI.emptyFn?(t(n._getSearchItems(i)),r.allowInsertValue&&n.popup.setKeyword(i)):t()},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){n.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]};return r.allowEdit?e:{type:"bi.absolute",items:[{el:e,left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}},_initData:function(){var e=this.options;this.tree=new BI.Tree,this.nodes=BI.Tree.treeFormat(BI.deepClone(e.items)),this.tree.initTree(this.nodes)},_getSearchItems:function(i){var n=this,r=this.options,o=[];return this.tree.traverse(function(e){var t=BI.Func.getSearchResult(n.tree.isRoot(e)?[]:BI.concat([e.text],r.allowSearchValue?[e.value]:[]),i);if(0<t.find.length||0<t.match.length)return o.push(e),!0}),this._fillTreeStructure4Search(o,"id")},_createJson:function(e,t){return{id:e.id,pId:e.pId,text:e.text,value:e.value,isParent:BI.isNotEmptyArray(e.children),open:t}},_getChildren:function(e){var n=this;e.children=e.children||[];var r=[];return BI.each(e.children,function(e,t){var i=n._getChildren(t);r=r.concat(i)}),e.children.concat(r)},_fillTreeStructure4Search:function(e){var i=this,n=[],r=[];for(BI.each(e,function(e,t){r.push({pId:t.pId}),n.push(t),n=n.concat(i._getChildren(t))});BI.isNotEmptyArray(r);){var t=r.pop(),o=this.tree.search(this.tree.getRoot(),t.pId,"id");null!=o&&(o.open=!0,r.push({pId:o.pId}),n.push(o))}return BI.uniqBy(BI.map(n,function(e,t){return i._createJson(t,t.open)}),"id")},_digest:function(i){var e=this.options;if(e.itemsCreator!==BI.emptyFn)return e.valueFormatter(i);var t=BI.find(e.items,function(e,t){return t.value===i});return BI.isNotNull(t)?t.text:e.text},_getShowText:function(){return this.editor.getText()},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(e){this.options.items=e,this._initData(e)},setValue:function(e){this.editor.setState(this._digest(e[0]))},getValue:function(){return this.searcher.getValue()}}),BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiLayerSelectTreeTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiLayerSelectTreeTrigger.EVENT_STOP="EVENT_STOP",BI.MultiLayerSelectTreeTrigger.EVENT_START="EVENT_START",BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multilayer_select_tree_trigger",BI.MultiLayerSelectTreeTrigger)},function(e,t){BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var t=this,i=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:i.id,pId:i.pId,keyword:i.keyword,open:i.open,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(e){t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(e){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(e)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(e)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode)},function(e,t){BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var t=this,i=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:i.id,pId:i.pId,keyword:i.keyword,open:i.open,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(e){t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(e){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(e)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(e)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode)},function(e,t){BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var t=this,i=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:i.id,pId:i.pId,keyword:i.keyword,open:i.open,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(e){t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(e){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(e)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(e)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode)},function(e,t){BI.MultiLayerSelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.MultiLayerSelectTreePlusGroupNode.superclass._init.apply(this,arguments);var t=this,i=this.options;this.node=BI.createWidget({type:"bi.select_tree_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:i.id,pId:i.pId,keyword:i.keyword,open:i.open,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(e){t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(e){BI.MultiLayerSelectTreePlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(e)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(e)}}),BI.shortcut("bi.multilayer_select_tree_plus_group_node",BI.MultiLayerSelectTreePlusGroupNode)},function(e,t){BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-tree-combo",isDefaultInit:!1,height:24,text:"",itemsCreator:BI.emptyFn,items:[],value:"",attributes:{tabIndex:0},allowEdit:!1,allowSearchValue:!1,allowInsertValue:!1})},render:function(){var t=this,e=this.options,i=e.itemsCreator===BI.emptyFn?this._getSyncConfig():this._getAsyncConfig();return e.allowEdit||e.itemsCreator!==BI.emptyFn?{type:"bi.absolute",items:[{el:i,left:0,right:0,top:0,bottom:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(e){t.triggerBtn=e},width:e.height,height:e.height,handler:function(){t.combo.isViewVisible()?t.combo.hideView():t.combo.showView()}},right:0,bottom:0,top:0}]}:i},_getBaseConfig:function(){var t=this,e=this.options;return{type:"bi.combo",container:e.container,destroyWhenHide:e.destroyWhenHide,adjustLength:2,ref:function(e){t.combo=e},popup:{el:{type:"bi.multilayer_single_tree_popup",isDefaultInit:e.isDefaultInit,itemsCreator:e.itemsCreator,items:e.items,ref:function(e){t.trigger&&t.trigger.getSearcher().setAdapter(e)},listeners:[{eventName:BI.MultiLayerSingleTreePopup.EVENT_CHANGE,action:function(){t.setValue(this.getValue()),t.combo.hideView(),t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)}}],onLoaded:function(){BI.nextTick(function(){t.combo.adjustWidth(),t.combo.adjustHeight()})}},value:e.value,maxHeight:400,minHeight:240},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW)}}]}},_getSearchConfig:function(){var t=this,i=this.options;return{el:{type:"bi.multilayer_single_tree_trigger",container:i.container,allowInsertValue:i.allowInsertValue,allowSearchValue:i.allowSearchValue,allowEdit:i.allowEdit,cls:"multilayer-single-tree-trigger",ref:function(e){t.trigger=e},watermark:i.watermark,items:i.items,itemsCreator:i.itemsCreator,valueFormatter:i.valueFormatter,height:i.height-2,text:i.text,value:i.value,tipType:i.tipType,warningTitle:i.warningTitle,title:i.title,listeners:[{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE,action:function(){t.setValue(this.getValue()),t.combo.hideView(),t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS,action:function(){t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_FOCUS)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_BLUR,action:function(){t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BLUR)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING,action:function(){t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,action:function(){var e=t.trigger.getSearcher().getKeyword();t.combo.setValue([e]),t.combo.hideView()}}]},toggle:!i.allowEdit,hideChecker:function(e){return!(i.container&&t.trigger.getSearcher().isSearching()&&0<t.trigger.getSearcher().getView().element.find(e.target).length)&&0===t.triggerBtn.element.find(e.target).length},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){t.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW)}}]}},_getSyncConfig:function(){var e=this.options,t=this._getBaseConfig();return BI.extend(t,e.allowEdit?this._getSearchConfig():{el:{type:"bi.single_tree_trigger",text:e.text,height:e.height,items:e.items,value:e.value}})},_getAsyncConfig:function(){var e=this._getBaseConfig();return BI.extend(e,this._getSearchConfig())},setValue:function(e){e=BI.isArray(e)?e:[e],this.combo.setValue(e)},getValue:function(){return this.combo.getValue()},populate:function(e){this.combo.populate(e)}}),BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiLayerSingleTreeCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiLayerSingleTreeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo)},function(e,t){BI.MultiLayerSingleTreeInsertSearchPane=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-multilayer-single-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[],value:""}},render:function(){var i=this,n=this.options;return this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:n.isDefaultInit,items:n.items,itemsCreator:n.itemsCreator===BI.emptyFn?BI.emptyFn:function(e,t){n.itemsCreator(e,function(e){t(e),i.setKeyword(n.keywordGetter())})},keywordGetter:n.keywordGetter,value:n.value,scrollable:null,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.MultiLayerSelectLevelTree.EVENT_CHANGE,action:function(){i.fireEvent(BI.MultiLayerSingleTreeInsertSearchPane.EVENT_CHANGE)}}]}),{type:"bi.vertical",scrolly:!1,scrollable:!0,vgap:5,items:[{type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:24,cls:"bi-high-light",hgap:5,ref:function(e){i.addNotMatchTip=e},handler:function(){i.fireEvent(BI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM,n.keywordGetter())}},this.tree]}},setKeyword:function(e){var t=BI.isEmptyArray(this.tree.getAllLeaves());this.addNotMatchTip.setVisible(t),t&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",e))},getValue:function(){return this.tree.getValue()},setValue:function(e){e=BI.isArray(e)?e:[e],this.tree.setValue(e)},populate:function(e){this.tree.populate(e)}}),BI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiLayerSingleTreeInsertSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_insert_search_pane",BI.MultiLayerSingleTreeInsertSearchPane)},function(e,t){BI.MultiLayerSingleLevelTree=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,chooseType:BI.Selection.Single,scrollable:!0})},_init:function(){var e=this.options;BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.storeValue=e.value,this.initTree(this.options.items),this.check()},_formatItems:function(n,r,o){var a=this,s=this.options.keywordGetter();return BI.each(n,function(e,t){var i={};t.layer=r,BI.isKey(t.id)||(t.id=BI.UUID()),t.keyword=t.keyword||s,i.pNode=o,!0===t.isParent||!0===t.parent||BI.isNotEmptyArray(t.children)?(i.type="bi.multilayer_single_tree_mid_plus_group_node",e===n.length-1&&(i.type="bi.multilayer_single_tree_last_plus_group_node",i.isLastNode=!0),0!==e||o||(i.type="bi.multilayer_single_tree_first_plus_group_node"),0!==e||e!==n.length-1||o||(i.type="bi.multilayer_single_tree_plus_group_node"),BI.defaults(t,i),a._formatItems(t.children,r+1,t)):(i.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==e||o||(i.type="bi.multilayer_single_tree_first_tree_leaf_item"),e===n.length-1&&(i.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(t,i))}),n},_assertId:function(e){BI.each(e,function(e,t){t.id=t.id||BI.UUID()})},initTree:function(e){var n=this,r=this.options,o=!1;this.empty(),this._assertId(e),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{isDefaultInit:r.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(e),0),value:r.value,itemsCreator:function(t,i){1!==t.times||t.node||BI.nextTick(function(){n.loading()}),r.itemsCreator(t,function(e){o=e.hasNext,1!==t.times||t.node||n._populate(e.items),i(n._formatItems(BI.Tree.transformToTreeFormat(e.items),t.node?t.node.layer+1:0,t.node)),n.setValue(n.storeValue),1!==t.times||t.node||BI.nextTick(function(){n.loaded()})})},el:{type:"bi.loader",isDefaultInit:r.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:r.chooseType,behaviors:r.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return o}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(e,t){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&(n.setValue(t),n.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,t))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:r.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(e){this._populate(e),BI.isNull(e)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(e),0))},setValue:function(e){this.options.chooseType===BI.Selection.None||(this.storeValue=e,this.tree.setValue(e))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:BI.isNull(this.storeValue)?[]:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(e){return this.tree.getNodeById(e)},getNodeByValue:function(e){return this.tree.getNodeByValue(e)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree)},function(e,t){BI.MultiLayerSingleTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[],onLoaded:BI.emptyFn,minHeight:240})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:t.isDefaultInit,items:t.items,itemsCreator:t.itemsCreator,keywordGetter:t.keywordGetter,value:t.value,scrollable:null,onLoaded:function(){e.tree.check(),t.onLoaded()}}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){e.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)}),this.tree.css("min-height",t.minHeight-10)},getValue:function(){return this.tree.getValue()},setValue:function(e){e=BI.isArray(e)?e:[e],this.tree.setValue(e)},populate:function(e){this.tree.populate(e)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup)},function(e,t){BI.MultiLayerSingleTreeTrigger=BI.inherit(BI.Trigger,{props:function(){return{extraCls:"bi-multi-layer-single-tree-trigger bi-border bi-focus-shadow bi-border-radius",height:24,valueFormatter:function(e){return e},itemsCreator:BI.emptyFn,watermark:BI.i18nText("BI-Basic_Search"),allowSearchValue:!1,title:BI.bind(this._getShowText,this)}},render:function(){var n=this,r=this.options;r.itemsCreator===BI.emptyFn&&this._initData();var e={type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){n.searcher=this},masker:BI.isNotNull(r.container)?{offset:{},container:r.container}:{offset:{}},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){n.editor=this},defaultText:r.text,text:this._digest(r.value),value:r.value,height:r.height,tipText:"",watermark:r.watermark,listeners:[{eventName:BI.StateEditor.EVENT_FOCUS,action:function(){n.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS)}},{eventName:BI.StateEditor.EVENT_BLUR,action:function(){n.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_BLUR)}},{eventName:BI.StateEditor.EVENT_CHANGE,action:function(){n.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING)}}]},popup:{type:r.allowInsertValue?"bi.multilayer_single_tree_insert_search_pane":"bi.multilayer_single_tree_popup",itemsCreator:r.itemsCreator===BI.emptyFn?BI.emptyFn:function(e,t){e.keyword=n.editor.getValue(),r.itemsCreator(e,t)},keywordGetter:function(){return n.editor.getValue()},cls:"bi-card",listeners:[{eventName:BI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM,action:function(){n.options.text=n.getSearcher().getKeyword(),n.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM)}}],ref:function(e){n.popup=e}},onSearch:function(e,t){var i=e.keyword;r.itemsCreator===BI.emptyFn?(t(n._getSearchItems(i)),r.allowInsertValue&&n.popup.setKeyword(i)):t()},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){n.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]};return r.allowEdit?e:{type:"bi.absolute",items:[{el:e,left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}},_initData:function(){var e=this.options;this.tree=new BI.Tree,this.nodes=BI.Tree.treeFormat(BI.deepClone(e.items)),this.tree.initTree(this.nodes)},_getSearchItems:function(i){var n=this,r=this.options,o=[];return this.tree.traverse(function(e){var t=BI.Func.getSearchResult(n.tree.isRoot(e)?[]:BI.concat([e.text],r.allowSearchValue?[e.value]:[]),i);if(0<t.find.length||0<t.match.length)return o.push(e),!0}),this._fillTreeStructure4Search(o,"id")},_createJson:function(e,t){return{id:e.id,pId:e.pId,text:e.text,value:e.value,isParent:BI.isNotEmptyArray(e.children),open:t}},_getChildren:function(e){var n=this;e.children=e.children||[];var r=[];return BI.each(e.children,function(e,t){var i=n._getChildren(t);r=r.concat(i)}),e.children.concat(r)},_fillTreeStructure4Search:function(e){var i=this,n=[],r=[];for(BI.each(e,function(e,t){r.push({pId:t.pId}),n.push(t),n=n.concat(i._getChildren(t))});BI.isNotEmptyArray(r);){var t=r.pop(),o=this.tree.search(this.tree.getRoot(),t.pId,"id");null!=o&&(o.open=!0,r.push({pId:o.pId}),n.push(o))}return BI.uniqBy(BI.map(n,function(e,t){return i._createJson(t,t.open)}),"id")},_digest:function(i){var e=this.options;if(e.itemsCreator!==BI.emptyFn)return e.valueFormatter(i);var t=BI.find(e.items,function(e,t){return t.value===i});return BI.isNotNull(t)?t.text:e.text},_getShowText:function(){return this.editor.getText()},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(e){this.options.items=e,this._initData()},setValue:function(e){this.editor.setState(this._digest(e[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)},function(e,t){BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{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 t=this.options;this.node=this._createNode();for(var i=[],e=t.pNode;e;)e.isLastNode&&i.push(e.layer),e=e.pNode;var n=[];BI.count(0,t.layer,function(e){n.push({type:"bi.layout",cls:BI.contains(i,e)?"":"base-line-conn-background",width:12,height:t.height})}),n.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(t.layer,12),items:[n]})},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(e){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(e)},_createNode:function(){var t=this,e=this.options;return BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:e.id,pId:e.pId,open:e.open,isLastNode:e.isLastNode,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode)},function(e,t){BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{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 t=this.options;this.node=this._createNode();for(var i=[],e=t.pNode;e;)e.isLastNode&&i.push(e.layer),e=e.pNode;var n=[];BI.count(0,t.layer,function(e){n.push({type:"bi.layout",cls:BI.contains(i,e)?"":"base-line-conn-background",width:12,height:t.height})}),n.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(t.layer,12),items:[n]})},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(e){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(e)},_createNode:function(){var t=this,e=this.options;return BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:e.id,pId:e.pId,open:e.open,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode)},function(e,t){BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var t=this.options;this.node=this._createNode();for(var i=[],e=t.pNode;e;)e.isLastNode&&i.push(e.layer),e=e.pNode;var n=[];BI.count(0,t.layer,function(e){n.push({type:"bi.layout",cls:BI.contains(i,e)?"":"base-line-conn-background",width:12,height:t.height})}),n.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(t.layer,12),items:[n]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(e)},_createNode:function(){var t=this,e=this.options;return BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:e.id,pId:e.pId,open:e.open,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode)},function(e,t){BI.MultiLayerSingleTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSingleTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-single-tree-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24})},_init:function(){BI.MultiLayerSingleTreePlusGroupNode.superclass._init.apply(this,arguments);var t=this.options;this.node=this._createNode();for(var i=[],e=t.pNode;e;)e.isLastNode&&i.push(e.layer),e=e.pNode;var n=[];BI.count(0,t.layer,function(e){n.push({type:"bi.layout",cls:BI.contains(i,e)?"":"base-line-conn-background",width:12,height:t.height})}),n.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(t.layer,12),items:[n]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreePlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSingleTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(e)},_createNode:function(){var t=this,e=this.options;return BI.createWidget({type:"bi.plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:e.id,pId:e.pId,open:e.open,isLastNode:e.isLastNode,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_plus_group_node",BI.MultiLayerSingleTreePlusGroupNode)},function(e,t){BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:24})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var t=this,i=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:i.id,pId:i.pId,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py,keyword:i.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(e){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(e)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem)},function(e,t){BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:24})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var t=this,i=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:i.id,pId:i.pId,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py,keyword:i.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(e){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(e)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem)},function(e,t){BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:24})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var t=this,i=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:i.id,pId:i.pId,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py,keyword:i.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(e){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(e)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem)},function(e,t){BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:12,lgap:10,tgap:10,bgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var i=this,n=this.options;this.storeValue=n.value||{},this.display=BI.createWidget({type:"bi.display_selected_list",items:n.items,itemsCreator:function(e,t){e=BI.extend(e||{},{selectedValues:i.storeValue.value}),i.storeValue.type!==BI.Selection.Multi?n.itemsCreator(e,t):t({items:BI.map(i.storeValue.value,function(e,t){var i=n.valueFormatter(t)||t;return{text:i,value:t,title:i}})})}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){n.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.vertical_adapt",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap},{el:this.continueSelect,lgap:this.constants.lgap}]},tgap:this.constants.tgap},{height:"fill",el:this.display,tgap:this.constants.bgap}]})},setValue:function(e){this.storeValue=e||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane)},function(e,t){BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:24,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var i=this,n=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(n.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(e,t){n.itemsCreator(e,function(e){i.hasNext=!!e.hasNext,t(i._createItems(e.items))})},hasNext:function(){return i.hasNext}})},_createItems:function(e){return BI.createItems(e,{type:"bi.icon_text_item",cls:"cursor-default check-font icon-size-12 display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(e){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(e))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList)},function(e,t){BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.MultiSelectCombo.superclass._init.apply(this,arguments);var i=this,e=this.options,n=function(){BI.isKey(i._startValue)&&(i.storeValue.type===BI.Selection.All?(BI.remove(i.storeValue.value,i._startValue),i.storeValue.assist=i.storeValue.assist||[],i.storeValue.assist.pushDistinct(i._startValue)):(BI.pushDistinct(i.storeValue.value,i._startValue),BI.remove(i.storeValue.assist,i._startValue))),i.trigger.getSearcher().setState(i.storeValue),i.numberCounter.setButtonChecked(i.storeValue)};this.storeValue=e.value||{},this._assertValue(this.storeValue),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:e.allowEdit,height:e.height,text:e.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:this.storeValue}),this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){i.fireEvent(BI.MultiSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){i.fireEvent(BI.MultiSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){i._setStartValue(""),this.getSearcher().setValue(i.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){i._setStartValue(""),i.fireEvent(BI.MultiSelectCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){var e;this.getSearcher().hasMatched()&&(e=this.getSearcher().getKeyword(),i._join({type:BI.Selection.Multi,value:[e]},function(){i.combo.setValue(i.storeValue),i._setStartValue(e),n(),i.populate(),i._setStartValue("")}))}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&i._joinKeywords(e,function(){BI.isEndWithBlank(t)?(i.combo.setValue(i.storeValue),n(),i.combo.populate(),i._setStartValue("")):(i.combo.setValue(i.storeValue),n())}),i.fireEvent(BI.MultiSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(e,t){t instanceof BI.MultiSelectBar?i._joinAll(this.getValue(),function(){n()}):i._join(this.getValue(),function(){n()}),i.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){i.numberCounter.updateSelectedValue(i.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){i.combo.isViewVisible()||i.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!e.allowEdit,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){i.popup=this,i.trigger.setAdapter(this),i.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){i.storeValue=this.getValue(),i._adjust(function(){n()}),i.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){i._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){i.setValue(),i._defaultState()}}],itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){i.combo.adjustWidth(),i.combo.adjustHeight(),i.numberCounter.adjustView(),i.trigger.getSearcher().adjustView()})}},value:e.value,hideChecker:function(e){return 0===t.element.find(e.target).length&&0===i.numberCounter.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(i.storeValue),BI.nextTick(function(){i._populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){i._stopEditing(),!0===i.requesting?i.wants2Quit=!0:i.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){i.numberCounter.hideView(),i.combo.isViewVisible()?i.combo.hideView():i.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:this.storeValue}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){i.combo.isViewVisible()||i.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){this.updateSelectedValue(i.storeValue)}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){i.trigger.refreshPlaceHolderWidth(!0===e?i.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<i.trigger.element.find(e.target).length&&i.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.height}]})},_itemsCreator4Trigger:function(t,i){var n=this;this.options.itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(BI.deepClone(n.getValue())),i.apply(n,arguments)})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(r,o){var a=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:r},function(e){var t,i,n=BI.map(e.items,"value");t=n,i=a._makeMap(t),BI.each(r,function(e,t){BI.isNotNull(i[t])&&(a.storeValue.type===BI.Selection.Multi?BI.pushDistinct(a.storeValue.value,t):BI.remove(a.storeValue.value,t))}),a._adjust(o)})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,u.storeValue.assist&&u.storeValue.assist.push(r[t]),delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void u._adjust(l)}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&(u.storeValue.assist&&u.storeValue.assist.push(o[i[e]]),delete o[i[e]]),BI.isNull(a[i[e]])&&(BI.remove(u.storeValue.assist,t),s.push(t))}),u.storeValue.value=s.concat(BI.values(o)),u._adjust(l)})},_adjust:function(e){var t=this;this.options;!function(){!0===t.wants2Quit&&(t.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),t.wants2Quit=!1);t.requesting=!1}(),e()},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),BI.remove(i.storeValue.assist,t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,i.storeValue.assist&&i.storeValue.assist.push(n[t]),delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void i._adjust(t)}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},_populate:function(){this.combo.populate.apply(this.combo,arguments)},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue),this.numberCounter.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._populate.apply(this,arguments),this.numberCounter.populateSwitcher.apply(this.numberCounter,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo)},function(e,t){BI.MultiSelectNoBarCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo-no-bar",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0}})},_init:function(){BI.MultiSelectNoBarCombo.superclass._init.apply(this,arguments);var i=this,e=this.options,n=function(){BI.isKey(i._startValue)&&(i.storeValue.type===BI.Selection.All?(BI.remove(i.storeValue.value,i._startValue),i.storeValue.assist=i.storeValue.assist||[],i.storeValue.assist.pushDistinct(i._startValue)):(BI.pushDistinct(i.storeValue.value,i._startValue),BI.remove(i.storeValue.assist,i._startValue))),i.trigger.getSearcher().setState(i.storeValue),i.numberCounter.setButtonChecked(i.storeValue)};this.storeValue={type:BI.Selection.Multi,value:e.value||[]},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:e.height,text:e.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:{type:BI.Selection.Multi,value:e.value}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){i.fireEvent(BI.MultiSelectNoBarCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){i.fireEvent(BI.MultiSelectNoBarCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){i._setStartValue(""),this.getSearcher().setValue(i.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){i._setStartValue(""),i.fireEvent(BI.MultiSelectNoBarCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&i._joinKeywords(e,function(){BI.isEndWithBlank(t)?(i.combo.setValue(i.storeValue),n(),i.combo.populate(),i._setStartValue("")):(i.combo.setValue(i.storeValue),n())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(e,t){t instanceof BI.MultiSelectBar?i._joinAll(this.getValue(),function(){n()}):i._join(this.getValue(),function(){n()}),i.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){i.numberCounter.updateSelectedValue(i.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){i.combo.isViewVisible()||i.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_no_bar_popup_view",ref:function(){i.popup=this,i.trigger.setAdapter(this),i.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){i.storeValue=this.getValue(),i._adjust(function(){n()}),i.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){i._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){i.setValue(),i._defaultState()}}],itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){i.combo.adjustWidth(),i.combo.adjustHeight(),i.numberCounter.adjustView(),i.trigger.getSearcher().adjustView()})}},value:{type:BI.Selection.Multi,value:e.value},hideChecker:function(e){return 0===t.element.find(e.target).length&&0===i.numberCounter.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(i.storeValue),BI.nextTick(function(){i._populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){i._stopEditing(),!0===i.requesting?i.wants2Quit=!0:i.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CONFIRM)});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){i.numberCounter.hideView(),i.combo.isViewVisible()?i.combo.hideView():i.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:{type:BI.Selection.Multi,value:e.value}}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){i.combo.isViewVisible()||i.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){this.updateSelectedValue(i.storeValue)}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){i.trigger.refreshPlaceHolderWidth(!0===e?i.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<i.trigger.element.find(e.target).length&&i.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.height}]})},_itemsCreator4Trigger:function(t,i){var n=this;this.options.itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(BI.deepClone(n.storeValue)),i.apply(n,arguments)})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(r,o){var a=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,keywords:r},function(e){var t,i,n=BI.map(e.items,"value");t=n,i=a._makeMap(t),BI.each(r,function(e,t){BI.isNotNull(i[t])&&(a.storeValue.type===BI.Selection.Multi?BI.pushDistinct(a.storeValue.value,t):BI.remove(a.storeValue.value,t))}),a._adjust(o)})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,u.storeValue.assist&&u.storeValue.assist.push(r[t]),delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void u._adjust(l)}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&(u.storeValue.assist&&u.storeValue.assist.push(o[i[e]]),delete o[i[e]]),BI.isNull(a[i[e]])&&(BI.remove(u.storeValue.assist,t),s.push(t))}),u.storeValue.value=s.concat(BI.values(o)),u._adjust(l)})},_adjust:function(e){var t=this;this.options;!function(){!0===t.wants2Quit&&(t.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CONFIRM),t.wants2Quit=!1);t.requesting=!1}(),e()},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),BI.remove(i.storeValue.assist,t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,i.storeValue.assist&&i.storeValue.assist.push(n[t]),delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void i._adjust(t)}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},_populate:function(){this.combo.populate.apply(this.combo,arguments)},setValue:function(e){this.storeValue={type:BI.Selection.Multi,value:e||[]},this.combo.setValue(this.storeValue),this.numberCounter.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this._populate.apply(this,arguments),this.numberCounter.populateSwitcher.apply(this.numberCounter,arguments)}}),BI.extend(BI.MultiSelectNoBarCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectNoBarCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectNoBarCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectNoBarCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectNoBarCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectNoBarCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_no_bar_combo",BI.MultiSelectNoBarCombo)},function(e,t){BI.MultiSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.MultiSelectInsertCombo.superclass._init.apply(this,arguments);var i=this,e=this.options,n=function(){BI.isKey(i._startValue)&&(i.storeValue.type===BI.Selection.All?(BI.remove(i.storeValue.value,i._startValue),i.storeValue.assist=i.storeValue.assist||[],i.storeValue.assist.pushDistinct(i._startValue)):(BI.pushDistinct(i.storeValue.value,i._startValue),BI.remove(i.storeValue.assist,i._startValue))),i.trigger.getSearcher().setState(i.storeValue),i.numberCounter.setButtonChecked(i.storeValue)};this.storeValue=e.value||{},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_insert_trigger",allowEdit:e.allowEdit,height:e.height,text:e.text,watermark:e.watermark,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:e.value}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_FOCUS,function(){i.fireEvent(BI.MultiSelectInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BLUR,function(){i.fireEvent(BI.MultiSelectInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START,function(){i._setStartValue(""),this.getSearcher().setValue(i.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP,function(){i._setStartValue(""),i.fireEvent(BI.MultiSelectInsertCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE,function(){this.getSearcher().hasMatched()&&i._addItem(n)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM,function(){var e;this.getSearcher().hasMatched()||(i._addItem(n),e=this.getSearcher().getKeyword(),i._stopEditing(),i.fireEvent(BI.MultiSelectInsertCombo.EVENT_ADD_ITEM,e))}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&i._joinKeywords(e,function(){BI.isEndWithBlank(t)?(i.combo.setValue(i.storeValue),n(),i.combo.populate(),i._setStartValue("")):(i.combo.setValue(i.storeValue),n())}),i.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE,function(e,t){t instanceof BI.MultiSelectBar?i._joinAll(this.getValue(),function(){n()}):i._join(this.getValue(),function(){n()}),i.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){i.numberCounter.updateSelectedValue(i.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){i.combo.isViewVisible()||i.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!e.allowEdit,el:this.trigger,adjustLength:1,container:e.container,popup:{type:"bi.multi_select_popup_view",ref:function(){i.popup=this,i.trigger.setAdapter(this),i.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){i.storeValue=this.getValue(),i._adjust(function(){n()}),i.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){i._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){i.setValue(),i._defaultState()}}],itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){i.combo.adjustWidth(),i.combo.adjustHeight(),i.numberCounter.adjustView(),i.trigger.getSearcher().adjustView()})}},value:e.value,hideChecker:function(e){return 0===t.element.find(e.target).length&&0===i.numberCounter.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(i.storeValue),BI.nextTick(function(){i._populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){i._stopEditing(),!0===i.requesting?i.wants2Quit=!0:i.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM)});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){i.numberCounter.hideView(),i.combo.isViewVisible()?i.combo.hideView():i.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:e.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){i.combo.isViewVisible()||i.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){this.updateSelectedValue(i.storeValue)}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){i.trigger.refreshPlaceHolderWidth(!0===e?i.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<i.trigger.element.find(e.target).length&&i.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.height}]})},_itemsCreator4Trigger:function(t,i){var n=this;this.options.itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(BI.deepClone(n.getValue())),i.apply(n,arguments)})},_addItem:function(e){var t=this,i=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[i]},function(){t.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(t.storeValue.value,i),t.combo.setValue(t.storeValue),t._setStartValue(i),e(),t.populate(),t._setStartValue("")})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(r,o){var a=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:r},function(e){var t,i,n=BI.map(e.items,"value");t=n,i=a._makeMap(t),BI.each(r,function(e,t){BI.isNotNull(i[t])&&(a.storeValue.type===BI.Selection.Multi?BI.pushDistinct(a.storeValue.value,t):BI.remove(a.storeValue.value,t))}),a._adjust(o)})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,u.storeValue.assist&&u.storeValue.assist.push(r[t]),delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void u._adjust(l)}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&(u.storeValue.assist&&u.storeValue.assist.push(o[i[e]]),delete o[i[e]]),BI.isNull(a[i[e]])&&(BI.remove(u.storeValue.assist,t),s.push(t))}),u.storeValue.value=s.concat(BI.values(o)),u._adjust(l)})},_adjust:function(e){var t=this;this.options;!function(){!0===t.wants2Quit&&(t.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),t.wants2Quit=!1);t.requesting=!1}(),e()},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),BI.remove(i.storeValue.assist,t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,i.storeValue.assist&&i.storeValue.assist.push(n[t]),delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void i._adjust(t)}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},_populate:function(){this.combo.populate.apply(this.combo,arguments)},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue),this.numberCounter.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._populate.apply(this,arguments),this.numberCounter.populateSwitcher.apply(this.numberCounter,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.MultiSelectInsertCombo.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo)},function(e,t){BI.MultiSelectInsertNoBarCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo-no-bar",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0}})},_init:function(){BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this,arguments);var i=this,e=this.options,n=function(){BI.isKey(i._startValue)&&(i.storeValue.type===BI.Selection.All?(BI.remove(i.storeValue.value,i._startValue),i.storeValue.assist=i.storeValue.assist||[],i.storeValue.assist.pushDistinct(i._startValue)):(BI.pushDistinct(i.storeValue.value,i._startValue),BI.remove(i.storeValue.assist,i._startValue))),i.trigger.getSearcher().setState(i.storeValue),i.numberCounter.setButtonChecked(i.storeValue)};this.storeValue={type:BI.Selection.Multi,value:e.value||[]},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_insert_trigger",height:e.height,text:e.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:{type:BI.Selection.Multi,value:e.value}}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START,function(){i._setStartValue(""),this.getSearcher().setValue(i.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP,function(){i._setStartValue("")}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE,function(){this.getSearcher().hasMatched()&&i._addItem(n)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM,function(){var e;this.getSearcher().hasMatched()||(i._addItem(n),e=this.getSearcher().getKeyword(),i._stopEditing(),i.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM,e))}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&i._joinKeywords(e,function(){BI.isEndWithBlank(t)?(i.combo.setValue(i.storeValue),n(),i.combo.populate(),i._setStartValue("")):(i.combo.setValue(i.storeValue),n())})}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE,function(e,t){t instanceof BI.MultiSelectBar?i._joinAll(this.getValue(),function(){n()}):i._join(this.getValue(),function(){n()})}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){i.numberCounter.updateSelectedValue(i.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){i.combo.isViewVisible()||i.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_no_bar_popup_view",ref:function(){i.popup=this,i.trigger.setAdapter(this),i.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){i.storeValue=this.getValue(),i._adjust(function(){n()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){i._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){i.setValue(),i._defaultState()}}],itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){i.combo.adjustWidth(),i.combo.adjustHeight(),i.numberCounter.adjustView(),i.trigger.getSearcher().adjustView()})}},value:{type:BI.Selection.Multi,value:e.value},hideChecker:function(e){return 0===t.element.find(e.target).length&&0===i.numberCounter.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(i.storeValue),BI.nextTick(function(){i._populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){i._stopEditing(),!0===i.requesting?i.wants2Quit=!0:i.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM)});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){i.numberCounter.hideView(),i.combo.isViewVisible()?i.combo.hideView():i.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:{type:BI.Selection.Multi,value:e.value}}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){i.combo.isViewVisible()||i.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){this.updateSelectedValue(i.storeValue)}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){i.trigger.refreshPlaceHolderWidth(!0===e?i.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<i.trigger.element.find(e.target).length&&i.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.height}]})},_itemsCreator4Trigger:function(t,i){var n=this;this.options.itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(BI.deepClone(n.storeValue)),i.apply(n,arguments)})},_addItem:function(e){var t=this,i=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[i]},function(){t.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(t.storeValue.value,i),t.combo.setValue(t.storeValue),t._setStartValue(i),e(),t.populate(),t._setStartValue("")})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(r,o){var a=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:r},function(e){var t,i,n=BI.map(e.items,"value");t=n,i=a._makeMap(t),BI.each(r,function(e,t){BI.isNotNull(i[t])&&(a.storeValue.type===BI.Selection.Multi?BI.pushDistinct(a.storeValue.value,t):BI.remove(a.storeValue.value,t))}),a._adjust(o)})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,u.storeValue.assist&&u.storeValue.assist.push(r[t]),delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void u._adjust(l)}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&(u.storeValue.assist&&u.storeValue.assist.push(o[i[e]]),delete o[i[e]]),BI.isNull(a[i[e]])&&(BI.remove(u.storeValue.assist,t),s.push(t))}),u.storeValue.value=s.concat(BI.values(o)),u._adjust(l)})},_adjust:function(e){var t=this;this.options;!function(){!0===t.wants2Quit&&(t.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM),t.wants2Quit=!1);t.requesting=!1}(),e()},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),BI.remove(i.storeValue.assist,t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,i.storeValue.assist&&i.storeValue.assist.push(n[t]),delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void i._adjust(t)}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},_populate:function(){this.combo.populate.apply(this.combo,arguments)},setValue:function(e){this.storeValue={type:BI.Selection.Multi,value:e||[]},this.combo.setValue(this.storeValue),this.numberCounter.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this._populate.apply(this,arguments),this.numberCounter.populateSwitcher.apply(this.numberCounter,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_insert_no_bar_combo",BI.MultiSelectInsertNoBarCombo)},function(e,t){BI.MultiSelectInsertTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border bi-border-radius",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectInsertTrigger.superclass._init.apply(this,arguments);var e=this,t=this.options;t.height&&this.setHeight(t.height-2),this.searcher=BI.createWidget(t.searcher,{type:"bi.multi_select_insert_searcher",height:t.height,text:t.text,itemsCreator:t.itemsCreator,valueFormatter:t.valueFormatter,watermark:t.watermark,popup:{},adapter:t.adapter,masker:t.masker,value:t.value}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_START,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_PAUSE,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_STOP,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS)}),this.wrapNumberCounter=BI.createWidget({type:"bi.layout"}),this.wrapper=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:this.wrapNumberCounter,width:0},{el:BI.createWidget(),width:24}]}),t.allowEdit||BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.text",title:function(){return e.searcher.getState()}},left:0,right:24,top:0,bottom:0}]})},refreshPlaceHolderWidth:function(e){this.wrapper.attr("items")[1].width=e,this.wrapper.resize()},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(e){this.searcher.setAdapter(e)},setValue:function(e){this.searcher.setValue(e)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectInsertTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectInsertTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertTrigger.EVENT_START="EVENT_START",BI.MultiSelectInsertTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_trigger",BI.MultiSelectInsertTrigger)},function(e,t){BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var s=this,l=this.options,u=!1;this.storeValue=l.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",logic:l.logic,toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},el:BI.extend({onLoaded:l.onLoaded,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"}]}}},l.el),itemsCreator:function(r,o){var a=s._startValue;s.storeValue&&(r=BI.extend(r||{},{selectedValues:BI.isKey(a)&&s.storeValue.type===BI.Selection.Multi?s.storeValue.value.concat(a):s.storeValue.value})),l.itemsCreator(r,function(e){u=e.hasNext;var t,i,n=[];1===r.times&&s.storeValue&&(t=BI.map(s.storeValue.value,function(e,t){var i=l.valueFormatter(t)||t;return{text:i,value:t,title:i,selected:s.storeValue.type===BI.Selection.Multi}}),BI.isKey(s._startValue)&&!BI.contains(s.storeValue.value,s._startValue)&&(i=l.valueFormatter(a)||a,t.unshift({text:i,value:a,title:i,selected:!0})),n=s._createItems(t)),o(n.concat(s._createItems(e.items)),e.keyword||""),1===r.times&&s.storeValue&&(BI.isKey(a)&&(s.storeValue.type===BI.Selection.All?BI.remove(s.storeValue.value,a):BI.pushDistinct(s.storeValue.value,a)),s.setValue(s.storeValue)),1===r.times&&s._scrollToTop()})},hasNext:function(){return u},value:this.storeValue}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,vgap:5},l.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)})))),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){s.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){s.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(e){return BI.createItems(e,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var e=this;BI.delay(function(){e.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},setStartValue:function(e){this._startValue=e},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(e){e=this._createItems(e),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(e){this.button_group.resetHeight(e-10)},resetWidth:function(e){this.button_group.resetWidth(e)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader)},function(e,t){BI.MultiSelectNoBarLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarLoader.superclass._init.apply(this,arguments);var s=this,l=this.options,u=!1;this.storeValue=l.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget(BI.extend({type:"bi.list_pane",onLoaded:l.onLoaded,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(r,o){var a=s._startValue;s.storeValue&&(r=BI.extend(r||{},{selectedValues:BI.isKey(a)&&s.storeValue.type===BI.Selection.Multi?s.storeValue.value.concat(a):s.storeValue.value})),l.itemsCreator(r,function(e){u=e.hasNext;var t,i,n=[];1===r.times&&s.storeValue&&(t=BI.map(s.storeValue.value,function(e,t){var i=l.valueFormatter(t)||t;return{text:i,value:t,title:i,selected:s.storeValue.type===BI.Selection.Multi}}),BI.isKey(s._startValue)&&!BI.contains(s.storeValue.value,s._startValue)&&(i=l.valueFormatter(a)||a,t.unshift({text:i,value:a,title:i,selected:!0})),n=s._createItems(t)),o(n.concat(s._createItems(e.items)),e.keyword||""),1===r.times&&s.storeValue&&(BI.isKey(a)&&(s.storeValue.type===BI.Selection.All?BI.remove(s.storeValue.value,a):BI.pushDistinct(s.storeValue.value,a)),s.setValue(s.storeValue)),1===r.times&&s._scrollToTop()})},hasNext:function(){return u},value:this.storeValue},l.el)),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){s.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){s.fireEvent(BI.MultiSelectNoBarLoader.EVENT_CHANGE,arguments)})},_createItems:function(e){return BI.createItems(e,{type:"bi.multi_select_item",cls:"bi-list-item-active",logic:this.options.logic,height:24,iconWrapperWidth:36})},_scrollToTop:function(){var e=this;BI.delay(function(){e.button_group.element.scrollTop(0)},30)},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},setStartValue:function(e){this._startValue=e},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue.value)},getValue:function(){return{type:BI.Selection.Multi,value:this.button_group.getValue()}},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(e){e=this._createItems(e),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(e){this.button_group.element.css({"max-height":e+"px"})},resetWidth:function(){}}),BI.MultiSelectNoBarLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_no_bar_loader",BI.MultiSelectNoBarLoader)},function(e,t){BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var t=this,e=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:e.onLoaded,value:e.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:e.maxWidth,minWidth:e.minWidth,maxHeight:e.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:e.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){t.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(e){switch(e){case 0:t.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:t.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(e){this.loader.setStartValue(e)},setValue:function(e){this.popupView.setValue(e)},getValue:function(){return this.popupView.getValue()},populate:function(e){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(e){this.popupView.resetHeight(e)},resetWidth:function(e){this.popupView.resetWidth(e)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView)},function(e,t){BI.MultiSelectNoBarPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarPopupView.superclass._init.apply(this,arguments);var t=this,e=this.options;this.loader=BI.createWidget({type:"bi.multi_select_no_bar_loader",itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:e.onLoaded,value:e.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:e.maxWidth,minWidth:e.minWidth,maxHeight:e.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:e.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){t.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(e){switch(e){case 0:t.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);break;case 1:t.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(e){this.loader.setStartValue(e)},setValue:function(e){this.popupView.setValue(e)},getValue:function(){return this.popupView.getValue()},populate:function(e){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(e){this.popupView.resetHeight(e)},resetWidth:function(e){this.popupView.resetWidth(e)}}),BI.MultiSelectNoBarPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_no_bar_popup_view",BI.MultiSelectNoBarPopupView)},function(e,t){BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border bi-border-radius",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var e=this,t=this.options;t.height&&this.setHeight(t.height-2),this.searcher=BI.createWidget(t.searcher,{type:"bi.multi_select_searcher",height:t.height,text:t.text,itemsCreator:t.itemsCreator,valueFormatter:t.valueFormatter,watermark:t.watermark,popup:{},adapter:t.adapter,masker:t.masker,value:t.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS)}),this.wrapNumberCounter=BI.createWidget({type:"bi.layout"}),this.wrapper=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:this.wrapNumberCounter,width:0},{el:BI.createWidget(),width:24}]}),t.allowEdit||BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.text",title:function(){return e.searcher.getState()}},left:0,right:24,top:0,bottom:0}]})},refreshPlaceHolderWidth:function(e){this.wrapper.attr("items")[1].width=e,this.wrapper.resize()},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(e){this.searcher.setAdapter(e)},setValue:function(e){this.searcher.setValue(e)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger)},function(e,t){BI.MultiSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchInsertPane.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.MultiSelectSearchInsertPane.superclass._init.apply(this,arguments);var i=this,n=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(){i.fireEvent(BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,n.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:n.keywordGetter,valueFormatter:n.valueFormatter,itemsCreator:function(e,t){n.itemsCreator.apply(i,[e,function(e){t(e),i.setKeyword(n.keywordGetter())}])},value:n.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(i){var e=BI.some(this.loader.getAllButtons(),function(e,t){return i===t.getValue()}),t=0<this.loader.getAllButtons().length&&e;this.tooltipClick.setVisible(t),this.addNotMatchTip.setVisible(!t),t||this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",i))},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(e){this.loader.setValue(e)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(e){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_search_insert_pane",BI.MultiSelectSearchInsertPane)},function(e,t){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 a=this,s=this.options,l=!1;this.storeValue=BI.deepClone(s.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:s.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(r,o){a.storeValue&&(r=BI.extend(r||{},{selectedValues:a.storeValue.value})),s.itemsCreator(r,function(e){var t=e.keyword=s.keywordGetter();l=e.hasNext;var i,n=[];1===r.times&&a.storeValue&&(i=a._filterValues(a.storeValue),n=a._createItems(i)),o(n.concat(a._createItems(e.items)),t),1===r.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return l}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(e){return BI.createItems(e,{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(i){var e,n=this.options,t=n.keywordGetter(),r=BI.deepClone(i.value)||[],o=BI.map(r,function(e,t){return{text:n.valueFormatter(t)||t,value:t}});return BI.isKey(t)&&(r=(e=BI.Func.getSearchResult(o,t)).match.concat(e.find)),BI.map(r,function(e,t){return{text:t.text,title:t.text,value:t.value,selected:i.type===BI.Selection.All}})},setValue:function(e){this.storeValue=BI.deepClone(e),this.button_group.setValue(e)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(e){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(e){this.button_group.resetHeight(e)},resetWidth:function(e){this.button_group.resetWidth(e)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader)},function(e,t){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 i=this,n=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:n.keywordGetter,valueFormatter:n.valueFormatter,itemsCreator:function(e,t){n.itemsCreator.apply(i,[e,function(e){t(e),i.setKeyword(n.keywordGetter())}])},value:n.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(e){var t,i=0<this.loader.getAllButtons().length&&(t=this.loader.getAllButtons()[0])&&e===t.getValue();i!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(i),this.resizer.attr("items")[0].height=i?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(e){this.loader.setValue(e)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(e){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane)},function(e,t){BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var e=this,t=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:16,cls:"bi-high-light-background count-tip"}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){e.numberCounter.setTag(e.numberCounter.getText()),e.numberCounter.setText(BI.i18nText("BI-Check_Selected"))},function(){e.numberCounter.setText(e.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(t.value)&&this.setValue(t.value)},_populate:function(i){var n=this,e=this.options;i.type!==BI.Selection.All?BI.nextTick(function(){n.numberCounter.setText(i.value.length),n.setVisible(0<i.value.length)}):e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(e){var t=e.count-i.value.length;BI.nextTick(function(){n.numberCounter.setText(t),n.setVisible(0<t)})})},_assertValue:function(e){return(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[]),e},setValue:function(e){e=this._assertValue(e),this.options.value=e,this._populate(e)},populate:function(){this._populate(this._assertValue(this.options.value))},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton)},function(e,t){BI.MultiSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{},watermark:BI.i18nText("BI-Basic_Search")})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var e=this,t=this.options;this.editor=BI.createWidget(t.el,{type:"bi.state_editor",element:this,height:t.height,watermark:t.watermark,allowBlank:!0,value:t.value,defaultText:t.text,text:t.text,tipType:t.tipType,warningTitle:t.warningTitle}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){e.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){e.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){e.fireEvent(BI.MultiSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(e){this.editor.setState(e)},setValue:function(e){this.editor.setValue(e)},setTipType:function(e){this.editor.setTipType(e)},getValue:function(){var e=this.editor.getState();return BI.isArray(e)&&0<e.length?e[e.length-1]:""},getState:function(){return this.editor.getText()},getKeywords:function(){var e=this.editor.getLastChangedValue(),t=e.match(/[\S]+/g);return BI.isEndWithBlank(e)?t.concat([" "]):t},populate:function(e){}}),BI.MultiSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor)},function(e,t){BI.MultiSelectInsertSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectInsertSearcher.superclass._init.apply(this,arguments);var n=this,r=this.options;this.editor=BI.createWidget(r.el,{type:"bi.multi_select_editor",watermark:r.watermark,height:r.height,text:r.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,element:this,height:r.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_insert_pane",valueFormatter:r.valueFormatter,keywordGetter:function(){return n.editor.getValue()},itemsCreator:function(e,t){var i=n.editor.getValue();e.keywords=[i],this.setKeyword(i),r.itemsCreator(e,t)},value:r.value,listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM)}}]},r.popup),adapter:r.adapter,masker:r.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var e=this.getKeywords();n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,e)}),BI.isNotNull(r.value)&&this.setState(r.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(e){this.searcher.setAdapter(e)},setState:function(e){var i,n=this.options;(e=e||{}).value||(e.value=[]),e.type===BI.Selection.All?0===e.value.length?this.editor.setState(BI.Selection.All):BI.size(e.assist)<=20?(i="",BI.each(e.assist,function(e,t){i+=0===e?""+(n.valueFormatter(t+"")||t):","+(n.valueFormatter(t+"")||t)}),this.editor.setState(i)):this.editor.setState(BI.Selection.Multi):0===e.value.length?this.editor.setState(BI.Selection.None):BI.size(e.value)<=20?(i="",BI.each(e.value,function(e,t){i+=0===e?""+(n.valueFormatter(t+"")||t):","+(n.valueFormatter(t+"")||t)}),this.editor.setState(i)):this.editor.setState(BI.Selection.Multi)},getState:function(){return this.editor.getState()},setValue:function(e){this.setState(e),this.searcher.setValue(e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(e){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectInsertSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectInsertSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertSearcher.EVENT_START="EVENT_START",BI.MultiSelectInsertSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_searcher",BI.MultiSelectInsertSearcher)},function(e,t){BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var n=this,r=this.options;this.editor=BI.createWidget(r.el,{type:"bi.multi_select_editor",height:r.height,text:r.text,watermark:r.watermark,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){n.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){n.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,element:this,height:r.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:r.valueFormatter,keywordGetter:function(){return n.editor.getValue()},itemsCreator:function(e,t){var i=n.editor.getValue();e.keywords=[i],this.setKeyword(i),r.itemsCreator(e,t)},value:r.value},r.popup),adapter:r.adapter,masker:r.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){n.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),n.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){n.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){n.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var e=this.getKeywords();n.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,e)}),BI.isNotNull(r.value)&&this.setState(r.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(e){this.searcher.setAdapter(e)},setState:function(e){var i,n=this.options;(e=e||{}).value||(e.value=[]),e.type===BI.Selection.All?0===e.value.length?this.editor.setState(BI.Selection.All):BI.size(e.assist)<=20?(i="",BI.each(e.assist,function(e,t){i+=0===e?""+(n.valueFormatter(t+"")||t):","+(n.valueFormatter(t+"")||t)}),this.editor.setState(i)):this.editor.setState(BI.Selection.Multi):0===e.value.length?this.editor.setState(BI.Selection.None):BI.size(e.value)<=20?(i="",BI.each(e.value,function(e,t){i+=0===e?""+(n.valueFormatter(t+"")||t):","+(n.valueFormatter(t+"")||t)}),this.editor.setState(i)):this.editor.setState(BI.Selection.Multi)},getState:function(){return this.editor.getState()},setValue:function(e){this.setState(e),this.searcher.setValue(e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(e){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher)},function(e,t){BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var t=this,e=this.options;this.button=BI.createWidget(e.el,{type:"bi.multi_select_check_selected_button",itemsCreator:e.itemsCreator,value:e.value}),this.button.on(BI.Events.VIEW,function(){t.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:e.valueFormatter,itemsCreator:e.itemsCreator,onClickContinueSelect:function(){t.switcher.hideView()},ref:function(e){t.checkPane=e},value:e.value},e.popup),adapter:e.adapter,masker:e.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){t.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){t.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var e=this;BI.nextTick(function(){e.populate()})})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(e){this.switcher.setAdapter(e)},setValue:function(e){this.switcher.setValue(e)},updateSelectedValue:function(e){this.checkPane.setValue(e)},setButtonChecked:function(e){this.button.setValue(e)},getValue:function(){},populate:function(e){this.switcher.populate.apply(this.switcher,arguments)},populateSwitcher:function(){this.button.populate.apply(this.button,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher)},function(e,t){BI.MultiSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var n=this,r=this.options;this.storeValue=r.value||{};var i=function(){BI.isKey(n._startValue)&&(n.storeValue.type===BI.Selection.All?BI.remove(n.storeValue.value,n._startValue):BI.pushDistinct(n.storeValue.value,n._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:r.itemsCreator,valueFormatter:r.valueFormatter,logic:{dynamic:!0},el:{},value:r.value}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){n.storeValue=this.getValue(),i(),n.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:r.valueFormatter,keywordGetter:function(){return n.trigger.getKeyword()},itemsCreator:function(e,t){var i=n.trigger.getKeyword();BI.isNotEmptyString(i)&&(e.keywords=[i],this.setKeyword(e.keywords[0]),r.itemsCreator(e,t))},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var e=n.trigger.getKeyword();n.trigger.hasMatched()||(n.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(n.storeValue.value,e),n._showAdapter(),n.adapter.setValue(n.storeValue),n.adapter.populate(),n.storeValue.type===BI.Selection.Multi&&n.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE))}}]}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){n._showSearcherPane(),n._setStartValue(""),this.setValue(BI.deepClone(n.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){n._showAdapter(),n._setStartValue(""),n.adapter.setValue(n.storeValue),n.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var e=this.getKeyword();this.hasMatched()&&n._join({type:BI.Selection.Multi,value:[e]},function(){n.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(n.storeValue.value,e),n._showAdapter(),n.adapter.setValue(n.storeValue),n._setStartValue(e),i(),n.adapter.populate(),n._setStartValue(""),n.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),n._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var e=this.getKeywords(),t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.adapter.setValue(n.storeValue),i(),n.adapter.populate(),n._setStartValue("")):(n.adapter.setValue(n.storeValue),i()),n.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(e,t){t instanceof BI.MultiSelectBar?n._joinAll(this.getValue(),function(){i(),n.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):n._join(this.getValue(),function(){i(),n.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}}],value:r.value}),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:30,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(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(r,o){var a=this,e=this.options;this._assertValue(this.storeValue),e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:r},function(e){var t,i,n=BI.map(e.items,"value");t=n,i=a._makeMap(t),BI.each(r,function(e,t){BI.isNotNull(i[t])&&(a.storeValue.type===BI.Selection.Multi?BI.pushDistinct(a.storeValue.value,t):BI.remove(a.storeValue.value,t))}),o()})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:[u.trigger.getKeyword()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void l()}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&delete o[i[e]],BI.isNull(a[i[e]])&&s.push(t)}),u.storeValue.value=s.concat(BI.values(o)),l()})},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void t()}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.adapter.setStartValue(e)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_list",BI.MultiSelectInsertList)},function(e,t){BI.MultiSelectInsertNoBarList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertNoBarList.superclass._init.apply(this,arguments);var n=this,r=this.options;this.storeValue={type:BI.Selection.Multi,value:r.value||[]};var i=function(){BI.isKey(n._startValue)&&(n.storeValue.type===BI.Selection.All?BI.remove(n.storeValue.value,n._startValue):BI.pushDistinct(n.storeValue.value,n._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_no_bar_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:r.itemsCreator,valueFormatter:r.valueFormatter,logic:{dynamic:!1},el:{},value:{type:BI.Selection.Multi,value:r.value||[]}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){n.storeValue=this.getValue(),i(),n.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:r.valueFormatter,keywordGetter:function(){return n.trigger.getKeyword()},itemsCreator:function(e,t){var i=n.trigger.getKeyword();BI.isNotEmptyString(i)&&(e.keywords=[i],this.setKeyword(e.keywords[0]),r.itemsCreator(e,t))},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var e=n.trigger.getKeyword();n.trigger.hasMatched()||(n.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(n.storeValue.value,e),n._showAdapter(),n.adapter.setValue(n.storeValue),n.adapter.populate(),n.storeValue.type===BI.Selection.Multi&&n.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE))}}]}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){n._showSearcherPane(),n._setStartValue(""),this.setValue(BI.deepClone(n.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){n._showAdapter(),n._setStartValue(""),n.adapter.setValue(n.storeValue),n.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var e=this.getKeyword();this.hasMatched()&&n._join({type:BI.Selection.Multi,value:[e]},function(){n.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(n.storeValue.value,e),n._showAdapter(),n.adapter.setValue(n.storeValue),n._setStartValue(e),i(),n.adapter.populate(),n._setStartValue(""),n.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var e=this.getKeywords(),t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.adapter.setValue(n.storeValue),i(),n.adapter.populate(),n._setStartValue("")):(n.adapter.setValue(n.storeValue),i()),n.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(e,t){t instanceof BI.MultiSelectBar?n._joinAll(this.getValue(),function(){i(),n.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)}):n._join(this.getValue(),function(){i(),n.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}}],value:{type:BI.Selection.Multi,value:r.value||[]}}),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:30,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(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(r,o){var a=this,e=this.options;this._assertValue(this.storeValue),e.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,keywords:r},function(e){var t,i,n=BI.map(e.items,"value");t=n,i=a._makeMap(t),BI.each(r,function(e,t){BI.isNotNull(i[t])&&(a.storeValue.type===BI.Selection.Multi?BI.pushDistinct(a.storeValue.value,t):BI.remove(a.storeValue.value,t))}),o()})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),e.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,keywords:[u.trigger.getKeyword()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void l()}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&delete o[i[e]],BI.isNull(a[i[e]])&&s.push(t)}),u.storeValue.value=s.concat(BI.values(o)),l()})},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void t()}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.adapter.setStartValue(e)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(e){this.storeValue={type:BI.Selection.Multi,value:e||[]},this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarList,{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)},function(e,t){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 n=this,r=this.options;this.storeValue={};var i=function(){BI.isKey(n._startValue)&&(n.storeValue.type===BI.Selection.All?BI.remove(n.storeValue.value,n._startValue):BI.pushDistinct(n.storeValue.value,n._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:r.itemsCreator,valueFormatter:r.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){n.storeValue=this.getValue(),n._adjust(function(){i(),n.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:r.valueFormatter,keywordGetter:function(){return n.trigger.getKeyword()},itemsCreator:function(e,t){var i=n.trigger.getKeyword();BI.isNotEmptyString(i)&&(e.keywords=[i],this.setKeyword(e.keywords[0]),r.itemsCreator(e,t))}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){n._showSearcherPane(),n._setStartValue(""),this.setValue(BI.deepClone(n.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){n._showAdapter(),n._setStartValue(""),n.adapter.setValue(n.storeValue),n.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var e=this.getKeyword();this.hasMatched()&&n._join({type:BI.Selection.Multi,value:[e]},function(){n._showAdapter(),n.adapter.setValue(n.storeValue),n._setStartValue(e),i(),n.adapter.populate(),n._setStartValue(""),n.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var e=this.getKeyword(),t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.adapter.setValue(n.storeValue),i(),n.adapter.populate(),n._setStartValue("")):(n.adapter.setValue(n.storeValue),i()),n.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(e,t){t instanceof BI.MultiSelectBar?n._joinAll(this.getValue(),function(){i(),n.fireEvent(BI.MultiSelectList.EVENT_CHANGE)}):n._join(this.getValue(),function(){i(),n.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(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(r,o){var a=this,e=this.options;this._assertValue(this.storeValue),e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keywords:r},function(e){var t,i,n=BI.map(e.items,"value");t=n,i=a._makeMap(t),BI.each(r,function(e,t){BI.isNotNull(i[t])&&(a.storeValue.type===BI.Selection.Multi?BI.pushDistinct(a.storeValue.value,t):BI.remove(a.storeValue.value,t))}),a._adjust(o)})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void u._adjust(l)}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&delete o[i[e]],BI.isNull(a[i[e]])&&s.push(t)}),u.storeValue.value=s.concat(BI.values(o)),u._adjust(l)})},_adjust:function(t){var i=this,e=this.options;function n(){i.storeValue.type===BI.Selection.All&&i.storeValue.value.length>=i._count?i.storeValue={type:BI.Selection.Multi,value:[]}:i.storeValue.type===BI.Selection.Multi&&i.storeValue.value.length>=i._count&&(i.storeValue={type:BI.Selection.All,value:[]})}this._count?(n(),t()):e.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(e){i._count=e.count,n(),t()})},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void i._adjust(t)}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.adapter.setStartValue(e)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList)},function(e,t){BI.MultiSelectTree=BI.inherit(BI.Single,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var i=this,n=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:n.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){i.searcher.isSearching()?i.storeValue={value:i.searcherPane.getValue()}:i.storeValue={value:i.adapter.getValue()},i.setSelectedValue(i.storeValue.value),i.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return i.searcher.getKeyword()},itemsCreator:function(e,t){e.keyword=i.searcher.getKeyword(),n.itemsCreator(e,t)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t({keyword:i.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){i._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){i._showAdapter(),BI.nextTick(function(){i.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){i.searcher.isSearching()?i.storeValue={value:i.searcherPane.getValue()}:i.storeValue={value:i.adapter.getValue()},i.setSelectedValue(i.storeValue.value),i.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){i._showAdapter(),BI.nextTick(function(){i.adapter.populate()})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,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)},resize:function(){},setSelectedValue:function(e){this.storeValue.value=e||{},this.adapter.setSelectedValue(e),this.searcherPane.setSelectedValue(e),this.searcher.setValue({value:e||{}})},setValue:function(e){this.adapter.setValue(e)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(e){this.adapter.updateValue(e)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree)},function(e,t){BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:t.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){e.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(e){e=e||{},this.popup.setValue(e)},setSelectedValue:function(e){e=e||{},this.popup.setSelectedValue(e)},updateValue:function(e){this.popup.updateValue(e),this.popup.refresh()},populate:function(e){this.popup.stroke(e)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup)},function(e,t){BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn,el:{type:"bi.display_tree"}})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var e=this,i=this.options;this.selectedValues={};var t=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});t.on(BI.TextButton.EVENT_CHANGE,function(){i.onClickContinueSelect(),BI.nextTick(function(){e.empty()})});var n=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:t,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget(i.el,{type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(e,t){e.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,i.itemsCreator(e,t)},value:(i.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){e.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){n.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){n.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:n},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(e){this.display.stroke(e)},setValue:function(e){e=e||{},this.display.setSelectedValue(e.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane)},function(e,t){BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){BI.MultiTreeCombo.superclass._init.apply(this,arguments);var i=this,e=this.options,t=!1,n=!1;this.storeValue={value:e.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:e.allowEdit,height:e.height,valueFormatter:e.valueFormatter,text:e.text,watermark:e.watermark,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:e.itemsCreator},value:{value:e.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!e.allowEdit,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){i.popup=this,i.trigger.setAdapter(this),i.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){i.numberCounter.adjustView(),(t=!0)===n&&l()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){r=!0;var e={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};i.trigger.getSearcher().setState(e),i.numberCounter.setButtonChecked(e),i.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM,i.combo.getValue())}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){i.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){o=!0,i.setValue(),i._defaultState()}}],itemsCreator:e.itemsCreator,onLoaded:function(){BI.nextTick(function(){i.numberCounter.adjustView(),i.trigger.getSearcher().adjustView()})}},value:{value:e.value||{}},hideChecker:function(e){return 0===u.element.find(e.target).length&&0===i.numberCounter.element.find(e.target).length}});var r=!1,o=!1,a=function(){return i.trigger.getSearcher().isSearching()},s=function(){return i.combo.isViewVisible()};function l(){a()?i.storeValue={value:i.trigger.getValue()}:s()&&(i.storeValue={value:i.combo.getValue()}),i.trigger.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue)}this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){i.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){i.fireEvent(BI.MultiTreeCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){i.storeValue={value:i.combo.getValue()},this.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){i.storeValue={value:this.getValue()},i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),BI.nextTick(function(){s()&&i.combo.populate()}),i.fireEvent(BI.MultiTreeCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){i.fireEvent(BI.MultiTreeCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){i.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){i.combo.isViewVisible()||i.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var e=this.getSearcher().hasChecked(),t={type:BI.Selection.Multi,value:e?{1:1}:{}};this.getSearcher().setState(e?BI.Selection.Multi:BI.Selection.None),i.numberCounter.setButtonChecked(t),i.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM,i.combo.getValue())}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a()||(!0===r&&(i.storeValue={value:i.combo.getValue()},r=!1),i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),i.populate(),i.fireEvent(BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW))}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a()?(i._stopEditing(),i.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):s()&&(i._stopEditing(),i.storeValue={value:i.combo.getValue()},!0===o&&(i.storeValue={value:{}}),i.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),r=o=!1});var u=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});u.on(BI.TriggerIconButton.EVENT_CHANGE,function(){i.numberCounter.hideView(),i.combo.isViewVisible()?i.combo.hideView():i.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane"},masker:{offset:this.constants.offset},itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,value:{value:e.value||{}}}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){i.combo.isViewVisible()||i.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){!1===n&&(n=!0),!0===t&&(n=null,l())}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){i.trigger.refreshPlaceHolderWidth(!0===e?i.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<i.trigger.element.find(e.target).length&&i.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:u,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.height}]})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},setValue:function(e){this.storeValue.value=e||{},this.combo.setValue({value:e||{}}),this.numberCounter.setValue({value:e||{}})},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo)},function(e,t){BI.MultiTreeInsertCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){BI.MultiTreeInsertCombo.superclass._init.apply(this,arguments);var i=this,e=this.options,t=!1,n=!1;this.storeValue={value:e.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:e.allowEdit,height:e.height,valueFormatter:e.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",text:e.text,watermark:e.watermark,itemsCreator:e.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){i.storeValue.value[i.trigger.getSearcher().getKeyword()]={},i._assertShowValue(),i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),i._stopEditing()}}]}},value:{value:e.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!e.allowEdit,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){i.popup=this,i.trigger.setAdapter(this),i.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){i.numberCounter.adjustView(),(t=!0)===n&&l()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){r=!0;var e={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};i.trigger.getSearcher().setState(e),i.numberCounter.setButtonChecked(e),i.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,i.combo.getValue())}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){i.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){o=!0,i.setValue(),i._defaultState()}}],itemsCreator:e.itemsCreator,onLoaded:function(){BI.nextTick(function(){i.numberCounter.adjustView(),i.trigger.getSearcher().adjustView()})}},value:{value:e.value||{}},hideChecker:function(e){return 0===u.element.find(e.target).length&&0===i.numberCounter.element.find(e.target).length}});var r=!1,o=!1,a=function(){return i.trigger.getSearcher().isSearching()},s=function(){return i.combo.isViewVisible()};function l(){a()?i.storeValue={value:i.trigger.getValue()}:s()&&(i.storeValue={value:i.combo.getValue()}),i.trigger.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue)}this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){i.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){i.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){i.storeValue={value:i.combo.getValue()},this.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){i.storeValue={value:this.getValue()},i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),BI.nextTick(function(){s()&&i.combo.populate()}),i.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){i.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){i.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var e=this.getSearcher().hasChecked(),t={type:BI.Selection.Multi,value:e?{1:1}:{}};this.getSearcher().setState(e?BI.Selection.Multi:BI.Selection.None),i.numberCounter.setButtonChecked(t),i.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,i.combo.getValue())}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a()||(!0===r&&(i.storeValue={value:i.combo.getValue()},r=!1),i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),i.populate(),i.fireEvent(BI.MultiTreeInsertCombo.EVENT_BEFORE_POPUPVIEW))}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a()?(i._stopEditing(),i.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)):s()&&(i._stopEditing(),i.storeValue={value:i.combo.getValue()},!0===o&&(i.storeValue={value:{}}),i.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)),r=o=!1});var u=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});u.on(BI.TriggerIconButton.EVENT_CHANGE,function(){i.numberCounter.hideView(),i.combo.isViewVisible()?i.combo.hideView():i.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane"},itemsCreator:e.itemsCreator,masker:{offset:this.constants.offset},valueFormatter:e.valueFormatter,value:e.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){i.combo.isViewVisible()||i.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){!1===n&&(n=!0),!0===t&&(n=null,l())}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){i.trigger.refreshPlaceHolderWidth(!0===e?i.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<i.trigger.element.find(e.target).length&&i.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:u,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.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(e){this.storeValue.value=e||{},this.combo.setValue({value:e||{}}),this.numberCounter.setValue({value:e||{}})},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiTreeInsertCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_tree_insert_combo",BI.MultiTreeInsertCombo)},function(e,t){BI.MultiTreeListCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-list-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0,allowInsertValue:!0})},_init:function(){BI.MultiTreeListCombo.superclass._init.apply(this,arguments);var i=this,e=this.options,t=!1,n=!1;this.storeValue={value:e.value||[]},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:e.allowEdit,text:e.text,watermark:e.watermark,height:e.height,valueFormatter:e.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_list_tree_searcher",itemsCreator:e.itemsCreator,popup:{type:e.allowInsertValue?"bi.multi_tree_search_insert_pane":"bi.multi_tree_search_pane",el:{type:"bi.list_part_tree"},listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){i.storeValue.value.unshift([i.trigger.getSearcher().getKeyword()]),i._assertShowValue(),i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),i._stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",el:{type:"bi.list_display_tree"},itemsCreator:e.itemsCreator}},value:{value:e.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!e.allowEdit,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){i.popup=this,i.trigger.setAdapter(this),i.numberCounter.setAdapter(this)},el:{type:"bi.list_async_tree"},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){i.numberCounter.adjustView(),(t=!0)===n&&l()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){r=!0;var e={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():[]};i.trigger.getSearcher().setState(e),i.numberCounter.setButtonChecked(e),i.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM,i.combo.getValue())}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){i.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){o=!0,i.setValue(),i._defaultState()}}],itemsCreator:e.itemsCreator,onLoaded:function(){BI.nextTick(function(){i.numberCounter.adjustView(),i.trigger.getSearcher().adjustView()})}},value:{value:e.value||{}},hideChecker:function(e){return 0===u.element.find(e.target).length&&0===i.numberCounter.element.find(e.target).length}});var r=!1,o=!1,a=function(){return i.trigger.getSearcher().isSearching()},s=function(){return i.combo.isViewVisible()};function l(){a()?i.storeValue={value:i.trigger.getValue()}:s()&&(i.storeValue={value:i.combo.getValue()}),i.trigger.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue)}this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){i.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){i.fireEvent(BI.MultiTreeListCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){i.storeValue={value:i.combo.getValue()},this.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){i.storeValue={value:this.getValue()},i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),BI.nextTick(function(){s()&&i.combo.populate()}),i.fireEvent(BI.MultiTreeListCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){i.fireEvent(BI.MultiTreeListCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){i.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var e=this.getSearcher().hasChecked(),t={type:BI.Selection.Multi,value:e?{1:1}:{}};this.getSearcher().setState(e?BI.Selection.Multi:BI.Selection.None),i.numberCounter.setButtonChecked(t),i.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM,i.combo.getValue())}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a()||(!0===r&&(i.storeValue={value:i.combo.getValue()},r=!1),i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),i.populate(),i.fireEvent(BI.MultiTreeListCombo.EVENT_BEFORE_POPUPVIEW))}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a()?(i.trigger.stopEditing(),i.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)):s()&&(i._stopEditing(),i.storeValue={value:i.combo.getValue()},!0===o&&(i.storeValue={value:[]}),i.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)),r=o=!1});var u=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});u.on(BI.TriggerIconButton.EVENT_CHANGE,function(){i.numberCounter.hideView(),i.combo.isViewVisible()?i.combo.hideView():i.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane"},itemsCreator:e.itemsCreator,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,value:e.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){i.combo.isViewVisible()||i.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){!1===n&&(n=!0),!0===t&&(n=null,l())}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){i.trigger.refreshPlaceHolderWidth(!0===e?i.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<i.trigger.element.find(e.target).length&&i.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:u,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.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(e){this.storeValue.value=e||[],this.combo.setValue({value:e||[]}),this.numberCounter.setValue({value:e||[]})},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.MultiTreeListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_tree_list_combo",BI.MultiTreeListCombo)},function(e,t){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 t=this,e=this.options,i=e.value;this.selectedValues={},this.tree=BI.createWidget(e.el,{type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:e.itemsCreator,onLoaded:e.onLoaded,value:i.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:e.maxWidth,minWidth:e.minWidth,maxHeight:e.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(e){switch(e){case 0:t.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:t.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){t.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){t.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(e){e=e||{},this.tree.setSelectedValue(e.value)},populate:function(e){this.tree.stroke(e)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(e){this.popupView.resetHeight(e)},resetWidth:function(e){this.popupView.resetWidth(e)}}),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)},function(e,t){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 e=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:BI.i18nText("BI-Check_Selected"),textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){e.indicator.setVisible(!1),e.checkSelected.setVisible(!0)},function(){e.indicator.setVisible(!0),e.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(e){e=e||{};var t=0<BI.size(e.value);this.setVisible(t)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton)},function(e,t){BI.MultiTreeSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24},props:{baseCls:"bi-multi-tree-search-insert-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,el:{type:"bi.part_tree"}},render:function(){var i=this,n=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_button",invisible:!0,ref:function(e){i.addTip=e},text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",handler:function(){i.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,n.keywordGetter())}},top:5,left:0,right:0},{el:BI.extend({type:"bi.part_tree",tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(e,t){e.keyword=n.keywordGetter(),n.itemsCreator(e,function(e){t(e),i.setKeyword(n.keywordGetter(),e.items)})},ref:function(e){i.partTree=e},value:n.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.TreeView.EVENT_CHANGE,action:function(){i.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE)}}]},n.el),left:0,top:0,bottom:0,right:0}]}},setKeyword:function(e,t){var i=BI.isEmptyArray(t);this.addTip.setVisible(i),this.partTree.setVisible(!i),i&&this.addTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",e))},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(e){this.setSelectedValue(e.value)},setSelectedValue:function(e){e=e||{},this.partTree.setSelectedValue(e)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(e){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_tree_search_insert_pane",BI.MultiTreeSearchInsertPane)},function(e,t){BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{props:{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn},render:function(){var t=this,i=this.options;return BI.extend({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(e,t){e.keyword=i.keywordGetter(),i.itemsCreator(e,t)},value:i.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.TreeView.EVENT_CHANGE,action:function(){t.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)}}],ref:function(e){t.partTree=e}},i.el)},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(e){this.setSelectedValue(e.value)},setSelectedValue:function(e){e=e||{},this.partTree.setSelectedValue(e)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(e){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane)},function(e,t){BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(e){return e},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var i=this,n=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:n.height,text:n.text,watermark:n.watermark,el:{type:"bi.simple_state_editor",height:n.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t({keyword:i.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return i.editor.getValue()},itemsCreator:function(e,t){e.keyword=i.editor.getValue(),n.itemsCreator(e,t)},value:n.value},n.popup),adapter:n.adapter,masker:n.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){i.fireEvent(BI.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),i.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){i.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){i.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(n.value)&&this.setState(n.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(e){this.searcher.setAdapter(e)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(e){var n=this.options;(e=e||{}).value||(e.value=[]);var r,o=0;BI.isNumber(e)?this.editor.setState(e):0===BI.size(e.value)?this.editor.setState(BI.Selection.None):(r="",BI.each(e.value,function(e,t){var i=BI.last(t);r+=(n.valueFormatter(i+"")||i)+"; ",o++}),20<o?this.editor.setState(BI.Selection.Multi):this.editor.setState(r))},getState:function(){return this.editor.getState()},setValue:function(e){this.setState(e),this.searcher.setValue(e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(e){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSearcher.EVENT_START="EVENT_START",BI.MultiListTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiListTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_list_tree_searcher",BI.MultiListTreeSearcher)},function(e,t){BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(e){return e},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var i=this,n=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",watermark:n.watermark,height:n.height,el:{type:"bi.simple_state_editor",text:n.text,height:n.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){i.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){i.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t({keyword:i.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return i.editor.getValue()},itemsCreator:function(e,t){e.keyword=i.editor.getValue(),n.itemsCreator(e,t)},value:n.value},n.popup),adapter:n.adapter,masker:n.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){i.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){i.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){i.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){i.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var e=this.getKeywords();i.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,e)}),BI.isNotNull(n.value)&&this.setState(n.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(e){this.searcher.setAdapter(e)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(e){var s=this.options;(e=e||{}).value||(e.value={});var n,l=0;BI.isNumber(e)?this.editor.setState(e):0===BI.size(e.value)?this.editor.setState(BI.Selection.None):(n="",BI.each(e.value,function(e,t){var i=function a(e){var n="";var r=0,o=BI.size(e);BI.each(e,function(e,t){r++;var i=a(t);n+=(s.valueFormatter(e+"")||e)+(""===i?"":":"+i)+(r===o?"":","),""===i&&l++});return n}(t);n+=(s.valueFormatter(e+"")||e)+(""===i?"":":"+i)+"; ",""===i&&l++}),20<l?this.editor.setState(BI.Selection.Multi):this.editor.setState(n))},getState:function(){return this.editor.getState()},setValue:function(e){this.setState(e),this.searcher.setValue(e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(e){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher)},function(e,t){BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(e){return e},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var e=this,t=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:t.height-2,allowBlank:t.allowBlank,value:t.valueFormatter(t.value),validationChecker:t.validationChecker,errorText:t.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){e.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_ERROR,function(){t.value=BI.parseFloat(this.getLastValidValue())}),this.editor.on(BI.TextEditor.EVENT_VALID,function(){t.value=BI.parseFloat(this.getValue())}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){e.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){e._finetuning(t.step),e.fireEvent(BI.NumberEditor.EVENT_CHANGE),e.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){e._finetuning(-t.step),e.fireEvent(BI.NumberEditor.EVENT_CHANGE),e.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:t.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(e){var t=BI.parseFloat(this.getValue());this.setValue(BI.add(t,e))},setUpEnable:function(e){this.topBtn.setEnable(!!e)},setDownEnable:function(e){this.bottomBtn.setEnable(!!e)},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},getValue:function(){return this.options.value},setValue:function(e){var t=this.options;t.value=e,this.editor.setValue(t.valueFormatter(e))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor)},function(e,t){BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var e=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-number-interval"+(BI.isIE()&&BI.getIEVersion()<10?" hack":""),height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var t=this,i=this.constants,e=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:e.height-2,watermark:e.watermark,allowBlank:e.allowBlank,value:e.min,level:"warning",tipType:"success",title:function(){return t.smallEditor&&t.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(e){return!!BI.isNumeric(e)||(t.smallEditorBubbleType=i.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:e.numTip,height:e.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:e.height-2,watermark:e.watermark,allowBlank:e.allowBlank,value:e.max,title:function(){return t.bigEditor&&t.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(e){return!!BI.isNumeric(e)||(t.bigEditorBubbleType=i.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:e.numTip,height:e.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:e.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),!0===e.closeMin?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:e.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),!0===e.closeMax?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:e.height-2*i.border,width:i.width-2*i.border,height:e.height-2*i.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:t.smallEditor},{el:t.smallCombo,width:i.width-i.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:t.bigCombo,width:i.width-i.border},{el:t.bigEditor,lgap:1}]}),BI.createWidget({element:t,type:"bi.center",hgap:15,height:e.height,items:[{type:"bi.absolute",items:[{el:t.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:t.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:t,type:"bi.horizontal_auto",items:[t.label]}),t._setValidEvent(t.bigEditor,i.bigEditor),t._setValidEvent(t.smallEditor,i.smallEditor),t._setErrorEvent(t.bigEditor,i.bigEditor),t._setErrorEvent(t.smallEditor,i.smallEditor),t._setBlurEvent(t.bigEditor),t._setBlurEvent(t.smallEditor),t._setFocusEvent(t.bigEditor),t._setFocusEvent(t.smallEditor),t._setComboValueChangedEvent(t.bigCombo),t._setComboValueChangedEvent(t.smallCombo),t._setEditorValueChangedEvent(t.bigEditor),t._setEditorValueChangedEvent(t.smallEditor),t._checkValidation()},_checkValidation:function(){var e=this,t=this.constants,i=this.options;if(e._setTitle(""),BI.Bubbles.hide(t.typeError),BI.Bubbles.hide(t.numberError),BI.Bubbles.hide(t.signalError),!e.smallEditor.isValid()||!e.bigEditor.isValid())return e.element.removeClass("number-error"),i.validation="invalid",t.typeError;if(BI.isEmptyString(e.smallEditor.getValue())||BI.isEmptyString(e.bigEditor.getValue()))return e.element.removeClass("number-error"),i.validation="valid","";var n=parseFloat(e.smallEditor.getValue()),r=parseFloat(e.bigEditor.getValue()),o=e.bigCombo.getValue(),a=e.smallCombo.getValue();return o[0]===t.less_equal&&a[0]===t.less_equal?r<n?(e.element.addClass("number-error"),i.validation="invalid",t.numberError):(e.element.removeClass("number-error"),i.validation="valid",""):r<n?(e.element.addClass("number-error"),i.validation="invalid",t.numberError):n===r?(e.element.addClass("number-error"),i.validation="invalid",t.signalError):(e.element.removeClass("number-error"),i.validation="valid","")},_setTitle:function(e){this.label.setTitle(e)},_setFocusEvent:function(e){var t=this,i=this.constants;e.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(t._setTitle(""),t._checkValidation()){case i.typeError:BI.Bubbles.show(i.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset});break;case i.numberError:BI.Bubbles.show(i.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset});break;case i.signalError:BI.Bubbles.show(i.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset});break;default:return}})},_setBlurEvent:function(e){var t=this.constants,i=this;e.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(t.typeError),BI.Bubbles.hide(t.numberError),BI.Bubbles.hide(t.signalError),i._checkValidation()){case t.typeError:i._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case t.numberError:i._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case t.signalError:i._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:i._setTitle("")}})},_setErrorEvent:function(e){var t=this.constants,i=this;e.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){i._checkValidation(),BI.Bubbles.show(t.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),i,{offsetStyle:"left",adjustYOffset:t.adjustYOffset}),i.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(e){var t=this,i=this.constants;e.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(t._checkValidation()){case i.numberError:BI.Bubbles.show(i.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset}),t.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case i.signalError:BI.Bubbles.show(i.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset}),t.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:t.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(e){var t=this,i=this.constants;e.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(t._checkValidation()){case i.typeError:BI.Bubbles.show(i.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset});break;case i.numberError:BI.Bubbles.show(i.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset});break;case i.signalError:BI.Bubbles.show(i.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset})}t.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),e.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){t.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(e){var t=this,i=this.constants;e.on(BI.IconCombo.EVENT_CHANGE,function(){switch(t._checkValidation()){case i.typeError:t._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),t.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case i.numberError:t._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),t.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case i.signalError:t._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),t.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:t.fireEvent(BI.NumberInterval.EVENT_CHANGE),t.fireEvent(BI.NumberInterval.EVENT_CONFIRM),t.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(e){this.smallEditor.setEnable(e)},setCloseMinEnable:function(e){this.smallCombo.setEnable(e)},setMaxEnable:function(e){this.bigEditor.setEnable(e)},setCloseMaxEnable:function(e){this.bigCombo.setEnable(e)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(e){this.smallTip.setText(e),this.bigTip.setText(e)},getNumTip:function(){return this.smallTip.getText()},setValue:function(e){e=e||{};var t;(BI.isNumeric(e.min)||BI.isEmptyString(e.min))&&this.smallEditor.setValue(e.min),BI.isNotNull(e.min)||this.smallEditor.setValue(""),(BI.isNumeric(e.max)||BI.isEmptyString(e.max))&&this.bigEditor.setValue(e.max),BI.isNotNull(e.max)||this.bigEditor.setValue(""),BI.isNull(e.closeMin)||(t=!0===e.closeMin?1:0,this.smallCombo.setValue(t)),BI.isNull(e.closeMax)||(t=!0===e.closeMax?1:0,this.bigCombo.setValue(t)),this._checkValidation()},getValue:function(){var e={},t=this.smallCombo.getValue(),i=this.bigCombo.getValue();return e.min=this.smallEditor.getValue(),e.max=this.bigEditor.getValue(),0===t[0]?e.closeMin=!1:e.closeMin=!0,0===i[0]?e.closeMax=!1:e.closeMax=!0,e},destroyed:function(){var e=this.constants;BI.Bubbles.remove(e.typeError),BI.Bubbles.remove(e.numberError),BI.Bubbles.remove(e.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval)},function(e,t){BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var t=this,e=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(e){t.editor=e},height:e.height-2,watermark:e.watermark,allowBlank:e.allowBlank,value:e.value,quitChecker:e.quitChecker,validationChecker:e.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setValue:function(e){return this.editor.setValue(e)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor)},function(e,t){BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var n=this,e=this.options,i=function(){BI.isKey(n._startValue)&&(n.storeValue.type===BI.Selection.All?BI.remove(n.storeValue.value,n._startValue):BI.pushDistinct(n.storeValue.value,n._startValue)),n._updateAllValue(),n._checkError(),n.trigger.getSearcher().setState(n.storeValue),n.trigger.getCounter().setButtonChecked(n.storeValue)};this.storeValue=BI.deepClone(e.value||{}),this._updateAllValue(),this._assertValue(this.storeValue),this._checkError(),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.search_multi_select_trigger",text:e.text,height:e.height,masker:{offset:{left:0,top:0,right:0,bottom:25}},allValueGetter:function(){return n.allValue},valueFormatter:e.valueFormatter,itemsCreator:function(t,i){n._itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(BI.deepClone(n.getValue())),i.apply(n,arguments)})},value:this.storeValue,warningTitle:e.warningTitle}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){n._setStartValue(""),this.getSearcher().setValue(n.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){n._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){var e;this.getSearcher().hasMatched()&&(e=this.getSearcher().getKeyword(),n._join({type:BI.Selection.Multi,value:[e]},function(){n.combo.setValue(n.storeValue),n._setStartValue(e),i(),n._populate(),n._setStartValue("")}))}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.combo.setValue(n.storeValue),i(),n.combo.populate(),n._setStartValue("")):(n.combo.setValue(n.storeValue),i())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(e,t){t instanceof BI.MultiSelectBar?n._joinAll(this.getValue(),function(){i()}):n._join(this.getValue(),function(){i()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(n.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){n.combo.isViewVisible()||n.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_multi_select_popup_view",ref:function(){n.popup=this,n.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){n.storeValue=this.getValue(),n._adjust(function(){i()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){n._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){n.setValue(),n._defaultState()}}],itemsCreator:BI.bind(n._itemsCreator,this),valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){n.combo.adjustWidth(),n.combo.adjustHeight(),n.trigger.getCounter().adjustView(),n.trigger.getSearcher().adjustView()})}},value:e.value,hideChecker:function(e){return 0===t.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(n.storeValue),BI.nextTick(function(){n._populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){n.trigger.stopEditing(),!0===n.requesting?n.wants2Quit=!0:(i(),n.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){n.trigger.getCounter().hideView(),n.combo.isViewVisible()?n.combo.hideView():n.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(e){var i=this.options;(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[]),BI.remove(e.value,function(e,t){return!BI.contains(BI.map(i.items,"value"),t)})},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(r,o){var a=this;this.options;this._assertValue(this.storeValue),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:r},function(e){var t,i,n=BI.map(e.items,"value");t=n,i=a._makeMap(t),BI.each(r,function(e,t){BI.isNotNull(i[t])&&(a.storeValue.type===BI.Selection.Multi?BI.pushDistinct(a.storeValue.value,t):BI.remove(a.storeValue.value,t))}),a._adjust(o)})},_joinAll:function(t,l){var u=this;this.options;this._assertValue(t),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,u.storeValue.assist&&u.storeValue.assist.push(r[t]),delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void u._adjust(l)}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&(u.storeValue.assist&&u.storeValue.assist.push(o[i[e]]),delete o[i[e]]),BI.isNull(a[i[e]])&&(BI.remove(u.storeValue.assist,t),s.push(t))}),u.storeValue.value=s.concat(BI.values(o)),u._adjust(l)})},_adjust:function(t){var i=this;this.options;function n(){i.storeValue.type===BI.Selection.All&&i.storeValue.value.length>=i._count?i.storeValue={type:BI.Selection.Multi,value:[]}:i.storeValue.type===BI.Selection.Multi&&i.storeValue.value.length>=i._count&&(i.storeValue={type:BI.Selection.All,value:[]}),i._updateAllValue(),i._checkError(),!0===i.wants2Quit&&(i.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM),i.wants2Quit=!1),i.requesting=!1}this._count?(n(),t()):this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_DATA_LENGTH},function(e){i._count=e.count,n(),t()})},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),BI.remove(i.storeValue.assist,t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,i.storeValue.assist&&i.storeValue.assist.push(n[t]),delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void i._adjust(t)}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},_getItemsByTimes:function(e,t){for(var i=[],n=100*(t-1);e[n]&&n<100*t;n++)i.push(e[n]);return i},_hasNextByTimes:function(e,t){return 100*t<e.length},_itemsCreator:function(e,t){var i,n=this.options.items,r=(e.keywords||[]).slice();e.keyword&&r.push(e.keyword),BI.each(r,function(e,t){var i=BI.Func.getSearchResult(n,t);n=i.match.concat(i.find)}),e.selectedValues&&(i=BI.makeObject(e.selectedValues,!0),n=BI.filter(n,function(e,t){return!i[t.value]})),e.type!=BI.MultiSelectCombo.REQ_GET_ALL_DATA?e.type!=BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?t({items:this._getItemsByTimes(n,e.times),hasNext:this._hasNextByTimes(n,e.times)}):t({count:n.length}):t({items:n})},_checkError:function(){var e,i=this.storeValue.value||[];BI.isNotEmptyArray(i)?(i=BI.isArray(i)?i:[i],e=BI.find(this.allValue,function(e,t){return!BI.contains(i,t)}),BI.isNull(e)?(BI.isNotNull(this.trigger)&&this.trigger.setTipType("success"),this.element.removeClass("combo-error")):(BI.isNotNull(this.trigger)&&this.trigger.setTipType("warning"),this.element.addClass("combo-error"))):i.length===this.allValue.length?(BI.isNotNull(this.trigger)&&this.trigger.setTipType("success"),this.element.removeClass("combo-error")):(BI.isNotNull(this.trigger)&&this.trigger.setTipType("warning"),this.element.addClass("combo-error"))},_updateAllValue:function(){this.storeValue=this.storeValue||{},this.allValue=BI.deepClone(this.storeValue.value||[])},setValue:function(e){this.storeValue=BI.deepClone(e||{}),this._updateAllValue(),this._assertValue(this.storeValue),this.combo.setValue(this.storeValue),this._checkError()},getValue:function(){return BI.deepClone(this.storeValue)},_populate:function(){this._count=null,this.combo.populate()},populate:function(e){this.options.items=e,this._populate()}}),BI.extend(BI.SearchMultiTextValueCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.SearchMultiTextValueCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.search_multi_text_value_combo",BI.SearchMultiTextValueCombo)},function(e,t){BI.SearchMultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SearchMultiSelectTrigger.superclass._init.apply(this,arguments);var t=this,e=this.options;e.height&&this.setHeight(e.height-2),this.searcher=BI.createWidget(e.searcher,{type:"bi.search_multi_select_searcher",height:e.height,itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,allValueGetter:e.allValueGetter,popup:{},adapter:e.adapter,masker:e.masker,value:e.value,text:e.text,tipType:e.tipType,warningTitle:e.warningTitle}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(e.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:e.valueFormatter,itemsCreator:e.itemsCreator,adapter:e.adapter,masker:e.masker,value:e.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var i=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),n=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:i,width:0},{el:BI.createWidget(),width:24}]});this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){n.attr("items")[1].width=!0===e?t.numberCounter.element.outerWidth()+8:0,n.resize()})}),this.element.click(function(e){0<t.element.find(e.target).length&&t.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(e){this.searcher.setAdapter(e),this.numberCounter.setAdapter(e)},setValue:function(e){this.searcher.setValue(e),this.numberCounter.setValue(e)},setTipType:function(e){this.searcher.setTipType(e)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SearchMultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectTrigger.EVENT_START="EVENT_START",BI.SearchMultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.search_multi_select_trigger",BI.SearchMultiSelectTrigger)},function(e,t){BI.SearchMultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectLoader.superclass._init.apply(this,arguments);var s=this,l=this.options,u=!1;this.storeValue=l.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:l.logic,el:BI.extend({onLoaded:l.onLoaded,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"}]}}},l.el),itemsCreator:function(r,o){var a=s._startValue;s.storeValue&&(r=BI.extend(r||{},{selectedValues:BI.isKey(a)&&s.storeValue.type===BI.Selection.Multi?s.storeValue.value.concat(a):s.storeValue.value})),l.itemsCreator(r,function(e){u=e.hasNext;var t,i,n=[];1===r.times&&s.storeValue&&(t=BI.map(s.storeValue.value,function(e,t){var i=l.valueFormatter(t)||t;return{text:i,value:t,title:i,selected:s.storeValue.type===BI.Selection.Multi}}),BI.isKey(s._startValue)&&!BI.contains(s.storeValue.value,s._startValue)&&(i=l.valueFormatter(a)||a,t.unshift({text:i,value:a,title:i,selected:!0})),n=s._createItems(t)),o(n.concat(s._createItems(e.items)),e.keyword||""),1===r.times&&s.storeValue&&(BI.isKey(a)&&(s.storeValue.type===BI.Selection.All?BI.remove(s.storeValue.value,a):BI.pushDistinct(s.storeValue.value,a)),s.setValue(s.storeValue)),1===r.times&&s._scrollToTop()})},hasNext:function(){return u},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){s.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){s.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(e){return BI.createItems(e,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var e=this;BI.delay(function(){e.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},setStartValue:function(e){this._startValue=e},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(e){e=this._createItems(e),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(e){this.button_group.resetHeight(e)},resetWidth:function(e){this.button_group.resetWidth(e)}}),BI.SearchMultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_multi_select_loader",BI.SearchMultiSelectLoader)},function(e,t){BI.SearchMultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectPopupView.superclass._init.apply(this,arguments);var t=this,e=this.options;this.loader=BI.createWidget({type:"bi.search_multi_select_loader",itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:e.onLoaded,value:e.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:e.maxWidth,minWidth:e.minWidth,maxHeight:e.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:e.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){t.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(e){switch(e){case 0:t.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:t.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(e){this.loader.setStartValue(e)},setValue:function(e){this.popupView.setValue(e)},getValue:function(){return this.popupView.getValue()},populate:function(e){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(e){this.popupView.resetHeight(e)},resetWidth:function(e){this.popupView.resetWidth(e)}}),BI.SearchMultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.search_multi_select_popup_view",BI.SearchMultiSelectPopupView)},function(e,t){BI.SearchMultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SearchMultiSelectSearcher.superclass._init.apply(this,arguments);var n=this,r=this.options;this.editor=BI.createWidget(r.el,{type:"bi.multi_select_editor",height:r.height,text:r.text,tipType:r.tipType,warningTitle:r.warningTitle}),this.searcher=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,element:this,height:r.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:r.valueFormatter,keywordGetter:function(){return n.editor.getValue()},itemsCreator:function(e,t){var i=n.editor.getValue();e.keywords=[i],this.setKeyword(i),r.itemsCreator(e,t)},value:r.value},r.popup),adapter:r.adapter,masker:r.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){n.fireEvent(BI.SearchMultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),n.fireEvent(BI.SearchMultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){n.fireEvent(BI.SearchMultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){n.fireEvent(BI.SearchMultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var e=this.getKeywords();n.fireEvent(BI.SearchMultiSelectSearcher.EVENT_SEARCHING,e)}),BI.isNotNull(r.value)&&this.setState(r.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(e){this.searcher.setAdapter(e)},setState:function(e){var i,n=this.options,t={};t.type=e.type,t.value=n.allValueGetter()||[],t.assist=e.assist,t.type===BI.Selection.All?0===t.value.length?this.editor.setState(BI.Selection.All):BI.size(t.assist)<=20?(i="",BI.each(t.assist,function(e,t){i+=0===e?""+(n.valueFormatter(t+"")||t):","+(n.valueFormatter(t+"")||t)}),this.editor.setState(i)):this.editor.setState(BI.Selection.Multi):0===t.value.length?this.editor.setState(BI.Selection.None):BI.size(t.value)<=20?(i="",BI.each(t.value,function(e,t){i+=0===e?""+(n.valueFormatter(t+"")||t):","+(n.valueFormatter(t+"")||t)}),this.editor.setState(i)):this.editor.setState(BI.Selection.Multi)},setTipType:function(e){this.editor.setTipType(e)},setValue:function(e){this.setState(e),this.searcher.setValue(e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(e){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SearchMultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SearchMultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectSearcher.EVENT_START="EVENT_START",BI.SearchMultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.search_multi_select_searcher",BI.SearchMultiSelectSearcher)},function(e,t){BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(e){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode)},function(e,t){BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(e){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode)},function(e,t){BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(e){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode)},function(e,t){BI.SelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-select-tree-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreePlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(e){BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.select_tree_plus_group_node",BI.SelectTreePlusGroupNode)},function(e,t){BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:t.text,height:t.height,items:t.items,value:t.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:t.items,value:t.value}),this.combo=BI.createWidget({type:"bi.combo",container:t.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.combo.hideView()})},setValue:function(e){e=BI.isArray(e)?e:[e],this.trigger.setValue(e),this.popup.setValue(e)},getValue:function(){return this.popup.getValue()},populate:function(e){this.combo.populate(e)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo)},function(e,t){BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var t=this,e=this.options;this.trigger=BI.createWidget(e.el),this.trigger.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&this.isSelected()&&t.expander.setValue([]),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:e.trigger,toggle:e.toggle,direction:e.direction,isDefaultInit:e.isDefaultInit,el:this.trigger,popup:e.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&t.trigger.setSelected(!1),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},getAllLeaves:function(){return this.expander.getAllLeaves()},setValue:function(e){BI.contains(e,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(e))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(e){this.expander.populate(e)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander)},function(e,t){BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(n,r,o){var a=this;return BI.each(n,function(e,t){var i={layer:r};t.id=t.id||BI.UUID(),i.pNode=o,!0===t.isParent||!0===t.parent||BI.isNotEmptyArray(t.children)?(i.type="bi.select_tree_mid_plus_group_node",e===n.length-1&&(i.type="bi.select_tree_last_plus_group_node",i.isLastNode=!0),0!==e||o||(i.type="bi.select_tree_first_plus_group_node"),0===e&&e===n.length-1&&(i.type="bi.select_tree_plus_group_node"),BI.defaults(t,i),a._formatItems(t.children,r+1,t)):(i.type="bi.mid_tree_leaf_item",0!==e||o||(i.type="bi.first_tree_leaf_item"),e===n.length-1&&(i.type="bi.last_tree_leaf_item"),BI.defaults(t,i))}),n},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(t.items),0),value:t.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){e.fireEvent(BI.SelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(e){e=BI.isArray(e)?e:[e],this.tree.setValue(e)},populate:function(e){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(e)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup)},function(e,t){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 a=this,s=this.options,l=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:s.allowNoSelect,element:this,logic:{dynamic:!1},value:s.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(r,o){a.storeValue&&(r=BI.extend(r||{},{selectedValues:[a.storeValue]})),s.itemsCreator(r,function(e){var t=e.keyword=s.keywordGetter();l=e.hasNext;var i,n=[];1===r.times&&BI.isNotNull(a.storeValue)&&(i=a._filterValues(a.storeValue),n=a._createItems(i)),o(n.concat(a._createItems(e.items)),t||""),1===r.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return l}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(e){return BI.createItems(e,{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(e){var t,i=this.options,n=i.keywordGetter(),r=e||[],o=BI.map(BI.isArray(r)?r:[r],function(e,t){return{text:i.valueFormatter(t)||t,value:t}});return BI.isKey(n)&&(r=(t=BI.Func.getSearchResult(o,n)).match.concat(t.find)),BI.map(r,function(e,t){return{text:t.text,title:t.text,value:t.value,selected:!1}})},setValue:function(e){this.storeValue=e,this.button_group.setValue(e)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(e){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(e){this.button_group.resetHeight(e)},resetWidth:function(e){this.button_group.resetWidth(e)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader)},function(e,t){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 i=this,n=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"single-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(){i.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,n.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:n.allowNoSelect,keywordGetter:n.keywordGetter,valueFormatter:n.valueFormatter,itemsCreator:function(e,t){n.itemsCreator.apply(i,[e,function(e){t(e),i.setKeyword(n.keywordGetter())}])},value:n.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(i){var e=BI.some(this.loader.getAllButtons(),function(e,t){return i===t.getValue()}),t=0<this.loader.getAllButtons().length&&e;this.tooltipClick.setVisible(t),this.addNotMatchTip.setVisible(!t),t||this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",i))},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(e){this.loader.setValue(e)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(e){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.single_select_search_insert_pane",BI.SingleSelectSearchInsertPane)},function(e,t){BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.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.SingleSelectSearchPane.superclass._init.apply(this,arguments);var i=this,n=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"single-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:n.allowNoSelect,keywordGetter:n.keywordGetter,valueFormatter:n.valueFormatter,itemsCreator:function(e,t){n.itemsCreator.apply(i,[e,function(e){t(e),i.setKeyword(n.keywordGetter())}])},value:n.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(e){var t,i=0<this.loader.getAllButtons().length&&(t=this.loader.getAllButtons()[0])&&e===t.getValue();i!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(i),this.resizer.attr("items")[0].height=i?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(e){this.loader.setValue(e)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(e){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane)},function(e,t){BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var n=this,e=this.options,i=function(){BI.isKey(n._startValue)&&(n.storeValue=n._startValue),n.trigger.getSearcher().setState(n.storeValue)};this.storeValue=e.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:e.height,allowNoSelect:e.allowNoSelect,allowEdit:e.allowEdit,valueFormatter:e.valueFormatter,itemsCreator:function(t,i){e.itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(n.getValue()),i.apply(n,arguments)})},text:e.text,value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){n.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){n.fireEvent(BI.SingleSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){n._setStartValue(),this.getSearcher().setValue(n.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){n._setStartValue(),n.fireEvent(BI.SingleSelectCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){var e;this.getSearcher().hasMatched()&&(e=this.getSearcher().getKeyword(),n.combo.setValue(n.storeValue),n._setStartValue(e),i(),n.populate(),n._setStartValue())}),this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.combo.setValue(n.storeValue),i(),n.combo.populate(),n._setStartValue()):(n.combo.setValue(n.storeValue),i())}),n.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(e,t){n.storeValue=this.getValue(),i(),n._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){n.combo.isViewVisible()||n.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:e.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:e.allowNoSelect,ref:function(){n.popup=this,n.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){n.storeValue=this.getValue(),n._adjust(function(){i(),n._defaultState()}),n.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM)}}],itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){n.combo.adjustWidth(),n.combo.adjustHeight(),n.trigger.getSearcher().adjustView()})}},hideChecker:function(e){return 0===t.element.find(e.target).length},value:e.value}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(n.storeValue),BI.nextTick(function(){n.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){n.trigger.stopEditing(),!0===n.requesting?n.wants2Quit=!0:n.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM)});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"single-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){n.combo.isViewVisible()?n.combo.hideView():n.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(e){},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(r,o){var a=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:r},function(e){var t,i,n=BI.map(e.items,"value");t=n,i=a._makeMap(t),BI.each(r,function(e,t){BI.isNotNull(i[t])&&BI.remove(a.storeValue.value,t)}),a._adjust(o)})},_adjust:function(t){var i=this,e=this.options;function n(){!0===i.wants2Quit&&(i.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),i.wants2Quit=!1),i.requesting=!1}this._count?(n(),t()):e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(e){i._count=e.count,n(),t()})},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},setValue:function(e){this.storeValue=e,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo)},function(e,t){BI.SingleSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectInsertCombo.superclass._init.apply(this,arguments);var n=this,e=this.options,i=function(){BI.isKey(n._startValue)&&(n.storeValue=n._startValue),n.trigger.getSearcher().setState(n.storeValue)};this.storeValue=e.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:e.height,allowNoSelect:e.allowNoSelect,allowEdit:e.allowEdit,valueFormatter:e.valueFormatter,itemsCreator:function(t,i){e.itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(n.getValue()),i.apply(n,arguments)})},text:e.text,value:this.storeValue,searcher:{popup:{type:"bi.single_select_search_insert_pane",listeners:[{eventName:BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){n.trigger.getSearcher().hasMatched()||(n.storeValue=n.trigger.getSearcher().getKeyword(),i(),n._defaultState())}}]}}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){n.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){n.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){n._setStartValue(),this.getSearcher().setValue(n.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){n._setStartValue(),n.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){var e;this.getSearcher().hasMatched()&&(e=this.getSearcher().getKeyword(),n.storeValue=e,n.combo.setValue(n.storeValue),n._setStartValue(e),i(),n.populate(),n._setStartValue())}),this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.combo.setValue(n.storeValue),i(),n.combo.populate(),n._setStartValue()):(n.combo.setValue(n.storeValue),i())}),n.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(e,t){n.storeValue=this.getValue(),i(),n._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){n.combo.isViewVisible()||n.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:e.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:e.allowNoSelect,ref:function(){n.popup=this,n.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){n.storeValue=this.getValue(),n._adjust(function(){i(),n._defaultState()}),n.fireEvent(BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM)}}],itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){n.combo.adjustWidth(),n.combo.adjustHeight(),n.trigger.getSearcher().adjustView()})}},hideChecker:function(e){return 0===t.element.find(e.target).length},value:e.value}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(n.storeValue),BI.nextTick(function(){n.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){n.trigger.stopEditing(),!0===n.requesting?n.wants2Quit=!0:n.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM)});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"single-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){n.combo.isViewVisible()?n.combo.hideView():n.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(e){},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(r,o){var a=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,keywords:r},function(e){var t,i,n=BI.map(e.items,"value");t=n,i=a._makeMap(t),BI.each(r,function(e,t){BI.isNotNull(i[t])&&BI.remove(a.storeValue.value,t)}),a._adjust(o)})},_adjust:function(e){var t=this;this.options;!function(){!0===t.wants2Quit&&(t.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM),t.wants2Quit=!1);t.requesting=!1}(),e()},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},setValue:function(e){this.storeValue=e,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_insert_combo",BI.SingleSelectInsertCombo)},function(e,t){BI.SingleSelectComboItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item",logic:{dynamic:!1},height:24})},_init:function(){BI.SingleSelectComboItem.superclass._init.apply(this,arguments);var e=this.options;this.radio=BI.createWidget({type:"bi.radio"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,keyword:e.keyword,value:e.value,py:e.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:26},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectComboItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.SingleSelectComboItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(e){BI.SingleSelectComboItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(e)}}),BI.SingleSelectComboItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_combo_item",BI.SingleSelectComboItem)},function(e,t){BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"},allowNoSelect:!1})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var n=this,e=this.options;this.list=BI.createWidget(e.el,{type:"bi.list_pane",items:e.items,itemsCreator:function(t,i){1===t.times&&n.toolbar&&n.toolbar.setVisible(!1),e.itemsCreator(t,function(e){i.apply(n,arguments),1===t.times&&(n.toolbar&&n.toolbar.setVisible(e&&0<e.length),n.toolbar&&n.toolbar.setEnable(e&&0<e.length))})},onLoaded:e.onLoaded,hasNext:e.hasNext,value:e.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(e,t,i){e===BI.Events.CLICK&&n.fireEvent(BI.SingleSelectList.EVENT_CHANGE,t,i),n.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(e.direction),BI.extend({scrolly:!0},e.logic,{items:e.allowNoSelect?BI.LogicFactory.createLogicItemsByDirection(e.direction,{type:"bi.single_select_item",cls:"bi-list-item-active",height:24,forceNotSelected:!0,text:BI.i18nText("BI-Basic_No_Select"),ref:function(e){n.toolbar=e},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(e){e===BI.Events.CLICK&&(n.list.setValue(),n.fireEvent(BI.SingleSelectList.EVENT_CHANGE)),n.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]},this.list):BI.LogicFactory.createLogicItemsByDirection(e.direction,this.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(e){this.list.prependItems.apply(this.list,arguments)},addItems:function(e){this.list.addItems.apply(this.list,arguments)},setValue:function(e){this.list.setValue([e])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(e){this.list.populate.apply(this.list,arguments)},resetHeight:function(e){this.list.resetHeight?this.list.resetHeight(e):this.list.element.css({"max-height":e+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(e){return this.list.getIndexByValue(e)},getNodeById:function(e){return this.list.getNodeById(e)},getNodeByValue:function(e){return this.list.getNodeByValue(e)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList)},function(e,t){BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},el:{height:400},allowNoSelect:!1,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,s=this.options,l=!1;this.storeValue=s.value,this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:s.allowNoSelect,logic:s.logic,el:BI.extend({onLoaded:s.onLoaded,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"}]}}},s.el),itemsCreator:function(n,r){var o=a._startValue;BI.isNotNull(a.storeValue)&&(n=BI.extend(n||{},{selectedValues:[a.storeValue]})),s.itemsCreator(n,function(e){l=e.hasNext;var t,i=[];1===n.times&&BI.isNotNull(a.storeValue)&&(t=BI.map([a.storeValue],function(e,t){var i=s.valueFormatter(t)||t;return{text:i,value:t,title:i,selected:!0}}),i=a._createItems(t)),r(i.concat(a._createItems(e.items)),e.keyword||""),1===n.times&&a.storeValue&&(BI.isKey(o)&&(a.storeValue=o),a.setValue(a.storeValue)),1===n.times&&a._scrollToTop()})},hasNext:function(){return l},value:this.storeValue}),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(e){return BI.createItems(e,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:!1})},_scrollToTop:function(){var e=this;BI.delay(function(){e.button_group.element.scrollTop(0)},30)},_assertValue:function(e){},setStartValue:function(e){this._startValue=e},setValue:function(e){this.storeValue=e,this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(e){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(e){this.button_group.resetHeight(e)},resetWidth:function(e){this.button_group.resetWidth(e)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader)},function(e,t){BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",allowNoSelect:!1,maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var e=this,t=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:t.allowNoSelect,itemsCreator:t.itemsCreator,valueFormatter:t.valueFormatter,onLoaded:t.onLoaded,value:t.value}),this.popupView=BI.createWidget({type:"bi.popup_view",stopPropagation:!1,maxWidth:t.maxWidth,minWidth:t.minWidth,maxHeight:t.maxHeight,element:this,el:this.loader,value:t.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){e.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)})},setStartValue:function(e){this.loader.setStartValue(e)},setValue:function(e){this.popupView.setValue(e)},getValue:function(){return this.popupView.getValue()},populate:function(e){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(e){this.popupView.resetHeight(e)},resetWidth:function(e){this.popupView.resetWidth(e)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView)},function(e,t){BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border bi-border-radius",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var e=this,t=this.options;t.height&&this.setHeight(t.height-2),this.searcher=BI.createWidget(t.searcher,{type:"bi.single_select_searcher",allowNoSelect:t.allowNoSelect,text:t.text,height:t.height,itemsCreator:t.itemsCreator,valueFormatter:t.valueFormatter,popup:{},adapter:t.adapter,masker:t.masker,value:t.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_FOCUS,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_FOCUS)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_BLUR,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_BLUR,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:24}]});t.allowEdit||BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.text",title:function(){return e.searcher.getState()}},left:0,right:24,top:0,bottom:0}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(e){this.searcher.setAdapter(e)},setValue:function(e){this.searcher.setValue(e)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.SingleSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger)},function(e,t){BI.SingleSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectInsertList.superclass._init.apply(this,arguments);var i=this,n=this.options;this.storeValue=n.value;var r=function(){BI.isKey(i._startValue)&&(i.storeValue=i._startValue)};this.adapter=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:n.allowNoSelect,cls:"popup-single-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:n.itemsCreator,valueFormatter:n.valueFormatter,logic:{dynamic:!0},el:{},value:n.value}),this.adapter.on(BI.SingleSelectLoader.EVENT_CHANGE,function(){i.storeValue=this.getValue(),r(),i.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.single_select_search_pane",allowNoSelect:n.allowNoSelect,cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:n.valueFormatter,keywordGetter:function(){return i.trigger.getKeyword()},itemsCreator:function(e,t){e.keywords=[i.trigger.getKeyword()],this.setKeyword(e.keywords[0]),n.itemsCreator(e,t)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,value:n.value,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){i._showSearcherPane(),i._setStartValue(),this.setValue(BI.deepClone(i.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){i._showAdapter(),i._setStartValue(),i.adapter.setValue(i.storeValue),i.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var e=this.getKeyword();i.storeValue=e,i._showAdapter(),i.adapter.setValue(i.storeValue),i._setStartValue(e),r(),i.adapter.populate(),i._setStartValue(),i.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var e=this.getKeyword(),t=BI.last(e);0<(e=BI.initial(e||[])).length&&i._joinKeywords(e,function(){BI.isEndWithBlank(t)?(i.adapter.setValue(i.storeValue),r(),i.adapter.populate(),i._setStartValue()):(i.adapter.setValue(i.storeValue),r())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){i.storeValue=this.getValue(),i.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(e){return BI.makeObject(e||[])},_joinKeywords:function(t,n){var r=this,e=this.options;function i(e){var i=r._makeMap(e);BI.each(t,function(e,t){BI.isNotNull(i[t])&&(r.storeValue.type===BI.Selection.Single?BI.pushDistinct(r.storeValue.value,t):BI.remove(r.storeValue.value,t))}),n()}this._assertValue(this.storeValue),this._allData?i(this._allData):e.itemsCreator({type:BI.SingleSelectInsertList.REQ_GET_ALL_DATA},function(e){r._allData=BI.map(e.items,"value"),i(r._allData)})},_setStartValue:function(e){this._startValue=e,this.adapter.setStartValue(e)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(e){this.storeValue=e,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)},function(e,t){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 e=this,t=this.options;this.editor=BI.createWidget(t.el,{type:"bi.state_editor",element:this,height:t.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:t.value,defaultText:t.text,text:t.text}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){e.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){e.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){e.fireEvent(BI.SingleSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(e){this.editor.setState(e)},setValue:function(e){this.editor.setValue(e)},getValue:function(){var e=this.editor.getState();return BI.isArray(e)&&0<e.length?e[e.length-1]:""},getKeywords:function(){var e=this.editor.getLastChangedValue(),t=e.match(/[\S]+/g);return BI.isEndWithBlank(e)?t.concat([" "]):t},populate:function(e){}}),BI.SingleSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor)},function(e,t){BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},allowNoSelect:!1})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var n=this,r=this.options;this.editor=BI.createWidget(r.el,{type:"bi.single_select_editor",height:r.height,text:r.text,listeners:[{eventName:BI.SingleSelectEditor.EVENT_FOCUS,action:function(){n.fireEvent(BI.SingleSelectSearcher.EVENT_FOCUS)}},{eventName:BI.SingleSelectEditor.EVENT_BLUR,action:function(){n.fireEvent(BI.SingleSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,element:this,height:r.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",allowNoSelect:r.allowNoSelect,valueFormatter:r.valueFormatter,keywordGetter:function(){return n.editor.getValue()},itemsCreator:function(e,t){var i=n.editor.getValue();e.keywords=[i],this.setKeyword(i),r.itemsCreator(e,t)},value:r.value},r.popup),adapter:r.adapter,masker:r.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){n.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),n.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){n.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){n.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var e=this.getKeywords();n.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,e)}),BI.isNotNull(r.value)&&this.setState(r.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(e){this.searcher.setAdapter(e)},setState:function(e){var t=this.options;BI.isNull(e)?this.editor.setState(BI.Selection.None):this.editor.setState(t.valueFormatter(e+"")||e+"")},setValue:function(e){this.setState(e),this.searcher.setValue(e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(e){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher)},function(e,t){BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-sign-initial-editor",validationChecker:BI.emptyFn,text:"",height:24})},_init:function(){BI.SignTextEditor.superclass._init.apply(this,arguments);var e=this,t=this.options;this.editor=BI.createWidget({type:"bi.editor",height:t.height,hgap:4,vgap:2,value:t.value,validationChecker:t.validationChecker,allowBlank:!1}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:function(){return e.getValue()},textAlign:t.textAlign,height:t.height,hgap:4,handler:function(){e._showInput(),e.editor.focus(),e.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){e.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){e._showHint(),e._checkText(),e.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){e._showHint(),e._checkText(),e.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){e._checkText()}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),e._checkText()},_checkText:function(){var t=this.options;BI.nextTick(BI.bind(function(){var e;""===this.editor.getValue()?(this.text.setValue(t.watermark||""),this.text.element.addClass("bi-water-mark")):(e=this.editor.getValue(),e=BI.isEmpty(e)||e==t.text?t.text:e+t.text,this.text.setValue(e),this.text.element.removeClass("bi-water-mark"))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(e){this.text.setTitle(e)},setWarningTitle:function(e){this.text.setWarningTitle(e)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(e){this.editor.setErrorText(e)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(e){this.editor.setValue(e),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(e){var t=this.options;this._showHint(),e=BI.isEmpty(e)||e==t.text?t.text:e+t.text,this.text.setValue(e)}}),BI.SignTextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignTextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SignTextEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.shortcut("bi.sign_text_editor",BI.SignTextEditor)},function(e,t){BI.SliderIconButton=BI.inherit(BI.Widget,{props:{baseCls:"bi-single-slider-button"},constants:{LARGE_SIZE:16,NORMAL_SIZE:12,LARGE_OFFSET:4,NORMAL_OFFSET:6},render:function(){var e=this;return{type:"bi.absolute",ref:function(){e.wrapper=this},items:[{el:{type:"bi.text_button",cls:"slider-button bi-high-light-border",ref:function(){e.slider=this}}}]}}}),BI.shortcut("bi.single_slider_button",BI.SliderIconButton)},function(e,t){BI.SingleSlider=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24,TRACK_GAP_HALF:7,TRACK_GAP:14},props:{baseCls:"bi-single-slider bi-slider-track",digit:!1,unit:""},render:function(){var a=this,s=this.options,l=this._constant;this.enable=!1,this.value="",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.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var u=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:l.SLIDER_WIDTH_HALF,height:l.SLIDER_HEIGHT});return u.element.click(function(e){var t,i,n,r,o;a.enable&&a.isEnabled()&&u.element[0]===e.originalEvent.target&&(t=e.clientX-a.element.offset().left-l.SLIDER_WIDTH_HALF,i=a.track.element[0].scrollWidth-l.TRACK_GAP,(n=0)<t&&t<i&&(n=100*t/a._getGrayTrackLength()),i<=t&&(n=100),r=BI.parseFloat(n.toFixed(1)),a._setAllPosition(r),o=a._getValueByPercent(r),o=!1===s.digit?o:o.toFixed(s.digit),a.label.setValue(o),a.value=o,a.fireEvent(BI.SingleSlider.EVENT_CHANGE))}),this.label=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:s.unit,width:l.EDITOR_WIDTH-2,allowBlank:!1,textAlign:"center",validationChecker:function(e){return a._checkValidation(e)}}),this.label.element.hover(function(){a.label.element.removeClass("bi-border").addClass("bi-border")},function(){a.label.element.removeClass("bi-border")}),this.label.on(BI.SignEditor.EVENT_CONFIRM,function(){var e=BI.parseFloat(this.getValue()),t=a._getPercentByValue(e),i=BI.parseFloat(t.toFixed(1));a._setAllPosition(i),this.setValue(e),a.value=e,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}),this._setVisible(!1),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:l.TRACK_HEIGHT}]}],hgap:l.TRACK_GAP_HALF,height:l.TRACK_HEIGHT},top:23,left:0,width:"100%"},{el:u,top:20,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.horizontal_auto",items:[this.label]}],height:l.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]}},_draggable:function(r){var o=this,a=this.options,s=!1,l=0,u=0,c=0,h=new BI.MouseMoveTracker(function(e){var t,i,n;h.isDragging()&&(s=!0,l=p(c+(u+=e)),r.element.addClass("dragging"),t=100*l/o._getGrayTrackLength(),i=BI.parseFloat(t.toFixed(1)),o._setBlueTrack(i),o._setLabelPosition(i),o._setSliderPosition(i),n=o._getValueByPercent(i),n=!1===a.digit?n:n.toFixed(a.digit),o.label.setValue(n),o.value=n)},function(){var e,t;!0===s&&(e=100*(l=p(l))/o._getGrayTrackLength(),t=BI.parseFloat(e.toFixed(1)),o._setSliderPosition(t),u=l=0,c=l,s=!1),r.element.removeClass("dragging"),h.releaseMouseMoves(),o.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);function p(e){return BI.clamp(e,0,o._getGrayTrackLength())}r.element.on("mousedown",function(e){r.isEnabled()&&(p(c=this.offsetLeft),h.captureMouseMoves(e))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(e){var t=this.options,i=!1;return BI.isNumeric(e)&&!(BI.isNull(e)||e<this.min||e>this.max)&&(i=!1===t.digit||((e+"").split(".")[1]||"").length===t.digit),i},_setBlueTrack:function(e){this.blueTrack.element.css({width:e+"%"})},_setLabelPosition:function(e){},_setSliderPosition:function(e){this.slider.element.css({left:e+"%"})},_setAllPosition:function(e){this._setSliderPosition(e),this._setLabelPosition(e),this._setBlueTrack(e)},_setVisible:function(e){this.slider.setVisible(e),this.label.setVisible(e)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(e){var t=BI.parseInt(10*e);return(this.max-this.min)*t/1e3+this.min},_getPercentByValue:function(e){return 100*(e-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(e){var t=this.options;e=BI.parseFloat(e),e=!1===t.digit?e:e.toFixed(t.digit),isNaN(e)||(this._checkValidation(e)&&(this.value=e),e>this.max&&(this.value=this.max),e<this.min&&(this.value=this.min))},_setEnable:function(e){BI.SingleSlider.superclass._setEnable.apply(this,[e]),e?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},setMinAndMax:function(e){var t=BI.parseFloat(e.min),i=BI.parseFloat(e.max);!isNaN(t)&&!isNaN(i)&&t<i&&(this.min=t,this.max=i)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,this.label.setErrorText(BI.i18nText("BI-Basic_Please_Enter_Number_Between",this.min,this.max)),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider)},function(e,t){BI.SingleSliderLabel=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:20,HEIGHT:20,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24,TRACK_GAP_HALF:7,TRACK_GAP:14},_defaultConfig:function(){return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider-label bi-slider-track",digit:!1,unit:""})},_init:function(){BI.SingleSliderLabel.superclass._init.apply(this,arguments);var a=this,s=this.options,l=this._constant;this.enable=!1,this.value="",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.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var u=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:l.SLIDER_WIDTH_HALF,height:l.SLIDER_HEIGHT});u.element.click(function(e){var t,i,n,r,o;a.enable&&a.isEnabled()&&u.element[0]===e.originalEvent.target&&(t=e.clientX-a.element.offset().left-l.SLIDER_WIDTH_HALF,i=a.track.element[0].scrollWidth-l.TRACK_GAP,(n=0)<t&&t<i&&(n=100*t/a._getGrayTrackLength()),i<=t&&(n=100),r=BI.parseFloat(n.toFixed(1)),a._setAllPosition(r),o=a._getValueByPercent(r),o=!1===s.digit?o:o.toFixed(s.digit),a.label.setText(o+s.unit),a.value=o,a.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE))}),this.label=BI.createWidget({type:"bi.label",height:l.HEIGHT,width:l.EDITOR_WIDTH-2}),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:l.TRACK_HEIGHT}]}],hgap:l.TRACK_GAP_HALF,height:l.TRACK_HEIGHT},top:13,left:0,width:"100%"},{el:u,top:10,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.horizontal_auto",items:[this.label]}],height:l.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(r){var o=this,a=this.options,s=!1,l=0,u=0,c=0,h=new BI.MouseMoveTracker(function(e){var t,i,n;h.isDragging()&&(s=!0,l=p(c+(u+=e)),r.element.addClass("dragging"),t=100*l/o._getGrayTrackLength(),i=BI.parseFloat(t.toFixed(1)),o._setBlueTrack(i),o._setLabelPosition(i),o._setSliderPosition(i),n=o._getValueByPercent(i),n=!1===a.digit?n:n.toFixed(a.digit),o.label.setValue(n+a.unit),o.value=n,o.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE))},function(){var e,t;!0===s&&(e=100*(l=p(l))/o._getGrayTrackLength(),t=BI.parseFloat(e.toFixed(1)),o._setSliderPosition(t),u=l=0,c=l,s=!1),r.element.removeClass("dragging"),h.releaseMouseMoves(),o.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);function p(e){return BI.clamp(e,0,o._getGrayTrackLength())}r.element.on("mousedown",function(e){r.isEnabled()&&(p(c=this.offsetLeft),h.captureMouseMoves(e))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(e){return BI.isNumeric(e)&&!(BI.isNull(e)||e<this.min||e>this.max)},_setBlueTrack:function(e){this.blueTrack.element.css({width:e+"%"})},_setLabelPosition:function(e){},_setSliderPosition:function(e){this.slider.element.css({left:e+"%"})},_setAllPosition:function(e){this._setSliderPosition(e),this._setLabelPosition(e),this._setBlueTrack(e)},_setVisible:function(e){this.slider.setVisible(e),this.label.setVisible(e)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(e){var t=BI.parseInt(10*e);return(this.max-this.min)*t/1e3+this.min},_getPercentByValue:function(e){return 100*(e-this.min)/(this.max-this.min)},_setEnable:function(e){BI.SingleSliderLabel.superclass._setEnable.apply(this,[e]),e?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.value},setValue:function(e){var t=this.options;e=BI.parseFloat(e),e=!1===t.digit?e:e.toFixed(t.digit),isNaN(e)||(this._checkValidation(e)&&(this.value=e),e>this.max&&(this.value=this.max),e<this.min&&(this.value=this.min))},setMinAndMax:function(e){var t=BI.parseFloat(e.min),i=BI.parseFloat(e.max);!isNaN(t)&&!isNaN(i)&&t<i&&(this.min=t,this.max=i)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){var e=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+e.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+e.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel)},function(e,t){BI.SingleSliderNormal=BI.inherit(BI.Single,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24,TRACK_GAP_HALF:7,TRACK_GAP:14},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,s=this._constant,e=this._createTrack();this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var l=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:s.SLIDER_WIDTH_HALF,height:s.SLIDER_HEIGHT});return l.element.click(function(e){var t,i,n,r,o;a.enable&&a.isEnabled()&&l.element[0]===e.originalEvent.target&&(t=e.clientX-a.element.offset().left-s.SLIDER_WIDTH_HALF,i=a.track.element[0].scrollWidth-s.TRACK_GAP,(n=0)<t&&t<i&&(n=100*t/a._getGrayTrackLength()),i<=t&&(n=100),r=BI.parseFloat(n.toFixed(1)),a._setAllPosition(r),o=a._getValueByPercent(r),a.value=o,a.fireEvent(BI.SingleSlider.EVENT_CHANGE))}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:e,width:"100%",height:s.TRACK_HEIGHT}]}],hgap:s.TRACK_GAP_HALF,height:s.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:l,top:0,left:0,width:"100%"}]}},_draggable:function(r){var o=this,a=this.options,s=!1,l=0,u=0,c=0,h=new BI.MouseMoveTracker(function(e){var t,i,n;h.isDragging()&&(s=!0,l=p(c+(u+=e)),r.element.addClass("dragging"),t=100*l/o._getGrayTrackLength(),i=BI.parseFloat(t.toFixed(1)),o._setBlueTrack(i),o._setSliderPosition(i),n=o._getValueByPercent(i),n=!1===a.digit?n:n.toFixed(a.digit),o.value=n,o.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,n))},function(){var e,t;!0===s&&(e=100*(l=p(l))/o._getGrayTrackLength(),t=BI.parseFloat(e.toFixed(1)),o._setSliderPosition(t),u=l=0,c=l,s=!1),r.element.removeClass("dragging"),h.releaseMouseMoves(),o.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);function p(e){return BI.clamp(e,0,o._getGrayTrackLength())}r.element.on("mousedown",function(e){r.isEnabled()&&(p(c=this.offsetLeft),h.captureMouseMoves(e))})},_createTrack:function(){var t=this;this._constant;return 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.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}],ref:function(e){t.track=e}}},_checkValidation:function(e){return!(BI.isNull(e)||e<this.min||e>this.max)},_setBlueTrack:function(e){this.blueTrack.element.css({width:e+"%"})},_setSliderPosition:function(e){this.slider.element.css({left:e+"%"})},_setAllPosition:function(e){this._setSliderPosition(e),this._setBlueTrack(e)},_setVisible:function(e){this.slider.setVisible(e)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(e){var t=BI.parseInt(10*e);return(this.max-this.min)*t/1e3+this.min},_getPercentByValue:function(e){return 100*(e-this.min)/(this.max-this.min)},_setEnable:function(e){BI.SingleSliderNormal.superclass._setEnable.apply(this,[e]),e?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.value},setValue:function(e){var t=BI.parseFloat(e);isNaN(t)||(this._checkValidation(t)&&(this.value=t),t>this.max&&(this.value=this.max),t<this.min&&(this.value=this.min))},setMinAndMax:function(e){var t=BI.parseFloat(e.min),i=BI.parseFloat(e.max);!isNaN(t)&&!isNaN(i)&&t<i&&(this.min=t,this.max=i)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal)},function(e,t){BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:t.text,height:t.height,items:t.items,value:t.value},t.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:t.items,value:t.value}),this.combo=BI.createWidget({type:"bi.combo",container:t.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){e.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.combo.hideView(),e.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(e){this.combo.populate(e)},setValue:function(e){e=BI.isArray(e)?e:[e],this.trigger.setValue(e),this.popup.setValue(e)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo)},function(e,t){BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:t.items,value:t.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){e.fireEvent(BI.SingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(e){e=BI.isArray(e)?e:[e],this.tree.setValue(e)},populate:function(e){BI.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(e)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup)},function(e,t){BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var e=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:e.text,items:e.items,height:e.height,value:e.value})},_checkTitle:function(){var i=this,n=this.getValue();BI.any(this.options.items,function(e,t){if(BI.contains(n,t.value))return i.trigger.setTitle(t.text||t.value),!0})},setValue:function(e){e=BI.isArray(e)?e:[e],this.options.value=e,this.trigger.setValue(e),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(e){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(e)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger)},function(e,t){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 e,t=this,i=this.options;this._createValueMap(),BI.isNotNull(i.value)&&(e=this._digest(i.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:i.height,items:i.items,text:i.text,value:e}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:i.height,el:this.trigger,value:BI.isNull(e)?[]:[e],items:BI.deepClone(i.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var e=t.combo.getValue()[0].value;e!==t.value&&(t.setValue(e),t.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var e=t.combo.getValue()[0].childValue;e!==t.value&&(t.setValue(e),t.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var n=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(e,i){BI.has(i,"el")?BI.each(i.children,function(e,t){n.valueMap[t.value]={value:i.el.value,childValue:t.value}}):n.valueMap[i.value]={value:i.value}})},_digest:function(e){return this.value=e,this.valueMap[e]},setValue:function(e){e=this._digest(e),this.combo.setValue([e]),this.trigger.setValue(e)},getValue:function(){var e=this.combo.getValue()[0];return[e.childValue||e.value]},populate:function(e){this.options.items=BI.flatten(e),this.combo.populate(e),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo)},function(e,t){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 e=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:e.height,items:this._formatItemArray(e.items),text:e.text,value:BI.isNull(e.value)?"":e.value.childValue||e.value.value})},_formatItemArray:function(){var e=BI.flatten(BI.deepClone(this.options.items)),t=[];return BI.each(e,function(e,i){BI.has(i,"el")?(BI.each(i.children,function(e,t){t.text=i.el.text+"("+t.text+")"}),t=BI.concat(t,i.children)):t.push(i)}),t},setValue:function(e){this.trigger.setValue(e.childValue||e.value)},populate:function(e){this.trigger.populate(this._formatItemArray(e))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger)},function(e,t){BI.TimePopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-popup",height:68},render:function(){var t=this;return{type:"bi.vtape",items:[{el:{type:"bi.center_adapt",cls:"bi-split-top",items:[{type:"bi.dynamic_date_time_select",value:this.options.value,ref:function(e){t.timeSelect=e}}]},hgap:10,height:44},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Clears"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){t.fireEvent(BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Now"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){t.fireEvent(BI.TimePopup.BUTTON_NOW_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){t.fireEvent(BI.TimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},setValue:function(e){this._checkValueValid(e)?this.timeSelect.setValue():this.timeSelect.setValue({hour:e.hour,minute:e.minute,second:e.second})},getValue:function(){return this.timeSelect.getValue()},_checkValueValid:function(e){return BI.isNull(e)||BI.isEmptyObject(e)||BI.isEmptyString(e)}}),BI.TimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.TimePopup.BUTTON_NOW_EVENT_CHANGE="BUTTON_NOW_EVENT_CHANGE",BI.TimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.time_popup",BI.TimePopup)},function(e,t){BI.TimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:80,popupWidth:240,comboAdjustHeight:1,border:1},props:{baseCls:"bi-time-combo bi-border bi-border-radius bi-focus-shadow",width:78,height:22,format:"",allowEdit:!1},render:function(){var i=this,e=this.options;this.storeTriggerValue="",this.storeValue=e.value;var t={type:"bi.time_popup",value:e.value,listeners:[{eventName:BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){i.setValue(),i.hidePopupView(),i.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.hidePopupView(),i.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_NOW_EVENT_CHANGE,action:function(){i._setNowTime()}}],ref:function(e){i.popup=e}};return{type:"bi.htape",items:[{type:"bi.absolute",items:[{el:{type:"bi.combo",container:e.container,toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.time_trigger",height:e.height,allowEdit:e.allowEdit,watermark:e.watermark,format:e.format,value:e.value,ref:function(e){i.trigger=e},listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){i.combo.isViewVisible()&&i.combo.hideView(),i.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN,arguments)}},{eventName:"EVENT_STOP",action:function(){i.combo.isViewVisible()||i.combo.showView()}},{eventName:"EVENT_FOCUS",action:function(){i.storeTriggerValue=i.trigger.getKey(),i.combo.isViewVisible()||i.combo.showView(),i.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_BLUR",action:function(){i.fireEvent("EVENT_BLUR")}},{eventName:"EVENT_ERROR",action:function(){var e=BI.getDate();i.storeValue={hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds()},i.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_VALID",action:function(){i.fireEvent("EVENT_VALID")}},{eventName:"EVENT_CHANGE",action:function(){i.fireEvent("EVENT_CHANGE")}},{eventName:"EVENT_CONFIRM",action:function(){var e,t;i.combo.isViewVisible()||(e=i.storeTriggerValue,t=i.trigger.getKey(),BI.isNotEmptyString(t)&&!BI.isEqual(t,e)?(i.storeValue=i.trigger.getValue(),i.setValue(i.trigger.getValue())):BI.isEmptyString(t)&&(i.storeValue=null,i.trigger.setValue()),i.fireEvent("EVENT_CONFIRM"))}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:t,width:this.constants.popupWidth,stopPropagation:!1},hideChecker:function(e){return 0===i.triggerBtn.element.find(e.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){i.popup.setValue(i.storeValue),i.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW)}}],ref:function(e){i.combo=e}},top:0,left:0,right:22,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button time-font icon-size-16",width:22,height:22,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){i.combo.isViewVisible()||i.combo.showView()}}],ref:function(e){i.triggerBtn=e}},top:0,right:0}]}]}},setValue:function(e){this.storeValue=e,this.trigger.setValue(e)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()},_setNowTime:function(){var e=BI.getDate(),t={hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds()};this.setValue(t),this.hidePopupView(),this.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}}),BI.TimeCombo.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.TimeCombo.EVENT_VALID="EVENT_VALID",BI.TimeCombo.EVENT_ERROR="EVENT_ERROR",BI.TimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.time_combo",BI.TimeCombo)},function(e,t){BI.TimeTrigger=BI.inherit(BI.Trigger,{_const:{COMPARE_FORMAT:"%H:%M:%S",COMPLETE_COMPARE_FORMAT:"%Y-%M-%d %H:%M:%S %P",FORMAT_ARRAY:["%H:%M:%S","%I:%M:%S","%l:%M:%S","%k:%M:%S","%l:%M:%S %p","%l:%M:%S %P","%H:%M:%S %p","%H:%M:%S %P","%l:%M","%k:%M","%I:%M","%H:%M","%M:%S"],DEFAULT_DATE_STRING:"2000-01-01",DEFAULT_HOUR:"00"},props:{extraCls:"bi-time-trigger",value:{},format:"",allowEdit:!1},render:function(){var i=this,e=this.options;return this.storeTriggerValue="",this.storeValue=e.value,{type:"bi.absolute",items:[{el:{type:"bi.sign_editor",height:e.height,validationChecker:function(e){return i._dateCheck(e)},quitChecker:function(){return!1},ref:function(e){i.editor=e},value:this._formatValue(e.value),hgap:4,allowBlank:!0,watermark:BI.isKey(e.watermark)?e.watermark:BI.i18nText("BI-Basic_Unrestricted"),title:BI.bind(this._getTitle,this),listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){i.fireEvent("EVENT_KEY_DOWN",arguments)}},{eventName:"EVENT_FOCUS",action:function(){i.storeTriggerValue=i.getKey(),i.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_BLUR",action:function(){i.fireEvent("EVENT_BLUR")}},{eventName:"EVENT_STOP",action:function(){i.fireEvent("EVENT_STOP")}},{eventName:"EVENT_VALID",action:function(){i.fireEvent("EVENT_VALID")}},{eventName:"EVENT_ERROR",action:function(){i.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_CONFIRM",action:function(){var e,t=i.editor.getValue();BI.isNotNull(t)&&i.editor.setState(t),BI.isNotEmptyString(t)&&!BI.isEqual(i.storeTriggerValue,i.getKey())&&(e=t.match(/\d+/g),i.storeValue={hour:0|e[0],minute:0|e[1],second:0|e[2]}),i.fireEvent("EVENT_CONFIRM")}},{eventName:"EVENT_START",action:function(){i.fireEvent("EVENT_START")}},{eventName:"EVENT_CHANGE",action:function(){i.fireEvent("EVENT_CHANGE")}}]},left:0,right:0,top:0,bottom:0},{el:{type:"bi.text",invisible:e.allowEdit,cls:"show-text",title:BI.bind(this._getTitle,this),hgap:4},left:0,right:0,top:0,bottom:0}]}},_dateCheck:function(i){var n=this._const,r=this;return BI.any(n.FORMAT_ARRAY,function(e,t){return BI.print(BI.parseDateTime(n.DEFAULT_DATE_STRING+" "+r._getCompleteHMS(i,t),n.COMPLETE_COMPARE_FORMAT),t)===i})},_getCompleteHMS:function(e,t){var i=this._const;switch(t){case"%M:%S":e=i.DEFAULT_HOUR+":"+e}return e},_getTitle:function(){var e=this.storeValue||{},t=BI.getDate();return BI.print(BI.getDate(t.getFullYear(),0,1,e.hour,e.minute,e.second),this._getFormatString())},_getFormatString:function(){return this.options.format||this._const.COMPARE_FORMAT},_formatValue:function(e){var t=BI.getDate();return BI.isNotEmptyObject(e)?BI.print(BI.getDate(t.getFullYear(),t.getMonth(),t.getDay(),e.hour,e.minute,e.second),this._getFormatString()):""},getKey:function(){return this.editor.getValue()},setValue:function(e){this.storeValue=e,this.editor.setValue(this._formatValue(e))},getValue:function(){return this.storeValue}}),BI.shortcut("bi.time_trigger",BI.TimeTrigger)},function(e,t){BI.DateInterval=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0,timeErrorCls:"time-error"},_defaultConfig:function(){var e=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-date-interval",minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){var e=this.options;BI.DateInterval.superclass._init.apply(this,arguments),e.value=e.value||{},this.left=this._createCombo(e.value.start),this.right=this._createCombo(e.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:this,type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:this.left,left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:this.right,left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.label]})},_createCombo:function(e){var i=this,t=this.options,n=BI.createWidget({type:"bi.dynamic_date_combo",behaviors:t.behaviors,value:e});return n.on(BI.DynamicDateCombo.EVENT_ERROR,function(){i._clearTitle(),BI.Bubbles.hide("error"),i.element.removeClass(i.constants.timeErrorCls),i.fireEvent(BI.DateInterval.EVENT_ERROR)}),n.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),i,{offsetStyle:"center"}),i.fireEvent(BI.DateInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls))}),n.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),i,{offsetStyle:"center"}),i.fireEvent(BI.DateInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls))}),n.on(BI.DynamicDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),i.fireEvent(BI.DateInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls),i.fireEvent(BI.DateInterval.EVENT_CHANGE))}),n},_dateCheck:function(e){return BI.print(BI.parseDateTime(e,"%Y-%x-%d"),"%Y-%x-%d")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d")===e||BI.print(BI.parseDateTime(e,"%Y-%x-%e"),"%Y-%x-%e")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%e"),"%Y-%X-%e")===e},_checkVoid:function(e){var t=this.options;return!BI.checkDateVoid(e.year,e.month,e.day,t.minDate,t.maxDate)[0]},_check:function(e,t){var i=e.match(/\d+/g),n=t.match(/\d+/g);return this._dateCheck(e)&&BI.checkDateLegal(e)&&this._checkVoid({year:i[0],month:i[1],day:i[2]})&&this._dateCheck(t)&&BI.checkDateLegal(t)&&this._checkVoid({year:n[0],month:n[1],day:n[2]})},_compare:function(e,t){return e=BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d"),t=BI.print(BI.parseDateTime(t,"%Y-%X-%d"),"%Y-%X-%d"),BI.isNotNull(e)&&BI.isNotNull(t)&&t<e},_setTitle:function(e){this.left.setTitle(e),this.right.setTitle(e),this.label.setTitle(e)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(e){e=e||{},this.left.setValue(e.start),this.right.setValue(e.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.DateInterval.EVENT_VALID="EVENT_VALID",BI.DateInterval.EVENT_ERROR="EVENT_ERROR",BI.DateInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_interval",BI.DateInterval)},function(e,t){BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0,timeErrorCls:"time-error"},_defaultConfig:function(){var e=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-time-interval",minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){var e=this.options;BI.TimeInterval.superclass._init.apply(this,arguments),e.value=e.value||{},this.left=this._createCombo(e.value.start),this.right=this._createCombo(e.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:this,type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:this.left,left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:this.right,left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.label]})},_createCombo:function(e){var i=this,t=this.options,n=BI.createWidget({type:"bi.dynamic_date_time_combo",behaviors:t.behaviors,value:e});return n.on(BI.DynamicDateTimeCombo.EVENT_ERROR,function(){i._clearTitle(),BI.Bubbles.hide("error"),i.element.removeClass(i.constants.timeErrorCls),i.fireEvent(BI.TimeInterval.EVENT_ERROR)}),n.on(BI.DynamicDateTimeCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i.left.isValid()&&i.right.isValid()&&i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),i,{offsetStyle:"center"}),i.fireEvent(BI.TimeInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls))}),n.on(BI.DynamicDateTimeCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i.left.isValid()&&i.right.isValid()&&i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),i,{offsetStyle:"center"}),i.fireEvent(BI.TimeInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls))}),n.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i.left.isValid()&&i.right.isValid()&&i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),i.fireEvent(BI.TimeInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls),i.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),n},_dateCheck:function(e){return BI.print(BI.parseDateTime(e,"%Y-%x-%d %H:%M:%S"),"%Y-%x-%d %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%x-%e %H:%M:%S"),"%Y-%x-%e %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%e %H:%M:%S"),"%Y-%X-%e %H:%M:%S")===e},_checkVoid:function(e){var t=this.options;return!BI.checkDateVoid(e.year,e.month,e.day,t.minDate,t.maxDate)[0]},_check:function(e,t){var i=e.match(/\d+/g),n=t.match(/\d+/g);return this._dateCheck(e)&&BI.checkDateLegal(e)&&this._checkVoid({year:i[0],month:i[1],day:i[2]})&&this._dateCheck(t)&&BI.checkDateLegal(t)&&this._checkVoid({year:n[0],month:n[1],day:n[2]})},_compare:function(e,t){return e=BI.print(BI.parseDateTime(e,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S"),t=BI.print(BI.parseDateTime(t,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S"),BI.isNotNull(e)&&BI.isNotNull(t)&&t<e},_setTitle:function(e){this.left.setTitle(e),this.right.setTitle(e),this.label.setTitle(e)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(e){e=e||{},this.left.setValue(e.start),this.right.setValue(e.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval)},function(e,t){BI.TimePeriods=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0},props:{extraCls:"bi-time-interval",value:{}},render:function(){var t=this,e=this.options;return{type:"bi.absolute",height:this.constants.height,items:[{el:{type:"bi.horizontal_auto",items:[{type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-",ref:function(e){t.label=e}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:BI.extend({ref:function(e){t.left=e}},this._createCombo(e.value.start)),left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:BI.extend({ref:function(e){t.right=e}},this._createCombo(e.value.end)),left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]},top:0,left:0,right:0,bottom:0}]}},_createCombo:function(e){var t=this;return{type:"bi.time_combo",value:e,listeners:[{eventName:BI.TimeCombo.EVENT_BEFORE_POPUPVIEW,action:function(){t.left.hidePopupView(),t.right.hidePopupView()}},{eventName:BI.TimeCombo.EVENT_CHANGE,action:function(){t.fireEvent(BI.TimePeriods.EVENT_CHANGE)}},{eventName:BI.TimeCombo.EVENT_CONFIRM,action:function(){t.fireEvent(BI.TimePeriods.EVENT_CONFIRM)}}]}},setValue:function(e){e=e||{},this.left.setValue(e.start),this.right.setValue(e.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimePeriods.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimePeriods.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_periods",BI.TimePeriods)},function(e,t){BI.DynamicYearCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-card"},render:function(){var e=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){e.item=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(e,t){return{dateType:e,value:Math.abs(t),offset:0<t?1:0}},setValue:function(e){e=e||{year:0},this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,e.year))},getValue:function(){var e=this.item.getValue();return{year:0===e.offset?-e.value:e.value}}}),BI.DynamicYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_card",BI.DynamicYearCard)},function(e,t){BI.StaticYearCard=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-card",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(e){var t=this.options,i=this._year,n=BI.createWidget({type:"bi.year_calendar",behaviors:t.behaviors,min:t.min,max:t.max,logic:{dynamic:!0},year:i+12*e});return n.setValue(this._year),n},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var t=this,e=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){t.navigation.setSelect(t.navigation.getSelect()-1),t._checkLeftValid(),t._checkRightValid()}}]}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){t.navigation.setSelect(t.navigation.getSelect()+1),t._checkLeftValid(),t._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:{dynamic:!0},tab:{type:"bi.htape",cls:"bi-split-top bi-split-bottom",height:30,items:[{el:{type:"bi.center_adapt",items:[t.backBtn]},width:25},{type:"bi.layout"},{el:{type:"bi.center_adapt",items:[t.preBtn]},width:25}]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(t.selectedYear);var e=this.getSelectedCard();t.backBtn.setEnable(!e.isFrontYear()),t.preBtn.setEnable(!e.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){t.selectedYear=this.getValue(),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments),t.fireEvent(BI.StaticYearCard.EVENT_CHANGE,t.selectedYear)}),BI.isKey(e.value)&&this.setValue(e.value)},_checkLeftValid:function(){this.options;return this.backBtn.setEnable(!0),!0},_checkRightValid:function(){this.options;return this.preBtn.setEnable(!0),!0},getValue:function(){return{year:this.selectedYear}},setValue:function(e){var t=this.options,i=(e=e||{}).year;BI.checkDateVoid(i,1,1,t.min,t.max)[0]?(i=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(i)),this.navigation.setValue("")):(this.selectedYear=BI.parseInt(i),this.navigation.setSelect(BI.YearCalendar.getPageByYear(i)),this.navigation.setValue(this.selectedYear)),this._checkLeftValid(),this._checkRightValid()}}),BI.StaticYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_card",BI.StaticYearCard)},function(e,t){BI.DynamicYearCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-combo bi-border bi-focus-shadow",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:22},_init:function(){BI.DynamicYearCombo.superclass._init.apply(this,arguments);var t=this,e=this.options;this.storeValue=e.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_trigger",min:e.min,max:e.max,height:e.height,value:e.value||""}),this.trigger.on(BI.DynamicYearTrigger.EVENT_KEY_DOWN,function(){t.combo.isViewVisible()&&t.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS,function(){t.storeTriggerValue=this.getKey()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_START,function(){t.combo.isViewVisible()&&t.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP,function(){t.combo.showView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR,function(){t.combo.isViewVisible()&&t.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM,function(){t.combo.isViewVisible()||(this.getKey()&&this.getKey()!==t.storeTriggerValue?(t.storeValue=t.trigger.getValue(),t.setValue(t.storeValue)):this.getKey()||(t.storeValue=null,t.setValue()),t._checkDynamicValue(t.storeValue),t.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",container:e.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_popup",ref:function(){t.popup=this},listeners:[{eventName:BI.DynamicYearPopup.EVENT_CHANGE,action:function(){t.setValue(t.popup.getValue()),t.combo.hideView(),t.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){t.setValue(),t.combo.hideView(),t.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var e=BI.getDate();t.setValue({type:BI.DynamicYearCombo.Static,value:{year:e.getFullYear()}}),t.combo.hideView(),t.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,action:function(){t.setValue(t.popup.getValue()),t.combo.hideView(),t.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:e.behaviors,min:e.min,max:e.max},value:e.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){t.popup.setValue(t.storeValue),t.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){t.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){t.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(e.value)},_checkDynamicValue:function(e){var t=null;switch(BI.isNotNull(e)&&(t=e.type),t){case BI.DynamicYearCombo.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(e){this.storeValue=e,this.trigger.setValue(e),this._checkDynamicValue(e)},getValue:function(){return this.storeValue}}),BI.DynamicYearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_combo",BI.DynamicYearCombo),BI.extend(BI.DynamicYearCombo,{Static:1,Dynamic:2})},function(e,t){BI.DynamicYearPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var e=this,t=(this.options,this.constants);return this.storeValue={type:BI.DynamicYearCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:t.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",textHeight:t.buttonHeight-1,cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Year"),ref:function(){e.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:t.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){var e;this.dateTab.getSelect()===BI.DynamicDateCombo.Static?(this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0)):(e=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue()),e=BI.print(e,"%Y"),this.textButton.setValue(e),this.textButton.setEnable(!1))},_getTabJson:function(){var t=this,i=this.options;return{type:"bi.tab",ref:function(){t.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(e){switch(e){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){t._setInnerValue(t.year,e)}}],ref:function(){t.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_card",behaviors:i.behaviors,min:t.options.min,max:t.options.max,listeners:[{eventName:BI.StaticYearCard.EVENT_CHANGE,action:function(){t.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE)}}],ref:function(){t.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){switch(t.dateTab.getSelect()){case BI.DynamicYearCombo.Static:var e=BI.DynamicDateHelper.getCalculation(t.dynamicPane.getValue());t.year.setValue({year:e.getFullYear()}),t._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:t.storeValue&&t.storeValue.type===BI.DynamicYearCombo.Dynamic?t.dynamicPane.setValue(t.storeValue.value):t.dynamicPane.setValue({year:0}),t._setInnerValue()}}}]}},setValue:function(e){this.storeValue=e;var t=(e=e||{}).type||BI.DynamicDateCombo.Static,i=e.value||e;switch(this.dateTab.setSelect(t),t){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(i),this._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(i),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)},function(e,t){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(e){this.options.title=BI.bind(this._titleCreator,this),e()},_init:function(){BI.DynamicYearTrigger.superclass._init.apply(this,arguments);var t=this,i=this.options,e=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:i.height,validationChecker:function(e){return""===e||BI.isPositiveInteger(e)&&!BI.checkDateVoid(e,1,1,i.min,i.max)[0]},quitChecker:function(e){return!1},hgap:e.hgap,vgap:e.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_KEY_DOWN,function(){t.fireEvent(BI.DynamicYearTrigger.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){t.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){t.fireEvent(BI.DynamicYearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var e=t.editor.getValue();BI.isNotNull(e)&&t.editor.setValue(e),BI.isNotEmptyString(e)&&(t.storeValue={type:BI.DynamicDateCombo.Static,value:{year:e}}),t.fireEvent(BI.DynamicYearTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){t.editor.isValid()&&t.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){t.fireEvent(BI.DynamicYearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){t.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_Date_Year"),width:i.height},width:i.height},{el:{type:"bi.trigger_icon_button",width:i.height},width:i.height}]}),this.setValue(i.value)},_getText:function(e){var t="";return BI.isNotNull(e.year)&&0!==BI.parseInt(e.year)&&(t+=Math.abs(e.year)+BI.i18nText("BI-Basic_Year")+(e.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),t},_setInnerValue:function(e,t){var i=BI.print(e,"%Y");this.editor.setState(i),this.editor.setValue(i)},_titleCreator:function(){var e=this.storeValue||{},t=e.type||BI.DynamicDateCombo.Static,i=e.value;if(!this.editor.isValid())return"";switch(t){case BI.DynamicDateCombo.Dynamic:var n=this._getText(i),r=BI.getDate(),r=BI.DynamicDateHelper.getCalculation(i),o=BI.print(r,"%Y");return BI.isEmptyString(n)?o:n+":"+o;case BI.DynamicDateCombo.Static:default:return(i=i||{}).year}},setValue:function(e){var t,i,n=BI.getDate();switch(this.storeValue=e,BI.isNotNull(e)&&(t=e.type||BI.DynamicDateCombo.Static,i=e.value||e),t){case BI.DynamicDateCombo.Dynamic:var r=this._getText(i),n=BI.DynamicDateHelper.getCalculation(i);this._setInnerValue(n,r);break;case BI.DynamicDateCombo.Static:default:i=i||{},this.editor.setState(i.year),this.editor.setValue(i.year)}},getValue:function(){return this.storeValue},getKey:function(){return 0|this.editor.getValue()}}),BI.DynamicYearTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.DynamicYearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearTrigger.EVENT_START="EVENT_START",BI.DynamicYearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_trigger",BI.DynamicYearTrigger)},function(e,t){BI.DynamicYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var e=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){e.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.MONTH,ref:function(){e.month=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(e,t){return{dateType:e,value:Math.abs(t),offset:0<t?1:0}},setValue:function(e){e=e||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,e.year)),this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH,e.month))},getValue:function(){var e=this.year.getValue(),t=this.month.getValue();return{year:0===e.offset?-e.value:e.value,month:0===t.offset?-t.value:t.value}}}),BI.DynamicYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_card",BI.DynamicYearMonthCard)},function(e,t){BI.StaticYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-month-card",behaviors:{}},_createMonths:function(){var n=this,e=[1,7,2,8,3,9,4,10,5,11,6,12],t=[];return t.push(e.slice(0,2)),t.push(e.slice(2,4)),t.push(e.slice(4,6)),t.push(e.slice(6,8)),t.push(e.slice(8,10)),t.push(e.slice(10,12)),BI.map(t,function(i,e){return BI.map(e,function(t,e){return{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:e,text:e,ref:function(e){n.monthMap[0===t?i:i+6]=e}}})})},render:function(){var t=this,e=this.options;return this.monthMap={},{type:"bi.vertical",items:[{type:"bi.year_picker",min:e.min,max:e.max,ref:function(){t.yearPicker=this},behaviors:e.behaviors,height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var e=this.getValue();t._checkMonthStatus(e),t.setValue({year:e,month:t.selectedMonth})}}]},{type:"bi.button_group",cls:"bi-split-top",behaviors:e.behaviors,ref:function(){t.month=this},items:this._createMonths(),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:e.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){t.selectedYear=t.yearPicker.getValue(),t.selectedMonth=this.getValue()[0],t.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE)}}]}]}},mounted:function(){this._checkMonthStatus(this.selectedYear)},_checkMonthStatus:function(e){var t=this.options,i=BI.parseDateTime(t.min,"%Y-%X-%d"),n=BI.parseDateTime(t.max,"%Y-%X-%d"),r=i.getFullYear(),o=n.getFullYear(),a=0,s=11;r===e&&(a=i.getMonth()),o===e&&(s=n.getMonth());var l=e<r||o<e;BI.each(this.monthMap,function(e,t){var i=e<a||s<e;t.setEnable(!l&&!i)})},setMinDate:function(e){this.options.min!==e&&(this.options.min=e,this.yearPicker.setMinDate(e),this._checkMonthStatus(this.selectedYear))},setMaxDate:function(e){this.options.max!==e&&(this.options.max=e,this.yearPicker.setMaxDate(e),this._checkMonthStatus(this.selectedYear))},getValue:function(){return{year:this.selectedYear,month:this.selectedMonth}},setValue:function(e){var t,i=this.options,n={};n.year=e.year||0,n.month=e.month||0,0===n.year||0===n.month||BI.checkDateVoid(n.year,n.month,1,i.min,i.max)[0]?(t=n.year||BI.getDate().getFullYear(),this.selectedYear=t,this.selectedMonth="",this.yearPicker.setValue(t),this.month.setValue()):(this.selectedYear=BI.parseInt(n.year),this.selectedMonth=BI.parseInt(n.month),this.yearPicker.setValue(this.selectedYear),this.month.setValue(this.selectedMonth))}}),BI.StaticYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_month_card",BI.StaticYearMonthCard)},function(e,t){BI.DynamicYearMonthCombo=BI.inherit(BI.Single,{props:{baseCls:"bi-year-month-combo bi-border bi-focus-shadow",behaviors:{},minDate:"1900-01-01",maxDate:"2099-12-31",height:22},_init:function(){BI.DynamicYearMonthCombo.superclass._init.apply(this,arguments);var i=this,e=this.options;this.storeValue=e.value,this.storeTriggerValue="",this.trigger=BI.createWidget({type:"bi.dynamic_year_month_trigger",min:e.minDate,max:e.maxDate,height:e.height,value:e.value||""}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN,function(){i.combo.isViewVisible()&&i.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START,function(){i.combo.isViewVisible()&&i.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP,function(){i.combo.showView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR,function(){i.combo.isViewVisible()&&i.combo.hideView(),i.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID,function(){i.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM,function(){var e=i.storeTriggerValue,t=i.trigger.getKey();BI.isNotEmptyString(t)&&!BI.isEqual(t,e)&&(i.storeValue=i.trigger.getValue(),i.setValue(i.trigger.getValue())),i._checkDynamicValue(i.storeValue),i.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_FOCUS,function(){i.storeTriggerValue=i.trigger.getKey(),i.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS)}),this.combo=BI.createWidget({type:"bi.combo",container:e.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:{type:"bi.dynamic_year_month_popup",ref:function(){i.popup=this},listeners:[{eventName:BI.DynamicYearMonthPopup.EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.combo.hideView(),i.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){i.setValue(),i.combo.hideView(),i.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var e=BI.getDate();i.setValue({type:BI.DynamicYearMonthCombo.Static,value:{year:e.getFullYear(),month:e.getMonth()+1}}),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:e.behaviors,min:e.minDate,max:e.maxDate},value:e.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){i.popup.setValue(i.storeValue),i.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){i.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){i.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(e.value)},_checkDynamicValue:function(e){var t=null;switch(BI.isNotNull(e)&&(t=e.type),t){case BI.DynamicYearMonthCombo.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)}},hideView:function(){this.combo.hideView()},setValue:function(e){this.storeValue=e,this.trigger.setValue(e),this._checkDynamicValue(e)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},isValid:function(){return this.trigger.isValid()}}),BI.DynamicYearMonthCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthCombo.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_month_combo",BI.DynamicYearMonthCombo),BI.extend(BI.DynamicYearMonthCombo,{Static:1,Dynamic:2})},function(e,t){BI.DynamicYearMonthPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-year-month-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var e=this,t=(this.options,this.constants);return this.storeValue={type:BI.DynamicYearMonthCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:t.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",textHeight:t.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Current_Month"),ref:function(){e.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:t.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){var e;this.dateTab.getSelect()===BI.DynamicDateCombo.Static?(this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0)):(e=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue()),e=BI.print(e,"%Y-%x"),this.textButton.setValue(e),this.textButton.setEnable(!1))},_getTabJson:function(){var t=this,i=this.options;return{type:"bi.tab",ref:function(){t.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Month"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(e){switch(e){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_month_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){t._setInnerValue(t.year,e)}}],ref:function(){t.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_month_card",behaviors:i.behaviors,min:t.options.min,max:t.options.max,listeners:[{eventName:BI.StaticYearMonthCard.EVENT_CHANGE,action:function(){t.fireEvent(BI.DynamicYearMonthPopup.EVENT_CHANGE)}}],ref:function(){t.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){switch(t.dateTab.getSelect()){case BI.DynamicYearCombo.Static:var e=BI.DynamicDateHelper.getCalculation(t.dynamicPane.getValue());t.year.setValue({year:e.getFullYear(),month:e.getMonth()+1}),t._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:t.storeValue&&t.storeValue.type===BI.DynamicYearCombo.Dynamic?t.dynamicPane.setValue(t.storeValue.value):t.dynamicPane.setValue({year:0}),t._setInnerValue()}}}]}},setMinDate:function(e){this.options.min!==e&&(this.options.min=e,this.year.setMinDate(e))},setMaxDate:function(e){this.options.max!==e&&(this.options.max=e,this.year.setMaxDate(e))},setValue:function(e){this.storeValue=e;var t=(e=e||{}).type||BI.DynamicDateCombo.Static,i=e.value||e;switch(this.dateTab.setSelect(t),t){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(i),this._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(i),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearMonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_popup",BI.DynamicYearMonthPopup)},function(e,t){BI.DynamicYearMonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2},props:{extraCls:"bi-year-month-trigger",min:"1900-01-01",max:"2099-12-31",height:22},beforeInit:function(e){this.options.title=BI.bind(this._titleCreator,this),e()},_init:function(){BI.DynamicYearMonthTrigger.superclass._init.apply(this,arguments);var e=this.options;this.yearEditor=this._createEditor(!0),this.monthEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:e.height},width:e.height}]},{type:"bi.htape",items:[this.monthEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),width:e.height},width:e.height}]}]},{el:{type:"bi.trigger_icon_button",width:e.height},width:e.height}]}),this.setValue(e.value)},_createEditor:function(t){var i=this,n=this.options,e=this._const,r=BI.parseDateTime(n.min,"%Y-%X-%d"),o=BI.createWidget({type:"bi.sign_editor",height:n.height,validationChecker:function(e){return t?""===e||BI.isPositiveInteger(e)&&!BI.checkDateVoid(e,e===r.getFullYear()?r.getMonth()+1:1,1,n.min,n.max)[0]:""===e||BI.isPositiveInteger(e)&&1<=e&&e<=12&&!BI.checkDateVoid(BI.getDate().getFullYear(),e,1,n.min,n.max)[0]},quitChecker:function(){return!1},watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(e){return BI.i18nText("BI-Year_Trigger_Invalid_Text")},hgap:e.hgap,vgap:e.vgap,allowBlank:!0});return o.on(BI.SignEditor.EVENT_KEY_DOWN,function(){i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN)}),o.on(BI.SignEditor.EVENT_FOCUS,function(){i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS)}),o.on(BI.SignEditor.EVENT_STOP,function(){i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP)}),o.on(BI.SignEditor.EVENT_CONFIRM,function(){i._doEditorConfirm(o),i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM)}),o.on(BI.SignEditor.EVENT_SPACE,function(){o.isValid()&&o.blur()}),o.on(BI.SignEditor.EVENT_START,function(){i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_START)}),o.on(BI.SignEditor.EVENT_ERROR,function(){i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_ERROR)}),o.on(BI.SignEditor.EVENT_VALID,function(){var e=i.yearEditor.getValue(),t=i.monthEditor.getValue();BI.isNotEmptyString(e)&&BI.isNotEmptyString(t)&&BI.isPositiveInteger(e)&&1<=t&&t<=12&&!BI.checkDateVoid(e,t,1,n.min,n.max)[0]&&i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID)}),o.on(BI.SignEditor.EVENT_CHANGE,function(){t&&i._autoSwitch(o)}),o},_titleCreator:function(){var e=this.storeValue||{},t=e.type||BI.DynamicDateCombo.Static,i=e.value;if(!this.monthEditor.isValid()||!this.yearEditor.isValid())return"";switch(t){case BI.DynamicDateCombo.Dynamic:var n=this._getText(i),r=BI.getDate(),r=BI.DynamicDateHelper.getCalculation(i),o=BI.print(r,"%Y-%x");return BI.isEmptyString(n)?o:n+":"+o;case BI.DynamicDateCombo.Static:default:return i=i||{},this._getStaticTitle(i)}},_doEditorConfirm:function(e){var t=e.getValue();BI.isNotNull(t)&&e.setValue(t);var i=this.monthEditor.getValue();this.storeValue={type:BI.DynamicDateCombo.Static,value:{year:this.yearEditor.getValue(),month:BI.isEmptyString(this.monthEditor.getValue())?"":i}}},_yearCheck:function(e){var t=BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(e,"%Y"),"%Y")===e&&t>=this.options.min&&t<=this.options.max},_autoSwitch:function(e){var t=e.getValue();BI.isNotEmptyString(t)&&BI.checkDateLegal(t)&&4===t.length&&this._yearCheck(t)&&(this._doEditorConfirm(e),this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM),this.monthEditor.focus())},_getText:function(e){var t="";return BI.isNotNull(e.year)&&0!==BI.parseInt(e.year)&&(t+=Math.abs(e.year)+BI.i18nText("BI-Basic_Year")+(e.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(e.month)&&0!==BI.parseInt(e.month)&&(t+=Math.abs(e.month)+BI.i18nText("BI-Basic_Month")+(e.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),t},_setInnerValue:function(e,t){this.yearEditor.setValue(e.getFullYear()),this.monthEditor.setValue(e.getMonth()+1)},_getStaticTitle:function(e){switch(e=e||{},!(BI.isNull(e.year)||BI.isEmptyString(e.year))<<1|!(BI.isNull(e.month)||BI.isEmptyString(e.month))){case 0:return"";case 1:return e.month;case 2:return e.year;case 3:default:return e.year+"-"+e.month}},setValue:function(e){var t,i,n=BI.getDate();switch(this.storeValue=e,BI.isNotNull(e)&&(t=e.type||BI.DynamicDateCombo.Static,i=e.value||e),t){case BI.DynamicDateCombo.Dynamic:var r=this._getText(i),n=BI.DynamicDateHelper.getCalculation(i);this._setInnerValue(n,r);break;case BI.DynamicDateCombo.Static:default:i=i||{};var o=BI.isNull(i.month)?null:i.month;this.yearEditor.setValue(i.year),this.monthEditor.setValue(o)}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.monthEditor.getValue()},isValid:function(){return this.yearEditor.isValid()&&this.monthEditor.isValid()}}),BI.DynamicYearMonthTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthTrigger.EVENT_START="EVENT_START",BI.DynamicYearMonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_year_month_trigger",BI.DynamicYearMonthTrigger)},function(e,t){BI.YearMonthInterval=BI.inherit(BI.Single,{constants:{height:24,width:25,lgap:15,offset:-15,timeErrorCls:"time-error"},props:{extraCls:"bi-year-month-interval",minDate:"1900-01-01",maxDate:"2099-12-31"},_init:function(){var e=this.options;BI.YearMonthInterval.superclass._init.apply(this,arguments),e.value=e.value||{},this.left=this._createCombo(e.value.start),this.right=this._createCombo(e.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:this,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:this.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:this.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.label]})},_createCombo:function(e){var i=this,t=this.options,n=BI.createWidget({type:"bi.dynamic_year_month_combo",behaviors:t.behaviors,value:e,listeners:[{eventName:BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,action:function(){i.fireEvent(BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW)}}]});return n.on(BI.DynamicYearMonthCombo.EVENT_ERROR,function(){i._clearTitle(),BI.Bubbles.hide("error"),i.element.removeClass(i.constants.timeErrorCls),i.fireEvent(BI.YearMonthInterval.EVENT_ERROR)}),n.on(BI.DynamicYearMonthCombo.EVENT_VALID,function(){i._checkValid()}),n.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){i._checkValid()}),n.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,function(){i.left.hideView(),i.right.hideView()}),n.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i.left.isValid()&&i.right.isValid()&&i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),i.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls),i.fireEvent(BI.YearMonthInterval.EVENT_CHANGE))}),n},_dateCheck:function(e){return BI.print(BI.parseDateTime(e,"%Y-%x"),"%Y-%x")===e||BI.print(BI.parseDateTime(e,"%Y-%X"),"%Y-%X")===e},_checkVoid:function(e){var t=this.options;return!BI.checkDateVoid(e.year,e.month,1,t.minDate,t.maxDate)[0]},_check:function(e,t){var i=e.match(/\d+/g),n=t.match(/\d+/g),r="";BI.isNotNull(i)&&(r=(i[0]||"")+"-"+(i[1]||1));var o="";return BI.isNotNull(n)&&(o=(n[0]||"")+"-"+(n[1]||1)),this._dateCheck(r)&&BI.checkDateLegal(r)&&this._checkVoid({year:i[0],month:i[1]||1,day:1})&&this._dateCheck(o)&&BI.checkDateLegal(o)&&this._checkVoid({year:n[0],month:n[1]||1,day:1})},_compare:function(e,t){return e=BI.print(BI.parseDateTime(e,"%Y-%X"),"%Y-%X"),t=BI.print(BI.parseDateTime(t,"%Y-%X"),"%Y-%X"),BI.isNotNull(e)&&BI.isNotNull(t)&&t<e},_setTitle:function(e){this.setTitle(e)},_clearTitle:function(){this.setTitle("")},_checkValid:function(){var e=this;BI.Bubbles.hide("error");var t=e.left.getKey(),i=e.right.getKey();e.left.isValid()&&e.right.isValid()&&e._check(t,i)&&e._compare(t,i)?(e._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),e.element.addClass(e.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),e,{offsetStyle:"center"}),e.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(e._clearTitle(),e.element.removeClass(e.constants.timeErrorCls))},setValue:function(e){e=e||{},this.left.setValue(e.start),this.right.setValue(e.end),this._checkValid()},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.YearMonthInterval.EVENT_VALID="EVENT_VALID",BI.YearMonthInterval.EVENT_ERROR="EVENT_ERROR",BI.YearMonthInterval.EVENT_CHANGE="EVENT_CHANGE",BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_month_interval",BI.YearMonthInterval)},function(e,t){BI.DynamicYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var e=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){e.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.QUARTER,ref:function(){e.quarter=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(e,t){return{dateType:e,value:Math.abs(t),offset:0<t?1:0}},setValue:function(e){e=e||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,e.year)),this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,e.quarter))},getValue:function(){var e=this.year.getValue(),t=this.quarter.getValue();return{year:0===e.offset?-e.value:e.value,quarter:0===t.offset?-t.value:t.value}}}),BI.DynamicYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_card",BI.DynamicYearQuarterCard)},function(e,t){BI.StaticYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-quarter-card",behaviors:{}},_createQuarter:function(){var e=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];return BI.map(e,function(e,t){return BI.extend(t,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:24})})},render:function(){var t=this,e=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){t.yearPicker=this},behaviors:e.behaviors,height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var e=this.getValue();t.setValue({year:e,quarter:t.selectedQuarter})}}]},{type:"bi.button_group",behaviors:e.behaviors,ref:function(){t.quarter=this},items:this._createQuarter(),layouts:[{type:"bi.vertical",vgap:10}],value:e.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){t.selectedYear=t.yearPicker.getValue(),t.selectedQuarter=this.getValue()[0],t.fireEvent(BI.StaticYearQuarterCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,quarter:this.selectedQuarter}},setValue:function(e){var t,i=this.options,n={};n.year=e.year||0,n.quarter=e.quarter||0,0===n.quarter||0===n.year||BI.checkDateVoid(n.year,n.quarter,1,i.min,i.max)[0]?(t=n.year||BI.getDate().getFullYear(),this.selectedYear=t,this.selectedQuarter="",this.yearPicker.setValue(t),this.quarter.setValue()):(this.selectedYear=BI.parseInt(n.year),this.selectedQuarter=BI.parseInt(n.quarter),this.yearPicker.setValue(this.selectedYear),this.quarter.setValue(this.selectedQuarter))}}),BI.StaticYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_quarter_card",BI.StaticYearQuarterCard)},function(e,t){BI.DynamicYearQuarterCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-quarter-combo bi-border bi-focus-shadow",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:22},_init:function(){BI.DynamicYearQuarterCombo.superclass._init.apply(this,arguments);var i=this,e=this.options;this.storeValue=e.value,i.storeTriggerValue="",this.trigger=BI.createWidget({type:"bi.dynamic_year_quarter_trigger",min:e.min,max:e.max,height:e.height,value:e.value||""}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN,function(){i.combo.isViewVisible()&&i.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START,function(){i.combo.isViewVisible()&&i.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_STOP,function(){i.combo.showView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_ERROR,function(){i.combo.isViewVisible()&&i.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM,function(){var e=i.storeTriggerValue,t=i.trigger.getKey();BI.isNotEmptyString(t)&&!BI.isEqual(t,e)&&(i.storeValue=i.trigger.getValue(),i.setValue(i.trigger.getValue())),i._checkDynamicValue(i.storeValue),i.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS,function(){i.storeTriggerValue=i.trigger.getKey()}),this.combo=BI.createWidget({type:"bi.combo",container:e.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_quarter_popup",ref:function(){i.popup=this},listeners:[{eventName:BI.DynamicYearQuarterPopup.EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.combo.hideView(),i.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){i.setValue(),i.combo.hideView(),i.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var e=BI.getDate();i.setValue({type:BI.DynamicYearMonthCombo.Static,value:{year:e.getFullYear(),quarter:BI.getQuarter(e)}}),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:e.behaviors,min:e.min,max:e.max},value:e.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){i.popup.setValue(i.storeValue),i.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){i.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){i.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(e.value)},_checkDynamicValue:function(e){var t=null;switch(BI.isNotNull(e)&&(t=e.type),t){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(e){this.storeValue=e,this.trigger.setValue(e),this._checkDynamicValue(e)},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})},function(e,t){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 e=this,t=(this.options,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:t.buttonHeight-1,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",textHeight:t.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Current_Quarter"),ref:function(){e.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-top bi-high-light",shadow:!0,textHeight:t.buttonHeight-1,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){var e;this.dateTab.getSelect()===BI.DynamicYearQuarterCombo.Static?(this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0)):(e=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue()),e=BI.print(e,"%Y-%Q"),this.textButton.setValue(e),this.textButton.setEnable(!1))},_getTabJson:function(){var t=this,i=this.options;return{type:"bi.tab",ref:function(){t.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Quarter"),value:BI.DynamicYearQuarterCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearQuarterCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(e){switch(e){case BI.DynamicYearQuarterCombo.Dynamic:return{type:"bi.dynamic_year_quarter_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){t._setInnerValue(t.year,e)}}],ref:function(){t.dynamicPane=this}};case BI.DynamicYearQuarterCombo.Static:default:return{type:"bi.static_year_quarter_card",behaviors:i.behaviors,min:t.options.min,max:t.options.max,listeners:[{eventName:BI.DynamicYearCard.EVENT_CHANGE,action:function(){t.fireEvent(BI.DynamicYearQuarterPopup.EVENT_CHANGE)}}],ref:function(){t.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){switch(t.dateTab.getSelect()){case BI.DynamicYearQuarterCombo.Static:var e=BI.DynamicDateHelper.getCalculation(t.dynamicPane.getValue());t.year.setValue({year:e.getFullYear(),quarter:BI.getQuarter(e)}),t._setInnerValue();break;case BI.DynamicYearQuarterCombo.Dynamic:default:t.storeValue&&t.storeValue.type===BI.DynamicYearQuarterCombo.Dynamic?t.dynamicPane.setValue(t.storeValue.value):t.dynamicPane.setValue({year:0}),t._setInnerValue()}}}]}},setValue:function(e){this.storeValue=e;var t=(e=e||{}).type||BI.DynamicDateCombo.Static,i=e.value||e;switch(this.dateTab.setSelect(t),t){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(i),this._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(i),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearQuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_popup",BI.DynamicYearQuarterPopup)},function(e,t){BI.DynamicYearQuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2},props:{extraCls:"bi-year-quarter-trigger",min:"1900-01-01",max:"2099-12-31",height:22},_init:function(){BI.DynamicYearQuarterTrigger.superclass._init.apply(this,arguments);var e=this.options;this.yearEditor=this._createEditor(!0),this.quarterEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:e.height},width:e.height}]},{type:"bi.htape",items:[this.quarterEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Quarter"),width:24},width:24}]}]},{el:{type:"bi.trigger_icon_button",width:e.height},width:e.height}]}),this.setValue(e.value)},_createEditor:function(t){var e=this,i=this.options,n=this._const,r=BI.createWidget({type:"bi.sign_editor",height:i.height,validationChecker:function(e){return t?""===e||BI.isPositiveInteger(e)&&!BI.checkDateVoid(e,1,1,i.min,i.max)[0]:""===e||BI.isPositiveInteger(e)&&1<=e&&e<=4&&!BI.checkDateVoid(BI.getDate().getFullYear(),e,1,i.min,i.max)[0]},quitChecker:function(){return!1},errorText:function(e){return BI.i18nText("BI-Year_Trigger_Invalid_Text")},watermark:BI.i18nText("BI-Basic_Unrestricted"),hgap:n.hgap,vgap:n.vgap,title:"",allowBlank:!0});return r.on(BI.SignEditor.EVENT_KEY_DOWN,function(){e.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN)}),r.on(BI.SignEditor.EVENT_FOCUS,function(){e.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS)}),r.on(BI.SignEditor.EVENT_STOP,function(){e.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP)}),r.on(BI.SignEditor.EVENT_CONFIRM,function(){e._doEditorConfirm(r),e.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM)}),r.on(BI.SignEditor.EVENT_SPACE,function(){r.isValid()&&r.blur()}),r.on(BI.SignEditor.EVENT_START,function(){e.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_START)}),r.on(BI.SignEditor.EVENT_ERROR,function(){e.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_ERROR)}),r.on(BI.SignEditor.EVENT_CHANGE,function(){t&&e._autoSwitch(r)}),r},_doEditorConfirm:function(e){var t=e.getValue();BI.isNotNull(t)&&e.setValue(t);var i=this.quarterEditor.getValue();this.storeValue={type:BI.DynamicYearQuarterCombo.Static,value:{year:this.yearEditor.getValue(),quarter:BI.isEmptyString(this.quarterEditor.getValue())?"":i}},this.setTitle(this._getStaticTitle(this.storeValue.value))},_yearCheck:function(e){var t=BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(e,"%Y"),"%Y")===e&&t>=this.options.min&&t<=this.options.max},_autoSwitch:function(e){var t=e.getValue();BI.isNotEmptyString(t)&&BI.checkDateLegal(t)&&4===t.length&&this._yearCheck(t)&&(this._doEditorConfirm(e),this.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM),this.quarterEditor.focus())},_getStaticTitle:function(e){switch(e=e||{},!(BI.isNull(e.year)||BI.isEmptyString(e.year))<<1|!(BI.isNull(e.quarter)||BI.isEmptyString(e.quarter))){case 0:return"";case 1:return e.quarter;case 2:return e.year;case 3:default:return e.year+"-"+e.quarter}},_getText:function(e){var t="";return BI.isNotNull(e.year)&&0!==BI.parseInt(e.year)&&(t+=Math.abs(e.year)+BI.i18nText("BI-Basic_Year")+(e.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(e.quarter)&&0!==BI.parseInt(e.quarter)&&(t+=Math.abs(e.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(e.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),t},_setInnerValue:function(e,t){var i=BI.print(e,"%Y-%Q");this.yearEditor.setValue(e.getFullYear()),this.quarterEditor.setValue(BI.getQuarter(e)),this.setTitle(BI.isEmptyString(t)?i:t+":"+i)},setValue:function(e){var t,i,n=BI.getDate();switch(this.storeValue=e,BI.isNotNull(e)&&(t=e.type||BI.DynamicYearQuarterCombo.Static,i=e.value||e),t){case BI.DynamicYearQuarterCombo.Dynamic:var r=this._getText(i),n=BI.DynamicDateHelper.getCalculation(i);this._setInnerValue(n,r);break;case BI.DynamicYearQuarterCombo.Static:default:i=i||{};var o=BI.isNull(i.quarter)?null:i.quarter;this.yearEditor.setValue(i.year),this.yearEditor.setTitle(i.year),this.quarterEditor.setValue(o),this.quarterEditor.setTitle(o),this.setTitle(this._getStaticTitle(i))}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.quarterEditor.getValue()}}),BI.DynamicYearQuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearQuarterTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearQuarterTrigger.EVENT_START="EVENT_START",BI.DynamicYearQuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_year_quarter_trigger",BI.DynamicYearQuarterTrigger)},function(e,t){BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(i){var n=i;return BI.isNotNull(this.items)&&BI.some(this.items,function(e,t){if(t.value===i||t.value+""===i)return n=t.text,!0}),n},_itemsCreator:function(t,o){var i=this,e=this.options;function n(n){var e=(t.keywords||[]).slice();t.keyword&&e.push(t.keyword);var i,r=n;BI.isNotEmptyArray(e)&&(r=[],BI.each(e,function(e,t){var i=BI.Func.getSearchResult(n,t);r=r.concat(i.match).concat(i.find)}),r=BI.uniq(r)),t.selectedValues&&(i=BI.makeObject(t.selectedValues,!0),r=BI.filter(r,function(e,t){return!i[t.value]})),t.type!==BI.MultiSelectCombo.REQ_GET_ALL_DATA?t.type!==BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?o({items:r,hasNext:!1}):o({count:r.length}):o({items:r})}e.cache&&this.items?n(this.items):e.itemsCreator({},function(e){n(i.items=e)})}})},function(e,t){BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;BI.isNotNull(t.items)&&(this.items=t.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",text:t.text,element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:t.width,height:t.height,value:{type:BI.Selection.Multi,value:t.value||[]}}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){e.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(e){this.combo.setValue({type:BI.Selection.Multi,value:e||[]})},getValue:function(){var e=this.combo.getValue()||{};return e.type===BI.Selection.All?e.assist:e.value||[]},populate:function(e){this.items=e,this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo)},function(e,t){BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var e=this,t=this.options;BI.isNotNull(t.items)&&(this.items=t.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:t.width,height:t.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){e.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(e){this.list.setValue({type:BI.Selection.Multi,value:e||[]})},getValue:function(){var e=this.list.getValue()||{};return e.type===BI.Selection.All?e.assist:e.value||[]},populate:function(e){this.items=e,this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane)},function(e,t){BI.AllValueMultiTextValueCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-all-value-multi-text-value-combo",width:200,height:24,items:[]},render:function(){var e=this,t=this.options,i=this._digestValue(t.value);return{type:"bi.search_multi_text_value_combo",text:t.text,height:t.height,items:t.items,value:i,numOfPage:100,valueFormatter:t.valueFormatter,warningTitle:t.warningTitle,listeners:[{eventName:BI.SearchMultiTextValueCombo.EVENT_CONFIRM,action:function(){e.fireEvent(BI.AllValueMultiTextValueCombo.EVENT_CONFIRM)}}],ref:function(){e.combo=this}}},setValue:function(e){var t=this._digestValue(e);this.combo.setValue(t)},getValue:function(){var i=this.combo.getValue()||{};if(i.value=i.value||[],i.type!==BI.Selection.All)return i.value||[];var n=[];return BI.each(this.options.items,function(e,t){BI.contains(i.value,t.value)||n.push(t.value)}),n},populate:function(e){this.options.items=e,this.combo.populate.apply(this,arguments)},_digestValue:function(e){return{type:BI.Selection.Multi,value:e||[]}}}),BI.AllValueMultiTextValueCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.all_value_multi_text_value_combo",BI.AllValueMultiTextValueCombo)},function(e,t){BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,open:!1})},_valueFormatter:function(i){var n=i;return BI.isNotNull(this.items)&&BI.some(this.items,function(e,t){if(t.value===i||t.value+""===i)return n=t.text,!0}),n},_initData:function(e){this.items=e;var t=BI.Tree.treeFormat(e);this.tree=new BI.Tree,this.tree.initTree(t)},_itemsCreator:function(e,t){var i=this,n=this.options;function r(){switch(e.type){case BI.TreeView.REQ_TYPE_INIT_DATA:i._reqInitTreeNode(e,t);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:i._reqAdjustTreeNode(e,t);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:i._reqSelectedTreeNode(e,t);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:i._reqDisplayTreeNode(e,t);break;default:i._reqTreeNode(e,t)}}this.items?r():n.itemsCreator({},function(e){i._initData(e),r()})},_reqDisplayTreeNode:function(e,t){var a=this,n=[],i=e.selectedValues;function s(e,t){return null==e?0:BI.isEmpty(e)?a._getChildCount(t):BI.size(e)}function l(e,t,i){n.push({id:e.id,pId:t,text:e.text+(0<i?"("+BI.i18nText("BI-Basic_Altogether")+i+BI.i18nText("BI-Basic_Count")+")":""),value:e.value,open:!0})}null==i||BI.isEmpty(i)?t({}):(function u(r,o,n){if(null==n||BI.isEmpty(n))return void BI.each(o.getChildren(),function(e,t){var i=BI.clone(r);i.push(t.value);var n=a._getChildCount(i);l(t,o.id,n),u(i,t,{})});BI.each(n,function(e){var t,i=a._getTreeNode(r,e);BI.isNull(i)?l({id:BI.UUID(),text:e,value:e},BI.UUID(),0):((t=BI.clone(r)).push(i.value),l(i,i.parent&&i.parent.id,s(n[e],t)),u(t,i,n[e]))})}([],this.tree.getRoot(),i),t({items:n}))},_reqSelectedTreeNode:function(e,t){var p=this,i=BI.deepClone(e.selectedValues),o=e.notSelectedValue||{},l=e.keyword||"",a=e.parentValues||[];function s(a,s,l){var u=a,c=[],h=[];BI.some(s,function(i,e){var t=u[e];if(null==t){if(0===i)return!0;if(!BI.isEmpty(u))return!0;var n=s.slice(0,i),r=p._getChildren(n);if(h.push(n),c.push(r.length),i===s.length-1&&1===r.length&&r[0].value===l)for(var o=c.length-1;0<=o&&1===c[o];o--)p._deleteNode(a,h[o]);else BI.each(r,function(e,t){return i===s.length-1&&t.value===l||void(u[t.value]={})});u=u[e]}else u=t})}function u(e,t,n,i){var r=BI.clone(e);if(r.push(t),p._isMatch(e,t,l))return i&&i.push(r),!0;var o=p._getChildren(r),a=[],s=!1;return BI.each(o,function(e,t){u(r,t.value,n,i)?s=!0:a.push(t.value)}),!0===s&&BI.each(a,function(e,t){var i=BI.clone(r);i.push(t),n.push(i)}),s}function c(e){for(var t=0,i=e.length;t<i;t++)if(p._isMatch(e.slice(0,t),e[t],l))return 1}null==i||BI.isEmpty(i)?t({}):(function(i){var e=a.concat(o);{var t;!function(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(null==(i=i[r]))return!1}return!0}(i,e)||(c(e)?p._deleteNode(i,e):(r=u(a,o,[],t=[]))&&BI.isNotEmptyArray(t)&&BI.each(t,function(e,t){p._getNode(i,t)?p._deleteNode(i,t):s(i,t,BI.last(t))}))}{var n,r;!function(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(!BI.has(i,r))return!1;if(i=i[r],BI.isEmpty(i))return!0}return!1}(i,e)||(r=!(n=[]),c(e)?r=!0:(r=u(a,o,n),e=a),!0===r&&(s(i,e,o),0<n.length&&BI.each(n,function(e,t){p._buildTree(i,t)})))}}(i),t(i))},_reqAdjustTreeNode:function(e,t){var i,n=this,a=[],r=e.selectedValues;null==r||BI.isEmpty(r)?t({}):(BI.each(r,function(e,t){a.push([e])}),function s(i,r){if(null==i||BI.isEmpty(i))return!0;var o=!0;BI.each(i,function(e,t){var n=BI.clone(r);n.push(e),s(i[e],n)||(BI.each(i[e],function(e,t){var i=BI.clone(n);i.push(e),a.push(i)}),o=!1)});return o&&(e=i,t=r,BI.isEmpty(e)||n._getChildCount(t)===BI.size(e));var e,t}(r,[]),i={},BI.each(a,function(e,t){n._buildTree(i,t)}),t(i))},_reqInitTreeNode:function(l,e){var g=this,u=[],I=l.keyword||"",c=l.selectedValues,h=l.lastSearchValue||"",t=function(){var e=g._getChildren([]),t=e.length;if(""!==h){for(var i=0,n=t;i<n;i++)if(e[i].value===h){t=i+1;break}}else t=0;for(var r=[],o=t,n=e.length;o<n;o++){var a;if(r.length<g._const.perPage?a=B(1,[],e[o].value,!1,u):r.length===g._const.perPage&&(a=B(1,[],e[o].value,!1,[])),!0===a[0]&&r.push(e[o].value),r.length>g._const.perPage)break}{var s;1===l.times&&(s=g._getAddedValueNode([],c),u=BI.concat(BI.filter(s,function(e,t){var i=BI.Func.getSearchResult([t.text||t.value],I);return 0<i.find.length||0<i.match.length}),u))}return r}();function B(n,e,t,i,r){var o,a;if(g._isMatch(e,t,I))return E(e,t,!1,p=i||f(e,t),!i&&(o=t,null!=(a=_(e))?BI.any(a,function(e,t){if(e===o&&null!=t&&!BI.isEmpty(t))return!0}):null),!0,r),[!0,p];var s=BI.clone(e);s.push(t);var l,u,c=g._getChildren(s),h=!1,p=!1,d=i||(l=t,null!=(u=_(e))?BI.any(u,function(e,t){if(e===l&&null!=t&&BI.isEmpty(t))return!0}):null);return BI.each(c,function(e,t){var i=B(n+1,s,t.value,d,r);!0===i[1]&&(p=!0),!0===i[0]&&(h=!0)}),!0===h&&E(e,t,!0,p=d||f(e,t)&&p,!1,!1,r),[h,p]}function E(e,t,i,n,r,o,a){var s=g._getTreeNode(e,t);a.push({id:s.id,pId:s.pId,text:s.text,value:s.value,title:s.title,isParent:0<s.getChildrenLength(),open:i,checked:n,halfCheck:r,flag:o})}function f(e,t){var i=_(e);return null!=i&&BI.any(i,function(e){if(e===t)return!0})}function _(e){var i=c;return null==i?null:(BI.every(e,function(e,t){return null!=(i=i[t])}),i)}BI.nextTick(function(){e({hasNext:t.length>g._const.perPage,items:u,lastSearchValue:BI.last(t)})})},_reqTreeNode:function(e,t){for(var i,c=this,n=this.options,a=[],r=e.times,o=e.checkState||{},s=e.parentValues||[],l=e.selectedValues||{},u=g(s,l),h=this._getChildren(s),p=(r-1)*this._const.perPage;h[p]&&p<r*this._const.perPage;p++){var d=I(h[p].value,s,u,o);a.push({id:h[p].id,pId:h[p].pId,value:h[p].value,text:h[p].text,times:1,isParent:0<h[p].getChildrenLength(),checked:d[0],halfCheck:d[1],open:n.open})}function g(e,i){var n={};return BI.each(e,function(e,t){i=i[t]||{}}),BI.each(i,function(e,t){var i;BI.isNull(t)?n[e]=[0,0]:BI.isEmpty(t)?n[e]=[2,0]:(i={},BI.each(t,function(e,t){(BI.isNull(t)||BI.isEmpty(t))&&(i[e]=!0)}),n[e]=[1,BI.size(i)])}),n}function I(e,t,i,n){var r,o,a=n.checked,s=n.half,l=!1,u=!1;return BI.has(i,e)&&(1===i[e][0]?((r=BI.clone(t)).push(e),0<(o=c._getChildCount(r))&&o!==i[e][1]&&(u=!0)):2===i[e][0]&&(l=!0)),[(a||u||l)&&(l||a)&&!s||BI.has(i,e),u]}n.open&&(i=[],BI.each(h,function(e,t){i=BI.concat(i,c._getAllChildren(s.concat([t.value])))}),BI.each(i,function(e,i){var t=g(i.parentValues,l),n={},r=BI.find(a,function(e,t){return t.id===i.pId});r&&(n.checked=!r.halfCheck&&r.checked,n.half=r.halfCheck);var o=I(i.value,i.parentValues,t,n);a.push({id:i.id,pId:i.pId,value:i.value,text:i.text,times:1,isParent:0<i.getChildrenLength(),checked:o[0],halfCheck:o[1],open:c.options.open})})),0===s.length&&1===r&&(a=BI.concat(c._getAddedValueNode(s,l),a)),BI.nextTick(function(){t({items:a,hasNext:h.length>r*c._const.perPage})})},_getAddedValueNode:function(e,t){var i=this._getChildren(e);return BI.map(BI.difference(BI.keys(t),BI.map(i,"value")),function(e,t){return{id:BI.UUID(),pId:0<i.length?i[0].pId:BI.UUID(),value:t,text:t,times:1,isParent:!1,checked:!0,halfCheck:!1}})},_getNode:function(e,t){for(var i=e,n=0,r=t.length;n<r;n++){if(null==i)return null;i=i[t[n]]}return i},_deleteNode:function(e,t){var i=t[t.length-1],n=t.slice(0,t.length-1),r=this._getNode(e,n);if(null!=r&&r[i])for(delete r[i];0<n.length&&BI.isEmpty(r);)i=n[n.length-1],n=n.slice(0,n.length-1),null!=(r=this._getNode(e,n))&&delete r[i]},_buildTree:function(e,t){var i=e;BI.each(t,function(e,t){BI.has(i,t)||(i[t]={}),i=i[t]})},_isMatch:function(e,t,i){var n=this.options,r=this._getTreeNode(e,t);if(!r)return!1;var o=BI.Func.getSearchResult([r.text||r.value],i);if(n.allowSearchValue&&r.value){var a=BI.Func.getSearchResult([r.value],i);return 0<a.find.length||0<a.match.length||0<o.find.length||0<o.match.length}return 0<o.find.length||0<o.match.length},_getTreeNode:function(t,i){var n,r=this,o=0;return this.tree.traverse(function(e){if(!r.tree.isRoot(e)){if(o>t.length)return!1;if(o===t.length&&e.value===i)return n=e,!1;if(e.value!==t[o])return!0;o++}}),n},_getChildren:function(e){var t;return(0<e.length?(t=BI.last(e),this._getTreeNode(e.slice(0,e.length-1),t)):this.tree.getRoot()).getChildren()},_getAllChildren:function(i){var e=this._getChildren(i),t=[].concat(e);BI.each(t,function(e,t){t.parentValues=i});for(var n=BI.map(e,function(e,t){return{parentValues:i,value:t.value}});BI.isNotEmptyArray(n);){var r=n.shift(),o=r.parentValues.concat(r.value),a=this._getChildren(o);BI.each(a,function(e,t){t.parentValues=o}),n=n.concat(a),t=t.concat(a)}return t},_getChildCount:function(e){return this._getChildren(e).length}})},function(e,t){BI.AbstractListTreeValueChooser=BI.inherit(BI.AbstractTreeValueChooser,{_reqDisplayTreeNode:function(e,t){var i,o=this,a={},n=e.selectedValues;function s(e,t){a[e.id]={id:e.id,pId:t,text:e.text,value:e.value,open:!0,isLeaf:e.isLeaf}}null==n||BI.isEmpty(n)?t({}):(this.tree.getRoot(),i=n,BI.each(i,function(e,r){BI.each(r,function(e,t){var i=t,n=o._getTreeNode(r.slice(0,e),i);BI.isNull(n)?s({id:BI.UUID(),text:i,value:i,isLeaf:!0},BI.UUID()):(BI.has(a,n.id)||s(n,n.parent&&n.parent.id),!0!==a[n.id].isLeaf&&(a[n.id].isLeaf=e===r.length-1))})}),t({items:BI.values(a)}))},_reqInitTreeNode:function(l,e){var u=this,c=[],h=l.keyword||"",p=l.selectedValues,d=l.lastSearchValue||"",t=function(){var e=u._getChildren([]),t=e.length;if(""!==d){for(var i=0,n=t;i<n;i++)if(e[i].value===d){t=i+1;break}}else t=0;for(var r=[],o=t,n=e.length;o<n;o++){var a;if(r.length<u._const.perPage?a=g(1,[],e[o].value,c):r.length===u._const.perPage&&(a=g(1,[],e[o].value,[])),!0===a[0]&&r.push(e[o].value),r.length>u._const.perPage)break}{var s;1===l.times&&(s=u._getAddedValueNode([],p),c=BI.concat(BI.filter(s,function(e,t){var i=BI.Func.getSearchResult([t.text||t.value],h);return 0<i.find.length||0<i.match.length}),c))}return r}();function g(n,e,t,r){if(u._isMatch(e,t,h))return I(e,t,!1,s=B(e,t),!0,r),[!0,s];var o=BI.clone(e);o.push(t);var i=u._getChildren(o),a=!1,s=!1;return BI.each(i,function(e,t){var i=g(n+1,o,t.value,r);!0===i[1]&&(s=!0),!0===i[0]&&(a=!0)}),!0===a&&I(e,t,!0,s=B(e,t),!1,r),[a,s]}function I(e,t,i,n,r,o){var a=u._getTreeNode(e,t);o.push({id:a.id,pId:a.pId,text:a.text,value:a.value,title:a.title,isParent:0<a.getChildrenLength(),open:i,checked:n,halfCheck:!1,flag:r})}function B(i,n){return BI.any(p,function(e,t){return BI.isEqual(i,t.slice(0,i.length))&&BI.last(t)===n})}BI.nextTick(function(){e({hasNext:t.length>u._const.perPage,items:c,lastSearchValue:BI.last(t)})})},_reqTreeNode:function(e,t){for(var i,n=this,r=this.options,o=[],a=e.times,s=e.parentValues||[],l=e.selectedValues||[],u=d(s,l),c=this._getChildren(s),h=(a-1)*this._const.perPage;c[h]&&h<a*this._const.perPage;h++){var p=BI.has(u,c[h].value);o.push({id:c[h].id,pId:c[h].pId,value:c[h].value,text:c[h].text,times:1,isParent:0<c[h].getChildrenLength(),checked:p,halfCheck:!1,open:r.open})}function d(i,e){var n={};return BI.each(e,function(e,t){BI.isEqual(i,t.slice(0,i.length))&&(n[BI.last(t)]=[2,0])}),n}r.open&&(i=[],BI.each(c,function(e,t){i=BI.concat(i,n._getAllChildren(s.concat([t.value])))}),BI.each(i,function(e,t){var i=d(t.parentValues,l),n=BI.has(i,t.value);o.push({id:t.id,pId:t.pId,value:t.value,text:t.text,times:1,isParent:0<t.getChildrenLength(),checked:n,halfCheck:!1,open:r.open})})),0===s.length&&1===a&&(o=BI.concat(n._getAddedValueNode(s,l),o)),BI.nextTick(function(){t({items:o,hasNext:c.length>a*n._const.perPage})})},_getAddedValueNode:function(e,t){var i=this._getChildren(e),n=BI.flatten(BI.filter(t,function(e,t){return 1===t.length}));return BI.map(BI.difference(n,BI.map(i,"value")),function(e,t){return{id:BI.UUID(),pId:0<i.length?i[0].pId:BI.UUID(),value:t,text:t,times:1,isParent:!1,checked:!0,halfCheck:!1}})}})},function(e,t){BI.ListTreeValueChooserInsertCombo=BI.inherit(BI.AbstractListTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.ListTreeValueChooserInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-list-tree-value-chooser-insert-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.ListTreeValueChooserInsertCombo.superclass._init.apply(this,arguments);var t=this,e=this.options;BI.isNotNull(e.items)&&this._initData(e.items),this.combo=BI.createWidget({type:"bi.multi_tree_list_combo",element:this,text:e.text,value:e.value,watermark:e.watermark,allowInsertValue:e.allowInsertValue,allowEdit:e.allowEdit,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:e.width,height:e.height,listeners:[{eventName:BI.MultiTreeListCombo.EVENT_FOCUS,action:function(){t.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_FOCUS)}},{eventName:BI.MultiTreeListCombo.EVENT_BLUR,action:function(){t.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_BLUR)}},{eventName:BI.MultiTreeListCombo.EVENT_STOP,action:function(){t.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_STOP)}},{eventName:BI.MultiTreeListCombo.EVENT_CLICK_ITEM,action:function(e){t.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CLICK_ITEM,e)}},{eventName:BI.MultiTreeListCombo.EVENT_SEARCHING,action:function(){t.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_SEARCHING)}},{eventName:BI.MultiTreeListCombo.EVENT_CONFIRM,action:function(){t.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM)}},{eventName:BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW)}}]})},setValue:function(e){this.combo.setValue(e)},getValue:function(){return this.combo.getValue()},populate:function(e){this._initData(e),this.combo.populate.apply(this.combo,arguments)}}),BI.ListTreeValueChooserInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.ListTreeValueChooserInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.ListTreeValueChooserInsertCombo.EVENT_STOP="EVENT_STOP",BI.ListTreeValueChooserInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.ListTreeValueChooserInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.ListTreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.list_tree_value_chooser_insert_combo",BI.ListTreeValueChooserInsertCombo)},function(e,t){BI.TreeValueChooserInsertCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-insert-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserInsertCombo.superclass._init.apply(this,arguments);var t=this,e=this.options;BI.isNotNull(e.items)&&this._initData(e.items),this.combo=BI.createWidget({type:"bi.multi_tree_insert_combo",allowEdit:e.allowEdit,text:e.text,value:e.value,watermark:e.watermark,element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:e.width,height:e.height,listeners:[{eventName:BI.MultiTreeInsertCombo.EVENT_FOCUS,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_FOCUS)}},{eventName:BI.MultiTreeInsertCombo.EVENT_BLUR,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_BLUR)}},{eventName:BI.MultiTreeInsertCombo.EVENT_STOP,action:function(){t.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_STOP)}},{eventName:BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,action:function(e){t.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM,e)}},{eventName:BI.MultiTreeInsertCombo.EVENT_SEARCHING,action:function(){t.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_SEARCHING)}},{eventName:BI.MultiTreeInsertCombo.EVENT_CONFIRM,action:function(){t.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM)}},{eventName:BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW)}}]})},setValue:function(e){this.combo.setValue(e)},getValue:function(){return this.combo.getValue()},populate:function(e){this._initData(e),this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.TreeValueChooserInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.TreeValueChooserInsertCombo.EVENT_STOP="EVENT_STOP",BI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.TreeValueChooserInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.TreeValueChooserInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.tree_value_chooser_insert_combo",BI.TreeValueChooserInsertCombo)},function(e,t){BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var t=this,e=this.options;BI.isNotNull(e.items)&&this._initData(e.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",text:e.text,allowEdit:e.allowEdit,value:e.value,watermark:e.watermark,element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:e.width,height:e.height,listeners:[{eventName:BI.MultiTreeCombo.EVENT_FOCUS,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_FOCUS)}},{eventName:BI.MultiTreeCombo.EVENT_BLUR,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_BLUR)}},{eventName:BI.MultiTreeCombo.EVENT_STOP,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_STOP)}},{eventName:BI.MultiTreeCombo.EVENT_CLICK_ITEM,action:function(e){t.fireEvent(BI.TreeValueChooserCombo.EVENT_CLICK_ITEM,e)}},{eventName:BI.MultiTreeCombo.EVENT_SEARCHING,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_SEARCHING)}},{eventName:BI.MultiTreeCombo.EVENT_CONFIRM,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)}},{eventName:BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_BEFORE_POPUPVIEW)}}]})},setValue:function(e){this.combo.setValue(e)},getValue:function(){return this.combo.getValue()},populate:function(e){this._initData(e),this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.TreeValueChooserCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TreeValueChooserCombo.EVENT_FOCUS="EVENT_FOCUS",BI.TreeValueChooserCombo.EVENT_BLUR="EVENT_BLUR",BI.TreeValueChooserCombo.EVENT_STOP="EVENT_STOP",BI.TreeValueChooserCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.TreeValueChooserCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo)},function(e,t){BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var e=this,t=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){e.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(t.items)&&(this._initData(t.items),this.populate())},setSelectedValue:function(e){this.pane.setSelectedValue(e)},setValue:function(e){this.pane.setValue(e)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane)},function(e,t){BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(i){var n=i;return BI.isNotNull(this.items)&&BI.some(this.items,function(e,t){if(t.value===i||t.value+""===i)return n=t.text,!0}),n},_getItemsByTimes:function(e,t){for(var i=[],n=(t-1)*this._const.perPage;e[n]&&n<t*this._const.perPage;n++)i.push(e[n]);return i},_hasNextByTimes:function(e,t){return t*this._const.perPage<e.length},_itemsCreator:function(t,o){var a=this,e=this.options;function i(n){var i,e=(t.keywords||[]).slice(),r=n;BI.isNotEmptyArray(e)&&(r=[],BI.each(e,function(e,t){var i=BI.Func.getSearchResult(n,t);r=r.concat(i.match).concat(i.find)}),r=BI.uniq(r)),t.selectedValues&&(i=BI.makeObject(t.selectedValues,!0),r=BI.filter(r,function(e,t){return!i[t.value]})),t.type!==BI.MultiSelectCombo.REQ_GET_ALL_DATA?t.type!==BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?o({items:a._getItemsByTimes(r,t.times),hasNext:a._hasNextByTimes(r,t.times)}):o({count:r.length}):o({items:r})}e.cache&&this.items?i(this.items):e.itemsCreator({},function(e){i(a.items=e)})}})},function(e,t){BI.ValueChooserInsertCombo=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-insert-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserInsertCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;BI.isNotNull(t.items)&&(this.items=t.items),this.combo=BI.createWidget({type:"bi.multi_select_insert_combo",element:this,allowEdit:t.allowEdit,text:t.text,value:t.value,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:t.width,height:t.height,listeners:[{eventName:BI.MultiSelectCombo.EVENT_FOCUS,action:function(){e.fireEvent(BI.ValueChooserInsertCombo.EVENT_FOCUS)}},{eventName:BI.MultiSelectCombo.EVENT_BLUR,action:function(){e.fireEvent(BI.ValueChooserInsertCombo.EVENT_BLUR)}},{eventName:BI.MultiSelectCombo.EVENT_STOP,action:function(){e.fireEvent(BI.ValueChooserInsertCombo.EVENT_STOP)}},{eventName:BI.MultiSelectCombo.EVENT_CLICK_ITEM,action:function(){e.fireEvent(BI.ValueChooserInsertCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectCombo.EVENT_SEARCHING,action:function(){e.fireEvent(BI.ValueChooserInsertCombo.EVENT_SEARCHING)}},{eventName:BI.MultiSelectCombo.EVENT_CONFIRM,action:function(){e.fireEvent(BI.ValueChooserInsertCombo.EVENT_CONFIRM)}}]})},setValue:function(e){this.combo.setValue(e)},getValue:function(){var e=this.combo.getValue()||{};return{type:e.type,value:e.value}},populate:function(e){this.items=e,this.combo.populate.apply(this,arguments)}}),BI.ValueChooserInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.ValueChooserInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.ValueChooserInsertCombo.EVENT_STOP="EVENT_STOP",BI.ValueChooserInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.ValueChooserInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.ValueChooserInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.value_chooser_insert_combo",BI.ValueChooserInsertCombo)},function(e,t){BI.ValueChooserCombo=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;BI.isNotNull(t.items)&&(this.items=t.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,allowEdit:t.allowEdit,text:t.text,value:t.value,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:t.width,height:t.height,listeners:[{eventName:BI.MultiSelectCombo.EVENT_FOCUS,action:function(){e.fireEvent(BI.ValueChooserCombo.EVENT_FOCUS)}},{eventName:BI.MultiSelectCombo.EVENT_BLUR,action:function(){e.fireEvent(BI.ValueChooserCombo.EVENT_BLUR)}},{eventName:BI.MultiSelectCombo.EVENT_STOP,action:function(){e.fireEvent(BI.ValueChooserCombo.EVENT_STOP)}},{eventName:BI.MultiSelectCombo.EVENT_CLICK_ITEM,action:function(){e.fireEvent(BI.ValueChooserCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectCombo.EVENT_SEARCHING,action:function(){e.fireEvent(BI.ValueChooserCombo.EVENT_SEARCHING)}},{eventName:BI.MultiSelectCombo.EVENT_CONFIRM,action:function(){e.fireEvent(BI.ValueChooserCombo.EVENT_CONFIRM)}}]})},setValue:function(e){this.combo.setValue(e)},getValue:function(){var e=this.combo.getValue()||{};return{type:e.type,value:e.value}},populate:function(e){this.items=e,this.combo.populate.apply(this,arguments)}}),BI.ValueChooserCombo.EVENT_BLUR="EVENT_BLUR",BI.ValueChooserCombo.EVENT_FOCUS="EVENT_FOCUS",BI.ValueChooserCombo.EVENT_STOP="EVENT_STOP",BI.ValueChooserCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.ValueChooserCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.ValueChooserCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.value_chooser_combo",BI.ValueChooserCombo)},function(e,t){BI.ValueChooserPane=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-pane",items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserPane.superclass._init.apply(this,arguments);var e=this,t=this.options;this.list=BI.createWidget({type:"bi.multi_select_list",element:this,value:t.value,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this)}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){e.fireEvent(BI.ValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(t.items)&&(this.items=t.items,this.list.populate())},setValue:function(e){this.list.setValue(e)},getValue:function(){var e=this.list.getValue()||{};return{type:e.type,value:e.value}},populate:function(e){e&&(this.items=e),this.list.populate.apply(this.list,arguments)}}),BI.ValueChooserPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.value_chooser_pane",BI.ValueChooserPane)},function(e,t,i){"use strict";var n,r=(n=i(659))&&n.__esModule?n:{"default":n};BI.extend(BI,r["default"])},function(e,t,i){"use strict";function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n={Decorators:function(e){if(e&&e.__esModule)return e;var t=a();if(t&&t.has(e))return t.get(e);var i={};if(null!=e){var n,r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e){Object.prototype.hasOwnProperty.call(e,o)&&((n=r?Object.getOwnPropertyDescriptor(e,o):null)&&(n.get||n.set)?Object.defineProperty(i,o,n):i[o]=e[o])}}i["default"]=e,t&&t.set(e,i);return i}(i(660))};t["default"]=n},function(e,t,i){"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function s(e,t){e.prototype=Object.create(t.prototype),function(e,t){for(var i=Object.getOwnPropertyNames(t),n=0;n<i.length;n++){var r=i[n],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&e[r]===undefined&&Object.defineProperty(e,r,o)}}(e.prototype.constructor=e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.shortcut=function(){return function(e){BI.shortcut(e.xtype,e)}},t.model=function(){return function(e){BI.model(e.xtype,e)}},t.store=function(i){var n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return function(e){return function(e){function t(){return e.apply(this,arguments)||this}return s(t,e),t.prototype._store=function(){var e=n.props?n.props.apply(this):undefined;return BI.Models.getModel(i.xtype,e)},t}(e)}},t.Model=void 0;var n=function(r){function e(){for(var e,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return a(o(e=r.call.apply(r,[this].concat(i))||this),"model",void 0),a(o(e),"store",void 0),a(o(e),"context",void 0),a(o(e),"actions",void 0),a(o(e),"childContext",void 0),a(o(e),"TYPE",void 0),a(o(e),"computed",void 0),e}return s(e,r),e.prototype.state=function(){return{}},e}(Fix.Model);t.Model=n},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){(function(Le){function we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e){"use strict";function s(e,t,i){}function l(e){return typeof e==="function"&&/native code/.test(e.toString())}var t=/\d\.\d{4}/;function u(e){e=e||"bi";return String(Math.random()+Math.random()).replace(t,e)}var n="__proto__"in{},i=function i(){if(typeof navigator==="undefined"){return false}return/(msie|trident)/i.test(navigator.userAgent.toLowerCase())},r=function r(){var e=0;if(typeof navigator==="undefined"){return false}var t=navigator.userAgent.toLowerCase();var i=t.match(/(?:msie\s([\w.]+))/);var n=t.match(/(?:trident.*rv:([\w.]+))/);if(i&&n&&i[1]&&n[1]){e=Math.max(i[1]*1,n[1]*1)}else if(i&&i[1]){e=i[1]*1}else if(n&&n[1]){e=n[1]*1}else{e=0}return e},o=i()&&r()<9,a=Object.prototype.toString;function c(e){return a.call(e)==="[object Object]"}function p(e,t){var i=true;var n=Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(e,t);if(n&&n.configurable===false){i=false}return i}function h(e){if(Object.isExtensible){return Object.isExtensible(e)}var t="";while(e.hasOwnProperty(t)){t+="?"}e[t]=true;var i=e.hasOwnProperty(t);delete e[t];return i}function y(e,t){if(e&&e.length){var i=e.indexOf(t);if(i>-1){return e.splice(i,1)}}}var d=/[^\w.$]/;function V(e){if(d.test(e)){return}var i=e.split(".");return function(e){for(var t=0;t<i.length;t++){if(!e)return;e=e[i[t]]}return e}}var g=function(){var r=[];var o=false;var e=void 0;function t(){o=false;var e=r.slice(0);r.length=0;for(var t=0;t<e.length;t++){e[t]()}}if(typeof Le!=="undefined"&&l(Le)){e=function e(){Le(t)}}else if(typeof MessageChannel!=="undefined"&&(l(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){var i=new MessageChannel;var n=i.port2;i.port1.onmessage=t;e=function e(){n.postMessage(1)}}else if(typeof Promise!=="undefined"&&l(Promise)){var a=Promise.resolve();e=function e(){a.then(t)}}else{e=function e(){setTimeout(t,0)}}return function s(t,i){var n=void 0;r.push(function(){if(t){try{t.call(i)}catch(e){console.error(e)}}else if(n){n(i)}});if(!o){o=true;e()}if(!t&&typeof Promise!=="undefined"){return new Promise(function(e,t){n=e})}}}(),I,B={__ob__:I,$accessors:I,$vbthis:I,$vbsetter:I},E=0,v=function(){function e(){we(this,e);this.id=E++;this.subs=[]}e.prototype.addSub=function t(e){this.subs.push(e)};e.prototype.removeSub=function i(e){y(this.subs,e)};e.prototype.depend=function n(){if(e.target){e.target.addDep(this)}};e.prototype.notify=function r(e){var t=this.subs.slice();for(var i=0,n=t.length;i<n;i++){t[i].update(e)}};return e}();v.target=null;var f=[];function m(e){if(v.target)f.push(v.target);v.target=e}function T(){v.target=f.pop()}var b=Array.prototype,C=[];_.each(["push","pop","shift","unshift","splice","sort","reverse"],function(a){var s=b[a];C[a]=function l(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++){t[i]=arguments[i]}var n=this.__ob__;var r=void 0;switch(a){case"push":case"unshift":r=t;break;case"splice":r=t.slice(2);break}if(r)r=n.observeArray(r);switch(a){case"push":case"unshift":t=r;break;case"splice":t=[t[0],t[1]].concat(r?r:[]);break}var o=s.apply(this,t);G(n.parent,n.parentKey,n.dep,true);return o}});var N=true;try{Object.defineProperty({},"_",{value:"x"});delete B.$vbsetter;delete B.$vbthis}catch(xe){N=false}var S=Object.defineProperties,x=void 0,L=new Date-0;if(!N){if("__defineGetter__"in{}){x=function x(e,t,i){if("value"in i){e[t]=i.value}if("get"in i){e.__defineGetter__(t,i.get)}if("set"in i){e.__defineSetter__(t,i.set)}return e};S=function S(e,t){for(var i in t){if(t.hasOwnProperty(i)){x(e,i,t[i])}}return e}}if(o){var w={};window.execScript(["Function parseVB(code)","\tExecuteGlobal(code)","End Function"].join("\n"),"VBScript");var A=function A(e,t,i,n){var r=t[i];if(arguments.length===4){r.set.call(e,n)}else{return r.get.call(e)}};S=function S(e,t,i){var n=[];n.push("\tPrivate [$vbsetter]","\tPublic [$accessors]","\tPublic Default Function [$vbthis](ac"+L+", s"+L+")","\t\tSet [$accessors] = ac"+L+": set [$vbsetter] = s"+L,"\t\tSet [$vbthis] = Me","\tEnd Function");var r={$vbthis:true,$vbsetter:true,$accessors:true};for(e in B){if(!r[e]){n.push("\tPublic ["+e+"]");r[e]=true}}for(e in t){if(r[e]){continue}r[e]=true;n.push("\tPublic Property Let ["+e+"](val"+L+")",'\t\tCall [$vbsetter](Me, [$accessors], "'+e+'", val'+L+")","\tEnd Property","\tPublic Property Set ["+e+"](val"+L+")",'\t\tCall [$vbsetter](Me, [$accessors], "'+e+'", val'+L+")","\tEnd Property","\tPublic Property Get ["+e+"]","\tOn Error Resume Next","\t\tSet["+e+'] = [$vbsetter](Me, [$accessors],"'+e+'")',"\tIf Err.Number <> 0 Then","\t\t["+e+'] = [$vbsetter](Me, [$accessors],"'+e+'")',"\tEnd If","\tOn Error Goto 0","\tEnd Property")}for(e in i){if(!r[e]){r[e]=true;n.push("\tPublic ["+e+"]")}}n.push("\tPublic [hasOwnProperty]");n.push("End Class");var o=n.join("\r\n");var a=w[o];if(!a){a=u("VBClass");window.parseVB("Class "+a+o);window.parseVB(["Function "+a+"Factory(acc, vbm)","\tDim o","\tSet o = (New "+a+")(acc, vbm)","\tSet "+a+"Factory = o","End Function"].join("\r\n"));w[o]=a}var s=window[a+"Factory"](t,A);return s}}}var D=S,M=_.keys(C),H={shouldConvert:true};function P(e,t,i,n){Object.defineProperty(e,t,{value:i,enumerable:!!n,writable:true,configurable:true})}var Y=function(){function i(e){we(this,i);this.value=e;this.dep=new v;this.vmCount=0;if(_.isArray(e)){var t=n?k:R;t(e,C,M);this.model=this.observeArray(e)}else{this.model=this.walk(e)}if(o){this.model["__ob__"]=this}else{P(this.model,"__ob__",this)}}i.prototype.walk=function t(e){return F(e,this)};i.prototype.observeArray=function r(e){for(var t=0,i=e.length;t<i;t++){var n=W(e[t],this,t);e[t]=n?n.model:e[t]}return e};return i}();function k(e,t,i){e.__proto__=t}function R(e,t,i){for(var n=0,r=i.length;n<r;n++){var o=i[n];e[o]=t[o]}}function W(e,t,i){if(!_.isObject(e)){return}var n=void 0;if(e.__ob__ instanceof Y){n=e.__ob__}else if(H.shouldConvert&&h(e)&&(_.isArray(e)||c(e))){n=new Y(e)}if(n){n.parent=t||n.parent;n.parentKey=i}return n}function G(t,i,e,n){e.notify({observer:t,key:i,refresh:n});if(t){_.each(t._deps,function(e){e.notify({observer:t,key:i})});var r=t,o=t,a=i||"";while(r){_.each(r._scopeDeps,function(e){e.notify({observer:t,key:i})});if(r.parentKey!=null){a=r.parentKey+"."+a}o=r;r=r.parent}for(var s in o._globalDeps){var l=new RegExp(s);if(l.test(a)){o._globalDeps[s].notify({observer:t,key:s})}}}}function F(l,u,c){var e={};var h=void 0;_.each(l,function(i,n){if(n in B){return}var r=p(l,n);var o=u&&u["__dep"+n]||new v;u&&(u["__dep"+n]=o);var a=r&&!c&&W(i,u,n);e[n]={enumerable:true,configurable:true,get:function t(){var e=a?a.model:i;if(v.target){o.depend();if(a){a.dep.depend();if(_.isArray(e)){X(e)}}}return e},set:function s(e){var t=a?a.model:i;if(e===t||e!==e&&t!==t){return}i=e;a=r&&!c&&W(e,u,n);if(a&&t&&t.__ob__){a._scopeDeps=t.__ob__._scopeDeps;a._deps=t.__ob__._deps}l[n]=a?a.model:e;G(h.__ob__,n,o)}}});return h=D(l,e)}function O(e,t,i){if(_.isArray(e)){e.length=Math.max(e.length,t);e.splice(t,1,i);return i}if(_.has(e,t)){e[t]=i;return i}var n=e.__ob__;if(!n){e[t]=i;return i}n.value[t]=i;e=F(n.value,n);G(n,t,n.dep);return e}function Z(e,t){if(_.isArray(e)){e.splice(t,1);return}var i=e.__ob__;if(!_.has(e,t)){return}if(!i){delete e[t];return e}delete i.value[t];e=F(i.value,i);G(i,t,i.dep);return e}function X(e){for(var t,i=0,n=e.length;i<n;i++){t=e[i];t&&t.__ob__&&t.__ob__.dep.depend();if(_.isArray(t)){X(t)}}}var J=[],K=[],Q={},U=false,z=false,j=0;function q(){j=J.length=K.length=0;Q={};U=z=false}function $(){z=true;var e=void 0,t=void 0,i=void 0;J.sort(function(e,t){return e.id-t.id});for(j=0;j<J.length;j++){e=J[j].watcher;i=J[j].options;t=e.id;Q[t]=null;e.run(i)}q()}function ee(e,t){var i=e.id;if(Q[i]==null){Q[i]=true;if(!z){J.push({watcher:e,options:t})}else{var n=J.length-1;while(n>j&&J[n].watcher.id>e.id){n--}J.splice(n+1,0,{watcher:e,options:t})}if(!U){U=true;g($)}}}var te=0,ie=function(){function r(e,t,i,n){we(this,r);this.vm=e;if(n){this.deep=!!n.deep;this.user=!!n.user;this.lazy=!!n.lazy;this.sync=!!n.sync}else{this.deep=this.user=this.lazy=this.sync=false}this.cb=i;this.id=++te;this.active=true;this.dirty=this.lazy;this.deps=[];this.newDeps=[];this.depIds=new Set;this.newDepIds=new Set;this.expression="";if(typeof t==="function"){this.getter=t}else{this.getter=V(t);if(!this.getter){this.getter=function(){}}}this.value=this.lazy?undefined:this.get()}r.prototype.get=function i(){m(this);var e=void 0;var t=this.vm;try{e=this.getter.call(t,t)}catch(xe){}finally{if(this.deep){oe(e)}T();this.cleanupDeps()}return e};r.prototype.addDep=function n(e){var t=e.id;if(!this.newDepIds.has(t)){this.newDepIds.add(t);this.newDeps.push(e);if(!this.depIds.has(t)){e.addSub(this)}}};r.prototype.cleanupDeps=function o(){var e=this.deps.length;while(e--){var t=this.deps[e];if(!this.newDepIds.has(t.id)){t.removeSub(this)}}var i=this.depIds;this.depIds=this.newDepIds;this.newDepIds=i;this.newDepIds.clear();i=this.deps;this.deps=this.newDeps;this.newDeps=i;this.newDeps.length=0};r.prototype.update=function t(e){if(this.lazy){this.dirty=true}else if(this.sync){this.run(e)}else{ee(this,e)}};r.prototype.run=function a(e){if(this.active){var t=this.get();if(t!==this.value||e&&e.refresh||this.deep){var i=this.value;this.value=t;if(this.user){try{this.cb.call(this.vm,t,i,e)}catch(xe){console.error(xe)}}else{try{this.cb.call(this.vm,t,i,e)}catch(xe){console.error(xe)}}}}};r.prototype.evaluate=function e(){this.value=this.get();this.dirty=false};r.prototype.depend=function s(){var e=this.deps.length;while(e--){this.deps[e].depend()}};r.prototype.teardown=function l(){if(this.active){y(this.vm._watchers,this);var e=this.deps.length;while(e--){this.deps[e].removeSub(this)}this.active=false}};return r}(),ne=new Set,re;function oe(e){ne.clear();ae(e,ne)}function ae(e,t){var i=void 0,n=void 0;var r=_.isArray(e);if(!r&&!_.isObject(e)){return}if(e.__ob__){var o=e.__ob__.dep.id;if(t.has(o)){return}t.add(o)}if(r){i=e.length;while(i--){ae(e[i],t)}}else{n=_.keys(e);i=n.length;while(i--){ae(e[n[i]],t)}}}var se={"||":re,"&&":re,"(":re,")":re};function le(e){var t="";for(var i=0,n=e.length;i<n;i++){if(_.isBoolean(e[i])||_.has(se,e[i])){t+=e[i]}else{t+="false"}}return new Function("return "+t)()}function ue(e){e=e.replace(/\*./g,"[a-zA-Z0-9_]+.");return"^"+e+"$"}function ce(T,e,r,b){if(c(r)){b=r;r=r.handler}if(typeof r==="string"){r=T[r]}b=b||{};b.user=true;var o=void 0;if(_.isFunction(e)||!(o=e.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g))||o.length===1&&!/\*/.test(e)){var t=new ie(T,e,r,b);if(b.immediate){r(t.value)}return function i(){t.teardown()}}var C=[];var a=o.slice();var s=false,l=false;var N=function N(e,t,i,n){if(s===true){return}a[e]=true;if(le(a)){s=true;r(t,i,n)}if(b&&b.sync){s=false;l=false;a=o.slice()}else{if(!l){l=true;g(function(){s=false;l=false;a=o.slice()})}}};_.each(o,function(e,n){if(_.has(se,e)){return}if(/^[1-9a-zA-Z.]+(\*\*$|\*$)/.test(e)||e==="**"){var t=/\*\*$/.test(e);if(t){e=e.replace(".**","")}else{e=e.replace(".*","")}var i=e==="**"?function(e){return e}:V(e);var r=i.call(T,T);var o=new v;if(t){(r.__ob__._scopeDeps||(r.__ob__._scopeDeps=[])).push(o)}else{(r.__ob__._deps||(r.__ob__._deps=[])).push(o)}var a=new ie(T,function(){o.depend();return NaN},function(e,t,i){N(n,e,t,_.extend({index:n},i))},b);C.push(function E(){a.teardown();r.__ob__._scopeDeps&&y(r.__ob__._scopeDeps,o);r.__ob__._deps&&y(r.__ob__._deps,o)});return}if(/\*\*$|\*$/.test(e)){throw new Error("not support")}if(/\*/.test(e)){var s=T;var l=e.split(".");for(var u=0,c=l.length;u<c;u++){if(l[u]==="*"){break}s=T[l[u]]}e=e.substr(e.indexOf("*"));var h=s.__ob__.parent,p=s.__ob__;while(h){e="*."+e;p=h;h=h.parent}var d=ue(e);var g=new v;p._globalDeps||(p._globalDeps={});p._globalDeps[d]=g;var I=new ie(s,function(){g.depend();return NaN},function(e,t,i){N(n,e,t,_.extend({index:n},i))},b);C.push(function f(){I.teardown();p._globalDeps&&delete p._globalDeps[d]});return}var B=new ie(T,e,function(e,t,i){N(n,e,t,_.extend({index:n},i))},b);C.push(function m(){B.teardown()})});return C}var he={};function pe(e){return he[e]}function de(e,t){he[e]=_.cloneDeep(t)}var ge={lazy:true};function Ie(e,t){if(t){e.$$state=W(t).model}}function Be(e,t){var i=e._computedWatchers={};Ee(e,t);for(var n in t){var r=t[n],o=e.$$model?e.model:e;var a=typeof r==="function"?_.bind(r,o):_.bind(r.get,o);i[n]=new ie(e.$$computed,a||s,s,ge)}}function Ee(e,t){var i={};var n=true;for(var r in t){if(!(r in e)){var o={enumerable:true,configurable:true,get:s,set:s};var a=t[r];if(typeof a==="function"){o.get=fe(e,r);o.set=s}else{o.get=a.get?n&&a.cache!==false?fe(r):a.get:s;o.set=a.set?a.set:s}i[r]=o}}e.$$computed=D({},i)}function fe(t,i){return function n(){var e=t._computedWatchers&&t._computedWatchers[i];if(e){if(e.dirty){e.evaluate()}if(v.target){e.depend()}return e.value}}}function _e(e,t){e._watchers||(e._watchers=[]);for(var i in t){var n=t[i];if(_.isArray(n)){for(var r=0;r<n.length;r++){e._watchers.push(me(e,i,n[r]))}}else{e._watchers.push(me(e,i,n))}}}function me(e,t,i,n){if(c(i)){n=i;i=i.handler}if(typeof i==="string"){i=e[i]}return ce(e.model,t,_.bind(i,e.$$model?e.model:e),n)}function Te(e,t){for(var i in t){e[i]=t[i]==null?s:_.bind(t[i],e.$$model?e.model:e)}}function be(n,e){e=e||[];_.each(e.reverse(),function(e){var t=pe(e);for(var i in t){if(typeof t[i]!=="function")continue;if(_.has(n,i))continue;n[i]=_.bind(t[i],n.$$model?n.model:n)}})}function Ce(o,a){var s={};var l=function l(e,t){var i=a[e];if(!(i in B)){s[i]={enumerable:true,configurable:true,get:function n(){if(o.$$computed&&i in o.$$computed){return o.$$computed[i]}if(o.$$state&&i in o.$$state){return o.$$state[i]}if(o.$$model&&i in o.$$model){return o.$$model[i]}var e=o._parent;while(e){if(e.$$context&&i in e.$$context){return e.$$context[i]}e=e._parent}},set:function r(e){if(o.$$state&&i in o.$$state){return o.$$state[i]=e}if(o.$$model&&i in o.$$model){return o.$$model[i]=e}var t=o._parent;while(t){if(t.$$context&&i in t.$$context){return t.$$context[i]=e}t=t._parent}}}}};for(var e=0,t=a.length;e<t;e++){l(e,t)}o.model=D({},s)}function Ne(o,a){var s={};var l=function l(e,t){var i=a[e];if(!(i in B)){s[i]={enumerable:true,configurable:true,get:function n(){return o.model[i]},set:function r(e){return o.model[i]=e}}}};for(var e=0,t=a.length;e<t;e++){l(e,t)}o.$$context=D({},s)}var ye=function(){function u(){we(this,u)}u.prototype._constructor=function c(e){if(e instanceof Y||e instanceof u){e=e.model}if(e&&e.__ob__){this.$$model=e}else{this.options=e||{}}this._parent=u.target;var t=_.isFunction(this.state)?this.state():this.state;var i=this.computed;var n=this.context;var r=this.childContext;var o=this.watch;var a=this.actions;var s=_.keys(this.$$model).concat(_.keys(t)).concat(_.keys(i)).concat(n||[]);var l=this.mixins;Ce(this,s);r&&Ne(this,r);this.$$model&&(this.model.__ob__=this.$$model.__ob__);be(this,l);this.init();Ie(this,t);Be(this,i);_e(this,o);Te(this,a);this.created&&this.created();if(this.$$model){return this.model}};u.prototype._init=function e(){};u.prototype.init=function t(){this._init()};u.prototype.destroy=function i(){for(var e in this._computedWatchers){this._computedWatchers[e].teardown()}_.each(this._watchers,function(e){e=_.isArray(e)?e:[e];_.each(e,function(e){e()})});this._watchers&&(this._watchers=[]);this.destroyed&&this.destroyed();this.$$model=null;this.$$computed=null;this.$$state=null};return u}();function Ve(e){var t=void 0;if(_.isArray(e)){t=[];for(var i=0,n=e.length;i<n;i++){t[i]=Ve(e[i])}}else if(e&&c(e)){t={};for(var r in e){if(!_.has(B,r)){t[r]=Ve(e[r])}}}else{t=e}return t}function ve(e){return new Y(e).model}var Se="2.0";e.define=ve,e.version=Se,e.$$skipArray=B,e.mixin=de,e.Model=ye,e.observerState=H,e.Observer=Y,e.observe=W,e.notify=G,e.defineReactive=F,e.set=O,e.del=Z,e.Watcher=ie,e.pushTarget=m,e.popTarget=T,e.watch=ce,e.toJSON=Ve,e.__esModule=true}(t)}).call(this,i(56).setImmediate)},,,,,,,function(e,t){!function(){function o(e,t,i,n){return BI.isPlainObject(i)&&(i=(n=i).handler),n=n||{},Fix.watch(e.model,t,_.bind(i,e),BI.extend(n,{store:e.store}))}var i=null,t=[];function r(e){i&&t.push(i),Fix.Model.target=i=e}function a(){Fix.Model.target=i=t.pop()}var n=null,s=[];function l(e){n&&s.push(n),Fix.Model.context=n=e}function u(){Fix.Model.context=n=s.pop()}var c=Fix.watch;Fix.watch=function(e,t,i,n){return BI.isPlainObject(i)&&(i=(n=i).handler),"string"==typeof i&&(i=e[i]),c.call(this,e,t,function(){n&&n.store&&r(n.store);try{var e=i.apply(this,arguments)}catch(t){console.error(t)}return n&&n.store&&a(),e},n)};var h=BI.createWidget;function p(){var e,t=!1;return _global.Fix&&this._store&&((e=function(e){if(null!=i)return i;for(var t=e=e||n;t&&!(t instanceof Fix.Model||t.store||t.__cacheStore);)t=t._parent||t.options&&t.options.element;return t?t instanceof Fix.Model?e.__cacheStore=t:(e.__cacheStore=t.store||t.__cacheStore,t.__cacheStore||t.store):void 0}(this.options.context||this.options.element))&&(r(e),t=!0),this.store=this._store(),this.store&&(this.store._widget=this),t&&a(),t=!1,r(this.store),this.store instanceof Fix.Model?this.model=this.store.model:this.model=this.store,t=!0),t}BI.createWidget=function(e,t,i){var n=!1;BI.isWidget(t)?(l(t),n=!0):null!=i&&(l(i),n=!0);var r=h.apply(this,arguments);return n&&u(),r},_.each(["populate","addItems","prependItems"],function(e){var i=BI.Loader.prototype[e];BI.Loader.prototype[e]=function(){l(this);try{var e=i.apply(this,arguments)}catch(t){console.error(t)}return u(),e}});var d=BI.Widget.prototype._init;BI.Widget.prototype._init=function(){var e=p.call(this);try{d.apply(this,arguments)}catch(t){console.error(t)}e&&a()};var g=BI.Widget.prototype._render;BI.Widget.prototype._render=function(){var e=!1;_global.Fix&&this._store&&(e=!0,r(this.store),function(e,t){for(var i in e._watchers||(e._watchers=[]),t){var n=t[i];if(BI.isArray(n))for(var r=0;r<n.length;r++)e._watchers.push(o(e,i,n[r]));else e._watchers.push(o(e,i,n))}}(this,this.watch)),g.apply(this,arguments),e&&a()};var I=BI.Widget.prototype.__d;BI.Widget.prototype.__d=function(){try{I.apply(this,arguments)}catch(e){console.error(e)}this.store&&BI.isFunction(this.store.destroy)&&this.store.destroy(),BI.each(this._watchers,function(e,t){t=BI.isArray(t)?t:[t],BI.each(t,function(e,t){t()})}),this._watchers&&(this._watchers=[]),this.store&&(this.store._parent&&(this.store._parent=null),this.store._widget&&(this.store._widget=null),this.store=null),delete this.__cacheStore},_.each(["_mount"],function(e){var i=BI.Widget.prototype[e];i&&(BI.Widget.prototype[e]=function(){this.store&&r(this.store);try{var e=i.apply(this,arguments)}catch(t){console.error(t)}return this.store&&a(),e})}),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(e){var n=BI[e];BI[e]=function(e,i,t){return"function"==typeof i?n(e,function(e,t){if(!(e in Fix.$$skipArray))return i.apply(this,arguments)},t):n.apply(this,arguments)}}),BI.isEmpty=function(e){return BI.isPlainObject(e)&&e.__ob__?0===BI.keys(e).length:_.isEmpty(e)},BI.keys=function(e){for(var t=_.keys(e),i=[],n=0;n<t.length;n++)t[n]in Fix.$$skipArray||i.push(t[n]);return i},BI.values=function(e){for(var t=BI.keys(obj),i=t.length,n=[],r=0;r<i;r++)n[r]=obj[t[r]];return n},BI.extend=function(){var e=Array.prototype.slice.call(arguments);if(e.length<1)return{};for(var i=e[0],t=1;t<e.length;)BI.each(e[t],function(e,t){i[e]=t}),t++;return i},BI.size=function(e){return BI.isPlainObject(e)&&e.__ob__?BI.keys(e).length:_.size(e)},BI.isEmptyObject=function(e){return 0===BI.size(e)},BI.deepClone=function(e){return Fix.toJSON(e)}),BI.watch=Fix.watch}()},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){i(79),i(80),i(81),i(83),i(219),i(220),i(84),i(85),i(86),i(87),i(88),i(89),i(90),i(91),i(92),i(93),i(94),i(95),i(96),i(97),i(223),i(224),i(225),i(226),i(227),i(98),i(228),i(229),i(230),i(231),i(232),i(233),i(234),i(235),i(236),i(237),i(238),i(99),i(239),i(100),i(101),i(102),i(103),i(104),i(105),i(240),i(241),i(242),i(243),i(244),i(221),i(222),i(106),i(245),i(246),i(247),i(248),i(249),i(250),i(251),i(252),i(253),i(254),i(255),i(256),i(257),i(258),i(259),i(260),i(261),i(262),i(263),i(264),i(265),i(266),i(267),i(268),i(269),i(270),i(271),i(272),i(273),i(274),i(275),i(276),i(277),i(278),i(279),i(280),i(281),i(282),i(283),i(284),i(285),i(286),i(287),i(107),i(108),i(109),i(756),i(345),i(346),i(347),i(348),i(349),i(350),i(351),i(352),i(353),i(354),i(355),i(356),i(357),i(358),i(359),i(360),i(361),i(362),i(363),i(364),i(365),i(366),i(367),i(368),i(369),i(370),i(371),i(372),i(373),i(374),i(375),i(376),i(377),i(378),i(379),i(380),i(381),i(382),i(383),i(384),i(385),i(386),i(387),i(388),i(389),i(390),i(391),i(392),i(393),i(394),i(395),i(396),i(397),i(398),i(399),i(400),i(401),i(402),i(403),i(404),i(405),i(406),i(407),i(408),i(409),i(410),i(411),i(412),i(413),i(414),i(415),i(416),i(417),i(418),i(419),i(420),i(421),i(422),i(423),i(424),i(425),i(426),i(427),i(428),i(429),i(430),i(431),i(432),i(433),i(434),i(435),i(436),i(437),i(438),i(439),i(440),i(441),i(442),i(443),i(444),i(445),i(446),i(447),i(448),i(449),i(450),i(451),i(452),i(453),i(454),i(455),i(456),i(457),i(458),i(459),i(460),i(461),i(462),i(463),i(464),i(465),i(466),i(467),i(468),i(469),i(470),i(471),i(472),i(473),i(474),i(475),i(476),i(477),i(478),i(479),i(480),i(481),i(482),i(483),i(484),i(485),i(486),i(487),i(488),i(489),i(110),i(111),i(112),i(113),i(114),i(115),i(116),i(117),i(118),i(119),i(120),i(121),i(122),i(123),i(124),i(125),i(126),i(127),i(128),i(129),i(130),i(131),i(132),i(133),i(134),i(135),i(136),i(137),i(138),i(139),i(140),i(141),i(142),i(143),i(144),i(145),i(146),i(147),i(148),i(149),i(150),i(151),i(152),i(153),i(154),i(155),i(156),i(157),i(158),i(159),i(160),i(161),i(162),i(163),i(164),i(165),i(166),i(167),i(490),i(491),i(492),i(493),i(494),i(495),i(496),i(497),i(498),i(499),i(500),i(501),i(502),i(503),i(504),i(505),i(506),i(507),i(508),i(509),i(510),i(511),i(512),i(513),i(514),i(515),i(516),i(517),i(518),i(519),i(520),i(521),i(522),i(523),i(524),i(525),i(526),i(527),i(528),i(529),i(530),i(531),i(532),i(533),i(534),i(535),i(536),i(537),i(538),i(539),i(540),i(541),i(542),i(543),i(544),i(545),i(546),i(547),i(548),i(549),i(550),i(551),i(552),i(553),i(554),i(555),i(556),i(557),i(558),i(559),i(560),i(561),i(562),i(563),i(564),i(565),i(566),i(567),i(568),i(569),i(570),i(571),i(572),i(573),i(574),i(575),i(576),i(577),i(578),i(579),i(580),i(581),i(582),i(583),i(584),i(585),i(586),i(587),i(588),i(589),i(590),i(591),i(592),i(593),i(594),i(595),i(596),i(597),i(598),i(599),i(600),i(601),i(602),i(603),i(604),i(605),i(606),i(607),i(608),i(609),i(610),i(611),i(612),i(613),i(614),i(615),i(616),i(617),i(618),i(619),i(620),i(621),i(622),i(623),i(624),i(625),i(626),i(627),i(628),i(629),i(630),i(631),i(632),i(633),i(634),i(635),i(636),i(637),i(638),i(639),i(640),i(641),i(642),i(643),i(644),i(645),i(646),i(647),i(648),i(649),i(650),i(651),i(652),i(653),i(654),i(655),i(656),i(657),i(763),i(968),e.exports=i(658)}]); |