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

2 lines
1.3 MiB

/*! time: 2020-6-4 17:14:21 */
!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=1244)}([,,,,,,,,,,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(i,e,t){(function(e){var t=function(e){return e&&e.Math==Math&&e};i.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||Function("return this")()}).call(this,t(10))},,,,,function(e,t,i){var n=i(14),r=i(662),o=i(717),a=i(974),s=n.Symbol,l=r("wks");e.exports=function(e){return l[e]||(l[e]=a&&s[e]||(a?s:o)("Symbol."+e))}},function(e,t,i){var c=i(14),h=i(714).f,p=i(47),d=i(57),g=i(769),f=i(1003),I=i(773);e.exports=function(e,t){var i,n,r,o,a=e.target,s=e.global,l=e.stat,u=s?c:l?c[a]||g(a,{}):(c[a]||{}).prototype;if(u)for(i in t){if(r=t[i],n=e.noTargetGet?(o=h(u,i))&&o.value:u[i],!I(s?i:a+(l?".":"#")+i,e.forced)&&n!==undefined){if(typeof r==typeof n)continue;f(r,n)}(e.sham||n&&n.sham)&&p(r,"sham",!0),d(u,i,r,e)}}},,,,,,,,,,function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,i){var n=i(31);e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},,,function(e,t,i){var n=i(30);e.exports=!n(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},,,,,,,,,,,function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},function(e,t,i){var n=i(35),r=i(48),o=i(661);e.exports=n?function(e,t,i){return r.f(e,t,o(1,i))}:function(e,t,i){return e[t]=i,e}},function(e,t,i){var n=i(35),r=i(969),o=i(32),a=i(767),s=Object.defineProperty;t.f=n?s:function(e,t,i){if(o(e),t=a(t,!0),o(i),r)try{return s(e,t,i)}catch(n){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},function(e,t,i){e.exports=i(14)},,,,,,,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){var s=i(14),n=i(662),l=i(47),u=i(46),c=i(769),r=i(970),o=i(65),a=o.get,h=o.enforce,p=String(r).split("toString");n("inspectSource",function(e){return r.call(e)}),(e.exports=function(e,t,i,n){var r=!!n&&!!n.unsafe,o=!!n&&!!n.enumerable,a=!!n&&!!n.noTargetGet;"function"==typeof i&&("string"!=typeof t||u(i,"name")||l(i,"name",t),h(i).source=p.join("string"==typeof t?t:"")),e!==s?(r?!a&&e[t]&&(o=!0):delete e[t],o?e[t]=i:l(e,t,i)):o?e[t]=i:c(t,i)})(Function.prototype,"toString",function(){return"function"==typeof this&&a(this).source||r.call(this)})},,,,,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 f(e,t){this.fun=e,this.array=t}function I(){}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 f(e,t)),1!==c.length||h||l(g)},f.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=I,o.addListener=I,o.once=I,o.off=I,o.removeListener=I,o.removeAllListeners=I,o.emit=I,o.prependListener=I,o.prependOnceListener=I,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){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},function(e,t,i){var n,r,o,a,s,l,u,c,h=i(1002),p=i(14),d=i(31),g=i(47),f=i(46),I=i(716),B=i(663),E=p.WeakMap;u=h?(n=new E,r=n.get,o=n.has,a=n.set,s=function(e,t){return a.call(n,e,t),t},l=function(e){return r.call(n,e)||{}},function(e){return o.call(n,e)}):(B[c=I("state")]=!0,s=function(e,t){return g(e,c,t),t},l=function(e){return f(e,c)?e[c]:{}},function(e){return f(e,c)}),e.exports={set:s,get:l,has:u,enforce:function(e){return u(e)?l(e):s(e,{})},getterFor:function(i){return function(e){var t;if(!d(e)||(t=l(e)).type!==i)throw TypeError("Incompatible receiver, "+i+" required");return t}}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},,,,,,,,,,,,,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 v,d=200,_="Expected a function",n="__lodash_hash_undefined__",b="__lodash_placeholder__",T=1,y=2,C=4,N=1,B=2,V=1,S=2,x=4,L=8,w=16,A=32,D=64,M=128,k=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",k]],P="[object Arguments]",E="[object Array]",l="[object AsyncFunction]",H="[object Boolean]",R="[object Date]",m="[object Error]",Y="[object Function]",W="[object GeneratorFunction]",O="[object Map]",F="[object Number]",u="[object Null]",G="[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]",f=/[&<>"']/g,I=RegExp(f.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,fe=/^0b[01]+$/i,Ie=/^\[object .+?Constructor\]$/,Be=/^0o[0-7]+$/i,Ee=/^(?:0|[1-9]\d*)$/,me="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",be="\\ufe0e\\ufe0f",Te="["+me+"]",ye="["+_e+"]",Ce="\\ud83c[\\udffb-\\udfff]",ve="[^"+me+"]",Ne="(?:\\ud83c[\\udde6-\\uddff]){2}",Ve="[\\ud800-\\udbff][\\udc00-\\udfff]",Se="\\u200d",xe="(?:"+ye+"|"+Ce+")"+"?",Le="["+be+"]?",we=Le+xe+("(?:"+Se+"(?:"+[ve,Ne,Ve].join("|")+")"+Le+xe+")*"),Ae="(?:"+[ve+ye+"?",ye,Ne,Ve,Te].join("|")+")",De=RegExp(Ce+"(?="+Ce+")|"+Ae+we,"g"),Me=RegExp("["+Se+me+_e+be+"]"),ke={};ke[z]=ke[j]=ke[q]=ke[$]=ke[ee]=ke[te]=ke[ie]=ke[ne]=ke[re]=!0,ke[P]=ke[E]=ke[Q]=ke[H]=ke[U]=ke[R]=ke[m]=ke[Y]=ke[O]=ke[F]=ke[G]=ke[Z]=ke[X]=ke[J]=ke[g]=!1;var Pe={};Pe[P]=Pe[E]=Pe[Q]=Pe[U]=Pe[H]=Pe[R]=Pe[z]=Pe[j]=Pe[q]=Pe[$]=Pe[ee]=Pe[O]=Pe[F]=Pe[G]=Pe[Z]=Pe[X]=Pe[J]=Pe[K]=Pe[te]=Pe[ie]=Pe[ne]=Pe[re]=!0,Pe[m]=Pe[Y]=Pe[g]=!1;var He=parseFloat,Re=parseInt,Ye="object"==typeof qo&&qo&&qo.Object===Object&&qo,We="object"==typeof self&&self&&self.Object===Object&&self,Oe=Ye||We||Function("return this")(),Fe=ta&&!ta.nodeType&&ta,Ge=Fe&&"object"==typeof $o&&$o&&!$o.nodeType&&$o,Ze=Ge&&Ge.exports===Fe,Xe=Ze&&Ye.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?v:e[t]}}function ft(e,n,r,o,t){return t(e,function(e,t,i){r=o?(o=!1,e):n(r,e,t,i)}),r}function It(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function Bt(t){return function(e){return t(e)}}function Et(e,t){return e.has(t)}var mt,_t=(mt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},function(e){return null==mt?v:mt[e]});function bt(e){return Me.test(e)}function Tt(e){var i=-1,n=Array(e.size);return e.forEach(function(e,t){n[++i]=[t,e]}),n}function yt(t,i){return function(e){return t(i(e))}}function Ct(e,t){for(var i=-1,n=e.length,r=0,o=[];++i<n;){var a=e[i];a!==t&&a!==b||(e[i]=b,o[r++]=i)}return o}function vt(e,t){return"__proto__"==t?v:e[t]}function Nt(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}function Vt(e){return(bt(e)?function(e){var t=De.lastIndex=0;for(;De.test(e);)++t;return t}:ut)(e)}function St(e){return bt(e)?e.match(De)||[]:e.split("")}var xt,Lt=Array.prototype,wt=Function.prototype,At=Object.prototype,Dt=Oe["__core-js_shared__"],Mt=wt.toString,kt=At.hasOwnProperty,Pt=0,Ht=(xt=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+xt:"",Rt=At.toString,Yt=Mt.call(Object),Wt=Oe._,Ot=RegExp("^"+Mt.call(kt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ft=Ze?Oe.Buffer:v,Gt=Oe.Symbol,Zt=Oe.Uint8Array,Xt=Ft?Ft.allocUnsafe:v,Jt=yt(Object.getPrototypeOf,Object),Kt=Object.create,Qt=At.propertyIsEnumerable,Ut=Lt.splice,zt=Gt?Gt.isConcatSpreadable:v,jt=Gt?Gt.iterator:v,qt=Gt?Gt.toStringTag:v,$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:v,ri=Oe.isFinite,oi=yt(Object.keys,Object),ai=Math.max,si=Math.min,li=Date.now,ui=Math.random,ci=(Lt.reverse,lr(Oe,"DataView")),hi=lr(Oe,"Map"),pi=lr(Oe,"Promise"),di=lr(Oe,"Set"),gi=lr(Oe,"WeakMap"),fi=lr(Object,"create"),Ii=gi&&new gi,Bi={},Ei=wr(ci),mi=wr(hi),_i=wr(pi),bi=wr(di),Ti=wr(gi),yi=Gt?Gt.prototype:v,Ci=yi?yi.valueOf:v,vi=yi?yi.toString:v;function Ni(e){if(Io(e)&&!so(e)&&!(e instanceof wi)){if(e instanceof Li)return e;if(kt.call(e,"__wrapped__"))return Ar(e)}return new Li(e)}var Vi=function(e){if(!fo(e))return{};if(Kt)return Kt(e);Si.prototype=e;var t=new Si;return Si.prototype=v,t};function Si(){}function xi(){}function Li(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=v}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 ki(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 Hi(e,t){var i=so(e),n=!i&&ao(e),r=!i&&!n&&co(e),o=!i&&!n&&!r&&Co(e),a=i||n||r||o,s=a?It(e.length,String):[],l=s.length;for(var u in e)!t&&!kt.call(e,u)||a&&("length"==u||r&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||fr(u,l))||s.push(u);return s}function Ri(e,t,i){(i===v||oo(e[t],i))&&(i!==v||t in e)||Gi(e,t,i)}function Yi(e,t,i){var n=e[t];kt.call(e,t)&&oo(n,i)&&(i!==v||t in e)||Gi(e,t,i)}function Wi(e,t){for(var i=e.length;i--;)if(oo(e[i][0],t))return i;return-1}function Oi(e,n,r,o){return Ui(e,function(e,t,i){n(o,e,r(e),i)}),o}function Fi(e,t){return e&&On(t,Ho(t),e)}function Gi(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&T,l=n&y,u=n&C;if(r&&(a=t?r(i,e,t,o):r(i)),a!==v)return a;if(!fo(i))return i;var c,h,p,d,g,f,I=so(i);if(I){if(a=function(e){var t=e.length,i=new e.constructor(t);t&&"string"==typeof e[0]&&kt.call(e,"index")&&(i.index=e.index,i.input=e.input);return i}(i),!s)return Wn(i,a)}else{var B=hr(i),E=B==Y||B==W;if(co(i))return kn(i,s);if(B==G||B==P||E&&!t){if(a=l||E?{}:dr(i),!s)return l?(f=p=i,d=(g=a)&&On(f,Ro(f),g),On(p,cr(p),d)):(h=Fi(a,c=i),On(c,ur(c),h))}else{if(!Pe[B])return t?i:{};a=function(e,t,i){var n=e.constructor;switch(t){case Q:return Pn(e);case H:case R: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 Hn(e,i);case O: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 Ci?Object(Ci.call(e)):{}}(e)}}(i,B,s)}}var m=(o=o||new Pi).get(i);if(m)return m;if(o.set(i,a),bo(i))return i.forEach(function(e){a.add(Zi(e,n,r,e,i,o))}),a;if(Bo(i))return i.forEach(function(e,t){a.set(t,Zi(e,n,r,t,i,o))}),a;var _=I?v:(u?l?rr:nr:l?Ro:Ho)(i);return et(_||i,function(e,t){_&&(e=i[t=e]),Yi(a,t,Zi(e,n,r,t,i,o))}),a}function Xi(e,t,i){if("function"!=typeof e)throw new TypeError(_);return setTimeout(function(){e.apply(v,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,Bt(i))),n?(o=rt,a=!1):t.length>=d&&(o=Et,a=!1,t=new ki(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}(Ni.prototype=xi.prototype).constructor=Ni,(Li.prototype=Vi(xi.prototype)).constructor=Li,(wi.prototype=Vi(xi.prototype)).constructor=wi,Ai.prototype.clear=function(){this.__data__=fi?fi(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(fi){var i=t[e];return i===n?v:i}return kt.call(t,e)?t[e]:v},Ai.prototype.has=function(e){var t=this.__data__;return fi?t[e]!==v:kt.call(t,e)},Ai.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=fi&&t===v?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?v: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},ki.prototype.add=ki.prototype.push=function(e){return this.__data__.set(e,n),this},ki.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===v?l==l&&!yo(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,Ho)}function rn(e,t){return e&&tn(e,t,Ho)}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:v}function sn(e,t,i){var n=t(e);return so(e)?n:at(n,i(e))}function ln(e){return null==e?e===v?p:u:qt&&qt in Object(e)?function(e){var t=kt.call(e,qt),i=e[qt];try{e[qt]=v;var n=!0}catch(o){}var r=Rt.call(e);n&&(t?e[qt]=i:delete e[qt]);return r}(e):(t=e,Rt.call(t));var t}function un(e,t){return t<e}function cn(e,t){return null!=e&&kt.call(e,t)}function hn(e,t){return null!=e&&t in Object(e)}function pn(e){return Io(e)&&ln(e)==P}function dn(e,t,i,n,r){return e===t||(null==e||null==t||!Io(e)&&!Io(t)?e!=e&&t!=t:function(e,t,i,n,r,o){var a=so(e),s=so(t),l=a?E:hr(e),u=s?E:hr(t),c=(l=l==P?G:l)==G,h=(u=u==P?G:u)==G,p=l==u;if(p&&co(e)){if(!co(t))return!1;c=!(a=!0)}if(p&&!c)return o=o||new Pi,a||Co(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 H:case R:case F:return oo(+e,+t);case m:return e.name==t.name&&e.message==t.message;case Z:case J:return e==t+"";case O:var s=Tt;case X:var l=n&N;if(s=s||Nt,e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;n|=B,a.set(e,t);var c=tr(s(e),s(t),n,r,o,a);return a["delete"](e),c;case K:if(Ci)return Ci.call(e)==Ci.call(t)}return!1}(e,t,l,i,n,r,o);if(!(i&N)){var d=c&&kt.call(e,"__wrapped__"),g=h&&kt.call(t,"__wrapped__");if(d||g){var f=d?e.value():e,I=g?t.value():t;return o=o||new Pi,r(f,I,i,n,o)}}return p&&(o=o||new Pi,function(e,t,i,n,r,o){var a=i&N,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:kt.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 f,I=e[h],B=t[h];if(n&&(f=a?n(B,I,h,t,e,o):n(I,B,h,e,t,o)),!(f===v?I===B||r(I,B,i,n,o):f)){d=!1;break}g=g||"constructor"==h}{var E,m;d&&!g&&(E=e.constructor,m=t.constructor,E!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof E&&E instanceof E&&"function"==typeof m&&m instanceof m)&&(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 fo(e)&&!(Ht&&Ht in e)&&(po(e)?Ot:Ie).test(wr(e))}function fn(e){return"function"==typeof e?e:null==e?Xo:"object"==typeof e?so(e)?function(i,n){if(Br(i)&&mr(n))return _r(Lr(i),n);return function(e){var t=Do(e,i);return t===v&&t===n?Mo(e,i):dn(n,t,N|B)}}(e[0],e[1]):_n(e):Br(t=e)?gt(Lr(t)):function(t){return function(e){return an(e,t)}}(t);var t}function In(e){if(!Er(e))return oi(e);var t=[];for(var i in Object(e))kt.call(e,i)&&"constructor"!=i&&t.push(i);return t}function Bn(e){if(!fo(e))return function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}(e);var t=Er(e),i=[];for(var n in e)("constructor"!=n||!t&&kt.call(e,n))&&i.push(n);return i}function En(e,t){return e<t}function mn(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 _n(t){var i=function(e){var t=Ho(e),i=t.length;for(;i--;){var n=t[i],r=e[n];t[i]=[n,r,mr(r)]}return t}(t);return 1==i.length&&i[0][2]?_r(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===v&&!(l in e))return!1}else{var h,p=new Pi;if(n&&(h=n(u,c,l,e,t,p)),!(h===v?dn(c,u,N|B,n,p):h))return!1}}return!0}(e,t,i)}}function bn(n,r,o,a,s){n!==r&&en(r,function(e,t){var i;fo(e)?(s=s||new Pi,function(e,t,i,n,r,o,a){var s=vt(e,i),l=vt(t,i),u=a.get(l);if(u)return Ri(e,i,u);var c=o?o(s,l,i+"",e,t,a):v,h=c===v;{var p,d,g;h&&(p=so(l),d=!p&&co(l),g=!p&&!d&&Co(l),c=l,p||d||g?c=so(s)?s:uo(s)?Wn(s):d?kn(l,!(h=!1)):g?Hn(l,!(h=!1)):[]:mo(l)||ao(l)?ao(c=s)?c=function(e){return On(e,Ro(e))}(s):(!fo(s)||n&&po(s))&&(c=dr(l)):h=!1)}h&&(a.set(l,c),r(c,l,n,o,a),a["delete"](l));Ri(e,i,c)}(n,r,t,o,bn,a,s)):((i=a?a(vt(n,t),e,t+"",n,r,s):v)===v&&(i=e),Ri(n,t,i))},Ro)}function Tn(e,n,i){var r=-1;return n=ot(n.length?n:[Xo],Bt(fn)),function(e,t){var i=e.length;for(e.sort(t);i--;)e[i]=e[i].value;return e}(mn(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!==v,n=null===e,r=e==e,o=yo(e),a=t!==v,s=null===t,l=t==t,u=yo(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 yn(e,t,i){for(var n=-1,r=t.length,o={};++n<r;){var a=t[n],s=an(e,a);i(s,a)&&vn(o,Mn(a,e),s)}return o}function Cn(e,t){return Cr(br(e,t,Xo),e+"")}function vn(e,t,i,n){if(!fo(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):v)===v&&(c=fo(l)?l:fr(t[r+1])?[]:{})),Yi(s,u,c),s=s[u]}return e}var Nn=Ii?function(e,t){return Ii.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(yo(e))return vi?vi.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 Nt(u);a=!1,r=Et,l=new ki}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:Br(e,t)?[e]:xr(xo(e))}function kn(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 Hn(e,t){var i=t?Pn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Rn(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 Yn(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 On(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):v;l===v&&(l=e[s]),(r?Gi:Yi)(i,s,l)}return i}function Fn(r,o){return function(e,t){var i=so(e)?$e:Oi,n=o?o():{};return i(e,r,fn(t),n)}}function Gn(s){return Cn(function(e,t){var i=-1,n=t.length,r=1<n?t[n-1]:v,o=2<n?t[2]:v,r=3<s.length&&"function"==typeof r?(n--,r):v;for(o&&Ir(t[0],t[1],o)&&(r=n<3?v: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 fo(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?[]:Ct(t,n);return(e-=r.length)<s?zn(o,a,Kn,u.placeholder,v,t,r,v,v,s-e):qe(this&&this!==Oe&&this instanceof u?l:o,this,t)}}function Kn(l,u,c,h,p,d,g,f,I,B){var E=u&M,m=u&V,_=u&S,b=u&(L|w),T=u&e,y=_?v:Xn(l);return function C(){for(var e,t,i=arguments.length,n=Array(i),r=i;r--;)n[r]=arguments[r];if(b&&(t=function(e,t){for(var i=e.length,n=0;i--;)e[i]===t&&++n;return n}(n,e=ar(C))),h&&(n=Rn(n,h,p,b)),d&&(n=Yn(n,d,g,b)),i-=t,b&&i<B){var o=Ct(n,e);return zn(l,u,Kn,C.placeholder,c,n,o,f,I,B-i)}var a=m?c:this,s=_?a[l]:l,i=n.length;return f?n=function(e,t){for(var i=e.length,n=si(t.length,i),r=Wn(e);n--;){var o=t[n];e[n]=fr(o,i)?r[o]:v}return e}(n,f):T&&1<i&&n.reverse(),E&&I<i&&(n.length=I),this&&this!==Oe&&this instanceof C&&(s=y||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!==Oe&&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:v,c?a:v,c?v:o,c?v:a,s,l,u],p=i.apply(v,h);return function(e){var t=function(e){var t=e.name+"",i=Bi[t],n=kt.call(Bi,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=Ni[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)&&yr(p,h),p.placeholder=n,vr(p,e,t)}var jn=di&&1/Nt(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(_);var u,c,h=n?n.length:0;h||(t&=~(A|D),n=r=v),a=a===v?a:ai(Vo(a),0),s=s===v?s:Vo(s),h-=r?r.length:0,t&D&&(u=n,c=r,n=r=v);var p,d,g,f,I,B=l?v:or(e),E=[e,t,i,n,r,u,c,o,a,s];return B&&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==k&&e[7].length<=t[8]||n==(M|k)&&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?Rn(l,s,t[4]):s,e[4]=l?Ct(e[3],b):t[4])}(s=t[5])&&(l=e[5],e[5]=l?Yn(l,s,t[6]):s,e[6]=l?Ct(e[5],b):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}(E,B),e=E[0],t=E[1],i=E[2],n=E[3],r=E[4],!(s=E[9]=E[9]===v?l?0:e.length:ai(E[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(v,E):Un(e,t,i,n):(g=i,f=t&V,I=Xn(d=e),function m(){return(this&&this!==Oe&&this instanceof m?I:d).apply(f?g:this,arguments)}),vr((B?Nn:yr)(p,E),e,t)}function $n(e,t,i,n,r,o){return fo(e)&&fo(t)&&(o.set(t,e),bn(e,t,v,$n,o),o["delete"](t)),e}function er(e){return mo(e)?v:e}function tr(e,t,i,n,r,o){var a=i&N,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&B?new ki:v;for(o.set(e,t),o.set(t,e);++c<s;){var d,g=e[c],f=t[c];if(n&&(d=a?n(f,g,c,t,e,o):n(g,f,c,e,t,o)),d!==v){if(d)continue;h=!1;break}if(p){if(!lt(t,function(e,t){return!Et(p,t)&&(g===e||r(g,e,i,n,o))&&p.push(t)})){h=!1;break}}else if(g!==f&&!r(g,f,i,n,o)){h=!1;break}}return o["delete"](e),o["delete"](t),h}function ir(e){return Cr(br(e,v,kr),e+"")}function nr(e){return sn(e,Ho,ur)}function rr(e){return sn(e,Ro,cr)}var or=Ii?function(e){return Ii.get(e)}:Ko;function ar(e){return(kt.call(Ni,"placeholder")?Ni: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)?v:i[n]);return gn(r)?r:v}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)&&fr(a,r)&&(so(e)||ao(e))}function dr(e){return"function"!=typeof e.constructor||Er(e)?{}:Vi(Jt(e))}function gr(e){return so(e)||ao(e)||!!(zt&&e&&e[zt])}function fr(e,t){var i=typeof e;return!!(t=null==t?r:t)&&("number"==i||"symbol"!=i&&Ee.test(e))&&-1<e&&e%1==0&&e<t}function Ir(e,t,i){if(fo(i)){var n=typeof t;return("number"==n?lo(i)&&fr(t,i.length):"string"==n&&t in i)&&oo(i[t],e)}}function Br(e,t){if(!so(e)){var i=typeof e;return"number"==i||"symbol"==i||"boolean"==i||null==e||yo(e)||(ae.test(e)||!oe.test(e)||null!=t&&e in Object(t))}}function Er(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||At)}function mr(e){return e==e&&!fo(e)}function _r(t,i){return function(e){return null!=e&&(e[t]===i&&(i!==v||t in Object(e)))}}function br(o,a,s){return a=ai(a===v?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 Tr(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)!=O||pi&&hr(pi.resolve())!=c||di&&hr(new di)!=X||gi&&hr(new gi)!=g)&&(hr=function(e){var t=ln(e),i=t==G?e.constructor:v,n=i?wr(i):"";if(n)switch(n){case Ei:return U;case mi:return O;case _i:return c;case bi:return X;case Ti:return g}return t});var yr=Nr(Nn),Cr=Nr(Vn);function vr(e,t,i){var n,r,o,a=t+"";return Cr(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 Nr(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(v,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||yo(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=Cn(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,fn(t),r)}function kr(e){return(null==e?0:e.length)?$i(e,1):[]}function Pr(e){return e&&e.length?e[0]:v}var Hr=Cn(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,Bt(t))),l=si(c.length,l),s[a]=!i&&(t||120<=r&&120<=c.length)?new ki(a&&c):v}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?Et(p,g):n(u,g,i))){for(a=o;--a;){var f=s[a];if(!(f?Et(f,g):n(e[a],g,i)))continue e}p&&p.push(g),u.push(d)}}return u}(t):[]});function Rr(e){var t=null==e?0:e.length;return t?e[t-1]:v}var Yr=Cn(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)}),It(i,function(e){return ot(t,gt(e))})}var Or=Cn(function(e,t){return uo(e)?Ji(e,t):[]}),Fr=Cn(Wr);function Gr(e){var t=Ni(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?v:Do(e,t[i]);return r}(e,t)};return!(1<i||this.__actions__.length)&&n instanceof wi&&fr(e)?((n=n.slice(e,+e+(i?1:0))).__actions__.push({func:Zr,args:[r],thisArg:v}),new Li(n,this.__chain__).thru(function(e){return i&&!e.length&&e.push(v),e})):this.thru(r)});var Xr=Fn(function(e,t,i){kt.call(e,i)?++e[i]:Gi(e,i,1)});var Jr,Kr=(Jr=Mr,function(e,t,i){var n,r=Object(e);lo(e)||(n=fn(t),e=Ho(e),t=function(e){return n(r[e],e,r)});var o=Jr(e,t,i);return-1<o?r[n?e[o]:o]:v});function Qr(e,t){return(so(e)?et:Ui)(e,fn(t))}var Ur=Fn(function(e,t,i){kt.call(e,i)?e[i].push(t):Gi(e,i,[t])});var zr=Cn(function(e,t){if(null==e)return[];var i=t.length;return 1<i&&Ir(e,t[0],t[1])?t=[]:2<i&&Ir(t[0],t[1],t[2])&&(t=[t[0]]),Tn(e,$i(t,1),[])}),jr=function(){return Oe.Date.now()};function qr(e,t){var i;if("function"!=typeof t)throw new TypeError(_);return e=Vo(e),function(){return 0<--e&&(i=t.apply(this,arguments)),e<=1&&(t=v),i}}var $r=Cn(function(e,t,i){var n,r=V;return i.length&&(n=Ct(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(_);function g(e){var t=o,i=a;return o=a=v,h=e,l=n.apply(i,t)}function f(e){var t=e-c;return c===v||r<=t||t<0||d&&s<=e-h}function I(){var e,t,i=jr();if(f(i))return B(i);u=setTimeout(I,(t=r-((e=i)-c),d?si(t,s-(e-h)):t))}function B(e){return u=v,t&&o?g(e):(o=a=v,l)}function i(){var e,t=jr(),i=f(t);if(o=arguments,a=this,c=t,i){if(u===v)return h=e=c,u=setTimeout(I,r),p?g(e):l;if(d)return u=setTimeout(I,r),g(c)}return u===v&&(u=setTimeout(I,r)),l}return r=So(r)||0,fo(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!==v&&clearTimeout(u),h=0,o=c=a=u=v},i.flush=function(){return u===v?l:B(jr())},i}var to=Cn(function(e,t){return Xi(e,1,t)}),io=Cn(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(_);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(_);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 Io(e)&&kt.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 Io(e)&&lo(e)}var co=ni||function(){return!1},ho=Ke?Bt(Ke):function(e){return Io(e)&&ln(e)==R};function po(e){if(!fo(e))return!1;var t=ln(e);return t==Y||t==W||t==l||t==h}function go(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=r}function fo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Io(e){return null!=e&&"object"==typeof e}var Bo=Qe?Bt(Qe):function(e){return Io(e)&&hr(e)==O};function Eo(e){return"number"==typeof e||Io(e)&&ln(e)==F}function mo(e){if(!Io(e)||ln(e)!=G)return!1;var t=Jt(e);if(null===t)return!0;var i=kt.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Mt.call(i)==Yt}var _o=Ue?Bt(Ue):function(e){return Io(e)&&ln(e)==Z},bo=ze?Bt(ze):function(e){return Io(e)&&hr(e)==X};function To(e){return"string"==typeof e||!so(e)&&Io(e)&&ln(e)==J}function yo(e){return"symbol"==typeof e||Io(e)&&ln(e)==K}var Co=je?Bt(je):function(e){return Io(e)&&go(e.length)&&!!ke[ln(e)]};function vo(e){if(!e)return[];if(lo(e))return(To(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==O?Tt:t==X?Nt:Go)(e)}function No(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=No(e),i=t%1;return t==t?i?t-i:t:0}function So(e){if("number"==typeof e)return e;if(yo(e))return o;var t;if(fo(e)&&(e=fo(t="function"==typeof e.valueOf?e.valueOf():e)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=e.replace(le,"");var i=fe.test(e);return i||Be.test(e)?Re(e.slice(2),i?2:8):ge.test(e)?o:+e}function xo(e){return null==e?"":Ln(e)}var Lo=Gn(function(e,t){On(t,Ro(t),e)});var wo=Cn(function(e,t){e=Object(e);var i=-1,n=t.length,r=2<n?t[2]:v;for(r&&Ir(t[0],t[1],r)&&(n=1);++i<n;)for(var o=t[i],a=Ro(o),s=-1,l=a.length;++s<l;){var u=a[s],c=e[u];(c===v||oo(c,At[u])&&!kt.call(e,u))&&(e[u]=o[u])}return e}),Ao=Cn(function(e){return e.push(v,$n),qe(Wo,v,e)});function Do(e,t,i){var n=null==e?v:an(e,t);return n===v?i:n}function Mo(e,t){return null!=e&&pr(e,t,hn)}var ko=Qn(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Rt.call(t)),e[t]=i},Zo(Xo)),Po=Qn(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Rt.call(t)),kt.call(e,t)?e[t].push(i):e[t]=[i]},fn);function Ho(e){return(lo(e)?Hi:In)(e)}function Ro(e){return lo(e)?Hi(e,!0):Bn(e)}var Yo=Gn(function(e,t,i){bn(e,t,i)}),Wo=Gn(function(e,t,i,n){bn(e,t,i,n)}),Oo=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}),On(t,rr(t),i),n&&(i=Zi(i,T|y|C,er));for(var r,o,a=e.length;a--;)r=i,o=e[a],null==(r=Tr(r,o=Mn(o,r)))||delete r[Lr(Rr(o))];return i});var Fo=ir(function(e,t){return null==e?{}:yn(i=e,t,function(e,t){return Mo(i,t)});var i});function Go(e){return null==e?[]:ot(Ho(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=Ho(t),r=on(t,i);null!=e||fo(t)&&(r.length||!i.length)||(e=t,t=n,n=this,r=on(t,Ho(t)));var o=!(fo(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&&Ir(e,t,i)&&(t=i=v),e=No(e),t===v?(t=e,e=0):t=No(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===v?e<t?1:-1:No(i),Qo)};function jo(){return[]}Ni.after=function(e,t){if("function"!=typeof t)throw new TypeError(_);return e=Vo(e),function(){if(--e<1)return t.apply(this,arguments)}},Ni.assignIn=Lo,Ni.before=qr,Ni.bind=$r,Ni.chain=Gr,Ni.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},Ni.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))},Ni.countBy=Xr,Ni.create=function(e,t){var i=Vi(e);return null==t?i:Fi(i,t)},Ni.debounce=eo,Ni.defaults=wo,Ni.defaultsDeep=Ao,Ni.defer=to,Ni.delay=io,Ni.difference=Dr,Ni.drop=function(e,t,i){var n=null==e?0:e.length;return n?Sn(e,(t=i||t===v?1:Vo(t))<0?0:t,n):[]},Ni.filter=function(e,t){return(so(e)?it:qi)(e,fn(t))},Ni.flatten=kr,Ni.flattenDeep=function(e){return(null==e?0:e.length)?$i(e,i):[]},Ni.groupBy=Ur,Ni.initial=function(e){return(null==e?0:e.length)?Sn(e,0,-1):[]},Ni.intersection=Hr,Ni.invert=ko,Ni.invertBy=Po,Ni.iteratee=function(e){return fn("function"==typeof e?e:Zi(e,T))},Ni.keys=Ho,Ni.map=function(e,t){return(so(e)?ot:mn)(e,fn(t))},Ni.matches=function(e){return _n(Zi(e,T))},Ni.merge=Yo,Ni.mixin=Jo,Ni.negate=ro,Ni.omit=Oo,Ni.omitBy=function(e,t){return function(e,i){if(null==e)return{};var t=ot(rr(e),function(e){return[e]});return i=fn(i),yn(e,t,function(e,t){return i(e,t[0])})}(e,ro(fn(t)))},Ni.once=function(e){return qr(2,e)},Ni.pick=Fo,Ni.range=zo,Ni.reject=function(e,t){return(so(e)?it:qi)(e,ro(fn(t)))},Ni.rest=function(e,t){if("function"!=typeof e)throw new TypeError(_);return Cn(e,t=t===v?t:Vo(t))},Ni.set=function(e,t,i){return null==e?e:vn(e,t,i)},Ni.slice=function(e,t,i){var n=null==e?0:e.length;return n?(i=i&&"number"!=typeof i&&Ir(e,t,i)?(t=0,n):(t=null==t?0:Vo(t),i===v?n:Vo(i)),Sn(e,t,i)):[]},Ni.sortBy=zr,Ni.take=function(e,t,i){return e&&e.length?Sn(e,0,(t=i||t===v?1:Vo(t))<0?0:t):[]},Ni.takeRight=function(e,t,i){var n=null==e?0:e.length;return n?Sn(e,(t=n-(t=i||t===v?1:Vo(t)))<0?0:t,n):[]},Ni.tap=function(e,t){return t(e),e},Ni.throttle=function(e,t,i){var n=!0,r=!0;if("function"!=typeof e)throw new TypeError(_);return fo(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),eo(e,t,{leading:n,maxWait:t,trailing:r})},Ni.thru=Zr,Ni.toArray=vo,Ni.union=Yr,Ni.uniq=function(e){return e&&e.length?wn(e):[]},Ni.uniqBy=function(e,t){return e&&e.length?wn(e,fn(t)):[]},Ni.unzip=Wr,Ni.values=Go,Ni.without=Or,Ni.zip=Fr,Ni.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]:v;i(a,e[n],s)}return a}(e||[],t||[],Yi)},Ni.extend=Lo,Jo(Ni,Ni),Ni.clamp=function(e,t,i){return i===v&&(i=t,t=v),i!==v&&(i=(i=So(i))==i?i:0),t!==v&&(t=(t=So(t))==t?t:0),n=So(e),r=t,o=i,n==n&&(o!==v&&(n=n<=o?n:o),r!==v&&(n=r<=n?n:r)),n;var n,r,o},Ni.clone=function(e){return Zi(e,C)},Ni.cloneDeep=function(e){return Zi(e,T|C)},Ni.escape=function(e){return(e=xo(e))&&I.test(e)?e.replace(f,_t):e},Ni.every=function(e,t,i){var n=so(e)?tt:zi;return i&&Ir(e,t,i)&&(t=v),n(e,fn(t))},Ni.find=Kr,Ni.findIndex=Mr,Ni.findKey=function(e,t){return ct(e,fn(t),nn)},Ni.findLastIndex=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=n-1;return i!==v&&(r=Vo(i),r=i<0?ai(n+r,0):si(r,n-1)),ht(e,fn(t),r,!0)},Ni.findLastKey=function(e,t){return ct(e,fn(t),rn)},Ni.forEach=Qr,Ni.get=Do,Ni.has=function(e,t){return null!=e&&pr(e,t,cn)},Ni.head=Pr,Ni.identity=Xo,Ni.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)},Ni.isArguments=ao,Ni.isArray=so,Ni.isArrayLike=lo,Ni.isBoolean=function(e){return!0===e||!1===e||Io(e)&&ln(e)==H},Ni.isDate=ho,Ni.isEmpty=function(e){if(null==e)return!0;if(lo(e)&&(so(e)||"string"==typeof e||"function"==typeof e.splice||co(e)||Co(e)||ao(e)))return!e.length;var t=hr(e);if(t==O||t==X)return!e.size;if(Er(e))return!In(e).length;for(var i in e)if(kt.call(e,i))return!1;return!0},Ni.isEqual=function(e,t){return dn(e,t)},Ni.isFinite=function(e){return"number"==typeof e&&ri(e)},Ni.isFunction=po,Ni.isNaN=function(e){return Eo(e)&&e!=+e},Ni.isNull=function(e){return null===e},Ni.isNumber=Eo,Ni.isObject=fo,Ni.isPlainObject=mo,Ni.isRegExp=_o,Ni.isString=To,Ni.isUndefined=function(e){return e===v},Ni.last=Rr,Ni.max=function(e){return e&&e.length?ji(e,Xo,un):v},Ni.min=function(e){return e&&e.length?ji(e,Xo,En):v},Ni.noConflict=function(){return Oe._===this&&(Oe._=Wt),this},Ni.noop=Ko,Ni.random=function(e,t,i){var n,r,o;if(i&&"boolean"!=typeof i&&Ir(e,t,i)&&(t=i=v),i===v&&("boolean"==typeof t?(i=t,t=v):"boolean"==typeof e&&(i=e,e=v)),e===v&&t===v?(e=0,t=1):(e=No(e),t===v?(t=e,e=0):t=No(t)),t<e&&(n=e,e=t,t=n),i||e%1||t%1){var a=ui();return si(e+a*(t-e+He("1e-"+((a+"").length-1))),t)}return o=t,(r=e)+ti(ui()*(o-r+1))},Ni.reduce=function(e,t,i){var n=so(e)?st:ft,r=arguments.length<3;return n(e,fn(t),i,r,Ui)},Ni.result=function(e,t,i){var n=-1,r=(t=Mn(t,e)).length;for(r||(r=1,e=v);++n<r;){var o=null==e?v:e[Lr(t[n])];o===v&&(n=r,o=i),e=po(o)?o.call(e):o}return e},Ni.size=function(e){if(null==e)return 0;if(lo(e))return To(e)?Vt(e):e.length;var t=hr(e);return t==O||t==X?e.size:In(e).length},Ni.some=function(e,t,i){var n=so(e)?lt:xn;return i&&Ir(e,t,i)&&(t=v),n(e,fn(t))},Ni.trim=function(e,t,i){if((e=xo(e))&&(i||t===v))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===v?a:o,(!r&&a<=o?n:Sn(n,r,o)).join("")},Ni.uniqueId=function(e){var t=++Pt;return xo(e)+t},Ni.each=Qr,Ni.first=Pr,Jo(Ni,(Uo={},nn(Ni,function(e,t){kt.call(Ni.prototype,t)||(Uo[t]=e)}),Uo),{chain:!1}),Ni.VERSION="4.17.5",et(["drop","take"],function(i,n){wi.prototype[i]=function(e){e=e===v?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=Cn(function(o,a){return"function"==typeof o?new wi(this):this.map(function(e){return n=a,null==(r=null==(t=Tr(t=e,i=Mn(i=o,t)))?t:t[Lr(Rr(i))])?v: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!==v&&(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=Ni[d?"take"+("last"==e?"Right":""):e],f=d||/^find/.test(e);g&&(Ni.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(Ni,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=f&&!a,u=t&&!s;if(f||!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:v}),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);Ni.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=Ni[t];n&&(i=n.name+"",(Bi[i]||(Bi[i]=[])).push({name:t,func:n}))}),Bi[Kn(v,S).name]=[{name:"wrapper",func:v}],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 f=-1,I=e[u+=t];++f<h;){var B=c[f],E=B.iteratee,m=B.type,_=E(I);if(2==m)I=_;else if(!_){if(1==m)continue e;break e}}g[p++]=I}return g},Ni.prototype.first=Ni.prototype.head,jt&&(Ni.prototype[jt]=function(){return this}),Oe._=Ni,(ea=function(){return Ni}.call(ta,ia,ta,$o))===v||($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,f;(r="undefined"==typeof self?void 0===e?void 0:e:self).setImmediate||(a=1,l=!(s={}),u=r.document,f=(f=Object.getPrototypeOf&&Object.getPrototypeOf(r))&&f.setTimeout?f: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)},f.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++},f.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,f,I,B,E,m,b=b||(c=Math,t=(e={}).lib={},i=t.Base={extend:function(e){T.prototype=this;var t=new T;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 T(){}p=b.lib.WordArray,b.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=b,t=e.lib,i=t.WordArray,n=t.Hasher,r=e.algo,N=[];!function(){for(var e=0;e<64;e++)N[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],f=e[t+9],I=e[t+10],B=e[t+11],E=e[t+12],m=e[t+13],_=e[t+14],b=e[t+15],T=V(T=o[0],v=o[1],C=o[2],y=o[3],a,7,N[0]),y=V(y,T,v,C,s,12,N[1]),C=V(C,y,T,v,l,17,N[2]),v=V(v,C,y,T,u,22,N[3]);T=V(T,v,C,y,c,7,N[4]),y=V(y,T,v,C,h,12,N[5]),C=V(C,y,T,v,p,17,N[6]),v=V(v,C,y,T,d,22,N[7]),T=V(T,v,C,y,g,7,N[8]),y=V(y,T,v,C,f,12,N[9]),C=V(C,y,T,v,I,17,N[10]),v=V(v,C,y,T,B,22,N[11]),T=V(T,v,C,y,E,7,N[12]),y=V(y,T,v,C,m,12,N[13]),C=V(C,y,T,v,_,17,N[14]),T=S(T,v=V(v,C,y,T,b,22,N[15]),C,y,s,5,N[16]),y=S(y,T,v,C,p,9,N[17]),C=S(C,y,T,v,B,14,N[18]),v=S(v,C,y,T,a,20,N[19]),T=S(T,v,C,y,h,5,N[20]),y=S(y,T,v,C,I,9,N[21]),C=S(C,y,T,v,b,14,N[22]),v=S(v,C,y,T,c,20,N[23]),T=S(T,v,C,y,f,5,N[24]),y=S(y,T,v,C,_,9,N[25]),C=S(C,y,T,v,u,14,N[26]),v=S(v,C,y,T,g,20,N[27]),T=S(T,v,C,y,m,5,N[28]),y=S(y,T,v,C,l,9,N[29]),C=S(C,y,T,v,d,14,N[30]),T=x(T,v=S(v,C,y,T,E,20,N[31]),C,y,h,4,N[32]),y=x(y,T,v,C,g,11,N[33]),C=x(C,y,T,v,B,16,N[34]),v=x(v,C,y,T,_,23,N[35]),T=x(T,v,C,y,s,4,N[36]),y=x(y,T,v,C,c,11,N[37]),C=x(C,y,T,v,d,16,N[38]),v=x(v,C,y,T,I,23,N[39]),T=x(T,v,C,y,m,4,N[40]),y=x(y,T,v,C,a,11,N[41]),C=x(C,y,T,v,u,16,N[42]),v=x(v,C,y,T,p,23,N[43]),T=x(T,v,C,y,f,4,N[44]),y=x(y,T,v,C,E,11,N[45]),C=x(C,y,T,v,b,16,N[46]),T=L(T,v=x(v,C,y,T,l,23,N[47]),C,y,a,6,N[48]),y=L(y,T,v,C,d,10,N[49]),C=L(C,y,T,v,_,15,N[50]),v=L(v,C,y,T,h,21,N[51]),T=L(T,v,C,y,E,6,N[52]),y=L(y,T,v,C,u,10,N[53]),C=L(C,y,T,v,I,15,N[54]),v=L(v,C,y,T,s,21,N[55]),T=L(T,v,C,y,g,6,N[56]),y=L(y,T,v,C,b,10,N[57]),C=L(C,y,T,v,p,15,N[58]),v=L(v,C,y,T,m,21,N[59]),T=L(T,v,C,y,c,6,N[60]),y=L(y,T,v,C,B,10,N[61]),C=L(C,y,T,v,l,15,N[62]),v=L(v,C,y,T,f,21,N[63]),o[0]=o[0]+T|0,o[1]=o[1]+v|0,o[2]=o[2]+C|0,o[3]=o[3]+y|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=b).lib,g=d.Base,f=d.WordArray,I=u.algo,B=I.MD5,E=I.EvpKDF=g.extend({cfg:g.extend({keySize:4,hasher:B,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=f.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 E.create(i).compute(e,t)},b.lib.Cipher||function(){var e=b,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?_:E}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 f=(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}},I=(t.BlockCipher=s.extend({cfg:s.cfg.extend({mode:d,padding:f}),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)}})),B=(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),I.create({ciphertext:i,salt:t})}},E=t.SerializableCipher=i.extend({cfg:i.extend({format:B}),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 I.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}}),m=(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,I.create({key:r,iv:o,salt:n})}},_=t.PasswordBasedCipher=E.extend({cfg:E.cfg.extend({kdf:m}),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=E.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,E.decrypt.call(this,e,t,r.key,n)}})}(),b.mode.ECB=((m=b.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=b,t=e.lib.BlockCipher,i=e.algo,u=[],c=[],h=[],p=[],d=[],g=[],f=[],I=[],B=[],E=[];!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;f[r]=l<<24|l>>>8,I[r]=l<<16|l>>>16,B[r]=l<<8|l>>>24,E[r]=l,i?(i=o^e[e[e[s^o]]],n^=e[e[n]]):i=n=1}}();var m=[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^=m[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:f[u[l>>>24]]^I[u[l>>>16&255]]^B[u[l>>>8&255]]^E[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,f,I,B,E,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 f=n[u>>>24]^r[c>>>16&255]^o[h>>>8&255]^a[255&p]^i[d++],I=n[c>>>24]^r[h>>>16&255]^o[p>>>8&255]^a[255&u]^i[d++],B=n[h>>>24]^r[p>>>16&255]^o[u>>>8&255]^a[255&c]^i[d++],E=n[p>>>24]^r[u>>>16&255]^o[c>>>8&255]^a[255&h]^i[d++],u=f,c=I,h=B,p=E;f=(s[u>>>24]<<24|s[c>>>16&255]<<16|s[h>>>8&255]<<8|s[255&p])^i[d++],I=(s[c>>>24]<<24|s[h>>>16&255]<<16|s[p>>>8&255]<<8|s[255&u])^i[d++],B=(s[h>>>24]<<24|s[p>>>16&255]<<16|s[u>>>8&255]<<8|s[255&c])^i[d++],E=(s[p>>>24]<<24|s[u>>>16&255]<<16|s[c>>>8&255]<<8|s[255&h])^i[d++];e[t]=f,e[t+1]=I,e[t+2]=B,e[t+3]=E},keySize:8});e.AES=t._createHelper(n)}(),_.extend(BI,{aesEncrypt:function(e,t){return t=b.enc.Utf8.parse(t),b.AES.encrypt(e,t,{mode:b.mode.ECB,padding:b.pad.Pkcs7}).ciphertext.toString(b.enc.Base64)},aesDecrypt:function(e,t){t=b.enc.Utf8.parse(t);var i=b.AES.decrypt(e,t,{mode:b.mode.ECB,padding:b.pad.Pkcs7});return b.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={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"};BI.htmlEncode=function(e){return BI.isNull(e)?"":BI.replaceAll(e+"",'&|"|<|>',function(e){return SPECIAL_TAGS[e]?SPECIAL_TAGS[e]:"&nbsp;"})},BI.htmlDecode=function(e){return BI.isNull(e)?"":BI.replaceAll(e+"","&amp;|&quot;|&lt;|&gt;|&nbsp;",function(e){switch(e){case"&amp;":return"&";case"&quot;":return'"';case"&lt;":return"<";case"&gt;":return">";case"&nbsp;":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(),f=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"]=f<10?"0"+f:f,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 I=/%./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(I,function(e){return u[e]||e});for(var B=t.match(I),E=0;E<B.length;E++){var m=u[B[E]];m&&(I=new RegExp(B[E],"g"),t=t.replace(I,m))}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]?(f[i]||(f[i]=new s[i]),e(f[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]?(f[i]||(f[i]=new s[i]),e[t](f[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 f={},I={};BI.Providers={getProvider:function(e,t){return f[e]||(f[e]=new s[e]),I[e]||(I[e]=new(f[e].$get())(t)),I[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,i){var n=i(766),r=i(715);e.exports=function(e){return n(r(e))}},function(e,t){e.exports=!1},function(e,t,i){var n=i(49),r=i(14),o=function(e){return"function"==typeof e?e:undefined};e.exports=function(e,t){return arguments.length<2?o(n[e])||o(r[e]):n[e]&&n[e][t]||r[e]&&r[e][t]}},function(e,t,i){var n=i(32),r=i(1009),o=i(771),a=i(663),s=i(973),l=i(768),u=i(716)("IE_PROTO"),c="prototype",h=function(){},p=function(){var e,t=l("iframe"),i=o.length;for(t.style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),p=e.F;i--;)delete p[c][o[i]];return p()};e.exports=Object.create||function(e,t){var i;return null!==e?(h[c]=n(e),i=new h,h[c]=null,i[u]=e):i=p(),t===undefined?i:r(i,t)},a[u]=!0},function(e,t,i){var n=i(715);e.exports=function(e){return Object(n(e))}},function(e,t,i){var d=i(32),g=i(1043),f=i(718),I=i(665),B=i(1044),E=i(1045),m=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,i,n,r){var o,a,s,l,u,c,h,p=I(t,i,n?2:1);if(r)o=e;else{if("function"!=typeof(a=B(e)))throw TypeError("Target is not iterable");if(g(a)){for(s=0,l=f(e.length);s<l;s++)if((u=n?p(d(h=e[s])[0],h[1]):p(e[s]))&&u instanceof m)return u;return new m(!1)}o=a.call(e)}for(c=o.next;!(h=c.call(o)).done;)if("object"==typeof(u=E(o,p,h.value,n))&&u&&u instanceof m)return u;return new m(!1)}).stop=function(e){return new m(!0,e)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,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)],I(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)],I(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)?I(f(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,I(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 f(e,t){var i=s._getOptions(e),n=null==i.key?s._getChildName(t):i.key;return d[n]=s._addElement(n,e)}function I(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){I(f(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)?B=this.getWidgetByName(this.getName()+p+"_"+g):(B=BI.createWidget(r[p][g]),this.addWidget(this.getName()+p+"_"+g,B));var f=100*d/o[p];B.element.css({position:"absolute",left:f+"%"}),0<g&&this.getWidgetByName(this.getName()+p+"_"+(g-1)).element.css({right:100-f+"%"}),g==t.columns-1&&B.element.css({right:"0%"}),c=p,h=g,(u=B)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 I=0,p=0;p<t.rows;p++){var B=this.getWidgetByName(this.getName()+p+"_"+g),E=100*I/a[g];B.element.css({top:E+"%"}),0<p&&this.getWidgetByName(this.getName()+(p-1)+"_"+g).element.css({bottom:100-E+"%"}),p==t.rows-1&&B.element.css({bottom:"0%"}),I+=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)||((I=BI.createWidget(t.items[o][a])).element.css({position:"absolute"}),this.addWidget(this.getName()+o+"_"+a,I))}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 f=s[a]<=1?100*s[a]+"%":s[a]+t.hgap+t.lgap+"px",I="";BI.isNumber(t.columnSize[a])&&(I=t.columnSize[a]<=1?100*t.columnSize[a]+"%":t.columnSize[a]+"px"),h.element.css({left:f,width:I}),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 B=l[a]<=1?100*l[a]+"%":l[a]+t.hgap+t.rgap+"px",I="";BI.isNumber(t.columnSize[a])&&(I=t.columnSize[a]<=1?100*t.columnSize[a]+"%":t.columnSize[a]+"px"),h.element.css({right:B,width:I}),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,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.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,f=l.length;g<f;g++){p[(v=l[g]).x]=v.x,p[v.x+v.width]=v.x+v.width,d[v.y]=v.y,d[v.y+v.height]=v.y+v.height}p=BI.toArray(p),d=BI.toArray(d);for(var I=BI.invert(p),B=BI.invert(d),E={},m={},_={},b={},T=function(e,t){null==e[t]&&(e[t]=Number.MAX_VALUE)},y=function(e,t){null==e[t]&&(e[t]=0)},g=0,f=l.length;g<f;g++){var C,v=l[g],N=this.renderedKeys[v.index]&&this.renderedKeys[v.index][1];0<=N?(v.width!==this.renderedCells[N]._width&&(this.renderedCells[N]._width=v.width,this.renderedCells[N].el.setWidth(v.width)),v.height!==this.renderedCells[N]._height&&(this.renderedCells[N]._height=v.height,this.renderedCells[N].el.setHeight(v.height)),this.renderedCells[N]._left!==v.x&&this.renderedCells[N].el.element.css("left",v.x+"px"),this.renderedCells[N]._top!==v.y&&this.renderedCells[N].el.element.css("top",v.y+"px"),u.push(C=this.renderedCells[N])):(C=BI.createWidget(BI.extend({type:"bi.label",width:v.width,height:v.height},e.items[v.index],{cls:(e.items[v.index].cls||"")+" container-cell"+(0===v.y?" first-row":"")+(0===v.x?" first-col":""),_left:v.x,_top:v.y})),u.push({el:C,left:v.x,top:v.y,_left:v.x,_top:v.y,_width:v.width,_height:v.height}));for(var V=0|B[v.y],S=0|B[v.y+v.height],x=V;x<=S;x++){var L=d[x];T(E,L),y(m,L),E[L]=Math.min(E[L],v.x),m[L]=Math.max(m[L],v.x+v.width)}for(var w=0|I[v.x],A=0|I[v.x+v.width],x=w;x<=A;x++){var D=p[x];T(_,D),y(b,D),_[D]=Math.min(_[D],v.y),b[D]=Math.max(b[D],v.y+v.height)}c[v.index]=[v.index,g],h[g]=C}var M={},k={},P=[];BI.each(c,function(e,t){i.renderedKeys[e]?M[e]=t:k[e]=t}),BI.each(this.renderedKeys,function(e,t){M[e]||k[e]||P.push(t[1])}),BI.each(P,function(e,t){i.renderedCells[t].el._destroy()});var H=[];BI.each(k,function(e,t){H.push(u[t[1]])}),this.container.addItems(H),this.container._children=h,this.container.attr("items",u),this.renderedCells=u,this.renderedKeys=c;var R=BI.min(E),Y=BI.max(m),W=BI.max(_),O=BI.min(b);this.renderRange={minX:R,minY:W,maxX:Y,maxY:O}}},_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,f=p.overscanStopIndex,I=d.overscanStartIndex,B=d.overscanStopIndex,E=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(I),m=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(g),_=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(B),b=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(f),T=E.offset+h,y=m.offset+c,C=_.offset+h+_.size,v=b.offset+c+b.size;if(T>=this.renderRange.minY&&C<=this.renderRange.maxY&&y>=this.renderRange.minX&&v<=this.renderRange.maxX)return;for(var N=[],V={},S={},x=this._getMaxScrollLeft(),L=this._getMaxScrollTop(),w=0,A=0,D=0,M=I;M<=B;M++)for(var k=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(M),P=g;P<=f;P++){var H,R=M+"-"+P,Y=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(P),W=this.renderedKeys[R]&&this.renderedKeys[R][2];0<=W?(Y.size!==this.renderedCells[W]._width&&(this.renderedCells[W]._width=Y.size,this.renderedCells[W].el.setWidth(Y.size)),k.size!==this.renderedCells[W]._height&&(this.renderedCells[W]._height=k.size,this.renderedCells[W].el.setHeight(k.size)),this.renderedCells[W]._left!==Y.offset+c&&this.renderedCells[W].el.element.css("left",Y.offset+c+"px"),this.renderedCells[W]._top!==k.offset+h&&this.renderedCells[W].el.element.css("top",k.offset+h+"px"),N.push(H=this.renderedCells[W])):(H=BI.createWidget(BI.extend({type:"bi.label",width:Y.size,height:k.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:Y.offset+c,_top:k.offset+h}),this),N.push({el:H,left:Y.offset+c,top:k.offset+h,_left:Y.offset+c,_top:k.offset+h,_width:Y.size,_height:k.size})),x=Math.min(x,Y.offset+c),w=Math.max(w,Y.offset+c+Y.size),L=Math.min(L,k.offset+h),A=Math.max(A,k.offset+h+k.size),V[R]=[M,P,D],S[D]=H,D++}var O={},F={},G=[];BI.each(V,function(e,t){i.renderedKeys[e]?O[e]=t:F[e]=t}),BI.each(this.renderedKeys,function(e,t){O[e]||F[e]||G.push(t[2])}),BI.each(G,function(e,t){i.renderedCells[t].el._destroy()});var Z=[];BI.each(F,function(e,t){Z.push(N[t[2]])}),this.container.addItems(Z,this),this.container._children=S,this.container.attr("items",N),this.renderedCells=N,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=[],f=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=I(1,[],e[o].value,!1,u):r.length===g._const.perPage&&(a=I(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],f);return 0<i.find.length||0<i.match.length}),u))}return r}();function I(n,e,t,i,r){var o,a;if(g._isMatch(e,t,f))return B(e,t,!1,p=i||E(e,t),!i&&(o=t,null!=(a=m(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=m(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=I(n+1,s,t.value,d,r);!0===i[1]&&(p=!0),!0===i[0]&&(h=!0)}),!0===h&&B(e,t,!0,p=d||E(e,t)&&p,!1,!1,r),[h,p]}function B(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 E(e,t){var i=m(e);return null!=i&&BI.any(i,function(e){if(e===t)return!0})}function m(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=f(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 f(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=f(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 f(e,t,!1,s=I(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&&f(e,t,!0,s=I(e,t),!1,r),[a,s]}function f(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 I(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){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,i){var n=i(169),r=i(1001);(e.exports=function(e,t){return r[e]||(r[e]=t!==undefined?t:{})})("versions",[]).push({version:"3.3.2",mode:n?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports={}},function(e,t,i){var n=i(48).f,r=i(46),o=i(19)("toStringTag");e.exports=function(e,t,i){e&&!r(e=i?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t,i){var o=i(66);e.exports=function(n,r,e){if(o(n),r===undefined)return n;switch(e){case 0:return function(){return n.call(r)};case 1:return function(e){return n.call(r,e)};case 2:return function(e,t){return n.call(r,e,t)};case 3:return function(e,t,i){return n.call(r,e,t,i)}}return function(){return n.apply(r,arguments)}}},function(e,t){e.exports={}},function(e,t,i){"use strict";var r=i(66),n=function(e){var i,n;this.promise=new e(function(e,t){if(i!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");i=e,n=t}),this.resolve=r(i),this.reject=r(n)};e.exports.f=function(e){return new n(e)}},function(e,t){Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var i;if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0==r)return-1;var o=0|t;if(r<=o)return-1;for(i=Math.max(0<=o?o:r-Math.abs(o),0);i<r;){if(i in n&&n[i]===e)return i;i++}return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(e){"use strict";if(null==this)throw new TypeError;var t,i,n=Object(this),r=n.length>>>0;if(0==r)return-1;for(t=r-1,1<arguments.length&&((t=Number(arguments[1]))!=t?t=0:0!=t&&t!=1/0&&t!=-1/0&&(t=(0<t||-1)*Math.floor(Math.abs(t)))),i=0<=t?Math.min(t,r-1):r-Math.abs(t);0<=i;i--)if(i in n&&n[i]===e)return i;return-1})},function(e,t){var i;_global.console=_global.console||((i={}).log=i.warn=i.debug=i.info=i.error=i.time=i.dir=i.profile=i.clear=i.exception=i.trace=i.assert=function(){},i)},function(e,t){_global.localStorage||(_global.localStorage={items:{},setItem:function(e,t){BI.Cache.addCookie(e,t)},getItem:function(e){return BI.Cache.getCookie(e)},removeItem:function(e){BI.Cache.deleteCookie(e)},key:function(){},clear:function(){this.items={}}})},function(e,t){Object.keys||(Object.keys=function(e){if(e!==Object(e))throw new TypeError("Object.keys called on a non-object");var t,i,n={__ob__:t,$accessors:t,$vbthis:t,$vbsetter:t},r=[];for(i in e)i in n||Object.prototype.hasOwnProperty.call(e,i)&&r.push(i);return r}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Date.now||(Date.now=function(){return(new Date).valueOf()})},function(e,t){"undefined"!=typeof Set&&Set.toString().match(/native code/)||(Set=function(){this.set={}},Set.prototype.has=function(e){return this.set[e]!==undefined},Set.prototype.add=function(e){this.set[e]=1},Set.prototype.clear=function(){this.set={}})},function(e,t){var a,i;i=window.navigator.userAgent.toLowerCase(),/msie/.test(i)&&(a=Array.prototype.sort,Array.prototype.sort=function(e){if(e&&"function"==typeof e){if(this.length<2)return this;for(var t,i=0,n=i+1,r=this.length,o=0;i<r;i++)for(n=i+1;n<r;n++)!0===0<("number"==typeof(o=e.call(this,this[i],this[n]))?o:o?1:0)&&(t=this[i],this[i]=this[n],this[n]=t);return this}return a.call(this)})},function(e,t,i){},function(e,t,i){},function(e,t){BI.prepares.push(function(){var e,r=function(){return null==e&&(e=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),e};BI.Plugin.registerWidget("bi.horizontal",function(e){var t=BI.isIE(),i=r(),n=t&&BI.getIEVersion()<8;return e.verticalAlign===BI.VerticalAlign.Middle&&e.horizontalAlign===BI.HorizontalAlign.Center||e.verticalAlign===BI.VerticalAlign.Middle&&e.horizontalAlign===BI.HorizontalAlign.Left||e.verticalAlign===BI.VerticalAlign.Top&&e.horizontalAlign===BI.HorizontalAlign.Center?n?e:BI.extend(e,{type:"bi.table_adapt"}):t?e:i?BI.extend(e,{type:"bi.flex_horizontal"}):BI.extend(e,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(e){var t=BI.isIE(),i=r(),n=e.items&&e.items.length<=1;return!t&&i&&n?!0===e.scrollable||!0===e.scrollx||!0===e.scrolly?BI.extend(e,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(e,{type:"bi.flex_center_adapt"}):n?BI.extend(e,{type:"bi.inline_center_adapt"}):e}),BI.Plugin.registerWidget("bi.vertical_adapt",function(e){var t=BI.isIE(),i=r();return!t&&i?!0===e.scrollable||!0===e.scrollx||!0===e.scrolly?BI.extend({},e,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(e,{type:"bi.flex_vertical_center_adapt"}):BI.extend(e,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(e){return e.items&&e.items.length<=1?BI.extend(e,{type:"bi.horizontal_auto"}):e}),BI.Plugin.registerWidget("bi.float_center_adapt",function(e){return!BI.isIE()&&r()?!0===e.scrollable||!0===e.scrollx||!0===e.scrolly?BI.extend({},e,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(e,{type:"bi.flex_center_adapt"}):BI.extend(e,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(e){if(!0===e.scrollable||!0===e.scrolly)return BI.extend({},e,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(e){if(!0===e.scrollable||!0===e.scrollx)return BI.extend({},e,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(e){if(!0===e.scrollable||!0===e.scrollx)return BI.extend({},e,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(e){if(!0===e.scrollable||!0===e.scrolly)return BI.extend({},e,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(e){if(!0===e.scrollable||!0===e.scrollx)return BI.extend({},e,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(e){if(!0===e.scrollable||!0===e.scrolly)return BI.extend({},e,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(e){if(!0===e.scrollable||!0===e.scrolly||!0===e.scrollx)return BI.extend({},e,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(e){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(e,{type:"bi.image_radio"}):e}),BI.Plugin.registerWidget("bi.checkbox",function(e){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(e,{type:"bi.image_checkbox"}):e}),BI.Plugin.registerWidget("bi.half_icon_button",function(e){return BI.isIE()&&BI.getIEVersion()<9?e:BI.extend(e,{type:"bi.half_button"})})})},function(e,t){!function(){var t,i,o=_global.document&&_global.document.attachEvent,a=!1;if(_global.document&&!o){var e=(i=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(e){return _global.setTimeout(e,20)},function(e){return i(e)}),n=(t=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout,function(e){return t(e)}),s=function(e){var t=e.__resizeTriggers__,i=t.firstElementChild,n=t.lastElementChild,r=i.firstElementChild;n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,r.style.width=i.offsetWidth+1+"px",r.style.height=i.offsetHeight+1+"px",i.scrollLeft=i.scrollWidth,i.scrollTop=i.scrollHeight},l=function(t){var i=this;s(this),this.__resizeRAF__&&n(this.__resizeRAF__),this.__resizeRAF__=e(function(){var e;(e=i).offsetWidth===e.__resizeLast__.width&&e.offsetHeight===e.__resizeLast__.height||(i.__resizeLast__.width=i.offsetWidth,i.__resizeLast__.height=i.offsetHeight,i.__resizeListeners__.forEach(function(e){e.call(i,t)}))})},r=!1,u="",c="animationstart",h="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),d="",g=document.createElement("fakeelement");if(g.style.animationName!==undefined&&(r=!0),!1===r)for(var f=0;f<h.length;f++)if(g.style[h[f]+"AnimationName"]!==undefined){d=h[f],u="-"+d.toLowerCase()+"-",c=p[f],r=!0;break}var I="resizeanim",B="@"+u+"keyframes "+I+" { from { opacity: 0; } to { opacity: 0; } } ",E=u+"animation: 1ms "+I+"; "}var m=function(t,e){var i,n,r;o?(t.attachEvent("onresize",e),BI.nextTick(e)):(t.__resizeTriggers__||("static"===getComputedStyle(t).position&&(t.style.position="relative"),a||(i=(B||"")+".resize-triggers { "+(E||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',n=document.head||document.getElementsByTagName("head")[0],(r=document.createElement("style")).type="text/css",r.styleSheet?r.styleSheet.cssText=i:r.appendChild(document.createTextNode(i)),n.appendChild(r),a=!0),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=document.createElement("div")).className="resize-triggers",t.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',t.appendChild(t.__resizeTriggers__),s(t),t.addEventListener("scroll",l,!0),c&&t.__resizeTriggers__.addEventListener(c,function(e){e.animationName===I&&s(t)})),t.__resizeListeners__.push(e))},_=function(e,t){o?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",l),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(e,t){return m(e.element[0],t),function(){_(e.element[0],t)}},removeResizeListener:function(e,t){_(e.element[0],t)}}}()},function(e,t){BI.DOM={},BI.extend(BI.DOM,{ready:function(e){BI.Widget._renderEngine.createElement(document).ready(e)}}),BI.extend(BI.DOM,{patchProps:function(e,n){var t=BI.jQuery._data(e[0]).events;BI.each(t,function(i,e){BI.each(e,function(e,t){n.on(i+(t.namespace?"."+t.namespace:""),t)})});var i=e.children(),r=n.children();if(i.length!==r.length)throw new Error("不匹配");BI.each(i,function(e,t){BI.DOM.patchProps(BI.jQuery(t),BI.jQuery(r[e]))}),BI.each(e.data("__widgets"),function(e,t){t.element=n})},hang:function(e){if(!BI.isEmpty(e)){var i=BI.Widget._renderEngine.createFragment();return BI.each(e,function(e,t){t instanceof BI.Widget&&(t=t.element),t instanceof BI.$&&t[0]&&i.appendChild(t[0])}),i}},isExist:function(e){return 0<BI.Widget._renderEngine.createElement("body").find(e.element).length},preloadImages:function(e,t){var i=0,n=[];function r(){++i>=e.length&&t()}BI.each(e,function(e,t){n[e]=new Image,n[e].src=t,n[e].onload=function(){r()},n[e].onerror=function(){r()}})},getTextSizeWidth:function(e,t){var i=BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");null==t&&(t=12),t+="px",i.css("font-size",t).text(e);var n=i.width();return i.remove(),n},getTextSizeHeight:function(e,t){var i=BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");null==t&&(t=12),t+="px",i.css("font-size",t).text(e);var n=i.height();return i.remove(),n},getScrollWidth:function(){var e;return!BI.isNull(this._scrollWidth)&&0!==this._scrollWidth||(e=BI.Widget._renderEngine.createElement("<div>").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body"),this._scrollWidth=e[0].offsetWidth-e[0].clientWidth,e.destroy()),this._scrollWidth},getImage:function(e,t,i){var n=document.createElement("canvas");BI.Widget._renderEngine.createElement("body").append(n);var r=n.getContext("2d");r.font="12px Georgia";var o=r.measureText(e).width+4;n.width=2*o,n.height=32,r.font="24px Georgia",r.fillStyle=t||"#3685f2",r.textBaseline="middle",r.fillText(e,4,18),BI.Widget._renderEngine.createElement(n).destroy();var a=i||"rgba(54, 133, 242, 0.1)";return{width:o,height:16,src:n.toDataURL("image/png"),style:"background-color: "+a+";vertical-align: middle; margin: 0 1px; width:"+o+"px;height: 16px; max-width:"+o+"px;max-height: 16px; min-width:"+o+"px;min-height: 16px",param:e}}}),BI.extend(BI.DOM,{isColor:function(e){return e&&(this.isRGBColor(e)||this.isHexColor(e))},isRGBColor:function(e){return!!e&&"rgb"===e.substr(0,3)},isHexColor:function(e){return!!e&&("#"===e[0]&&7===e.length)},isDarkColor:function(e){if(!e||!this.isHexColor(e))return!1;var t=this.rgb2json(this.hex2rgb(e));return Math.round(.299*t.r+.587*t.g+.114*t.b)<192},getContrastColor:function(e){return e&&this.isColor(e)?this.isDarkColor(e)?"#ffffff":"#1a1a1a":""},rgb2hex:function(e){if(!e||"rgb"!=e.substr(0,3))return"";var t=e.match(/\d+(\.\d+)?/g),i=BI.parseInt(t[0]),n=BI.parseInt(t[1]),r=BI.parseInt(t[2]);return"#"+this.int2hex(i)+this.int2hex(n)+this.int2hex(r)},rgb2json:function(e){if(!e)return{};if(!this.isRGBColor(e))return{};var t=e.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(t[0]),g:BI.parseInt(t[1]),b:BI.parseInt(t[2])}},rgba2json:function(e){if(!e)return{};var t=e.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(t[0]),g:BI.parseInt(t[1]),b:BI.parseInt(t[2]),a:BI.parseFloat(t[3])}},json2rgb:function(e){return BI.isKey(e.r)&&BI.isKey(e.g)&&BI.isKey(e.b)?"rgb("+e.r+","+e.g+","+e.b+")":""},json2rgba:function(e){return BI.isKey(e.r)&&BI.isKey(e.g)&&BI.isKey(e.b)?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":""},int2hex:function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return t[e>>>4]+""+t[15&e]},hex2rgb:function(e){if(!e)return"";if(!this.isHexColor(e))return e;var t,i="rgb(";return 7===e.length?t=[BI.parseInt("0x"+e.substring(1,3)),BI.parseInt("0x"+e.substring(3,5)),BI.parseInt("0x"+e.substring(5,7))]:4===e.length&&(t=[BI.parseInt("0x"+e.substring(1,2)),BI.parseInt("0x"+e.substring(2,3)),BI.parseInt("0x"+e.substring(3,4))]),i+=t[0]+",",i+=t[1]+",",i+=t[2]+")"},rgba2rgb:function(e,t){if(BI.isNull(t)&&(t=1),"rgba"!=e.substr(0,4))return"";var i=e.match(/\d+(\.\d+)?/g);if(i.length<4)return"";var n=BI.parseFloat(i[0]),r=BI.parseFloat(i[1]),o=BI.parseFloat(i[2]),a=BI.parseFloat(i[3]);return"rgb("+Math.floor(t*(1-a)*255+n*a)+","+Math.floor(t*(1-a)*255+r*a)+","+Math.floor(t*(1-a)*255+o*a)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(e,t,i){return{left:e.element.offset().left-t.element.outerWidth()-(i||0)}},getInnerLeftPosition:function(e,t,i){return{left:e.element.offset().left+(i||0)}},getRightPosition:function(e,t,i){var n=e.element;return{left:n.offset().left+n.outerWidth()+(i||0)}},getInnerRightPosition:function(e,t,i){var n=e.element,r=t.element.bounds();return{left:n.offset().left+n.outerWidth()-r.width-(i||0)}},getTopPosition:function(e,t,i){return{top:e.element.offset().top-t.element.outerHeight()-(i||0)}},getBottomPosition:function(e,t,i){var n=e.element;return{top:n.offset().top+n.outerHeight()+(i||0)}},isLeftSpaceEnough:function(e,t,i){return 0<=BI.DOM.getLeftPosition(e,t,i).left},isInnerLeftSpaceEnough:function(e,t,i){var n=t.element.bounds(),r=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(e,t,i).left+n.width<=r.width},isRightSpaceEnough:function(e,t,i){var n=t.element.bounds(),r=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(e,t,i).left+n.width<=r.width},isInnerRightSpaceEnough:function(e,t,i){return 0<=BI.DOM.getInnerRightPosition(e,t,i).left},isTopSpaceEnough:function(e,t,i){return 0<=BI.DOM.getTopPosition(e,t,i).top},isBottomSpaceEnough:function(e,t,i){var n=t.element.bounds(),r=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(e,t,i).top+n.height<=r.height},isRightSpaceLarger:function(e){return BI.Widget._renderEngine.createElement("body").bounds().width-e.element.offset().left-e.element.bounds().width>=e.element.offset().left},isBottomSpaceLarger:function(e){return BI.Widget._renderEngine.createElement("body").bounds().height-e.element.offset().top-e.element.bounds().height>=e.element.offset().top},getLeftAlignPosition:function(e,t,i){var n=t.element.bounds(),r=BI.Widget._renderEngine.createElement("body").bounds(),o=e.element.offset().left+i;return o+n.width>r.width&&(o=r.width-n.width),o<0&&(o=0),{left:o}},getLeftAdaptPosition:function(e,t,i){return BI.DOM.isLeftSpaceEnough(e,t,i)?BI.DOM.getLeftPosition(e,t,i):{left:0}},getRightAlignPosition:function(e,t,i){var n=e.element.bounds(),r=t.element.bounds(),o=e.element.offset().left+n.width-r.width-i;return o<0&&(o=0),{left:o}},getRightAdaptPosition:function(e,t,i){return BI.DOM.isRightSpaceEnough(e,t,i)?BI.DOM.getRightPosition(e,t,i):{left:BI.Widget._renderEngine.createElement("body").bounds().width-t.element.bounds().width}},getTopAlignPosition:function(e,t,i,n){var r,o,a=e.element.offset(),s=e.element.bounds(),l=t.element.bounds(),u=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(e,t,-1*s.height+i)?r=a.top+i:n?(r=a.top+i,o=u.height-r):(r=u.height-l.height)<i&&(o=u.height-i),r<i&&(r=i),o?{top:r,adaptHeight:o}:{top:r}},getTopAdaptPosition:function(e,t,i,n){var r=t.element.bounds(),o=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(e,t,i)?BI.DOM.getTopPosition(e,t,i):n?{top:0,adaptHeight:e.element.offset().top-i}:r.height+i>o.height?{top:0,adaptHeight:o.height-i}:{top:0}},getBottomAlignPosition:function(e,t,i,n){var r,o,a=e.element.offset(),s=e.element.bounds(),l=t.element.bounds(),u=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(e,t,-1*s.height+i)?r=a.top+s.height-l.height-i:n?(r=0,o=a.top+s.height-i):(r=0,l.height+i>u.height&&(o=u.height-i)),r<0&&(r=0),o?{top:r,adaptHeight:o}:{top:r}},getBottomAdaptPosition:function(e,t,i,n){var r=e.element.offset(),o=e.element.bounds(),a=t.element.bounds(),s=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(e,t,i)?BI.DOM.getBottomPosition(e,t,i):n?{top:r.top+o.height+i,adaptHeight:s.height-r.top-o.height-i}:a.height+i>s.height?{top:i,adaptHeight:s.height-i}:{top:s.height-a.height-i}},getCenterAdaptPosition:function(e,t){var i=e.element.offset(),n=e.element.bounds(),r=t.element.bounds(),o=BI.Widget._renderEngine.createElement("body").bounds(),a=i.left+n.width/2+r.width/2>o.width?o.width-r.width:i.left+n.width/2-r.width/2;return a<0&&(a=0),{left:a}},getMiddleAdaptPosition:function(e,t){var i=e.element.offset(),n=e.element.bounds(),r=t.element.bounds(),o=BI.Widget._renderEngine.createElement("body").bounds(),a=i.top+n.height/2+r.height/2>o.height?o.height-r.height:i.top+n.height/2-r.height/2;return a<0&&(a=0),{top:a}},getComboPositionByDirections:function(e,t,i,n,r,o){var a;i=i||0,n=n||0;for(var s,l,u,c=[],h=[],p=[],d=!1,g=!1,f=!1,I=o[0],B=0;B<o.length;B++)switch(a=o[B]){case"left":case"right":c.push(a);break;case"top":case"bottom":h.push(a);break;case"innerLeft":case"innerRight":p.push(a)}for(B=0;B<o.length;B++)switch(a=o[B]){case"left":if(!d){var E=g?n:i,m=g?0:n;if(BI.DOM.isLeftSpaceEnough(e,t,E))return s=BI.DOM.getLeftPosition(e,t,E).left,"bottom"===h[0]?(u=BI.DOM.getTopAlignPosition(e,t,m,r)).dir="left,bottom":(u=BI.DOM.getBottomAlignPosition(e,t,m,r)).dir="left,top",g&&(u.change="left"),u.left=s,u}f=!0;break;case"right":if(!d){E=g?n:i,m=g?i:n;if(BI.DOM.isRightSpaceEnough(e,t,E))return s=BI.DOM.getRightPosition(e,t,E).left,"bottom"===h[0]?(u=BI.DOM.getTopAlignPosition(e,t,m,r)).dir="right,bottom":(u=BI.DOM.getBottomAlignPosition(e,t,m,r)).dir="right,top",g&&(u.change="right"),u.left=s,u}f=!0;break;case"top":E=f?n:i,m=f?i:n;if(BI.DOM.isTopSpaceEnough(e,t,m))return l=BI.DOM.getTopPosition(e,t,m).top,"right"===c[0]?(u=BI.DOM.getLeftAlignPosition(e,t,E,r)).dir="top,right":(u=BI.DOM.getRightAlignPosition(e,t,E)).dir="top,left",f&&(u.change="top"),u.top=l,u;r&&(d=!0),g=!0;break;case"bottom":E=f?n:i,m=f?i:n;if(BI.DOM.isBottomSpaceEnough(e,t,m))return l=BI.DOM.getBottomPosition(e,t,m).top,"right"===c[0]?(u=BI.DOM.getLeftAlignPosition(e,t,E,r)).dir="bottom,right":(u=BI.DOM.getRightAlignPosition(e,t,E)).dir="bottom,left",f&&(u.change="bottom"),u.top=l,u;r&&(d=!0),g=!0;break;case"innerLeft":if(!d){E=g?n:i,m=g?0:n;if(BI.DOM.isInnerLeftSpaceEnough(e,t,E))return s=BI.DOM.getInnerLeftPosition(e,t,E).left,"bottom"===h[0]?(u=BI.DOM.getTopAlignPosition(e,t,m,r)).dir="innerLeft,bottom":(u=BI.DOM.getBottomAlignPosition(e,t,m,r)).dir="innerLeft,top",g&&(u.change="innerLeft"),u.left=s,u}f=!0;break;case"innerRight":if(!d){E=g?n:i,m=g?i:n;if(BI.DOM.isInnerRightSpaceEnough(e,t,E))return s=BI.DOM.getInnerRightPosition(e,t,E).left,"bottom"===h[0]?(u=BI.DOM.getTopAlignPosition(e,t,m,r)).dir="innerRight,bottom":(u=BI.DOM.getBottomAlignPosition(e,t,m,r)).dir="innerRight,top",g&&(u.change="innerRight"),u.left=s,u}}switch(o[0]){case"left":case"right":return(I=BI.DOM.isRightSpaceLarger(e)?(s=BI.DOM.getRightAdaptPosition(e,t,i).left,"right"):(s=BI.DOM.getLeftAdaptPosition(e,t,i).left,"left"),"bottom"===h[0])?((u=BI.DOM.getTopAlignPosition(e,t,n,r)).left=s,u.dir=I+",bottom",u):((u=BI.DOM.getBottomAlignPosition(e,t,n,r)).left=s,u.dir=I+",top",u);default:return(I=BI.DOM.isBottomSpaceLarger(e)?(u=BI.DOM.getBottomAdaptPosition(e,t,n,r),"bottom"):(u=BI.DOM.getTopAdaptPosition(e,t,n,r),"top"),"right"===c[0])?(s=BI.DOM.getLeftAlignPosition(e,t,i,r).left,u.left=s,u.dir=I+",right",u):(s=BI.DOM.getRightAlignPosition(e,t,i).left,u.left=s,u.dir=I+",left",u)}},getComboPosition:function(e,t,i,n,r,o,a){i=i||0,n=n||0;var s=BI.Widget._renderEngine.createElement("body").bounds().height-n,l=Math.min(t.attr("maxHeight")||s,s);t.resetHeight&&t.resetHeight(l);var u,c=BI.DOM.getComboPositionByDirections(e,t,i,n,r,o||["bottom","top","right","left"]);switch(a){case"center":c.change?(u=BI.DOM.getMiddleAdaptPosition(e,t),c.top=u.top):(u=BI.DOM.getCenterAdaptPosition(e,t),c.left=u.left);break;case"middle":c.change?(u=BI.DOM.getCenterAdaptPosition(e,t),c.left=u.left):(u=BI.DOM.getMiddleAdaptPosition(e,t),c.top=u.top)}return!0===r&&t.resetHeight&&t.resetHeight(Math.min(s-c.top,l)),c}})},function(e,t){BI.EventListener={listen:function(e,t,i){return e.addEventListener?(e.addEventListener(t,i,!1),{remove:function(){e.removeEventListener(t,i,!1)}}):e.attachEvent?(e.attachEvent("on"+t,i),{remove:function(){e.detachEvent("on"+t,i)}}):void 0},capture:function(e,t,i){return e.addEventListener?(e.addEventListener(t,i,!0),{remove:function(){e.removeEventListener(t,i,!0)}}):{remove:BI.emptyFn}},registerDefault:function(){}}},function(e,t){_.extend(BI,{isIE:function(){return!!_global.navigator&&(null==this.__isIE&&(this.__isIE=/(msie|trident)/i.test(navigator.userAgent.toLowerCase())),this.__isIE)},getIEVersion:function(){if(!_global.navigator)return 0;if(null!=this.__IEVersion)return this.__IEVersion;var e=0,t=navigator.userAgent.toLowerCase(),i=t.match(/(?:msie\s([\w.]+))/),n=t.match(/(?:trident.*rv:([\w.]+))/),e=i&&n&&i[1]&&n[1]?Math.max(+i[1],+n[1]):i&&i[1]?+i[1]:n&&n[1]?+n[1]:0;return this.__IEVersion=e},isIE9Below:function(){return!!BI.isIE()&&this.getIEVersion()<9},isEdge:function(){return!!_global.navigator&&/edge/i.test(navigator.userAgent.toLowerCase())},isChrome:function(){return!!_global.navigator&&/chrome/i.test(navigator.userAgent.toLowerCase())},isFireFox:function(){return!!_global.navigator&&/firefox/i.test(navigator.userAgent.toLowerCase())},isOpera:function(){return!!_global.navigator&&/opera/i.test(navigator.userAgent.toLowerCase())},isSafari:function(){return!!_global.navigator&&(/safari/i.test(navigator.userAgent.toLowerCase())&&!/chrome/i.test(navigator.userAgent.toLowerCase()))},isKhtml:function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},isMac:function(){return!!_global.navigator&&/macintosh|mac os x/i.test(navigator.userAgent)},isWindows:function(){return!!_global.navigator&&/windows|win32/i.test(navigator.userAgent)},isSupportCss3:function(e){if(!_global.document)return!1;for(var t,i=["webkit","Moz","ms","o"],n=[],r=document.documentElement.style,o=function(e){return BI.isString(e)?e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()}):""},a=0;a<i.length;a++)n.push(o(i[a]+"-"+e));for(n.push(o(e)),a=0,t=n.length;a<t;a++)if(n[a]in r)return!0;return!1}})},function(Kt,Qt,Ut){var zt;!function(f,y){var r,i,B=typeof y,I=f.document,e=f.location,t=f.jQuery,n=f.$,o={},h=[],a="1.12.4",E=h.concat,s=h.push,p=h.slice,l=h.indexOf,u=o.toString,m=o.hasOwnProperty,c=a.trim,de=function(e,t){return new de.fn.init(e,t,i)},d=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,C=/\S+/g,g=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,_=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,b=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,T=/^[\],:{}\s]*$/,v=/(?:^|:|,)(?:\s*\[)+/g,N=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,V=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,S=/^-ms-/,x=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},w=function(e){!I.addEventListener&&"load"!==e.type&&"complete"!==I.readyState||(A(),de.ready())},A=function(){I.addEventListener?(I.removeEventListener("DOMContentLoaded",w,!1),f.removeEventListener("load",w,!1)):(I.detachEvent("onreadystatechange",w),f.detachEvent("onload",w))};function D(e){var t=e.length,i=de.type(e);return!de.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===i||"function"!==i&&(0===t||"number"==typeof t&&0<t&&t-1 in e)))}de.fn=de.prototype={jquery:a,constructor:de,init:function(e,t,i){var n,r;if(!e)return this;if("string"!=typeof e)return e.nodeType?(this.context=this[0]=e,this.length=1,this):de.isFunction(e)?i.ready(e):(e.selector!==y&&(this.selector=e.selector,this.context=e.context),de.makeArray(e,this));if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:_.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof de?t[0]:t,de.merge(this,de.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:I,!0)),b.test(n[1])&&de.isPlainObject(t))for(n in t)de.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((r=I.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return i.find(e);this.length=1,this[0]=r}return this.context=I,this.selector=e,this},selector:"",length:0,size:function(){return this.length},toArray:function(){return p.call(this)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=de.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return de.each(this,e,t)},ready:function(e){return de.ready.promise().done(e),this},slice:function(){return this.pushStack(p.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(0<=i&&i<t?[this[i]]:[])},map:function(i){return this.pushStack(de.map(this,function(e,t){return i.call(e,t,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:s,sort:[].sort,splice:[].splice},de.fn.init.prototype=de.fn,de.extend=de.fn.extend=function(){var e,t,i,n,r,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[1]||{},s=2),"object"==typeof a||de.isFunction(a)||(a={}),l===s&&(a=this,--s);s<l;s++)if(null!=(r=arguments[s]))for(n in r)e=a[n],a!==(i=r[n])&&(u&&i&&(de.isPlainObject(i)||(t=de.isArray(i)))?(o=t?(t=!1,e&&de.isArray(e)?e:[]):e&&de.isPlainObject(e)?e:{},a[n]=de.extend(u,o,i)):i!==y&&(a[n]=i));return a},de.extend({noConflict:function(e){return f.$===de&&(f.$=n),e&&f.jQuery===de&&(f.jQuery=t),de},isReady:!1,readyWait:1,holdReady:function(e){e?de.readyWait++:de.ready(!0)},ready:function(e){if(!0===e?!--de.readyWait:!de.isReady){if(!I.body)return setTimeout(de.ready);(de.isReady=!0)!==e&&0<--de.readyWait||(r.resolveWith(I,[de]),de.fn.trigger&&de(I).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===de.type(e)},isArray:Array.isArray||function(e){return"array"===de.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?o[u.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==de.type(e)||e.nodeType||de.isWindow(e))return!1;try{if(e.constructor&&!m.call(e,"constructor")&&!m.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(i){return!1}var t;for(t in e);return t===y||m.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,i){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(i=t,t=!1),t=t||I;var n=b.exec(e),r=!i&&[];return n?[t.createElement(n[1])]:(n=de.buildFragment([e],t,r),r&&de(r).remove(),de.merge([],n.childNodes))},parseJSON:function(e){return f.JSON&&f.JSON.parse?f.JSON.parse(e):null===e?e:"string"==typeof e&&(e=de.trim(e))&&T.test(e.replace(N,"@").replace(V,"]").replace(v,""))?new Function("return "+e)():void de.error("Invalid JSON: "+e)},parseXML:function(e){var t;if(!e||"string"!=typeof e)return null;try{f.DOMParser?t=(new DOMParser).parseFromString(e,"text/xml"):((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e))}catch(i){t=y}return t&&t.documentElement&&!t.getElementsByTagName("parsererror").length||de.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){e&&de.trim(e)&&(f.execScript||function(e){f.eval.call(f,e)})(e)},camelCase:function(e){return e.replace(S,"ms-").replace(x,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var n=0,r=e.length,o=D(e);if(i){if(o)for(;n<r&&!1!==t.apply(e[n],i);n++);else for(n in e)if(!1===t.apply(e[n],i))break}else if(o)for(;n<r&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},trim:c&&!c.call("\ufeff ")?function(e){return null==e?"":c.call(e)}:function(e){return null==e?"":(e+"").replace(g,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(D(Object(e))?de.merge(i,"string"==typeof e?[e]:e):s.call(i,e)),i},inArray:function(e,t,i){var n;if(t){if(l)return l.call(t,e,i);for(n=t.length,i=i?i<0?Math.max(0,n+i):i:0;i<n;i++)if(i in t&&t[i]===e)return i}return-1},merge:function(e,t){var i=t.length,n=e.length,r=0;if("number"==typeof i)for(;r<i;r++)e[n++]=t[r];else for(;t[r]!==y;)e[n++]=t[r++];return e.length=n,e},grep:function(e,t,i){var n=[],r=0,o=e.length;for(i=!!i;r<o;r++)i!==!!t(e[r],r)&&n.push(e[r]);return n},map:function(e,t,i){var n,r=0,o=e.length,a=[];if(D(e))for(;r<o;r++)null!=(n=t(e[r],r,i))&&(a[a.length]=n);else for(r in e)null!=(n=t(e[r],r,i))&&(a[a.length]=n);return E.apply([],a)},guid:1,proxy:function(e,t){var i,n,r;return"string"==typeof t&&(r=e[t],t=e,e=r),de.isFunction(e)?(i=p.call(arguments,2),(n=function(){return e.apply(t||this,i.concat(p.call(arguments)))}).guid=e.guid=e.guid||de.guid++,n):y},access:function(e,t,i,n,r,o,a){var s=0,l=e.length,u=null==i;if("object"===de.type(i))for(s in r=!0,i)de.access(e,t,s,i[s],!0,o,a);else if(n!==y&&(r=!0,de.isFunction(n)||(a=!0),u&&(t=a?(t.call(e,n),null):(u=t,function(e,t,i){return u.call(de(e),i)})),t))for(;s<l;s++)t(e[s],i,a?n:n.call(e[s],s,t(e[s],i)));return r?e:u?t.call(e):l?t(e[0],i):o},now:function(){return(new Date).getTime()}}),de.ready.promise=function(e){if(!r)if(r=de.Deferred(),"complete"===I.readyState)setTimeout(de.ready);else if(I.addEventListener)I.addEventListener("DOMContentLoaded",w,!1),f.addEventListener("load",w,!1);else{I.attachEvent("onreadystatechange",w),f.attachEvent("onload",w);var t=!1;try{t=null==f.frameElement&&I.documentElement}catch(i){}t&&t.doScroll&&!function n(){if(!de.isReady){try{t.doScroll("left")}catch(i){return setTimeout(n,50)}A(),de.ready()}}()}return r.promise(e)},de.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){o["[object "+t+"]"]=t.toLowerCase()}),i=de(I);var M={};de.Callbacks=function(r){var e,i;r="string"==typeof r?M[r]||(i=M[e=r]={},de.each(e.match(C)||[],function(e,t){i[t]=!0}),i):de.extend({},r);var o,t,n,a,s,l,u=[],c=!r.once&&[],h=function(e){for(t=r.memory&&e,n=!0,s=l||0,l=0,a=u.length,o=!0;u&&s<a;s++)if(!1===u[s].apply(e[0],e[1])&&r.stopOnFalse){t=!1;break}o=!1,u&&(c?c.length&&h(c.shift()):t?u=[]:p.disable())},p={add:function(){var e;return u&&(e=u.length,function n(e){de.each(e,function(e,t){var i=de.type(t);"function"===i?r.unique&&p.has(t)||u.push(t):t&&t.length&&"string"!==i&&n(t)})}(arguments),o?a=u.length:t&&(l=e,h(t))),this},remove:function(){return u&&de.each(arguments,function(e,t){for(var i;-1<(i=de.inArray(t,u,i));)u.splice(i,1),o&&(i<=a&&a--,i<=s&&s--)}),this},has:function(e){return e?-1<de.inArray(e,u):!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=c=t=y,this},disabled:function(){return!u},lock:function(){return c=y,t||p.disable(),this},locked:function(){return!c},fireWith:function(e,t){return t=[e,(t=t||[]).slice?t.slice():t],!u||n&&!c||(o?c.push(t):h(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!n}};return p},de.extend({Deferred:function(e){var a=[["resolve","done",de.Callbacks("once memory"),"resolved"],["reject","fail",de.Callbacks("once memory"),"rejected"],["notify","progress",de.Callbacks("memory")]],r="pending",s={state:function(){return r},always:function(){return l.done(arguments).fail(arguments),this},then:function(){var o=arguments;return de.Deferred(function(r){de.each(a,function(e,t){var i=t[0],n=de.isFunction(o[e])&&o[e];l[t[1]](function(){var e=n&&n.apply(this,arguments);e&&de.isFunction(e.promise)?e.promise().done(r.resolve).fail(r.reject).progress(r.notify):r[i+"With"](this===s?r.promise():this,n?[e]:arguments)})}),o=null}).promise()},promise:function(e){return null!=e?de.extend(e,s):s}},l={};return s.pipe=s.then,de.each(a,function(e,t){var i=t[2],n=t[3];s[t[1]]=i.add,n&&i.add(function(){r=n},a[1^e][2].disable,a[2][2].lock),l[t[0]]=function(){return l[t[0]+"With"](this===l?s:this,arguments),this},l[t[0]+"With"]=i.fireWith}),s.promise(l),e&&e.call(l,l),l},when:function(e){var r,t,i,n=0,o=p.call(arguments),a=o.length,s=1!==a||e&&de.isFunction(e.promise)?a:0,l=1===s?e:de.Deferred(),u=function(t,i,n){return function(e){i[t]=this,n[t]=1<arguments.length?p.call(arguments):e,n===r?l.notifyWith(i,n):--s||l.resolveWith(i,n)}};if(1<a)for(r=new Array(a),t=new Array(a),i=new Array(a);n<a;n++)o[n]&&de.isFunction(o[n].promise)?o[n].promise().done(u(n,i,o)).fail(l.reject).progress(u(n,t,r)):--s;return s||l.resolveWith(i,o),l.promise()}}),de.support=function(){var o,e,t,i,n,r,a,s,l,u,c=I.createElement("div");if(c.setAttribute("className","t"),c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=c.getElementsByTagName("*"),t=c.getElementsByTagName("a")[0],!e||!t||!e.length)return{};a=(n=I.createElement("select")).appendChild(I.createElement("option")),i=c.getElementsByTagName("input")[0],t.style.cssText="top:1px;float:left;opacity:.5",o={getSetAttribute:"t"!==c.className,leadingWhitespace:3===c.firstChild.nodeType,tbody:!c.getElementsByTagName("tbody").length,htmlSerialize:!!c.getElementsByTagName("link").length,style:/top/.test(t.getAttribute("style")),hrefNormalized:"/a"===t.getAttribute("href"),opacity:/^0.5/.test(t.style.opacity),cssFloat:!!t.style.cssFloat,checkOn:!!i.value,optSelected:a.selected,enctype:!!I.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==I.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===I.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},i.checked=!0,o.noCloneChecked=i.cloneNode(!0).checked,n.disabled=!0,o.optDisabled=!a.disabled;try{delete c.test}catch(h){o.deleteExpando=!1}for(u in(i=I.createElement("input")).setAttribute("value",""),o.input=""===i.getAttribute("value"),i.value="t",i.setAttribute("type","radio"),o.radioValue="t"===i.value,i.setAttribute("checked","t"),i.setAttribute("name","t"),(r=I.createDocumentFragment()).appendChild(i),o.appendChecked=i.checked,o.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,c.attachEvent&&(c.attachEvent("onclick",function(){o.noCloneEvent=!1}),c.cloneNode(!0).click()),{submit:!0,change:!0,focusin:!0})c.setAttribute(s="on"+u,"t"),o[u+"Bubbles"]=s in f||!1===c.attributes[s].expando;return c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===c.style.backgroundClip,de(function(){var e,t,i,n="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",r=I.getElementsByTagName("body")[0];r&&((e=I.createElement("div")).style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",r.appendChild(e).appendChild(c),c.innerHTML="<table><tr><td></td><td>t</td></tr></table>",(i=c.getElementsByTagName("td"))[0].style.cssText="padding:0;margin:0;border:0;display:none",l=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",o.reliableHiddenOffsets=l&&0===i[0].offsetHeight,c.innerHTML="",c.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",o.boxSizing=4===c.offsetWidth,o.doesNotIncludeMarginInBodyOffset=1!==r.offsetTop,f.getComputedStyle&&(o.pixelPosition="1%"!==(f.getComputedStyle(c,null)||{}).top,o.boxSizingReliable="4px"===(f.getComputedStyle(c,null)||{width:"4px"}).width,(t=c.appendChild(I.createElement("div"))).style.cssText=c.style.cssText=n,t.style.marginRight=t.style.width="0",c.style.width="1px",o.reliableMarginRight=!parseFloat((f.getComputedStyle(t,null)||{}).marginRight)),typeof c.style.zoom!==B&&(c.innerHTML="",c.style.cssText=n+"width:1px;padding:1px;display:inline;zoom:1",o.inlineBlockNeedsLayout=3===c.offsetWidth,c.style.display="block",c.innerHTML="<div></div>",c.firstChild.style.width="5px",o.shrinkWrapBlocks=3!==c.offsetWidth,o.inlineBlockNeedsLayout&&(r.style.zoom=1)),r.removeChild(e),e=c=i=t=null)}),e=n=r=a=t=i=null,o}();var k=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function H(e,t,i,n){if(de.acceptData(e)){var r,o,a=de.expando,s="string"==typeof t,l=e.nodeType,u=l?de.cache:e,c=l?e[a]:e[a]&&a;if(c&&u[c]&&(n||u[c].data)||!s||i!==y)return c||(l?e[a]=c=h.pop()||de.guid++:c=a),u[c]||(u[c]={},l||(u[c].toJSON=de.noop)),"object"!=typeof t&&"function"!=typeof t||(n?u[c]=de.extend(u[c],t):u[c].data=de.extend(u[c].data,t)),r=u[c],n||(r.data||(r.data={}),r=r.data),i!==y&&(r[de.camelCase(t)]=i),s?null==(o=r[t])&&(o=r[de.camelCase(t)]):o=r,o}}function R(e,t,i){if(de.acceptData(e)){var n,r,o,a=e.nodeType,s=a?de.cache:e,l=a?e[de.expando]:de.expando;if(s[l]){if(t&&(o=i?s[l]:s[l].data)){for((n=0,r=(t=de.isArray(t)?t.concat(de.map(t,de.camelCase)):t in o||(t=de.camelCase(t))in o?[t]:t.split(" ")).length);n<r;n++)delete o[t[n]];if(!(i?W:de.isEmptyObject)(o))return}(i||(delete s[l].data,W(s[l])))&&(a?de.cleanData([e],!0):de.support.deleteExpando||s!=s.window?delete s[l]:s[l]=null)}}}function Y(e,t,i){if(i===y&&1===e.nodeType){var n="data-"+t.replace(P,"-$1").toLowerCase();if("string"==typeof(i=e.getAttribute(n))){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:k.test(i)?de.parseJSON(i):i)}catch(r){}de.data(e,t,i)}else i=y}return i}function W(e){var t;for(t in e)if(("data"!==t||!de.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}de.extend({cache:{},expando:"jQuery"+(a+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return!!(e=e.nodeType?de.cache[e[de.expando]]:e[de.expando])&&!W(e)},data:function(e,t,i){return H(e,t,i)},removeData:function(e,t){return R(e,t)},_data:function(e,t,i){return H(e,t,i,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&de.noData[e.nodeName.toLowerCase()];return!t||!0!==t&&e.getAttribute("classid")===t}}),de.fn.extend({data:function(t,e){var i,n,r=this[0],o=0,a=null;if(t!==y)return"object"==typeof t?this.each(function(){de.data(this,t)}):de.access(this,function(e){return e===y?r?Y(r,t,de.data(r,t)):null:void this.each(function(){de.data(this,t,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(a=de.data(r),1===r.nodeType&&!de._data(r,"parsedAttrs"))){for(i=r.attributes;o<i.length;o++)(n=i[o].name).indexOf("data-")||(n=de.camelCase(n.slice(5)),Y(r,n,a[n]));de._data(r,"parsedAttrs",!0)}return a},removeData:function(e){return this.each(function(){de.removeData(this,e)})}}),de.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=de._data(e,t),i&&(!n||de.isArray(i)?n=de._data(e,t,de.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=de.queue(e,t),n=i.length,r=i.shift(),o=de._queueHooks(e,t);"inprogress"===r&&(r=i.shift(),n--),(o.cur=r)&&("fx"===t&&i.unshift("inprogress"),delete o.stop,r.call(e,function(){de.dequeue(e,t)},o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return de._data(e,i)||de._data(e,i,{empty:de.Callbacks("once memory").add(function(){de._removeData(e,t+"queue"),de._removeData(e,i)})})}}),de.fn.extend({queue:function(t,i){var e=2;return"string"!=typeof t&&(i=t,t="fx",e--),arguments.length<e?de.queue(this[0],t):i===y?this:this.each(function(){var e=de.queue(this,t,i);de._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&de.dequeue(this,t)})},dequeue:function(e){return this.each(function(){de.dequeue(this,e)})},delay:function(n,e){return n=de.fx&&de.fx.speeds[n]||n,e=e||"fx",this.queue(e,function(e,t){var i=setTimeout(e,n);t.stop=function(){clearTimeout(i)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,r=de.Deferred(),o=this,a=this.length,s=function(){--n||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=y),e=e||"fx";a--;)(i=de._data(o[a],e+"queueHooks"))&&i.empty&&(n++,i.empty.add(s));return s(),r.promise(t)}});var O,F,G=/[\t\r\n]/g,Z=/\r/g,X=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,K=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Q=/^(?:checked|selected)$/i,U=de.support.getSetAttribute,z=de.support.input;de.fn.extend({attr:function(e,t){return de.access(this,de.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){de.removeAttr(this,e)})},prop:function(e,t){return de.access(this,de.prop,e,t,1<arguments.length)},removeProp:function(t){return t=de.propFix[t]||t,this.each(function(){try{this[t]=y,delete this[t]}catch(e){}})},addClass:function(t){var e,i,n,r,o,a=0,s=this.length,l="string"==typeof t&&t;if(de.isFunction(t))return this.each(function(e){de(this).addClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(C)||[];a<s;a++)if(n=1===(i=this[a]).nodeType&&(i.className?(" "+i.className+" ").replace(G," "):" ")){for(o=0;r=e[o++];)n.indexOf(" "+r+" ")<0&&(n+=r+" ");i.className=de.trim(n)}return this},removeClass:function(t){var e,i,n,r,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof t&&t;if(de.isFunction(t))return this.each(function(e){de(this).removeClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(C)||[];a<s;a++)if(n=1===(i=this[a]).nodeType&&(i.className?(" "+i.className+" ").replace(G," "):"")){for(o=0;r=e[o++];)for(;0<=n.indexOf(" "+r+" ");)n=n.replace(" "+r+" "," ");i.className=t?de.trim(n):""}return this},toggleClass:function(o,a){var s=typeof o,l="boolean"==typeof a;return de.isFunction(o)?this.each(function(e){de(this).toggleClass(o.call(this,e,this.className,a),a)}):this.each(function(){if("string"==s)for(var e,t=0,i=de(this),n=a,r=o.match(C)||[];e=r[t++];)n=l?n:!i.hasClass(e),i[n?"addClass":"removeClass"](e);else s!==B&&"boolean"!=s||(this.className&&de._data(this,"__className__",this.className),this.className=!this.className&&!1!==o&&de._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",i=0,n=this.length;i<n;i++)if(1===this[i].nodeType&&0<=(" "+this[i].className+" ").replace(G," ").indexOf(t))return!0;return!1},val:function(n){var e,r,o,t=this[0];return arguments.length?(o=de.isFunction(n),this.each(function(e){var t,i=de(this);1===this.nodeType&&(null==(t=o?n.call(this,e,i.val()):n)?t="":"number"==typeof t?t+="":de.isArray(t)&&(t=de.map(t,function(e){return null==e?"":e+""})),(r=de.valHooks[this.type]||de.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&r.set(this,t,"value")!==y||(this.value=t))})):t?(r=de.valHooks[t.type]||de.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&(e=r.get(t,"value"))!==y?e:"string"==typeof(e=t.value)?e.replace(Z,""):null==e?"":e:void 0}}),de.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,i,n=e.options,r=e.selectedIndex,o="select-one"===e.type||r<0,a=o?null:[],s=o?r+1:n.length,l=r<0?s:o?r:0;l<s;l++)if(((i=n[l]).selected||l===r)&&(de.support.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!de.nodeName(i.parentNode,"optgroup"))){if(t=de(i).val(),o)return t;a.push(t)}return a},set:function(e,t){var i=de.makeArray(t);return de(e).find("option").each(function(){this.selected=0<=de.inArray(de(this).val(),i)}),i.length||(e.selectedIndex=-1),i}}},attr:function(e,t,i){var n,r,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return typeof e.getAttribute===B?de.prop(e,t,i):((r=1!==a||!de.isXMLDoc(e))&&(t=t.toLowerCase(),n=de.attrHooks[t]||(K.test(t)?F:O)),i===y?n&&r&&"get"in n&&null!==(o=n.get(e,t))?o:(typeof e.getAttribute!==B&&(o=e.getAttribute(t)),null==o?y:o):null!==i?n&&r&&"set"in n&&(o=n.set(e,i,t))!==y?o:(e.setAttribute(t,i+""),i):void de.removeAttr(e,t))},removeAttr:function(e,t){var i,n,r=0,o=t&&t.match(C);if(o&&1===e.nodeType)for(;i=o[r++];)n=de.propFix[i]||i,K.test(i)?!U&&Q.test(i)?e[de.camelCase("default-"+i)]=e[n]=!1:e[n]=!1:de.attr(e,i,""),e.removeAttribute(U?i:n)},attrHooks:{type:{set:function(e,t){if(!de.support.radioValue&&"radio"===t&&de.nodeName(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,t,i){var n,r,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return(1!==o||!de.isXMLDoc(e))&&(t=de.propFix[t]||t,r=de.propHooks[t]),i!==y?r&&"set"in r&&(n=r.set(e,i,t))!==y?n:e[t]=i:r&&"get"in r&&null!==(n=r.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=e.getAttributeNode("tabindex");return t&&t.specified?parseInt(t.value,10):X.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:y}}}}),F={get:function(e,t){var i=de.prop(e,t),n="boolean"==typeof i&&e.getAttribute(t),r="boolean"==typeof i?z&&U?null!=n:Q.test(t)?e[de.camelCase("default-"+t)]:!!n:e.getAttributeNode(t);return r&&!1!==r.value?t.toLowerCase():y},set:function(e,t,i){return!1===t?de.removeAttr(e,i):z&&U||!Q.test(i)?e.setAttribute(!U&&de.propFix[i]||i,i):e[de.camelCase("default-"+i)]=e[i]=!0,i}},z&&U||(de.attrHooks.value={get:function(e,t){var i=e.getAttributeNode(t);return de.nodeName(e,"input")?e.defaultValue:i&&i.specified?i.value:y},set:function(e,t,i){if(!de.nodeName(e,"input"))return O&&O.set(e,t,i);e.defaultValue=t}}),U||(O=de.valHooks.button={get:function(e,t){var i=e.getAttributeNode(t);return i&&("id"===t||"name"===t||"coords"===t?""!==i.value:i.specified)?i.value:y},set:function(e,t,i){var n=e.getAttributeNode(i);return n||e.setAttributeNode(n=e.ownerDocument.createAttribute(i)),n.value=t+="","value"===i||t===e.getAttribute(i)?t:y}},de.attrHooks.contenteditable={get:O.get,set:function(e,t,i){O.set(e,""!==t&&t,i)}},de.each(["width","height"],function(e,i){de.attrHooks[i]=de.extend(de.attrHooks[i],{set:function(e,t){if(""===t)return e.setAttribute(i,"auto"),t}})})),de.support.hrefNormalized||(de.each(["href","src","width","height"],function(e,i){de.attrHooks[i]=de.extend(de.attrHooks[i],{get:function(e){var t=e.getAttribute(i,2);return null==t?y:t}})}),de.each(["href","src"],function(e,t){de.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),de.support.style||(de.attrHooks.style={get:function(e){return e.style.cssText||y},set:function(e,t){return e.style.cssText=t+""}}),de.support.optSelected||(de.propHooks.selected=de.extend(de.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),de.support.enctype||(de.propFix.enctype="encoding"),de.support.checkOn||de.each(["radio","checkbox"],function(){de.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),de.each(["radio","checkbox"],function(){de.valHooks[this]=de.extend(de.valHooks[this],{set:function(e,t){if(de.isArray(t))return e.checked=0<=de.inArray(de(e).val(),t)}})});var j=/^(?:input|select|textarea)$/i,q=/^key/,$=/^(?:mouse|contextmenu)|click/,ee=/^(?:focusinfocus|focusoutblur)$/,te=/^([^.]*)(?:\.(.+)|)$/;function ie(){return!0}function ne(){return!1}de.event={global:{},add:function(e,t,i,n,r){var o,a,s,l,u,c,h,p,d,g,f,I=de._data(e);if(I){for(i.handler&&(i=(l=i).handler,r=l.selector),i.guid||(i.guid=de.guid++),(a=I.events)||(a=I.events={}),(c=I.handle)||((c=I.handle=function(e){return typeof de===B||e&&de.event.triggered===e.type?y:de.event.dispatch.apply(c.elem,arguments)}).elem=e),s=(t=(t||"").match(C)||[""]).length;s--;)d=f=(o=te.exec(t[s])||[])[1],g=(o[2]||"").split(".").sort(),u=de.event.special[d]||{},d=(r?u.delegateType:u.bindType)||d,u=de.event.special[d]||{},h=de.extend({type:d,origType:f,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&de.expr.match.needsContext.test(r),namespace:g.join(".")},l),(p=a[d])||((p=a[d]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(e,n,g,c)||(e.addEventListener?e.addEventListener(d,c,!1):e.attachEvent&&e.attachEvent("on"+d,c))),u.add&&(u.add.call(e,h),h.handler.guid||(h.handler.guid=i.guid)),r?p.splice(p.delegateCount++,0,h):p.push(h),de.event.global[d]=!0;e=null}},remove:function(e,t,i,n,r){var o,a,s,l,u,c,h,p,d,g,f,I=de.hasData(e)&&de._data(e);if(I&&(c=I.events)){for(u=(t=(t||"").match(C)||[""]).length;u--;)if(d=f=(s=te.exec(t[u])||[])[1],g=(s[2]||"").split(".").sort(),d){for(h=de.event.special[d]||{},p=c[d=(n?h.delegateType:h.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=p.length;o--;)a=p[o],!r&&f!==a.origType||i&&i.guid!==a.guid||s&&!s.test(a.namespace)||n&&n!==a.selector&&("**"!==n||!a.selector)||(p.splice(o,1),a.selector&&p.delegateCount--,h.remove&&h.remove.call(e,a));l&&!p.length&&(h.teardown&&!1!==h.teardown.call(e,g,I.handle)||de.removeEvent(e,d,I.handle),delete c[d])}else for(d in c)de.event.remove(e,d+t[u],i,n,!0);de.isEmptyObject(c)&&(delete I.handle,de._removeData(e,"events"))}},trigger:function(e,t,i,n){var r,o,a,s,l,u,c=[i||I],h=m.call(e,"type")?e.type:e,p=m.call(e,"namespace")?e.namespace.split("."):[],d=l=i=i||I;if(3!==i.nodeType&&8!==i.nodeType&&!ee.test(h+de.event.triggered)&&(0<=h.indexOf(".")&&(h=(p=h.split(".")).shift(),p.sort()),o=h.indexOf(":")<0&&"on"+h,(e=e[de.expando]?e:new de.Event(h,"object"==typeof e&&e)).isTrigger=!0,e.namespace=p.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=y,e.target||(e.target=i),t=null==t?[e]:de.makeArray(t,[e]),s=de.event.special[h]||{},n||!s.trigger||!1!==s.trigger.apply(i,t))){if(!n&&!s.noBubble&&!de.isWindow(i)){for(a=s.delegateType||h,ee.test(a+h)||(d=d.parentNode);d;d=d.parentNode)c.push(d),l=d;l===(i.ownerDocument||I)&&c.push(l.defaultView||l.parentWindow||f)}for(u=0;(d=c[u++])&&!e.isPropagationStopped();)e.type=1<u?a:s.bindType||h,(r=(de._data(d,"events")||{})[e.type]&&de._data(d,"handle"))&&r.apply(d,t),(r=o&&d[o])&&de.acceptData(d)&&r.apply&&!1===r.apply(d,t)&&e.preventDefault();if(e.type=h,!n&&!e.isDefaultPrevented()&&(!s._default||!1===s._default.apply(i.ownerDocument,t))&&("click"!==h||!de.nodeName(i,"a"))&&de.acceptData(i)&&o&&i[h]&&!de.isWindow(i)){(l=i[o])&&(i[o]=null),de.event.triggered=h;try{i[h]()}catch(g){}de.event.triggered=y,l&&(i[o]=l)}return e.result}},dispatch:function(e){e=de.event.fix(e);var t,i,n,r,o,a,s,l=p.call(arguments),u=(de._data(this,"events")||{})[e.type]||[],c=de.event.special[e.type]||{};if((l[0]=e).delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=de.event.handlers.call(this,e,u),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,o=0;(n=r.handlers[o++])&&!e.isImmediatePropagationStopped();){e.namespace_re&&!e.namespace_re.test(n.namespace)||(e.handleObj=n,e.data=n.data,(s=(de.event.special[n.origType]||{}).handle||n.handler).apply&&(i=s.apply(r.elem,l)),i!==y&&!1===(e.result=i)&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var i,n,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(r=[],o=0;o<s;o++)r[i=(n=t[o]).selector+" "]===y&&(r[i]=n.needsContext?0<=de(i,this).index(l):de.find(i,this,null,[l]).length),r[i]&&r.push(n);r.length&&a.push({elem:l,handlers:r})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[de.expando])return e;var t,i,n,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=$.test(r)?this.mouseHooks:q.test(r)?this.keyHooks:{}),n=a.props?this.props.concat(a.props):this.props,e=new de.Event(o),t=n.length;t--;)e[i=n[t]]=o[i];return e.target||(e.target=o.srcElement||I),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var i,n,r,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(r=(n=e.target.ownerDocument||I).documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||o===y||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){if(de.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1}},focus:{trigger:function(){if(this!==I.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===I.activeElement&&this.blur)return this.blur(),!1},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==y&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,i,n){var r=de.extend(new de.Event,i,{type:e,isSimulated:!0,originalEvent:{}});n?de.event.trigger(r,null,t):de.event.dispatch.call(t,r),r.isDefaultPrevented()&&i.preventDefault()}},de.removeEvent=I.removeEventListener?function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i,!1)}:function(e,t,i){var n="on"+t;e.detachEvent&&(typeof e[n]===B&&(e[n]=null),e.detachEvent(n,i))},de.Event=function(e,t){if(!(this instanceof de.Event))return new de.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||!1===e.returnValue||e.getPreventDefault&&e.getPreventDefault()?ie:ne):this.type=e,t&&de.extend(this,t),this.timeStamp=e&&e.timeStamp||de.now(),this[de.expando]=!0},de.Event.prototype={isDefaultPrevented:ne,isPropagationStopped:ne,isImmediatePropagationStopped:ne,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ie,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ie,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ie,this.stopPropagation()}},de.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,r){de.event.special[e]={delegateType:r,bindType:r,handle:function(e){var t,i=e.relatedTarget,n=e.handleObj;return i&&(i===this||de.contains(this,i))||(e.type=n.origType,t=n.handler.apply(this,arguments),e.type=r),t}}}),de.support.submitBubbles||(de.event.special.submit={setup:function(){if(de.nodeName(this,"form"))return!1;de.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,i=de.nodeName(t,"input")||de.nodeName(t,"button")?t.form:y;i&&!de._data(i,"submitBubbles")&&(de.event.add(i,"submit._submit",function(e){e._submit_bubble=!0}),de._data(i,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&de.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(de.nodeName(this,"form"))return!1;de.event.remove(this,"._submit")}}),de.support.changeBubbles||(de.event.special.change={setup:function(){if(j.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(de.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),de.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),de.event.simulate("change",this,e,!0)})),!1;de.event.add(this,"beforeactivate._change",function(e){var t=e.target;j.test(t.nodeName)&&!de._data(t,"changeBubbles")&&(de.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||de.event.simulate("change",this.parentNode,e,!0)}),de._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return de.event.remove(this,"._change"),!j.test(this.nodeName)}}),de.support.focusinBubbles||de.each({focus:"focusin",blur:"focusout"},function(e,t){var i=0,n=function(e){de.event.simulate(t,e.target,de.event.fix(e),!0)};de.event.special[t]={setup:function(){0==i++&&I.addEventListener(e,n,!0)},teardown:function(){0==--i&&I.removeEventListener(e,n,!0)}}}),de.fn.extend({on:function(e,t,i,n,r){var o,a;if("object"==typeof e){for(o in"string"!=typeof t&&(i=i||t,t=y),e)this.on(o,t,i,e[o],r);return this}if(null==i&&null==n?(n=t,i=t=y):null==n&&("string"==typeof t?(n=i,i=y):(n=i,i=t,t=y)),!1===n)n=ne;else if(!n)return this;return 1===r&&(a=n,(n=function(e){return de().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=de.guid++)),this.each(function(){de.event.add(this,e,n,i,t)})},one:function(e,t,i,n){return this.on(e,t,i,n,1)},off:function(e,t,i){var n,r;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,de(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(i=t,t=y),!1===i&&(i=ne),this.each(function(){de.event.remove(this,e,i,t)});for(r in e)this.off(r,t,e[r]);return this},bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)},trigger:function(e,t){return this.each(function(){de.event.trigger(e,t,this)})},triggerHandler:function(e,t){var i=this[0];if(i)return de.event.trigger(e,t,i,!0)}}),function(i){var e,b,T,o,t,f,u,y,I,C,n,B,E,r,a,m,s,v="sizzle"+-new Date,_=i.document,N={},V=0,h=0,l=$(),c=$(),p=$(),d="undefined",g=[],S=g.pop,x=g.push,L=g.slice,w=g.indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(this[t]===e)return t;return-1},A="[\\x20\\t\\r\\n\\f]",D="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=D.replace("w","w#"),k="\\["+A+"*("+D+")"+A+"*(?:([*^$|!~]?=)"+A+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+A+"*\\]",P=":("+D+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+k.replace(3,8)+")*)|.*)\\)|)",H=new RegExp("^"+A+"+|((?:^|[^\\\\])(?:\\\\.)*)"+A+"+$","g"),R=new RegExp("^"+A+"*,"+A+"*"),Y=new RegExp("^"+A+"*([\\x20\\t\\r\\n\\f>+~])"+A+"*"),W=new RegExp(P),O=new RegExp("^"+M+"$"),F={ID:new RegExp("^#("+D+")"),CLASS:new RegExp("^\\.("+D+")"),NAME:new RegExp("^\\[name=['\"]?("+D+")['\"]?\\]"),TAG:new RegExp("^("+D.replace("w","w*")+")"),ATTR:new RegExp("^"+k),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),needsContext:new RegExp("^"+A+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+A+"*((?:-\\d)?\\d*)"+A+"*\\)|)(?=[^-]|$)","i")},G=/[\x20\t\r\n\f]*[+~]/,Z=/^[^{]+\{\s*\[native code/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/'|\\/g,U=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,z=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,j=function(e,t){var i="0x"+t-65536;return i!=i?t:i<0?String.fromCharCode(65536+i):String.fromCharCode(i>>10|55296,1023&i|56320)};try{L.call(_.documentElement.childNodes,0)[0].nodeType}catch(pe){L=function(e){for(var t,i=[];t=this[e++];)i.push(t);return i}}function q(e){return Z.test(e+"")}function $(){var i,n=[];return i=function(e,t){return n.push(e+=" ")>T.cacheLength&&delete i[n.shift()],i[e]=t}}function ee(e){return e[v]=!0,e}function te(e){var t=C.createElement("div");try{return e(t)}catch(pe){return!1}finally{t=null}}function ie(e,t,i,n){var r,o,a,s,l,u,c,h,p,d;if((t?t.ownerDocument||t:_)!==C&&I(t),i=i||[],!e||"string"!=typeof e)return i;if(1!==(s=(t=t||C).nodeType)&&9!==s)return[];if(!B&&!n){if(r=X.exec(e))if(a=r[1]){if(9===s){if(!(o=t.getElementById(a))||!o.parentNode)return i;if(o.id===a)return i.push(o),i}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&m(t,o)&&o.id===a)return i.push(o),i}else{if(r[2])return x.apply(i,L.call(t.getElementsByTagName(e),0)),i;if((a=r[3])&&N.getByClassName&&t.getElementsByClassName)return x.apply(i,L.call(t.getElementsByClassName(a),0)),i}if(N.qsa&&!E.test(e)){if(c=!0,h=v,p=t,d=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(u=oe(e),(c=t.getAttribute("id"))?h=c.replace(Q,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=u.length;l--;)u[l]=h+ae(u[l]);p=G.test(e)&&t.parentNode||t,d=u.join(",")}if(d)try{return x.apply(i,L.call(p.querySelectorAll(d),0)),i}catch(g){}finally{c||t.removeAttribute("id")}}}return function(e,t,i,n){var r,o,a,s,l,u=oe(e);if(!n&&1===u.length){if(2<(o=u[0]=u[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&!B&&T.relative[o[1].type]){if(!(t=T.find.ID(a.matches[0].replace(z,j),t)[0]))return i;e=e.slice(o.shift().value.length)}for(r=F.needsContext.test(e)?0:o.length;r--&&(a=o[r],!T.relative[s=a.type]);)if((l=T.find[s])&&(n=l(a.matches[0].replace(z,j),G.test(o[0].type)&&t.parentNode||t))){if(o.splice(r,1),!(e=n.length&&ae(o)))return x.apply(i,L.call(n,0)),i;break}}return f(e,u)(n,t,B,i,G.test(e)),i}(e.replace(H,"$1"),t,i,n)}function ne(e,t){var i=t&&e,n=i&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function re(a){return ee(function(o){return o=+o,ee(function(e,t){for(var i,n=a([],e.length,o),r=n.length;r--;)e[i=n[r]]&&(e[i]=!(t[i]=e[i]))})})}for(e in t=ie.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},I=ie.setDocument=function(e){var l=e?e.ownerDocument||e:_;return l!==C&&9===l.nodeType&&l.documentElement&&(n=(C=l).documentElement,B=t(l),N.tagNameNoComments=te(function(e){return e.appendChild(l.createComment("")),!e.getElementsByTagName("*").length}),N.attributes=te(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!=t&&"string"!=t}),N.getByClassName=te(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!(!e.getElementsByClassName||!e.getElementsByClassName("e").length)&&(e.lastChild.className="e",2===e.getElementsByClassName("e").length)}),N.getByName=te(function(e){e.id=v+0,e.innerHTML="<a name='"+v+"'></a><div name='"+v+"'></div>",n.insertBefore(e,n.firstChild);var t=l.getElementsByName&&l.getElementsByName(v).length===2+l.getElementsByName(v+0).length;return N.getIdNotName=!l.getElementById(v),n.removeChild(e),t}),T.attrHandle=te(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!=d&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},N.getIdNotName?(T.find.ID=function(e,t){if(typeof t.getElementById!=d&&!B){var i=t.getElementById(e);return i&&i.parentNode?[i]:[]}},T.filter.ID=function(e){var t=e.replace(z,j);return function(e){return e.getAttribute("id")===t}}):(T.find.ID=function(e,t){if(typeof t.getElementById!=d&&!B){var i=t.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!=d&&i.getAttributeNode("id").value===e?[i]:void 0:[]}},T.filter.ID=function(e){var i=e.replace(z,j);return function(e){var t=typeof e.getAttributeNode!=d&&e.getAttributeNode("id");return t&&t.value===i}}),T.find.TAG=N.tagNameNoComments?function(e,t){if(typeof t.getElementsByTagName!=d)return t.getElementsByTagName(e)}:function(e,t){var i,n=[],r=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;i=o[r++];)1===i.nodeType&&n.push(i);return n},T.find.NAME=N.getByName&&function(e,t){if(typeof t.getElementsByName!=d)return t.getElementsByName(name)},T.find.CLASS=N.getByClassName&&function(e,t){if(typeof t.getElementsByClassName!=d&&!B)return t.getElementsByClassName(e)},r=[],E=[":focus"],(N.qsa=q(l.querySelectorAll))&&(te(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||E.push("\\["+A+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||E.push(":checked")}),te(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&E.push("[*^$]="+A+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||E.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),E.push(",.*:")})),(N.matchesSelector=q(a=n.matchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||n.msMatchesSelector))&&te(function(e){N.disconnectedMatch=a.call(e,"div"),a.call(e,"[s!='']:x"),r.push("!=",P)}),E=new RegExp(E.join("|")),r=new RegExp(r.join("|")),m=q(n.contains)||n.compareDocumentPosition?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},s=n.compareDocumentPosition?function(e,t){var i;return e===t?(u=!0,0):(i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&i||e.parentNode&&11===e.parentNode.nodeType?e===l||m(_,e)?-1:t===l||m(_,t)?1:0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var i,n=0,r=e.parentNode,o=t.parentNode,a=[e],s=[t];if(e===t)return u=!0,0;if(!r||!o)return e===l?-1:t===l?1:r?-1:o?1:0;if(r===o)return ne(e,t);for(i=e;i=i.parentNode;)a.unshift(i);for(i=t;i=i.parentNode;)s.unshift(i);for(;a[n]===s[n];)n++;return n?ne(a[n],s[n]):a[n]===_?-1:s[n]===_?1:0},u=!1,[0,0].sort(s),N.detectDuplicates=u),C},ie.matches=function(e,t){return ie(e,null,null,t)},ie.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&I(e),t=t.replace(U,"='$1']"),N.matchesSelector&&!B&&(!r||!r.test(t))&&!E.test(t))try{var i=a.call(e,t);if(i||N.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(pe){}return 0<ie(t,C,null,[e]).length},ie.contains=function(e,t){return(e.ownerDocument||e)!==C&&I(e),m(e,t)},ie.attr=function(e,t){var i;return(e.ownerDocument||e)!==C&&I(e),B||(t=t.toLowerCase()),(i=T.attrHandle[t])?i(e):B||N.attributes?e.getAttribute(t):((i=e.getAttributeNode(t))||e.getAttribute(t))&&!0===e[t]?t:i&&i.specified?i.value:null},ie.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ie.uniqueSort=function(e){var t,i=[],n=1,r=0;if(u=!N.detectDuplicates,e.sort(s),u){for(;t=e[n];n++)t===e[n-1]&&(r=i.push(n));for(;r--;)e.splice(i[r],1)}return e},o=ie.getText=function(e){var t,i="",n=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=o(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[n];n++)i+=o(t);return i},T=ie.selectors={cacheLength:50,createPseudo:ee,match:F,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(z,j),e[3]=(e[4]||e[5]||"").replace(z,j),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ie.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ie.error(e[0]),e},PSEUDO:function(e){var t,i=!e[5]&&e[2];return F.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:i&&W.test(i)&&(t=oe(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(t){return"*"===t?function(){return!0}:(t=t.replace(z,j).toLowerCase(),function(e){return e.nodeName&&e.nodeName.toLowerCase()===t})},CLASS:function(e){var t=l[e+" "];return t||(t=new RegExp("(^|"+A+")"+e+"("+A+"|$)"))&&l(e,function(e){return t.test(e.className||typeof e.getAttribute!=d&&e.getAttribute("class")||"")})},ATTR:function(i,n,r){return function(e){var t=ie.attr(e,i);return null==t?"!="===n:!n||(t+="","="===n?t===r:"!="===n?t!==r:"^="===n?r&&0===t.indexOf(r):"*="===n?r&&-1<t.indexOf(r):"$="===n?r&&t.slice(-r.length)===r:"~="===n?-1<(" "+t+" ").indexOf(r):"|="===n&&(t===r||t.slice(0,r.length+1)===r+"-"))}},CHILD:function(d,e,t,g,f){var I="nth"!==d.slice(0,3),B="last"!==d.slice(-4),E="of-type"===e;return 1===g&&0===f?function(e){return!!e.parentNode}:function(e,t,i){var n,r,o,a,s,l,u=I!=B?"nextSibling":"previousSibling",c=e.parentNode,h=E&&e.nodeName.toLowerCase(),p=!i&&!E;if(c){if(I){for(;u;){for(o=e;o=o[u];)if(E?o.nodeName.toLowerCase()===h:1===o.nodeType)return!1;l=u="only"===d&&!l&&"nextSibling"}return!0}if(l=[B?c.firstChild:c.lastChild],B&&p){for(s=(n=(r=c[v]||(c[v]={}))[d]||[])[0]===V&&n[1],a=n[0]===V&&n[2],o=s&&c.childNodes[s];o=++s&&o&&o[u]||(a=s=0)||l.pop();)if(1===o.nodeType&&++a&&o===e){r[d]=[V,s,a];break}}else if(p&&(n=(e[v]||(e[v]={}))[d])&&n[0]===V)a=n[1];else for(;(o=++s&&o&&o[u]||(a=s=0)||l.pop())&&((E?o.nodeName.toLowerCase()!==h:1!==o.nodeType)||!++a||(p&&((o[v]||(o[v]={}))[d]=[V,a]),o!==e)););return(a-=f)===g||a%g==0&&0<=a/g}}},PSEUDO:function(e,o){var t,a=T.pseudos[e]||T.setFilters[e.toLowerCase()]||ie.error("unsupported pseudo: "+e);return a[v]?a(o):1<a.length?(t=[e,e,"",o],T.setFilters.hasOwnProperty(e.toLowerCase())?ee(function(e,t){for(var i,n=a(e,o),r=n.length;r--;)e[i=w.call(e,n[r])]=!(t[i]=n[r])}):function(e){return a(e,0,t)}):a}},pseudos:{not:ee(function(e){var n=[],r=[],s=f(e.replace(H,"$1"));return s[v]?ee(function(e,t,i,n){for(var r,o=s(e,null,n,[]),a=e.length;a--;)(r=o[a])&&(e[a]=!(t[a]=r))}):function(e,t,i){return n[0]=e,s(n,null,i,r),!r.pop()}}),has:ee(function(t){return function(e){return 0<ie(t,e).length}}),contains:ee(function(t){return function(e){return-1<(e.textContent||e.innerText||o(e)).indexOf(t)}}),lang:ee(function(i){return O.test(i||"")||ie.error("unsupported lang: "+i),i=i.replace(z,j).toLowerCase(),function(e){var t;do{if(t=B?e.getAttribute("xml:lang")||e.getAttribute("lang"):e.lang)return(t=t.toLowerCase())===i||0===t.indexOf(i+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=i.location&&i.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===n},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if("@"<e.nodeName||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:re(function(){return[0]}),last:re(function(e,t){return[t-1]}),eq:re(function(e,t,i){return[i<0?i+t:i]}),even:re(function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e}),odd:re(function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e}),lt:re(function(e,t,i){for(var n=i<0?i+t:i;0<=--n;)e.push(n);return e}),gt:re(function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e})}},{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[e]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(e);for(e in{submit:!0,reset:!0})T.pseudos[e]=function(i){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===i}}(e);function oe(e,t){var i,n,r,o,a,s,l,u=c[e+" "];if(u)return t?0:u.slice(0);for(a=e,s=[],l=T.preFilter;a;){for(o in i&&!(n=R.exec(a))||(n&&(a=a.slice(n[0].length)||a),s.push(r=[])),i=!1,(n=Y.exec(a))&&(i=n.shift(),r.push({value:i,type:n[0].replace(H," ")}),a=a.slice(i.length)),T.filter)!(n=F[o].exec(a))||l[o]&&!(n=l[o](n))||(i=n.shift(),r.push({value:i,type:o,matches:n}),a=a.slice(i.length));if(!i)break}return t?a.length:a?ie.error(e):c(e,s).slice(0)}function ae(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function se(s,e,t){var l=e.dir,u=t&&"parentNode"===l,c=h++;return e.first?function(e,t,i){for(;e=e[l];)if(1===e.nodeType||u)return s(e,t,i)}:function(e,t,i){var n,r,o,a=V+" "+c;if(i){for(;e=e[l];)if((1===e.nodeType||u)&&s(e,t,i))return!0}else for(;e=e[l];)if(1===e.nodeType||u)if((r=(o=e[v]||(e[v]={}))[l])&&r[0]===a){if(!0===(n=r[1])||n===b)return!0===n}else if((r=o[l]=[a])[1]=s(e,t,i)||b,!0===r[1])return!0}}function le(r){return 1<r.length?function(e,t,i){for(var n=r.length;n--;)if(!r[n](e,t,i))return!1;return!0}:r[0]}function ue(e,t,i,n,r){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(o=e[s])&&(i&&!i(o,n,r)||(a.push(o),u&&t.push(s)));return a}function ce(d,g,f,I,B,e){return I&&!I[v]&&(I=ce(I)),B&&!B[v]&&(B=ce(B,e)),ee(function(e,t,i,n){var r,o,a,s=[],l=[],u=t.length,c=e||function(e,t,i){for(var n=0,r=t.length;n<r;n++)ie(e,t[n],i);return i}(g||"*",i.nodeType?[i]:i,[]),h=!d||!e&&g?c:ue(c,s,d,i,n),p=f?B||(e?d:u||I)?[]:t:h;if(f&&f(h,p,i,n),I)for(r=ue(p,l),I(r,[],i,n),o=r.length;o--;)(a=r[o])&&(p[l[o]]=!(h[l[o]]=a));if(e){if(B||d){if(B){for(r=[],o=p.length;o--;)(a=p[o])&&r.push(h[o]=a);B(null,p=[],r,n)}for(o=p.length;o--;)(a=p[o])&&-1<(r=B?w.call(e,a):s[o])&&(e[r]=!(t[r]=a))}}else p=ue(p===t?p.splice(u,p.length):p),B?B(null,t,p,n):x.apply(t,p)})}function he(){}f=ie.compile=function(e,t){var i,I,B,E,m,_,n,r=[],o=[],a=p[e+" "];if(!a){for(i=(t=t||oe(e)).length;i--;)(a=function h(e){for(var n,t,i,r=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,l=se(function(e){return e===n},a,!0),u=se(function(e){return-1<w.call(n,e)},a,!0),c=[function(e,t,i){return!o&&(i||t!==y)||((n=t).nodeType?l:u)(e,t,i)}];s<r;s++)if(t=T.relative[e[s].type])c=[se(le(c),t)];else{if((t=T.filter[e[s].type].apply(null,e[s].matches))[v]){for(i=++s;i<r&&!T.relative[e[i].type];i++);return ce(1<s&&le(c),1<s&&ae(e.slice(0,s-1)).replace(H,"$1"),t,s<i&&h(e.slice(s,i)),i<r&&h(e=e.slice(i)),i<r&&ae(e))}c.push(t)}return le(c)}(t[i]))[v]?r.push(a):o.push(a);a=p(e,(I=o,m=(E=0)<(B=r).length,_=0<I.length,n=function(e,t,i,n,r){var o,a,s,l=[],u=0,c="0",h=e&&[],p=null!=r,d=y,g=e||_&&T.find.TAG("*",r&&t.parentNode||t),f=V+=null==d?1:Math.random()||.1;for(p&&(y=t!==C&&t,b=E);null!=(o=g[c]);c++){if(_&&o){for(a=0;s=I[a++];)if(s(o,t,i)){n.push(o);break}p&&(V=f,b=++E)}m&&((o=!s&&o)&&u--,e&&h.push(o))}if(u+=c,m&&c!==u){for(a=0;s=B[a++];)s(h,l,t,i);if(e){if(0<u)for(;c--;)h[c]||l[c]||(l[c]=S.call(n));l=ue(l)}x.apply(n,l),p&&!e&&0<l.length&&1<u+B.length&&ie.uniqueSort(n)}return p&&(V=f,y=d),h},m?ee(n):n))}return a},T.pseudos.nth=T.pseudos.eq,T.filters=he.prototype=T.pseudos,T.setFilters=new he,I(),ie.attr=de.attr,de.find=ie,de.expr=ie.selectors,de.expr[":"]=de.expr.pseudos,de.unique=ie.uniqueSort,de.text=ie.getText,de.isXMLDoc=ie.isXML,de.contains=ie.contains}(f);var re=/Until$/,oe=/^(?:parents|prev(?:Until|All))/,ae=/^.[^:#\[\.,]*$/,se=de.expr.match.needsContext,le={children:!0,contents:!0,next:!0,prev:!0};function ue(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function ce(e,i,n){if(i=i||0,de.isFunction(i))return de.grep(e,function(e,t){return!!i.call(e,t,e)===n});if(i.nodeType)return de.grep(e,function(e){return e===i===n});if("string"==typeof i){var t=de.grep(e,function(e){return 1===e.nodeType});if(ae.test(i))return de.filter(i,t,!n);i=de.filter(i,t)}return de.grep(e,function(e){return 0<=de.inArray(e,i)===n})}function he(e){var t=pe.split("|"),i=e.createDocumentFragment();if(i.createElement)for(;t.length;)i.createElement(t.pop());return i}de.fn.extend({find:function(e){var t,i,n,r=this.length;if("string"!=typeof e)return(n=this).pushStack(de(e).filter(function(){for(t=0;t<r;t++)if(de.contains(n[t],this))return!0}));for(i=[],t=0;t<r;t++)de.find(e,this[t],i);return(i=this.pushStack(1<r?de.unique(i):i)).selector=(this.selector?this.selector+" ":"")+e,i},has:function(e){var t,i=de(e,this),n=i.length;return this.filter(function(){for(t=0;t<n;t++)if(de.contains(this,i[t]))return!0})},not:function(e){return this.pushStack(ce(this,e,!1))},filter:function(e){return this.pushStack(ce(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?se.test(e)?0<=de(e,this.context).index(this[0]):0<de.filter(e,this).length:0<this.filter(e).length)},closest:function(e,t){for(var i,n=0,r=this.length,o=[],a=se.test(e)||"string"!=typeof e?de(e,t||this.context):0;n<r;n++)for(i=this[n];i&&i.ownerDocument&&i!==t&&11!==i.nodeType;){if(a?-1<a.index(i):de.find.matchesSelector(i,e)){o.push(i);break}i=i.parentNode}return this.pushStack(1<o.length?de.unique(o):o)},index:function(e){return e?"string"==typeof e?de.inArray(this[0],de(e)):de.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var i="string"==typeof e?de(e,t):de.makeArray(e&&e.nodeType?[e]:e),n=de.merge(this.get(),i);return this.pushStack(de.unique(n))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),de.fn.andSelf=de.fn.addBack,de.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return de.dir(e,"parentNode")},parentsUntil:function(e,t,i){return de.dir(e,"parentNode",i)},next:function(e){return ue(e,"nextSibling")},prev:function(e){return ue(e,"previousSibling")},nextAll:function(e){return de.dir(e,"nextSibling")},prevAll:function(e){return de.dir(e,"previousSibling")},nextUntil:function(e,t,i){return de.dir(e,"nextSibling",i)},prevUntil:function(e,t,i){return de.dir(e,"previousSibling",i)},siblings:function(e){return de.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return de.sibling(e.firstChild)},contents:function(e){return de.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:de.merge([],e.childNodes)}},function(n,r){de.fn[n]=function(e,t){var i=de.map(this,r,e);return re.test(n)||(t=e),t&&"string"==typeof t&&(i=de.filter(t,i)),i=1<this.length&&!le[n]?de.unique(i):i,1<this.length&&oe.test(n)&&(i=i.reverse()),this.pushStack(i)}}),de.extend({filter:function(e,t,i){return i&&(e=":not("+e+")"),1===t.length?de.find.matchesSelector(t[0],e)?[t[0]]:[]:de.find.matches(e,t)},dir:function(e,t,i){for(var n=[],r=e[t];r&&9!==r.nodeType&&(i===y||1!==r.nodeType||!de(r).is(i));)1===r.nodeType&&n.push(r),r=r[t];return n},sibling:function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i}});var pe="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ge=/ jQuery\d+="(?:null|\d+)"/g,fe=new RegExp("<(?:"+pe+")[\\s/>]","i"),Ie=/^\s+/,Be=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ee=/<([\w:]+)/,me=/<tbody/i,_e=/<|&#?\w+;/,be=/<(?:script|style|link)/i,Te=/^(?:checkbox|radio)$/i,ye=/checked\s*(?:[^=]|=\s*.checked.)/i,Ce=/^$|\/(?:java|ecma)script/i,ve=/^true\/(.*)/,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ve={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:de.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Se=he(I).appendChild(I.createElement("div"));function xe(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function Le(e){var t=ve.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function we(e,t){for(var i,n=0;null!=(i=e[n]);n++)de._data(i,"globalEval",!t||de._data(t[n],"globalEval"))}function Ae(e,t){if(1===t.nodeType&&de.hasData(e)){var i,n,r,o=de._data(e),a=de._data(t,o),s=o.events;if(s)for(i in delete a.handle,a.events={},s)for(n=0,r=s[i].length;n<r;n++)de.event.add(t,i,s[i][n]);a.data&&(a.data=de.extend({},a.data))}}function De(e,t){var i,n,r=0,o=typeof e.getElementsByTagName!==B?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==B?e.querySelectorAll(t||"*"):y;if(!o)for(o=[],i=e.childNodes||e;null!=(n=i[r]);r++)!t||de.nodeName(n,t)?o.push(n):de.merge(o,De(n,t));return t===y||t&&de.nodeName(e,t)?de.merge([e],o):o}function Me(e){Te.test(e.type)&&(e.defaultChecked=e.checked)}Ve.optgroup=Ve.option,Ve.tbody=Ve.tfoot=Ve.colgroup=Ve.caption=Ve.thead,Ve.th=Ve.td,de.fn.extend({text:function(e){return de.access(this,function(e){return e===y?de.text(this):this.empty().append((this[0]&&this[0].ownerDocument||I).createTextNode(e))},null,e,arguments.length)},wrapAll:function(t){return de.isFunction(t)?this.each(function(e){de(this).wrapAll(t.call(this,e))}):(this[0]&&(e=de(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)),this);var e},wrapInner:function(i){return de.isFunction(i)?this.each(function(e){de(this).wrapInner(i.call(this,e))}):this.each(function(){var e=de(this),t=e.contents();t.length?t.wrapAll(i):e.append(i)})},wrap:function(t){var i=de.isFunction(t);return this.each(function(e){de(this).wrapAll(i?t.call(this,e):t)})},unwrap:function(){return this.parent().each(function(){de.nodeName(this,"body")||de(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var i,n=0;null!=(i=this[n]);n++)(!e||0<de.filter(e,[i]).length)&&(t||1!==i.nodeType||de.cleanData(De(i)),i.parentNode&&(t&&de.contains(i.ownerDocument,i)&&we(De(i,"script")),i.parentNode.removeChild(i)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&de.cleanData(De(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&de.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return de.clone(this,e,t)})},html:function(e){return de.access(this,function(e){var t=this[0]||{},i=0,n=this.length;if(e===y)return 1===t.nodeType?t.innerHTML.replace(ge,""):y;if("string"==typeof e&&!be.test(e)&&(de.support.htmlSerialize||!fe.test(e))&&(de.support.leadingWhitespace||!Ie.test(e))&&!Ve[(Ee.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Be,"<$1></$2>");try{for(;i<n;i++)1===(t=this[i]||{}).nodeType&&(de.cleanData(De(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return de.isFunction(e)||"string"==typeof e||(e=de(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,i=this.parentNode;i&&(de(this).remove(),i.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(i,n,r){i=E.apply([],i);var e,t,o,a,s,l,u,c,h=0,p=this.length,d=this,g=p-1,f=i[0],I=de.isFunction(f);if(I||!(p<=1||"string"!=typeof f||de.support.checkClone)&&ye.test(f))return this.each(function(e){var t=d.eq(e);I&&(i[0]=f.call(this,e,n?t.html():y)),t.domManip(i,n,r)});if(p&&(e=(l=de.buildFragment(i,this[0].ownerDocument,!1,this)).firstChild,1===l.childNodes.length&&(l=e),e)){for(n=n&&de.nodeName(e,"tr"),o=(a=de.map(De(l,"script"),xe)).length;h<p;h++)t=l,h!==g&&(t=de.clone(t,!0,!0),o&&de.merge(a,De(t,"script"))),r.call(n&&de.nodeName(this[h],"table")?(u=this[h],c="tbody",u.getElementsByTagName(c)[0]||u.appendChild(u.ownerDocument.createElement(c))):this[h],t,h);if(o)for(s=a[a.length-1].ownerDocument,de.map(a,Le),h=0;h<o;h++)t=a[h],Ce.test(t.type||"")&&!de._data(t,"globalEval")&&de.contains(s,t)&&(t.src?de.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):de.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Ne,"")));l=e=null}return this}}),de.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){de.fn[e]=function(e){for(var t,i=0,n=[],r=de(e),o=r.length-1;i<=o;i++)t=i===o?this:this.clone(!0),de(r[i])[a](t),s.apply(n,t.get());return this.pushStack(n)}}),de.extend({clone:function(e,t,i){var n,r,o,a,s,l=de.contains(e.ownerDocument,e);if(de.support.html5Clone||de.isXMLDoc(e)||!fe.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Se.innerHTML=e.outerHTML,Se.removeChild(o=Se.firstChild)),!(de.support.noCloneEvent&&de.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||de.isXMLDoc(e)))for(n=De(o),s=De(e),a=0;null!=(r=s[a]);++a)n[a]&&function(e,t){var i,n,r;if(1===t.nodeType){if(i=t.nodeName.toLowerCase(),!de.support.noCloneEvent&&t[de.expando]){for(n in(r=de._data(t)).events)de.removeEvent(t,n,r.handle);t.removeAttribute(de.expando)}"script"===i&&t.text!==e.text?(xe(t).text=e.text,Le(t)):"object"===i?(t.parentNode&&(t.outerHTML=e.outerHTML),de.support.html5Clone&&e.innerHTML&&!de.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===i&&Te.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===i?t.defaultSelected=t.selected=e.defaultSelected:"input"!==i&&"textarea"!==i||(t.defaultValue=e.defaultValue)}}(r,n[a]);if(t)if(i)for(s=s||De(e),n=n||De(o),a=0;null!=(r=s[a]);a++)Ae(r,n[a]);else Ae(e,o);return 0<(n=De(o,"script")).length&&we(n,!l&&De(e,"script")),n=s=r=null,o},buildFragment:function(e,t,i,n){for(var r,o,a,s,l,u,c,h=e.length,p=he(t),d=[],g=0;g<h;g++)if((o=e[g])||0===o)if("object"===de.type(o))de.merge(d,o.nodeType?[o]:o);else if(_e.test(o)){for(s=s||p.appendChild(t.createElement("div")),l=(Ee.exec(o)||["",""])[1].toLowerCase(),c=Ve[l]||Ve._default,s.innerHTML=c[1]+o.replace(Be,"<$1></$2>")+c[2],r=c[0];r--;)s=s.lastChild;if(!de.support.leadingWhitespace&&Ie.test(o)&&d.push(t.createTextNode(Ie.exec(o)[0])),!de.support.tbody)for(r=(o="table"!==l||me.test(o)?"<table>"!==c[1]||me.test(o)?0:s:s.firstChild)&&o.childNodes.length;r--;)de.nodeName(u=o.childNodes[r],"tbody")&&!u.childNodes.length&&o.removeChild(u);for(de.merge(d,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=p.lastChild}else d.push(t.createTextNode(o));for(s&&p.removeChild(s),de.support.appendChecked||de.grep(De(d,"input"),Me),g=0;o=d[g++];)if((!n||-1===de.inArray(o,n))&&(a=de.contains(o.ownerDocument,o),s=De(p.appendChild(o),"script"),a&&we(s),i))for(r=0;o=s[r++];)Ce.test(o.type||"")&&i.push(o);return s=null,p},cleanData:function(e,t){for(var i,n,r,o,a=0,s=de.expando,l=de.cache,u=de.support.deleteExpando,c=de.event.special;null!=(i=e[a]);a++)if((t||de.acceptData(i))&&(o=(r=i[s])&&l[r])){if(o.events)for(n in o.events)c[n]?de.event.remove(i,n):de.removeEvent(i,n,o.handle);l[r]&&(delete l[r],u?delete i[s]:typeof i.removeAttribute!==B?i.removeAttribute(s):i[s]=null,h.push(r))}}});var ke,Pe,He,Re=/alpha\([^)]*\)/i,Ye=/opacity\s*=\s*([^)]*)/,We=/^(top|right|bottom|left)$/,Oe=/^(none|table(?!-c[ea]).+)/,Fe=/^margin/,Ge=new RegExp("^("+d+")(.*)$","i"),Ze=new RegExp("^("+d+")(?!px)[a-z%]+$","i"),Xe=new RegExp("^([+-])=("+d+")","i"),Je={BODY:"block"},Ke={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:0,fontWeight:400},Ue=["Top","Right","Bottom","Left"],ze=["Webkit","O","Moz","ms"];function je(e,t){if(t in e)return t;for(var i=t.charAt(0).toUpperCase()+t.slice(1),n=t,r=ze.length;r--;)if((t=ze[r]+i)in e)return t;return n}function qe(e,t){return e=t||e,"none"===de.css(e,"display")||!de.contains(e.ownerDocument,e)}function $e(e,t){for(var i,n,r,o=[],a=0,s=e.length;a<s;a++)(n=e[a]).style&&(o[a]=de._data(n,"olddisplay"),i=n.style.display,t?(o[a]||"none"!==i||(n.style.display=""),""===n.style.display&&qe(n)&&(o[a]=de._data(n,"olddisplay",nt(n.nodeName)))):o[a]||(r=qe(n),(i&&"none"!==i||!r)&&de._data(n,"olddisplay",r?i:de.css(n,"display"))));for(a=0;a<s;a++)(n=e[a]).style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?o[a]||"":"none"));return e}function et(e,t,i){var n=Ge.exec(t);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):t}function tt(e,t,i,n,r){for(var o=i===(n?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===i&&(a+=de.css(e,i+Ue[o],!0,r)),n?("content"===i&&(a-=de.css(e,"padding"+Ue[o],!0,r)),"margin"!==i&&(a-=de.css(e,"border"+Ue[o]+"Width",!0,r))):(a+=de.css(e,"padding"+Ue[o],!0,r),"padding"!==i&&(a+=de.css(e,"border"+Ue[o]+"Width",!0,r)));return a}function it(e,t,i){var n=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=Pe(e),a=de.support.boxSizing&&"border-box"===de.css(e,"boxSizing",!1,o);if(r<=0||null==r){if(((r=He(e,t,o))<0||null==r)&&(r=e.style[t]),Ze.test(r))return r;n=a&&(de.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+tt(e,t,i||(a?"border":"content"),n,o)+"px"}function nt(e){var t=I,i=Je[e];return i||("none"!==(i=rt(e,t))&&i||((t=((ke=(ke||de("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement))[0].contentWindow||ke[0].contentDocument).document).write("<!doctype html><html><body>"),t.close(),i=rt(e,t),ke.detach()),Je[e]=i),i}function rt(e,t){var i=de(t.createElement(e)).appendTo(t.body),n=de.css(i[0],"display");return i.remove(),n}de.fn.extend({css:function(e,t){return de.access(this,function(e,t,i){var n,r,o={},a=0;if(de.isArray(t)){for(r=Pe(e),n=t.length;a<n;a++)o[t[a]]=de.css(e,t[a],!1,r);return o}return i!==y?de.style(e,t,i):de.css(e,t)},e,t,1<arguments.length)},show:function(){return $e(this,!0)},hide:function(){return $e(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:qe(this))?de(this).show():de(this).hide()})}}),de.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=He(e,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":de.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=de.camelCase(t),l=e.style;if(t=de.cssProps[s]||(de.cssProps[s]=je(l,s)),a=de.cssHooks[t]||de.cssHooks[s],i===y)return a&&"get"in a&&(r=a.get(e,!1,n))!==y?r:l[t];if("string"===(o=typeof i)&&(r=Xe.exec(i))&&(i=(r[1]+1)*r[2]+parseFloat(de.css(e,t)),o="number"),!(null==i||"number"===o&&isNaN(i)||("number"!==o||de.cssNumber[s]||(i+="px"),de.support.clearCloneStyle||""!==i||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&(i=a.set(e,i,n))===y)))try{l[t]=i}catch(u){}}},css:function(e,t,i,n){var r,o,a,s=de.camelCase(t);return t=de.cssProps[s]||(de.cssProps[s]=je(e.style,s)),(a=de.cssHooks[t]||de.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,i)),o===y&&(o=He(e,t,n)),"normal"===o&&t in Qe&&(o=Qe[t]),""===i||i?(r=parseFloat(o),!0===i||de.isNumeric(r)?r||0:o):o},swap:function(e,t,i,n){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in r=i.apply(e,n||[]),t)e.style[o]=a[o];return r}}),f.getComputedStyle?(Pe=function(e){return f.getComputedStyle(e,null)},He=function(e,t,i){var n,r,o,a=i||Pe(e),s=a?a.getPropertyValue(t)||a[t]:y,l=e.style;return a&&(""!==s||de.contains(e.ownerDocument,e)||(s=de.style(e,t)),Ze.test(s)&&Fe.test(t)&&(n=l.width,r=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=s,s=a.width,l.width=n,l.minWidth=r,l.maxWidth=o)),s}):I.documentElement.currentStyle&&(Pe=function(e){return e.currentStyle},He=function(e,t,i){var n,r,o,a=i||Pe(e),s=a?a[t]:y,l=e.style;return null==s&&l&&l[t]&&(s=l[t]),Ze.test(s)&&!We.test(t)&&(n=l.left,(o=(r=e.runtimeStyle)&&r.left)&&(r.left=e.currentStyle.left),l.left="fontSize"===t?"1em":s,s=l.pixelLeft+"px",l.left=n,o&&(r.left=o)),""===s?"auto":s}),de.each(["height","width"],function(e,r){de.cssHooks[r]={get:function(e,t,i){if(t)return 0===e.offsetWidth&&Oe.test(de.css(e,"display"))?de.swap(e,Ke,function(){return it(e,r,i)}):it(e,r,i)},set:function(e,t,i){var n=i&&Pe(e);return et(0,t,i?tt(e,r,i,de.support.boxSizing&&"border-box"===de.css(e,"boxSizing",!1,n),n):0)}}}),de.support.opacity||(de.cssHooks.opacity={get:function(e,t){return Ye.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var i=e.style,n=e.currentStyle,r=de.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=n&&n.filter||i.filter||"";((i.zoom=1)<=t||""===t)&&""===de.trim(o.replace(Re,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===t||n&&!n.filter)||(i.filter=Re.test(o)?o.replace(Re,r):o+" "+r)}}),de(function(){de.support.reliableMarginRight||(de.cssHooks.marginRight={get:function(e,t){if(t)return de.swap(e,{display:"inline-block"},He,[e,"marginRight"])}}),!de.support.pixelPosition&&de.fn.position&&de.each(["top","left"],function(e,i){de.cssHooks[i]={get:function(e,t){if(t)return t=He(e,i),Ze.test(t)?de(e).position()[i]+"px":t}}})}),de.expr&&de.expr.filters&&(de.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!de.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||de.css(e,"display"))},de.expr.filters.visible=function(e){return!de.expr.filters.hidden(e)}),de.each({margin:"",padding:"",border:"Width"},function(r,o){de.cssHooks[r+o]={expand:function(e){for(var t=0,i={},n="string"==typeof e?e.split(" "):[e];t<4;t++)i[r+Ue[t]+o]=n[t]||n[t-2]||n[0];return i}},Fe.test(r)||(de.cssHooks[r+o].set=et)});var ot=/%20/g,at=/\[\]$/,st=/\r?\n/g,lt=/^(?:submit|button|image|reset|file)$/i,ut=/^(?:input|select|textarea|keygen)/i;de.fn.extend({serialize:function(){return de.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=de.prop(this,"elements");return e?de.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!de(this).is(":disabled")&&ut.test(this.nodeName)&&!lt.test(e)&&(this.checked||!Te.test(e))}).map(function(e,t){var i=de(this).val();return null==i?null:de.isArray(i)?de.map(i,function(e){return{name:t.name,value:e.replace(st,"\r\n")}}):{name:t.name,value:i.replace(st,"\r\n")}}).get()}}),de.param=function(e,t){var i,n=[],r=function(e,t){t=de.isFunction(t)?t():null==t?"":t,n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===y&&(t=de.ajaxSettings&&de.ajaxSettings.traditional),de.isArray(e)||e.jquery&&!de.isPlainObject(e))de.each(e,function(){r(this.name,this.value)});else for(i in e)!function o(i,e,n,r){var t;if(de.isArray(e))de.each(e,function(e,t){n||at.test(i)?r(i,t):o(i+"["+("object"==typeof t?e:"")+"]",t,n,r)});else if(n||"object"!==de.type(e))r(i,e);else for(t in e)o(i+"["+t+"]",e[t],n,r)}(i,e[i],t,r);return n.join("&").replace(ot,"+")},de.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,i){de.fn[i]=function(e,t){return 0<arguments.length?this.on(i,null,e,t):this.trigger(i)}}),de.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var ct,ht,pt=de.now(),dt=/\?/,gt=/#.*$/,ft=/([?&])_=[^&]*/,It=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Bt=/^(?:GET|HEAD)$/,Et=/^\/\//,mt=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,_t=de.fn.load,bt={},Tt={},yt="*/".concat("*");try{ht=e.href}catch(Jt){(ht=I.createElement("a")).href="",ht=ht.href}function Ct(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var i,n=0,r=e.toLowerCase().match(C)||[];if(de.isFunction(t))for(;i=r[n++];)"+"===i[0]?(i=i.slice(1)||"*",(o[i]=o[i]||[]).unshift(t)):(o[i]=o[i]||[]).push(t)}}function vt(t,r,o,a){var s={},l=t===Tt;function u(e){var n;return s[e]=!0,de.each(t[e]||[],function(e,t){var i=t(r,o,a);return"string"!=typeof i||l||s[i]?l?!(n=i):void 0:(r.dataTypes.unshift(i),u(i),!1)}),n}return u(r.dataTypes[0])||!s["*"]&&u("*")}function Nt(e,t){var i,n,r=de.ajaxSettings.flatOptions||{};for(n in t)t[n]!==y&&((r[n]?e:i=i||{})[n]=t[n]);return i&&de.extend(!0,e,i),e}ct=mt.exec(ht.toLowerCase())||[],de.fn.load=function(e,t,i){if("string"!=typeof e&&_t)return _t.apply(this,arguments);var n,r,o,a=this,s=e.indexOf(" ");return 0<=s&&(n=e.slice(s,e.length),e=e.slice(0,s)),de.isFunction(t)?(i=t,t=y):t&&"object"==typeof t&&(o="POST"),0<a.length&&de.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){r=arguments,a.html(n?de("<div>").append(de.parseHTML(e)).find(n):e)}).complete(i&&function(e,t){a.each(i,r||[e.responseText,t,e])}),this},de.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){de.fn[t]=function(e){return this.on(t,e)}}),de.each(["get","post"],function(e,r){de[r]=function(e,t,i,n){return de.isFunction(t)&&(n=n||i,i=t,t=y),de.ajax({url:e,type:r,dataType:n,data:t,success:i})}}),de.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ht,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ct[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":yt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":f.String,"text html":!0,"text json":de.parseJSON,"text xml":de.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Nt(Nt(e,de.ajaxSettings),t):Nt(de.ajaxSettings,e)},ajaxPrefilter:Ct(bt),ajaxTransport:Ct(Tt),ajax:function(e,t){"object"==typeof e&&(t=e,e=y),t=t||{};var i,n,c,h,p,d,g,r,f=de.ajaxSetup({},t),I=f.context||f,B=f.context&&(I.nodeType||I.jquery)?de(I):de.event,E=de.Deferred(),m=de.Callbacks("once memory"),_=f.statusCode||{},o={},a={},b=0,s="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!r)for(r={};t=It.exec(h);)r[t[1].toLowerCase()]=t[2];t=r[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?h:null},setRequestHeader:function(e,t){var i=e.toLowerCase();return b||(e=a[i]=a[i]||e,o[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)_[t]=[_[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||s;return g&&g.abort(t),l(0,t),this}};if(E.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,f.url=((e||f.url||ht)+"").replace(gt,"").replace(Et,ct[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=de.trim(f.dataType||"*").toLowerCase().match(C)||[""],null==f.crossDomain&&(i=mt.exec(f.url.toLowerCase()),f.crossDomain=!(!i||i[1]===ct[1]&&i[2]===ct[2]&&(i[3]||("http:"===i[1]?80:443))==(ct[3]||("http:"===ct[1]?80:443)))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=de.param(f.data,f.traditional)),vt(bt,f,t,T),2===b)return T;for(n in(d=f.global)&&0==de.active++&&de.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Bt.test(f.type),c=f.url,f.hasContent||(f.data&&(c=f.url+=(dt.test(c)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=ft.test(c)?c.replace(ft,"$1_="+pt++):c+(dt.test(c)?"&":"?")+"_="+pt++)),f.ifModified&&(de.lastModified[c]&&T.setRequestHeader("If-Modified-Since",de.lastModified[c]),de.etag[c]&&T.setRequestHeader("If-None-Match",de.etag[c])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+yt+"; q=0.01":""):f.accepts["*"]),f.headers)T.setRequestHeader(n,f.headers[n]);if(f.beforeSend&&(!1===f.beforeSend.call(I,T,f)||2===b))return T.abort();for(n in s="abort",{success:1,error:1,complete:1})T[n](f[n]);if(g=vt(Tt,f,t,T)){T.readyState=1,d&&B.trigger("ajaxSend",[T,f]),f.async&&0<f.timeout&&(p=setTimeout(function(){T.abort("timeout")},f.timeout));try{b=1,g.send(o,l)}catch(Jt){if(!(b<2))throw Jt;l(-1,Jt)}}else l(-1,"No Transport");function l(e,t,i,n){var r,o,a,s,l,u=t;2!==b&&(b=2,p&&clearTimeout(p),g=y,h=n||"",T.readyState=0<e?4:0,i&&(s=function(e,t,i){var n,r,o,a,s=e.contents,l=e.dataTypes,u=e.responseFields;for(a in u)a in i&&(t[u[a]]=i[a]);for(;"*"===l[0];)l.shift(),r===y&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){l.unshift(a);break}if(l[0]in i)o=l[0];else{for(a in i){if(!l[0]||e.converters[a+" "+l[0]]){o=a;break}n=n||a}o=o||n}if(o)return o!==l[0]&&l.unshift(o),i[o]}(f,T,i)),200<=e&&e<300||304===e?(f.ifModified&&((l=T.getResponseHeader("Last-Modified"))&&(de.lastModified[c]=l),(l=T.getResponseHeader("etag"))&&(de.etag[c]=l)),204===e?(r=!0,u="nocontent"):304===e?(r=!0,u="notmodified"):(u=(r=function(e,t){var i,n,r,o,a={},s=0,l=e.dataTypes.slice(),u=l[0];e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(l[1])for(r in e.converters)a[r.toLowerCase()]=e.converters[r];for(;n=l[++s];)if("*"!==n){if("*"!==u&&u!==n){if(!(r=a[u+" "+n]||a["* "+n]))for(i in a)if((o=i.split(" "))[1]===n&&(r=a[u+" "+o[0]]||a["* "+o[0]])){!0===r?r=a[i]:!0!==a[i]&&(n=o[0],l.splice(s--,0,n));break}if(!0!==r)if(r&&e["throws"])t=r(t);else try{t=r(t)}catch(Jt){return{state:"parsererror",error:r?Jt:"No conversion from "+u+" to "+n}}}u=n}return{state:"success",data:t}}(f,s)).state,o=r.data,r=!(a=r.error))):(a=u,!e&&u||(u="error",e<0&&(e=0))),T.status=e,T.statusText=(t||u)+"",r?E.resolveWith(I,[o,u,T]):E.rejectWith(I,[T,u,a]),T.statusCode(_),_=y,d&&B.trigger(r?"ajaxSuccess":"ajaxError",[T,f,r?o:a]),m.fireWith(I,[T,u]),d&&(B.trigger("ajaxComplete",[T,f]),--de.active||de.event.trigger("ajaxStop")))}return T},getScript:function(e,t){return de.get(e,y,t,"script")},getJSON:function(e,t,i){return de.get(e,t,i,"json")}}),de.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return de.globalEval(e),e}}}),de.ajaxPrefilter("script",function(e){e.cache===y&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),de.ajaxTransport("script",function(t){if(t.crossDomain){var n,r=I.head||de("head")[0]||I.documentElement;return{send:function(e,i){(n=I.createElement("script")).async=!0,t.scriptCharset&&(n.charset=t.scriptCharset),n.src=t.url,n.onload=n.onreadystatechange=function(e,t){!t&&n.readyState&&!/loaded|complete/.test(n.readyState)||(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(y,!0)}}}});var Vt=[],St=/(=)\?(?=&|$)|\?\?/;de.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Vt.pop()||de.expando+"_"+pt++;return this[e]=!0,e}}),de.ajaxPrefilter("json jsonp",function(e,t,i){var n,r,o,a=!1!==e.jsonp&&(St.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&St.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return n=e.jsonpCallback=de.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(St,"$1"+n):!1!==e.jsonp&&(e.url+=(dt.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return o||de.error(n+" was not called"),o[0]},e.dataTypes[0]="json",r=f[n],f[n]=function(){o=arguments},i.always(function(){f[n]=r,e[n]&&(e.jsonpCallback=t.jsonpCallback,Vt.push(n)),o&&de.isFunction(r)&&r(o[0]),o=r=y}),"script"});var xt,Lt,wt=0,At=f.ActiveXObject&&function(){var e;for(e in xt)xt[e](y,!0)};function Dt(){try{return new f.XMLHttpRequest}catch(Jt){}}de.ajaxSettings.xhr=f.ActiveXObject?function(){return!this.isLocal&&Dt()||function(){try{return new f.ActiveXObject("Microsoft.XMLHTTP")}catch(Jt){}}()}:Dt,Lt=de.ajaxSettings.xhr(),de.support.cors=!!Lt&&"withCredentials"in Lt,(Lt=de.support.ajax=!!Lt)&&de.ajaxTransport(function(c){var h;if(!c.crossDomain||de.support.cors)return{send:function(e,s){var l,t,u=c.xhr();if(c.username?u.open(c.type,c.url,c.async,c.username,c.password):u.open(c.type,c.url,c.async),c.xhrFields)for(t in c.xhrFields)u[t]=c.xhrFields[t];c.mimeType&&u.overrideMimeType&&u.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(t in e)u.setRequestHeader(t,e[t])}catch(i){}u.send(c.hasContent&&c.data||null),h=function(e,t){var i,n,r,o;try{if(h&&(t||4===u.readyState))if(h=y,l&&(u.onreadystatechange=de.noop,At&&delete xt[l]),t)4!==u.readyState&&u.abort();else{o={},i=u.status,n=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(o.text=u.responseText);try{r=u.statusText}catch(Jt){r=""}i||!c.isLocal||c.crossDomain?1223===i&&(i=204):i=o.text?200:404}}catch(a){t||s(-1,a)}o&&s(i,r,o,n)},c.async?4===u.readyState?setTimeout(h):(l=++wt,At&&(xt||(xt={},de(f).unload(At)),xt[l]=h),u.onreadystatechange=h):h()},abort:function(){h&&h(y,!0)}}});var Mt,kt,Pt=/^(?:toggle|show|hide)$/,Ht=new RegExp("^(?:([+-])=|)("+d+")([a-z%]*)$","i"),Rt=/queueHooks$/,Yt=[function(t,e,i){var n,r,o,a,s,l,u,c,h,p=this,d=t.style,g={},f=[],I=t.nodeType&&qe(t);i.queue||(null==(c=de._queueHooks(t,"fx")).unqueued&&(c.unqueued=0,h=c.empty.fire,c.empty.fire=function(){c.unqueued||h()}),c.unqueued++,p.always(function(){p.always(function(){c.unqueued--,de.queue(t,"fx").length||c.empty.fire()})}));1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===de.css(t,"display")&&"none"===de.css(t,"float")&&(de.support.inlineBlockNeedsLayout&&"inline"!==nt(t.nodeName)?d.zoom=1:d.display="inline-block"));i.overflow&&(d.overflow="hidden",de.support.shrinkWrapBlocks||p.always(function(){d.overflow=i.overflow[0],d.overflowX=i.overflow[1],d.overflowY=i.overflow[2]}));for(r in e)if(a=e[r],Pt.exec(a)){if(delete e[r],l=l||"toggle"===a,a===(I?"hide":"show"))continue;f.push(r)}if(o=f.length){"hidden"in(s=de._data(t,"fxshow")||de._data(t,"fxshow",{}))&&(I=s.hidden),l&&(s.hidden=!I),I?de(t).show():p.done(function(){de(t).hide()}),p.done(function(){var e;for(e in de._removeData(t,"fxshow"),g)de.style(t,e,g[e])});for(r=0;r<o;r++)n=f[r],u=p.createTween(n,I?s[n]:0),g[n]=s[n]||de.style(t,n),n in s||(s[n]=u.start,I&&(u.end=u.start,u.start="width"===n||"height"===n?1:0))}}],Wt={"*":[function(e,t){var i,n,r=this.createTween(e,t),o=Ht.exec(t),a=r.cur(),s=+a||0,l=1,u=20;if(o){if(i=+o[2],"px"!==(n=o[3]||(de.cssNumber[e]?"":"px"))&&s)for(s=de.css(r.elem,e,!0)||i||1;s/=l=l||".5",de.style(r.elem,e,s+n),l!==(l=r.cur()/a)&&1!==l&&--u;);r.unit=n,r.start=s,r.end=o[1]?s+(o[1]+1)*i:i}return r}]};function Ot(){return setTimeout(function(){Mt=y}),Mt=de.now()}function Ft(o,e,t){var i,a,s,n,r=0,l=Yt.length,u=de.Deferred().always(function(){delete c.elem}),c=function(){if(a)return!1;for(var e=Mt||Ot(),t=Math.max(0,h.startTime+h.duration-e),i=1-(t/h.duration||0),n=0,r=h.tweens.length;n<r;n++)h.tweens[n].run(i);return u.notifyWith(o,[h,i,t]),i<1&&r?t:(u.resolveWith(o,[h]),!1)},h=u.promise({elem:o,props:de.extend({},e),opts:de.extend(!0,{specialEasing:{}},t),originalProperties:e,originalOptions:t,startTime:Mt||Ot(),duration:t.duration,tweens:[],createTween:function(e,t){var i=de.Tween(o,h.opts,e,t,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(i),i},stop:function(e){var t=0,i=e?h.tweens.length:0;if(a)return this;for(a=!0;t<i;t++)h.tweens[t].run(1);return e?u.resolveWith(o,[h,e]):u.rejectWith(o,[h,e]),this}}),p=h.props;for(!function(e,t){var i,n,r,o,a;for(r in e)if(n=de.camelCase(r),o=t[n],i=e[r],de.isArray(i)&&(o=i[1],i=e[r]=i[0]),r!==n&&(e[n]=i,delete e[r]),(a=de.cssHooks[n])&&"expand"in a)for(r in i=a.expand(i),delete e[n],i)r in e||(e[r]=i[r],t[r]=o);else t[n]=o}(p,h.opts.specialEasing);r<l;r++)if(i=Yt[r].call(h,o,p,h.opts))return i;return s=h,n=p,de.each(n,function(e,t){for(var i=(Wt[e]||[]).concat(Wt["*"]),n=0,r=i.length;n<r;n++)if(i[n].call(s,e,t))return}),de.isFunction(h.opts.start)&&h.opts.start.call(o,h),de.fx.timer(de.extend(c,{elem:o,anim:h,queue:h.opts.queue})),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always)}function Gt(e,t,i,n,r){return new Gt.prototype.init(e,t,i,n,r)}function Zt(e,t){var i,n={height:e},r=0;for(t=t?1:0;r<4;r+=2-t)n["margin"+(i=Ue[r])]=n["padding"+i]=e;return t&&(n.opacity=n.width=e),n}function Xt(e){return de.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}de.Animation=de.extend(Ft,{tweener:function(e,t){for(var i,n=0,r=(e=de.isFunction(e)?(t=e,["*"]):e.split(" ")).length;n<r;n++)i=e[n],Wt[i]=Wt[i]||[],Wt[i].unshift(t)},prefilter:function(e,t){t?Yt.unshift(e):Yt.push(e)}}),(de.Tween=Gt).prototype={constructor:Gt,init:function(e,t,i,n,r,o){this.elem=e,this.prop=i,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(de.cssNumber[i]?"":"px")},cur:function(){var e=Gt.propHooks[this.prop];return e&&e.get?e.get(this):Gt.propHooks._default.get(this)},run:function(e){var t,i=Gt.propHooks[this.prop];return this.options.duration?this.pos=t=de.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):Gt.propHooks._default.set(this),this}},Gt.prototype.init.prototype=Gt.prototype,Gt.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=de.css(e.elem,e.prop,""))&&"auto"!==t?t:0:e.elem[e.prop]},set:function(e){de.fx.step[e.prop]?de.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[de.cssProps[e.prop]]||de.cssHooks[e.prop])?de.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Gt.propHooks.scrollTop=Gt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},de.each(["toggle","show","hide"],function(e,n){var r=de.fn[n];de.fn[n]=function(e,t,i){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(Zt(n,!0),e,t,i)}}),de.fn.extend({fadeTo:function(e,t,i,n){return this.filter(qe).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(t,e,i,n){var r=de.isEmptyObject(t),o=de.speed(e,i,n),a=function(){var e=Ft(this,de.extend({},t),o);a.finish=function(){e.stop(!0)},(r||de._data(this,"finish"))&&e.stop(!0)};return a.finish=a,r||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(r,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof r&&(o=e,e=r,r=y),e&&!1!==r&&this.queue(r||"fx",[]),this.each(function(){var e=!0,t=null!=r&&r+"queueHooks",i=de.timers,n=de._data(this);if(t)n[t]&&n[t].stop&&a(n[t]);else for(t in n)n[t]&&n[t].stop&&Rt.test(t)&&a(n[t]);for(t=i.length;t--;)i[t].elem!==this||null!=r&&i[t].queue!==r||(i[t].anim.stop(o),e=!1,i.splice(t,1));!e&&o||de.dequeue(this,r)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=de._data(this),i=t[a+"queue"],n=t[a+"queueHooks"],r=de.timers,o=i?i.length:0;for(t.finish=!0,de.queue(this,a,[]),n&&n.cur&&n.cur.finish&&n.cur.finish.call(this),e=r.length;e--;)r[e].elem===this&&r[e].queue===a&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<o;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete t.finish})}}),de.each({slideDown:Zt("show"),slideUp:Zt("hide"),slideToggle:Zt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,n){de.fn[e]=function(e,t,i){return this.animate(n,e,t,i)}}),de.speed=function(e,t,i){var n=e&&"object"==typeof e?de.extend({},e):{complete:i||!i&&t||de.isFunction(e)&&e,duration:e,easing:i&&t||t&&!de.isFunction(t)&&t};return n.duration=de.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in de.fx.speeds?de.fx.speeds[n.duration]:de.fx.speeds._default,null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){de.isFunction(n.old)&&n.old.call(this),n.queue&&de.dequeue(this,n.queue)},n},de.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},de.timers=[],de.fx=Gt.prototype.init,de.fx.tick=function(){var e,t=de.timers,i=0;for(Mt=de.now();i<t.length;i++)(e=t[i])()||t[i]!==e||t.splice(i--,1);t.length||de.fx.stop(),Mt=y},de.fx.timer=function(e){e()&&de.timers.push(e)&&de.fx.start()},de.fx.interval=13,de.fx.start=function(){kt=kt||setInterval(de.fx.tick,de.fx.interval)},de.fx.stop=function(){clearInterval(kt),kt=null},de.fx.speeds={slow:600,fast:200,_default:400},de.fx.step={},de.expr&&de.expr.filters&&(de.expr.filters.animated=function(t){return de.grep(de.timers,function(e){return t===e.elem}).length}),de.fn.offset=function(t){if(arguments.length)return t===y?this:this.each(function(e){de.offset.setOffset(this,t,e)});var e,i,n={top:0,left:0},r=this[0],o=r&&r.ownerDocument;return o?(e=o.documentElement,de.contains(e,r)?(typeof r.getBoundingClientRect!==B&&(n=r.getBoundingClientRect()),i=Xt(o),{top:n.top+(i.pageYOffset||e.scrollTop)-(e.clientTop||0),left:n.left+(i.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):n):void 0},de.offset={setOffset:function(e,t,i){var n=de.css(e,"position");"static"===n&&(e.style.position="relative");var r,o=de(e),a=o.offset(),s=de.css(e,"top"),l=de.css(e,"left"),u={},c={},h=("absolute"===n||"fixed"===n)&&-1<de.inArray("auto",[s,l])?(r=(c=o.position()).top,c.left):(r=parseFloat(s)||0,parseFloat(l)||0);de.isFunction(t)&&(t=t.call(e,i,a)),null!=t.top&&(u.top=t.top-a.top+r),null!=t.left&&(u.left=t.left-a.left+h),"using"in t?t.using.call(e,u):o.css(u)}},de.fn.extend({position:function(){if(this[0]){var e,t,i={top:0,left:0},n=this[0];return"fixed"===de.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),de.nodeName(e[0],"html")||(i=e.offset()),i.top+=de.css(e[0],"borderTopWidth",!0),i.left+=de.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-de.css(n,"marginTop",!0),left:t.left-i.left-de.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||I.documentElement;e&&!de.nodeName(e,"html")&&"static"===de.css(e,"position");)e=e.offsetParent;return e||I.documentElement})}}),de.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,r){var o=/Y/.test(r);de.fn[t]=function(e){return de.access(this,function(e,t,i){var n=Xt(e);if(i===y)return n?r in n?n[r]:n.document.documentElement[t]:e[t];n?n.scrollTo(o?de(n).scrollLeft():i,o?i:de(n).scrollTop()):e[t]=i},t,e,arguments.length,null)}}),de.each({Height:"height",Width:"width"},function(o,a){de.each({padding:"inner"+o,content:a,"":"outer"+o},function(n,e){de.fn[e]=function(e,t){var i=arguments.length&&(n||"boolean"!=typeof e),r=n||(!0===e||!0===t?"margin":"border");return de.access(this,function(e,t,i){var n;return de.isWindow(e)?e.document.documentElement["client"+o]:9===e.nodeType?(n=e.documentElement,Math.max(e.body["scroll"+o],n["scroll"+o],e.body["offset"+o],n["offset"+o],n["client"+o])):i===y?de.css(e,t,r):de.style(e,t,i,r)},a,i?e:y,i,null)}})}),BI.jQuery=BI.$=de,f.$=f.$||de,f.jQuery=f.jQuery||de,Ut(682).jQuery&&((zt=function(){return de}.apply(Qt,[]))===y||(Kt.exports=zt))}(window)},function(t,e){(function(e){t.exports=e}).call(this,{})},function(e,t){BI.$.extend(BI.$.Event.prototype,{stopEvent:function(){this.stopPropagation(),this.preventDefault()}})},function(e,t){var i;BI.jQuery&&((i=BI.jQuery).fn.insets||(i.fn.insets=function(){var e=this.padding(),t=this.border();return{top:e.top,bottom:e.bottom+t.bottom+t.top,left:e.left,right:e.right+t.right+t.left}}),i.fn.bounds||(i.fn.bounds=function(e){var t={hasIgnoredBounds:!0};return e?(isNaN(e.x)||(t.left=e.x),isNaN(e.y)||(t.top=e.y),null!=e.width&&(t.width=e.width-(this.outerWidth(!0)-this.width()),t.width=0<=t.width?t.width:e.width),null!=e.height&&(t.height=e.height-(this.outerHeight(!0)-this.height()),t.height=0<=t.height?t.height:e.height),this.css(t),this):{x:(t=this.position()).left,y:t.top,width:this.outerWidth(),height:this.outerHeight()}}),BI.extend(BI.jQuery.fn,{destroy:function(){this.remove(),!0===BI.isIE()&&(this[0].outerHTML="")},__textKeywordMarked__:function(e,i,t){if(!BI.isKey(i)||100<(e+"").length)return this.html(BI.htmlEncode(e));i+="",i=BI.toUpperCase(i);var n=(e||"")+"";for(t=(t||BI.makeFirstPY(e,{splitChar:""}))+"",t=BI.toUpperCase(t),this.empty();0<t.length&&0<n.length;){var r=BI.toUpperCase(n).indexOf(i),o=t.indexOf(i);if(0<=o&&(o=(o-Math.floor(o/(n.length+1)))%n.length),0<=r&&(r<o||-1===o))this.append(BI.htmlEncode(n.substr(0,r))),this.append(BI.$("<span>").addClass("bi-keyword-red-mark").html(BI.htmlEncode(n.substr(r,i.length)))),n=n.substr(r+i.length),BI.isNotEmptyString(t)&&(t=BI.map(t.split(""),function(e,t){return t.slice(r+i.length)}).join(""));else{if(!(0<=o)){this.append(BI.htmlEncode(n));break}this.append(BI.htmlEncode(n.substr(0,o))),this.append(BI.$("<span>").addClass("bi-keyword-red-mark").html(BI.htmlEncode(n.substr(o,i.length)))),BI.isNotEmptyString(t)&&(t=BI.map(t.split(""),function(e,t){return t.slice(o+i.length)}).join("")),n=n.substr(o+i.length)}}return this},getDomHeight:function(e){var t=BI.$(this).clone();t.appendTo(BI.$(e||"body"));var i=t.height();return t.remove(),i},hasVerticalScroll:function(){return 0<this.height()&&this[0].clientWidth<this[0].offsetWidth},hasHorizonScroll:function(){return 0<this.width()&&this[0].clientHeight<this[0].offsetHeight},getStyle:function(e){var t=this[0],i=void 0;if(_global.getComputedStyle&&(i=_global.getComputedStyle(t,null)))return i.getPropertyValue(BI.hyphenate(e));if(document.defaultView&&document.defaultView.getComputedStyle){if(i=document.defaultView.getComputedStyle(t,null))return i.getPropertyValue(BI.hyphenate(e));if("display"===e)return"none"}return t.currentStyle?"float"===e?t.currentStyle.cssFloat||t.currentStyle.styleFloat:t.currentStyle[BI.camelize(e)]:t.style&&t.style[BI.camelize(e)]},__isMouseInBounds__:function(e){var t=this.get(0).getBoundingClientRect?this.get(0).getBoundingClientRect():this.offset(),i=t.width||this.outerWidth(),n=t.height||this.outerHeight();return!(e.pageX<Math.floor(t.left)||e.pageX>t.left+i||e.pageY<Math.floor(t.top)||e.pageY>t.top+n)},__hasZIndexMask__:function(e){return e&&null!=this.zIndexMask[e]},__buildZIndexMask__:function(e,t){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var i=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:t});return i.element.css({"z-index":e}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:i,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(i),e&&(this.zIndexMask[e]=i),i.element},__releaseZIndexMask__:function(e){if(e&&this.zIndexMask[e])return BI.remove(this.indexMask,this.zIndexMask[e]),void this.zIndexMask[e].destroy();this.indexMask=this.indexMask||[];var t=this.indexMask.pop();t&&t.destroy()}}))},function(e,t){var r;_.extend(BI,{$import:(r={},function(i,e,t){var n;!function(i,n){var e=BI.$("head script, body script");BI.$.each(e,function(e,t){-1!=t.src.indexOf(i)&&(r[i]=!0)});var t=BI.$("head link");BI.$.each(t,function(e,t){-1!=t.href.indexOf(i)&&n&&(r[i]=!1,BI.$(t).remove())})}(i,t),!0!==r[i]&&("css"===e?((n=document.createElement("link")).rel="stylesheet",n.type="text/css",n.href=i,document.getElementsByTagName("head")[0].appendChild(n),r[i]=!0):BI.$.ajax({url:i,dataType:"script",async:!1,cache:!0,complete:function(e,t){"success"==t&&(r[i]=!0)}}))})})},function(e,t){!function(){var e={on:function(e,t,i){return h(this,"on",e,[t,i])&&t&&(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:i,ctx:i||this})),this},once:function(e,t,i){if(!h(this,"once",e,[t,i])||!t)return this;var n=this,r=_.once(function(){n.off(e,r),t.apply(this,arguments)});return r._callback=t,this.on(e,r,i)},off:function(e,t,i){if(!this._events||!h(this,"off",e,[t,i]))return this;if(!e&&!t&&!i)return this._events=void 0,this;for(var n=e?[e]:_.keys(this._events),r=0,o=n.length;r<o;r++){e=n[r];var a=this._events[e];if(a)if(t||i){for(var s=[],l=0,u=a.length;l<u;l++){var c=a[l];(t&&t!==c.callback&&t!==c.callback._callback||i&&i!==c.context)&&s.push(c)}s.length?this._events[e]=s:delete this._events[e]}else delete this._events[e]}return this},un:function(){this.off.apply(this,arguments)},trigger:function(e){if(!this._events)return this;var t=slice.call(arguments,1);if(!h(this,"trigger",e,t))return this;var i=this._events[e],n=this._events.all;return i&&r(i,t),n&&r(n,arguments),this},fireEvent:function(){this.trigger.apply(this,arguments)},listenTo:function(e,t,i){var n=this._listeningTo||(this._listeningTo={});return i||"object"!=typeof t||(i=this),(n[e._listenId||(e._listenId=_.uniqueId("l"))]=e).on(t,i,this),this},listenToOnce:function(e,t,i){if("object"==typeof t){for(var n in t)this.listenToOnce(e,n,t[n]);return this}if(l.test(t)){for(var r=t.split(l),o=0,a=r.length;o<a;o++)this.listenToOnce(e,r[o],i);return this}if(!i)return this;var s=_.once(function(){this.stopListening(e,t,s),i.apply(this,arguments)});return s._callback=i,this.listenTo(e,t,s)},stopListening:function(e,t,i){var n=this._listeningTo;if(!n)return this;var r=!t&&!i;for(var o in i||"object"!=typeof t||(i=this),e&&((n={})[e._listenId]=e),n)(e=n[o]).off(t,i,this),(r||_.isEmpty(e._events))&&delete this._listeningTo[o];return this}},l=/\s+/,h=function(e,t,i,n){if(!i)return!0;if("object"==typeof i){for(var r in i)e[t].apply(e,[r,i[r]].concat(n));return!1}if(l.test(i)){for(var o=i.split(l),a=0,s=o.length;a<s;a++)e[t].apply(e,[o[a]].concat(n));return!1}return!0},r=function(e,t){var i,n=-1,r=e.length,o=t[0],a=t[1],s=t[2];switch(t.length){case 0:for(;++n<r;)(i=e[n]).callback.call(i.ctx);return;case 1:for(;++n<r;)(i=e[n]).callback.call(i.ctx,o);return;case 2:for(;++n<r;)(i=e[n]).callback.call(i.ctx,o,a);return;case 3:for(;++n<r;)(i=e[n]).callback.call(i.ctx,o,a,s);return;default:for(;++n<r;)(i=e[n]).callback.apply(i.ctx,t);return}},t=BI.Router=function(e){(e=e||{}).routes&&(this.routes=e.routes),this._bindRoutes(),this._init.apply(this,arguments)},i=/\((.*?)\)/g,n=/(\(\?)?:\w+/g,o=/\*\w+/g,a=/[\-{}\[\]+?.,\\\^$|#\s]/g;_.extend(t.prototype,e,{_init:function(){},route:function(i,n,r){_.isRegExp(i)||(i=this._routeToRegExp(i)),_.isFunction(n)&&(r=n,n=""),r=r||this[n];var o=this;return BI.history.route(i,function(e){var t=o._extractParameters(i,e);!1!==o.execute(r,t,n)&&(o.trigger.apply(o,["route:"+n].concat(t)),o.trigger("route",n,t),BI.history.trigger("route",o,n,t))}),this},execute:function(e,t,i){e&&e.apply(this,t)},navigate:function(e,t){return BI.history.navigate(e,t),this},_bindRoutes:function(){if(this.routes){this.routes=_.result(this,"routes");for(var e,t=_.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(a,"\\$&").replace(i,"(?:$1)?").replace(n,function(e,t){return t?e:"([^/?]+)"}).replace(o,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var i=e.exec(t).slice(1);return _.map(i,function(e,t){return t===i.length-1?e||null:e?decodeURIComponent(e):null})}});var s=function(){this.handlers=[],this.checkUrl=_.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=_global.location,this.history=_global.history)},u=/^[#\/]|\s+$/g,c=/^\/+|\/+$/g,p=/#.*$/;s.started=!1,_.extend(s.prototype,e,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=decodeURI(this.location.pathname+this.getSearch()),t=this.root.slice(0,-1);return e.indexOf(t)||(e=e.slice(t.length)),"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._hasPushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(u,"")},start:function(e){if(s.started)throw new Error("BI.history has already been started");if(s.started=!0,this.options=_.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState),this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(c,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}var i,n;this._hasHashChange||!this._wantsHashChange||this._wantsPushState&&this._hasPushState||((i=document.createElement("iframe")).src="javascript:0",i.style.display="none",i.tabIndex=-1,n=document.body,this.iframe=n.insertBefore(i,n.firstChild).contentWindow,this.iframe.document.open().close(),this.iframe.location.hash="#"+this.fragment);var r=_global.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._hasPushState?r("popstate",this.checkUrl,!1):this._wantsHashChange&&this._hasHashChange&&!this.iframe?r("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=_global.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._hasPushState?e("popstate",this.checkUrl,!1):this._wantsHashChange&&this._hasHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe.frameElement),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),s.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();try{t=decodeURIComponent(t)}catch(e){}if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe)),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(t){return t=this.fragment=this.getFragment(t),_.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0})},navigate:function(e,t){if(!s.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var i=this.root;""!==e&&"?"!==e.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+e;if(e=decodeURI(e.replace(p,"")),this.fragment!==e){if(this.fragment=e,this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe)&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,i){var n;i?(n=e.href.replace(/(javascript:|#).*$/,""),e.replace(n+"#"+t)):e.hash="#"+t}}),BI.history=new s}()},function(e,t){!function(p){var e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],d=Array.prototype.slice,g,f;if(p.event.fixHooks){for(var i=e.length;i;){p.event.fixHooks[e[--i]]=p.event.mouseHooks}}var I=p.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener){for(var e=t.length;e;){this.addEventListener(t[--e],n,false)}}else{this.onmousewheel=n}},teardown:function(){if(this.removeEventListener){for(var e=t.length;e;){this.removeEventListener(t[--e],n,false)}}else{this.onmousewheel=null}},settings:{adjustOldDeltas:true,normalizeOffset:true}};function n(e){var t=e||_global.event,i=d.call(arguments,1),n=0,r=0,o=0,a=0,s=0,l=0;e=p.event.fix(t);e.type="mousewheel";if("detail"in t){o=t.detail*-1}if("wheelDelta"in t){o=t.wheelDelta}if("wheelDeltaY"in t){o=t.wheelDeltaY}if("wheelDeltaX"in t){r=t.wheelDeltaX*-1}if("axis"in t&&t.axis===t.HORIZONTAL_AXIS){r=o*-1;o=0}n=o===0?r:o;if("deltaY"in t){o=t.deltaY*-1;n=o}if("deltaX"in t){r=t.deltaX;if(o===0){n=r*-1}}if(o===0&&r===0){return}if(t.deltaMode===1){var u=40;n*=u;o*=u;r*=u}else if(t.deltaMode===2){var c=800;n*=c;o*=c;r*=c}a=Math.max(Math.abs(o),Math.abs(r));if(!f||a<f){f=a;if(E(t,a)){f/=40}}if(E(t,a)){n/=40;r/=40;o/=40}n=Math[n>=1?"floor":"ceil"](n/f);r=Math[r>=1?"floor":"ceil"](r/f);o=Math[o>=1?"floor":"ceil"](o/f);if(I.settings.normalizeOffset&&this.getBoundingClientRect){var h=this.getBoundingClientRect();s=e.clientX-h.left;l=e.clientY-h.top}e.deltaX=r;e.deltaY=o;e.deltaFactor=f;e.offsetX=s;e.offsetY=l;e.deltaMode=0;i.unshift(e,n,r,o);if(g){clearTimeout(g)}g=setTimeout(B,200);return(p.event.dispatch||p.event.handle).apply(this,i)}function B(){f=null}function E(e,t){return I.settings.adjustOldDeltas&&e.type==="mousewheel"&&t%120===0}p.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(BI.jQuery)},function(e,t){BI.TreeView=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this,arguments),{_baseCls:"bi-tree",paras:{selectedValues:{}},itemsCreator:BI.emptyFn})},_init:function(){BI.TreeView.superclass._init.apply(this,arguments);var e=this.options;this._stop=!1,this._createTree(),this.tip=BI.createWidget({type:"bi.loading_bar",invisible:!0,handler:BI.bind(this._loadMore,this)}),BI.createWidget({type:"bi.vertical",scrollable:!0,scrolly:!1,element:this,items:[this.tip]}),BI.isNotNull(e.value)&&this.setSelectedValue(e.value),BI.isIE9Below&&BI.isIE9Below()&&this.element.addClass("hack")},_createTree:function(){this.id="bi-tree"+BI.UUID(),this.nodes&&this.nodes.destroy(),this.tree&&this.tree.destroy(),this.tree=BI.createWidget({type:"bi.layout",element:"<ul id='"+this.id+"' class='ztree'></ul>"}),BI.createWidget({type:"bi.default",element:this.element,items:[this.tree]})},_selectTreeNode:function(e,t){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,t,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,t,this)},_configSetting:function(){var e=this.options.paras,a=this,t={async:{enable:!0,url:function(e,t){var i=a._getParentValues(t);return t.times=t.times||1,"&id="+t.id+"&times="+t.times+++"&parentValues= "+_global.encodeURIComponent(BI.jsonEncode(i))+"&checkState="+_global.encodeURIComponent(BI.jsonEncode(t.getCheckStatus()))},autoParam:["id","name"],otherParam:BI.cjkEncodeDO(e)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:function(e,t){if(t.isAjaxing)return BI.Msg.toast("Please Wait。","warning"),!1;t.children||(t.times=1,l(t,"refresh"));return!0},onAsyncSuccess:function(e,t,i,n){if(i.halfCheck=!1,!n||0===n.length||/^<html>[\s,\S]*<\/html>$/gi.test(n)||a._stop)return;var r=a.nodes,o=i.count||0;i.children.length>o?(i.count=i.children.length,BI.delay(function(){l(i)},s)):(r.updateNode(i),r.selectNode(i.children[0]))},onAsyncError:function(e,t,i,n,r,o){a.nodes;BI.Msg.toast("Error!","warning")},beforeCheck:function(e,t){{var i;!(t.halfCheck=!1)===t.checked&&(function r(e){BI.each(e,function(e,t){!0===t.halfCheck&&(t.halfCheck=!1,r(t.children))})}(t.children),i=a.nodes.getSelectedNodes(),BI.$.each(i,function(e,t){t.halfCheck=!1}))}var n=t.getCheckStatus();!0===n.half&&!0===n.checked&&(t.checked=!1)},onCheck:function(e,t,i){a._selectTreeNode(t,i)},onExpand:function(e,t,i){i.halfCheck=!1},onCollapse:function(e,t,i){},onClick:function(e,t,i){var n=i.checked,r=i.getCheckStatus();!0===r.half&&!0===r.checked&&(n=!1);a.nodes.checkNode(i,!n,!0,!0)}}},s=100;function l(e,t){var i=a.nodes;"refresh"==t&&i.updateNode(e),i.reAsyncChildNodes(e,t,!0)}return t},_getParentValues:function(e){if(!e.getParentNode())return[];var t=e.getParentNode();return this._getParentValues(t).concat([this._getNodeValue(t)])},_getNodeValue:function(e){return null==e.value?BI.replaceAll(e.text.replace(/<[^>]+>/g,""),"&nbsp;"," "):e.value},_getHalfSelectedValues:function(i,e){var t,n,r,o,a,s=this,l=e.getCheckStatus();!1===l.checked&&!1===l.half||(BI.isNotEmptyArray(e.children)&&!0===l.half?(t=e.children,BI.each(t,function(e,t){s._getHalfSelectedValues(i,t)})):(r=(n=e.parentValues||s._getParentValues(e)).concat(this._getNodeValue(e)),BI.isNotEmptyArray(e.children)||!1===l.half?this._buildTree(i,r):(o=BI.deepClone(this.options.paras.selectedValues),a=this._getTree(o,r),this._addTreeNode(i,n,this._getNodeValue(e),a))))},_getTree:function(e,t){var i=e;return BI.any(t,function(e,t){return null==i[t]||void(i=i[t])}),i},_addTreeNode:function(e,t,i,n){var r=e;BI.each(t,function(e,t){null==r[t]&&(r[t]={}),r=r[t]}),r[i]=n},_buildTree:function(e,t){var i=e;BI.each(t,function(e,t){null==i[t]&&(i[t]={}),i=i[t]})},_getSelectedValues:function(){var e,r=this,o={},t=this.nodes.getNodes();return e=t,BI.each(e,function(e,t){var i,n=t.getCheckStatus();!0!==n.checked&&!0!==n.half||(!0===n.half?r._getHalfSelectedValues(o,t):(i=(t.parentValues||r._getParentValues(t)).concat([r._getNodeValue(t)]),r._buildTree(o,i)))}),o},_dealWidthNodes:function(e){var i=this.options,t=BI.Tree.arrayFormat(e);return BI.each(t,function(e,t){t.title=t.title||t.text||t.value,t.isParent=t.isParent||t.parent,BI.isKey(i.paras.keyword)?t.text=BI.$("<div>").__textKeywordMarked__(t.text,i.paras.keyword,t.py).html():t.text=BI.htmlEncode(t.text+"")}),e},_loadMore:function(){var n=this,e=this.options;this.tip.setLoading();var t=BI.extend({},e.paras,{times:++this.times});e.itemsCreator(t,function(e){var t,i;!0!==n._stop&&(t=!!e.hasNext,i=e.items||[],t?n.tip.setLoaded():n.tip.setEnd(),0<i.length&&n.nodes.addNodes(null,n._dealWidthNodes(i)))})},_initTree:function(r){var o=this,e=this.options;o.fireEvent(BI.Events.INIT),this.times=1;var a=this.tree;a.empty(),this.loading(),this.tip.setVisible(!1);var s=BI.extend({},e.paras,{times:1});e.itemsCreator(s,function(e){var t,i,n;!0!==o._stop&&(t=!!e.hasNext,0<(i=e.items||[]).length&&(n=o._dealWidthNodes(i),!0!==o._stop&&(o.nodes=BI.$.fn.zTree.init(a.element,r,n))),o.setTipVisible(i.length<=0),o.loaded(),t?o.tip.setLoaded():o.tip.invisible(),1===s.times&&o.fireEvent(BI.Events.AFTERINIT))})},initTree:function(e,t){t=t||{async:{enable:!1},check:{enable:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=BI.$.fn.zTree.init(this.tree.element,t,e)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(e){delete this.options.keyword,BI.extend(this.options.paras,e);var t=this._configSetting();this._createTree(),this.start(),this._initTree(t)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){return 0<this.nodes.getCheckedNodes(!0).length},checkAll:function(e){this.nodes&&(BI.each(this.nodes.getNodes(),function(e,t){t.halfCheck=!1,function i(e){BI.each(e,function(e,t){t.halfCheck=!1,i(t.children)})}(t.children)}),this.nodes.checkAllNodes(e))},expandAll:function(e){this.nodes&&this.nodes.expandAll(e)},setValue:function(e,t){this.checkAll(!1),this.updateValue(e,t),this.refresh()},setSelectedValue:function(e){this.options.paras.selectedValues=BI.deepClone(e||{})},updateValue:function(e,n){var r;this.nodes&&(n=n||"value",r=this.nodes,BI.each(e,function(e,i){var t=r.getNodesByParam(n,e,null);BI.each(t,function(e,t){BI.extend(t,{checked:!0},i),r.updateNode(t)})}))},refresh:function(){this.nodes&&this.nodes.refresh()},getValue:function(){return this.nodes?this._getSelectedValues():null},destroyed:function(){this.stop(),this.nodes&&this.nodes.destroy()}}),BI.extend(BI.TreeView,{REQ_TYPE_INIT_DATA:1,REQ_TYPE_ADJUST_DATA:2,REQ_TYPE_SELECT_DATA:3,REQ_TYPE_GET_SELECTED_DATA:4}),BI.TreeView.EVENT_CHANGE="EVENT_CHANGE",BI.TreeView.EVENT_INIT=BI.Events.INIT,BI.TreeView.EVENT_AFTERINIT=BI.Events.AFTERINIT,BI.shortcut("bi.tree_view",BI.TreeView)},function(e,t){BI.AsyncTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.AsyncTree.superclass._init.apply(this,arguments);var t=this;this.service=new BI.TreeRenderPageService({subNodeListGetter:function(e){return BI.$("#"+t.id+" #"+e+"_ul")}})},_configSetting:function(){var e=this.options.paras,n=this;return{async:{enable:!1,otherParam:BI.cjkEncodeDO(e)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeCheck:function(e,t){{var i;!(t.halfCheck=!1)===t.checked&&(function r(e){BI.each(e,function(e,t){t.halfCheck=!1,r(t.children)})}(t.children),i=BI.$.fn.zTree.getZTreeObj(e).getSelectedNodes(),BI.each(i,function(e,t){t.halfCheck=!1}))}var n=t.getCheckStatus();!0===n.half&&!0===n.checked&&(t.checked=!1)},onCheck:function(e,t,i){n._selectTreeNode(t,i)},beforeExpand:function(e,t){n._beforeExpandNode(e,t)},onExpand:function(e,t,i){i.halfCheck=!1},onCollapse:function(e,t,i){i.halfCheck=!1},onClick:function(e,t,i){var n=BI.$.fn.zTree.getZTreeObj(t),r=i.checked,o=i.getCheckStatus();!0===o.half&&!0===o.checked&&(r=!1);n.checkNode(i,!r,!0,!0)}}}},_selectTreeNode:function(e,t){this.options;var i=BI.deepClone(t.parentValues||this._getParentValues(t)),n=this._getNodeValue(t);if(!0===t.checked)this._addTreeNode(this.options.paras.selectedValues,i,n,{});else{var r=t,o=this._getTree(this.options.paras.selectedValues,i);for(BI.isNotNull(o[n])&&delete o[n];null!=r&&BI.isEmpty(o);)i=i.slice(0,i.length-1),null!=(r=r.getParentNode())&&delete(o=this._getTree(this.options.paras.selectedValues,i))[n=this._getNodeValue(r)];this.options.paras.selectedValues=this._getJoinValue()}BI.AsyncTree.superclass._selectTreeNode.apply(this,arguments)},_beforeExpandNode:function(e,r){var o=this,n=this.options,a=function(e){var t,i,n=e.items||[];0<n.length&&(t=o._dealWidthNodes(n),i=!!e.hasNext,o.nodes.addNodes(r,t),i?o.service.pushNodeList(r.tId,s):o.service.removeNodeList(r.tId))};function s(e){e=e||{};var t=r.parentValues||o._getParentValues(r),i=BI.extend({},n.paras,{id:r.id,times:e.times,parentValues:t.concat(o._getNodeValue(r)),checkState:r.getCheckStatus()},e);n.itemsCreator(i,a)}var t=r.getCheckStatus();r.children||setTimeout(function(){s({times:1,checkState:t})},17)},_join:function(e,t){var o=this,a={};function s(i,n,r){BI.each(n,function(e,t){BI.isNull(r[e])||BI.isEmpty(r[e])?o._addTreeNode(a,i,e,t):s(i.concat([e]),n[e],r[e])})}return s([],e,t),s([],t,e),a},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.AsyncTree.superclass.hasChecked.apply(this,arguments)},_getJoinValue:function(){if(!this.nodes)return{};var e=this._getSelectedValues();return BI.isEmpty(e)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?e:this._join(e,this.options.paras.selectedValues)},getValue:function(){return this._getJoinValue()},stroke:function(e){delete this.options.keyword,this.service.clear(),BI.extend(this.options.paras,e);var t=this._configSetting();this._initTree(t)}}),BI.shortcut("bi.async_tree",BI.AsyncTree)},function(e,t){BI.PartTree=BI.inherit(BI.AsyncTree,{_defaultConfig:function(){return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.PartTree.superclass._init.apply(this,arguments)},_loadMore:function(){var n=this,r=this.options,e=BI.extend({},r.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),r.itemsCreator(e,function(e){var t=!!e.hasNext,i=e.items||[];r.paras.lastSearchValue=e.lastSearchValue,!0!==n._stop&&(t?n.tip.setLoaded():n.tip.setEnd(),0<i.length&&n.nodes.addNodes(null,n._dealWidthNodes(i)))})},_selectTreeNode:function(e,t){var i=this,n=this.options,r=BI.deepClone(t.parentValues||i._getParentValues(t)),o=this._getNodeValue(t);if(!0===t.checked)this.options.paras.selectedValues=this._getUnionValue(),n.itemsCreator(BI.extend({},n.paras,{type:BI.TreeView.REQ_TYPE_ADJUST_DATA,curSelectedValue:o,parentValues:r}),function(e){i.options.paras.selectedValues=e,BI.AsyncTree.superclass._selectTreeNode.apply(i,arguments)});else{for(var a=this.options.paras.selectedValues,s=r.concat(o),l=0,u=s.length;l<u;l++){if(null==(a=a[s[l]]))return;if(BI.isEmpty(a))break}n.itemsCreator(BI.extend({},n.paras,{type:BI.TreeView.REQ_TYPE_SELECT_DATA,notSelectedValue:o,parentValues:r}),function(e){i.options.paras.selectedValues=e,BI.AsyncTree.superclass._selectTreeNode.apply(i,arguments)})}},_getSelectedValues:function(){var o=this,a={};return function s(e){BI.each(e,function(e,t){var i=t.getCheckStatus();if(!1===i.checked)return!0;var n=t.parentValues||o._getParentValues(t),r=n.concat([o._getNodeValue(t)]);if(o._buildTree(a,r),BI.isNotEmptyArray(t.children))return s(t.children),!0;!0===i.half&&o._getHalfSelectedValues(a,t)})}(this.nodes.getNodes()),a},_initTree:function(n,r){var o=this,a=this.options;this.times=1;var s=this.tree;s.empty(),o.tip.setVisible(!1),this.loading();var e=BI.extend({},a.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:this.times}),t=function(e){var t,i;!0!==o._stop&&r==a.paras.keyword&&(t=!!e.hasNext,i=e.items||[],a.paras.lastSearchValue=e.lastSearchValue,function(e){if(!0===o._stop)return;o.nodes=BI.$.fn.zTree.init(s.element,n,e)}(0<i.length?o._dealWidthNodes(i):[]),o.setTipVisible(i.length<=0),o.loaded(),t?o.tip.setLoaded():o.tip.invisible(),o.fireEvent(BI.Events.AFTERINIT))};BI.delay(function(){a.itemsCreator(e,t)},100)},getValue:function(){return BI.deepClone(this.options.paras.selectedValues||{})},_getUnionValue:function(){if(!this.nodes)return{};var e=this._getSelectedValues();return BI.isEmpty(e)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?e:this._union(e,this.options.paras.selectedValues)},_union:function(e,t){var o=this,a={};function s(i,n,r){BI.each(n,function(e,t){BI.isNull(r[e])?o._addTreeNode(a,i,e,t):BI.isEmpty(r[e])?o._addTreeNode(a,i,e,{}):s(i.concat([e]),n[e],r[e])})}return s([],e,t),s([],t,e),a},stroke:function(e){var t=this.options;delete t.paras.keyword,BI.extend(t.paras,e),delete t.paras.lastSearchValue;var i=this._configSetting();this._initTree(i,t.paras.keyword)}}),BI.shortcut("bi.part_tree",BI.PartTree)},function(e,t){BI.ListTreeView=BI.inherit(BI.TreeView,{_constants:{SPLIT:"<|>"},_defaultConfig:function(){return BI.extend(BI.ListTreeView.superclass._defaultConfig.apply(this,arguments),{value:{}})},_init:function(){BI.ListTreeView.superclass._init.apply(this,arguments);var e=this.options;BI.isNotNull(e.value)&&this.setSelectedValue(e.value)},_configSetting:function(){this.options.paras;var o=this;return{async:{enable:!1},check:{enable:!0,chkboxType:{Y:"",N:""}},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{onCheck:function(e,t,i){o._selectTreeNode(t,i)},onClick:function(e,t,i){var n=BI.$.fn.zTree.getZTreeObj(t),r=i.checked;o._checkValue(i,!r),n.checkNode(i,!r,!0,!0)}}}},_selectTreeNode:function(e,t){this._checkValue(t,t.checked),BI.ListTreeView.superclass._selectTreeNode.apply(this,arguments)},_transArrayToMap:function(e){var n=this,r={};return BI.each(e,function(e,t){var i=t.join(n._constants.SPLIT);r[i]=!0}),r},_transMapToArray:function(e){var i=this,n=[];return BI.each(e,function(e){var t=e.split(i._constants.SPLIT);n.push(t)}),n},_checkValue:function(e,t){var i=BI.concat(this._getParentValues(e),this._getNodeValue(e)).join(this._constants.SPLIT);t?this.storeValue[i]=!0:delete this.storeValue[i]},setSelectedValue:function(e){this.options.paras.selectedValues=e||[],this.storeValue=this._transArrayToMap(e)},getValue:function(){return this._transMapToArray(this.storeValue)}}),BI.shortcut("bi.list_tree_view",BI.ListTreeView)},function(e,t){BI.ListAsyncTree=BI.inherit(BI.ListTreeView,{_defaultConfig:function(){return BI.extend(BI.ListAsyncTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ListAsyncTree.superclass._init.apply(this,arguments)},_configSetting:function(){var e=this.options.paras,o=this;return{async:{enable:!1,otherParam:BI.cjkEncodeDO(e)},check:{enable:!0,chkboxType:{Y:"",N:""}},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{onCheck:function(e,t,i){o._selectTreeNode(t,i)},beforeExpand:function(e,t){o._beforeExpandNode(e,t)},beforeCheck:function(e,t){t.half=!1},onClick:function(e,t,i){var n=BI.$.fn.zTree.getZTreeObj(t),r=i.checked;o._checkValue(i,!r),n.checkNode(i,!r,!0,!0)}}}},_beforeExpandNode:function(e,r){var o=this,a=this.options,t=r.parentValues||o._getParentValues(r),s=BI.extend({},a.paras,{id:r.id,times:1,parentValues:t.concat(this._getNodeValue(r))}),l=function(e){var t,i,n=e.items||[];0<n.length&&(t=o._dealWidthNodes(n),i=!!e.hasNext,o.nodes.addNodes(r,t),!0===i&&BI.delay(function(){u++,s.times=u,a.itemsCreator(s,l)},100))},u=1;r.children||setTimeout(function(){a.itemsCreator(s,l)},17)},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.ListAsyncTree.superclass.hasChecked.apply(this,arguments)},stroke:function(e){delete this.options.keyword,BI.extend(this.options.paras,e);var t=this._configSetting();this._initTree(t)}}),BI.shortcut("bi.list_async_tree",BI.ListAsyncTree)},function(e,t){BI.ListPartTree=BI.inherit(BI.ListAsyncTree,{_defaultConfig:function(){return BI.extend(BI.ListPartTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ListPartTree.superclass._init.apply(this,arguments)},_loadMore:function(){var n=this,r=this.options,e=BI.extend({},r.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),r.itemsCreator(e,function(e){var t=!!e.hasNext,i=e.items||[];r.paras.lastSearchValue=e.lastSearchValue,!0!==n._stop&&(t?n.tip.setLoaded():n.tip.setEnd(),0<i.length&&n.nodes.addNodes(null,n._dealWidthNodes(i)))})},_initTree:function(n,r){var o=this,a=this.options;this.times=1;var s=this.tree;s.empty(),o.tip.setVisible(!1),this.loading();var e=BI.extend({},a.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:this.times}),t=function(e){var t,i;!0!==o._stop&&r==a.paras.keyword&&(t=!!e.hasNext,i=e.items||[],a.paras.lastSearchValue=e.lastSearchValue,function(e){if(!0===o._stop)return;o.nodes=BI.$.fn.zTree.init(s.element,n,e)}(0<i.length?o._dealWidthNodes(i):[]),o.setTipVisible(i.length<=0),o.loaded(),t?o.tip.setLoaded():o.tip.invisible(),o.fireEvent(BI.Events.AFTERINIT))};BI.delay(function(){a.itemsCreator(e,t)},100)},stroke:function(e){var t=this.options;delete t.paras.keyword,BI.extend(t.paras,e),delete t.paras.lastSearchValue;var i=this._configSetting();this._initTree(i,t.paras.keyword)}}),BI.shortcut("bi.list_part_tree",BI.ListPartTree)},function(module,exports){!function(document){var F=(Gid=function(e){return this[e]},function(e){var t=e.files||[e];return t.item||(t.item=Gid),t}),Gid,event={add:document.addEventListener?function(e,t,i){return e.addEventListener(t,i,!1),this}:function(e,t,i){return e.attachEvent("on"+t,i),this},del:document.removeEventListener?function(e,t,i){return e.removeEventListener(t,i,!1),this}:function(e,t,i){return e.detachEvent("on"+t,i),this},stop:function(e){return e?(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,e.preventDefault?e.preventDefault():e.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(e,t,i){return"--".concat(e,CRLF,'Content-Disposition: form-data; name="',t,'"; filename="',_global.encodeURIComponent(i.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,i.getAsBinary(),CRLF,"--",e,"--",CRLF)},isFunction=function(e){return"[object Function]"===toString.call(e)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile,sendFile=xhr.upload||xhr.sendAsBinary?function(i,e,t,n){if(!(-1<e&&e<i.file.fileSize)){for(var r,o=new XMLHttpRequest,a=o.upload||{addEventListener:function(e,t){this["on"+e]=t}},s=0;s<length;s++)a.addEventListener(split[s].substring(2),function(t){return function(e){isFunction(i[t])&&i[t](e,o)}}(split[s]),!1);a.addEventListener("load",function(e){!1===i.onreadystatechange?isFunction(i.onload)&&i.onload(e,o):setTimeout(function(){4===o.readyState?isFunction(i.onload)&&i.onload(e,o):setTimeout(arguments.callee,15)},15)},!1),o.open("post",i.url+"&filename="+_global.encodeURIComponent(i.file.fileName),!0),o.upload?(o.onreadystatechange=function(){switch(o.readyState){case 4:var e=BI.jsonDecode(o.responseText);-1!=i.file.type.indexOf("image")&&(e.attach_type="image"),e.filename=i.file.fileName,1==i.maxlength?i.attach_array[0]=e:i.attach_array.push(e)}},isFunction(a.onloadstart)&&a.onloadstart()):((r={loaded:0,total:i.file.fileSize||i.file.size,simulation:!0}).interval=setInterval(function(){r.loaded+=256,r.total<=r.loaded&&(r.loaded=r.total),a.onprogress(r)},100),o.onabort=function(){a.onabort({})},o.onerror=function(){a.onerror({})},o.onreadystatechange=function(){switch(o.readyState){case 2:case 3:r.total<=r.loaded&&(r.loaded=r.total),a.onprogress(r);break;case 4:var e;clearInterval(r.interval),r.interval=0,r.loaded=r.total,a.onprogress(r),199<o.status&&o.status<400?(a.onload({}),(e=BI.jsonDecode(o.responseText)).filename=i.file.fileName,-1!=i.file.type.indexOf("image")&&(e.attach_type="image"),i.attach_array.push(e)):a.onerror({})}},a.onloadstart(r));var l,u="AjaxUploadBoundary"+(new Date).getTime();return o.setRequestHeader("Content-Type","multipart/form-data; boundary="+u),i.file.getAsBinary?o[o.sendAsBinary?"sendAsBinary":"send"](multipart(u,i.name,i.file)):(o.setRequestHeader("Content-Type","multipart/form-data"),(l=new FormData).append("FileData",i.file),o.send(l)),i}isFunction(i.onerror)&&i.onerror()}:function(handler,maxSize,width,height){var url=handler.url.concat(-1===handler.url.indexOf("?")?"?":"&","AjaxUploadFrame=true"),rpe={loaded:1,total:100,simulation:!0,interval:setInterval(function(){rpe.loaded<rpe.total&&++rpe.loaded,isFunction(handler.onprogress)&&handler.onprogress(rpe,{})},100)},onload=function(){iframe.onreadystatechange=iframe.onload=iframe.onerror=null,form.parentNode.removeChild(form),form=null,clearInterval(rpe.interval);try{var e=(iframe.contentWindow.document||iframe.contentWindow.contentDocument).body.innerHTML,t=BI.jsonDecode(e);-1!=handler.file.type.indexOf("image")&&(t.attach_type="image");try{t.filename=_global.decodeURIComponent(handler.file.fileName)}catch(i){t.filename=handler.file.fileName}1==handler.maxlength?handler.attach_array[0]=t:handler.attach_array.push(t)}catch(i){isFunction(handler.onerror)&&handler.onerror(rpe,event||_global.event)}isFunction(handler.onload)&&handler.onload(rpe,{responseText:e})},target=["AjaxUpload",(new Date).getTime(),String(Math.random()).substring(2)].join("_");try{var form=document.createElement('<form enctype="multipart/form-data"></form>'),iframe=handler.iframe||(handler.iframe=document.createElement('<iframe id="'+target+'" name="'+target+'" src="'+url+'"></iframe>'))}catch(e){var form=document.createElement("form"),iframe=handler.iframe||(handler.iframe=document.createElement("iframe"));form.setAttribute("enctype","multipart/form-data"),iframe.setAttribute("name",iframe.id=target),iframe.setAttribute("src",url)}with(iframe.style.position="absolute",iframe.style.left=iframe.style.top="-10000px",iframe.onload=onload,iframe.onerror=function(e){isFunction(handler.onerror)&&handler.onerror(rpe,e||_global.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loaded<rpe.total&&++rpe.loaded,handler.onloadprogress(rpe,{readyState:{loading:2,interactive:3,loaded:4,complete:4}[iframe.readyState]||1}))},form.setAttribute("action",handler.url+"&filename="+_global.encodeURIComponent(handler.file.fileName)),form.setAttribute("target",iframe.id),form.setAttribute("method","post"),form.appendChild(handler.file),form.style.display="none",isFunction(handler.onloadstart)&&handler.onloadstart(rpe,{}),document.body||document.documentElement)appendChild(iframe),appendChild(form),form.submit();return handler},xhr=null;return sendFile}(Object.prototype.toString),sendFiles=function(n,r,o,a){var s=n.files.length,l=n.onload,u=n.onloadstart;for(n.current=0,n.total=0,n.sent=0;n.current<s;)n.total+=n.files[n.current].fileSize||n.files[n.current].size,n.current++;return n.current=0,s&&-1!==n.files[0].fileSize?(n.file=n.files[n.current],sendFile(n,r,o,a).onload=function(e,t){n.onloadstart=null,n.sent+=n.files[n.current].fileSize||n.files[n.current].size,++n.current<s?(n.file=n.files[n.current],sendFile(n,r,o,a).onload=arguments.callee):l&&(n.onloadstart=u,n.onload=l,n.onload(e,t))}):s&&(n.total=100*s,n.file=n.files[n.current],sendFile(n,r,o,a).onload=function(e,t){var i=arguments.callee;n.onloadstart=null,n.sent+=100,++n.current<s?(/\b(chrome|safari)\b/i.test(navigator.userAgent)&&(n.iframe.parentNode.removeChild(n.iframe),n.iframe=null),setTimeout(function(){n.file=n.files[n.current],sendFile(n,r,o,a).onload=i},15)):l&&setTimeout(function(){n.iframe.parentNode.removeChild(n.iframe),n.iframe=null,n.onloadstart=u,n.onload=l,n.onload(e,t)},15)}),n};BI.File=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.File.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-file display-block",tagName:"input",attributes:{type:"file"},name:"",url:"",multiple:!0,accept:"",maxSize:-1})},_init:function(){var e=this.options;BI.File.superclass._init.apply(this,arguments),!0===e.multiple&&this.element.attr("multiple","multiple"),this.element.attr("name",e.name||this.getName()),this.element.attr("title",e.title||"")},created:function(){var n=this,e=this.options,r=this.wrap=this._wrap(this.element[0],e.maxSize);r.onloadstart=function(e,t){n.fireEvent(BI.File.EVENT_UPLOADSTART,arguments)},r.onprogress=function(e,t){-1!==this.file.fileSize&&e.simulation,n.fireEvent(BI.File.EVENT_PROGRESS,{file:this.file,total:e.total,loaded:e.loaded,simulation:e.simulation})},r.onerror=function(){n.fireEvent(BI.File.EVENT_ERROR)},r.onload=function(e,t){var i=this;setTimeout(function(){return i.clean(),i.hide(),t.status<200||399<t.status?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void n.fireEvent(BI.File.EVENT_ERROR)):void(BI.some(r.attach_array,function(e,t){if(t.errorCode)return BI.Msg.toast(t.errorMsg,{level:"error"}),n.fireEvent(BI.File.EVENT_ERROR,t),!0})||n.fireEvent(BI.File.EVENT_UPLOADED))},1e3)},r.url=e.url,r.fileType=e.accept,r.attach_array=[],r.attach_names=[],r.attachNum=0},_events:function(l){var u=this;return event.add(l.dom.input,"change",function(){event.del(l.dom.input,"change",arguments.callee);for(var e=l.dom.input.cloneNode(!0),t=0,i=F(l.dom.input);t<i.length;t++){var n=i.item(t),r=n.value||n.name,o=n.fileName||(n.fileName=r.split("\\").pop()),a=-1!==o.indexOf(".")?o.split(".").pop().toLowerCase():"unknown",s=n.fileSize||n.size;l.fileType&&-1===l.fileType.indexOf("*."+a)?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error"),{level:"error"}),u.fireEvent(BI.File.EVENT_ERROR,{errorType:0,file:n})):-1!==l.maxSize&&s&&l.maxSize<s?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error"),{level:"error"}),u.fireEvent(BI.File.EVENT_ERROR,{errorType:1,file:n})):l.files.unshift(n)}0<l.files.length&&u.fireEvent(BI.File.EVENT_CHANGE,{files:l.files}),e.value="",l.dom.input.parentNode.replaceChild(e,l.dom.input),l.dom.input=e,event.add(l.dom.input,"change",arguments.callee)}),l},_wrap:function(){var e=this.options,t=this.element[0];return!0===e.multiple&&this.element.attr("multiple","multiple"),t.value="",this._events({dom:{input:t,disabled:!1},name:t.name,maxSize:e.maxSize?e.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(e){if(e)for(var t in e)this[t]=e[t];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(e,t,i,n){this.dom.disabled||(this.dom.disabled=!0,this.dom.input.setAttribute("disabled","disabled"))}})},select:function(){this.wrap&&BI.Widget._renderEngine.createElement(this.wrap.dom.input).click()},upload:function(e){this.wrap&&this.wrap.upload(e)},getValue:function(){return this.wrap?this.wrap.attach_array:[]},reset:function(){this.wrap&&(this.wrap.attach_array=[],this.wrap.attach_names=[],this.wrap.attachNum=0)},_setEnable:function(e){BI.File.superclass._setEnable.apply(this,arguments),!0===e?this.element.attr("disabled","disabled"):this.element.removeAttr("disabled")}}),BI.File.EVENT_CHANGE="EVENT_CHANGE",BI.File.EVENT_UPLOADSTART="EVENT_UPLOADSTART",BI.File.EVENT_ERROR="EVENT_ERROR",BI.File.EVENT_PROGRESS="EVENT_PROGRESS",BI.File.EVENT_UPLOADED="EVENT_UPLOADED",BI.shortcut("bi.file",BI.File)}(_global.document||{})},function(module,exports){!function($){var settings={},roots={},caches={},_consts={className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_setting={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},_initRoot=function(e){var t=data.getRoot(e);t||(t={},data.setRoot(e,t)),t[e.data.key.children]=[],t.expandTriggerFlag=!1,t.curSelectedList=[],t.noSelection=!0,t.createdNodes=[],t.zId=0,t._ver=(new Date).getTime()},_initCache=function(e){var t=data.getCache(e);t||(t={},data.setCache(e,t)),t.nodes=[],t.doms=[]},_bindEvent=function(a){var e=a.treeObj,t=consts.event;e.bind(t.NODECREATED,function(e,t,i){tools.apply(a.callback.onNodeCreated,[e,t,i])}),e.bind(t.CLICK,function(e,t,i,n,r){tools.apply(a.callback.onClick,[t,i,n,r])}),e.bind(t.EXPAND,function(e,t,i){tools.apply(a.callback.onExpand,[e,t,i])}),e.bind(t.COLLAPSE,function(e,t,i){tools.apply(a.callback.onCollapse,[e,t,i])}),e.bind(t.ASYNC_SUCCESS,function(e,t,i,n){tools.apply(a.callback.onAsyncSuccess,[e,t,i,n])}),e.bind(t.ASYNC_ERROR,function(e,t,i,n,r,o){tools.apply(a.callback.onAsyncError,[e,t,i,n,r,o])}),e.bind(t.REMOVE,function(e,t,i){tools.apply(a.callback.onRemove,[e,t,i])}),e.bind(t.SELECTED,function(e,t,i,n){tools.apply(a.callback.onSelected,[t,i,n])}),e.bind(t.UNSELECTED,function(e,t,i,n){tools.apply(a.callback.onUnSelected,[t,i,n])})},_unbindEvent=function(e){var t=e.treeObj,i=consts.event;t.unbind(i.NODECREATED).unbind(i.CLICK).unbind(i.EXPAND).unbind(i.COLLAPSE).unbind(i.ASYNC_SUCCESS).unbind(i.ASYNC_ERROR).unbind(i.REMOVE).unbind(i.SELECTED).unbind(i.UNSELECTED)},_eventProxy=function(e){var t=e.target,i=data.getSetting(e.data.treeId),n="",r=null,o="",a="",s=null,l=null,u=null;if(tools.eqs(e.type,"mousedown")?a="mousedown":tools.eqs(e.type,"mouseup")?a="mouseup":tools.eqs(e.type,"contextmenu")?a="contextmenu":tools.eqs(e.type,"click")?tools.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+consts.id.SWITCH)?(n=tools.getNodeMainDom(t).id,o="switchNode"):(u=tools.getMDom(i,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(n=tools.getNodeMainDom(u).id,o="clickNode"):tools.eqs(e.type,"dblclick")&&(a="dblclick",(u=tools.getMDom(i,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(n=tools.getNodeMainDom(u).id,o="switchNode")),0<a.length&&0==n.length&&(u=tools.getMDom(i,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(n=tools.getNodeMainDom(u).id),0<n.length)switch(r=data.getNodeCache(i,n),o){case"switchNode":r.isParent&&(tools.eqs(e.type,"click")||tools.eqs(e.type,"dblclick")&&tools.apply(i.view.dblClickExpand,[i.treeId,r],i.view.dblClickExpand))?s=handler.onSwitchNode:o="";break;case"clickNode":s=handler.onClickNode}switch(a){case"mousedown":l=handler.onZTreeMousedown;break;case"mouseup":l=handler.onZTreeMouseup;break;case"dblclick":l=handler.onZTreeDblclick;break;case"contextmenu":l=handler.onZTreeContextmenu}return{stop:!1,node:r,nodeEventType:o,nodeEventCallback:s,treeEventType:a,treeEventCallback:l}},_initNode=function(e,t,i,n,r,o,a){var s,l;i&&(s=data.getRoot(e),l=e.data.key.children,i.level=t,i.tId=e.treeId+"_"+ ++s.zId,i.parentTId=n?n.tId:null,i.open="string"==typeof i.open?tools.eqs(i.open,"true"):!!i.open,i[l]&&0<i[l].length?(i.isParent=!0,i.zAsync=!0):(i.isParent="string"==typeof i.isParent?tools.eqs(i.isParent,"true"):!!i.isParent,i.open=!(!i.isParent||e.async.enable)&&i.open,i.zAsync=!i.isParent),i.isFirstNode=r,i.isLastNode=o,i.getParentNode=function(){return data.getNodeCache(e,i.parentTId)},i.getPreNode=function(){return data.getPreNode(e,i)},i.getNextNode=function(){return data.getNextNode(e,i)},i.isAjaxing=!1,data.fixPIdKeyValue(e,i))},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(e,t){data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=t},getNodeCacheId:function(e){return e.substring(e.lastIndexOf("_")+1)},addAfterA:function(e){_init.afterA.push(e)},addBeforeA:function(e){_init.beforeA.push(e)},addInnerAfterA:function(e){_init.innerAfterA.push(e)},addInnerBeforeA:function(e){_init.innerBeforeA.push(e)},addInitBind:function(e){_init.bind.push(e)},addInitUnBind:function(e){_init.unbind.push(e)},addInitCache:function(e){_init.caches.push(e)},addInitNode:function(e){_init.nodes.push(e)},addInitProxy:function(e,t){t?_init.proxys.splice(0,0,e):_init.proxys.push(e)},addInitRoot:function(e){_init.roots.push(e)},addNodesData:function(e,t,i){var n=e.data.key.children;t[n]||(t[n]=[]),0<t[n].length&&(t[n][t[n].length-1].isLastNode=!1,view.setNodeLineIcos(e,t[n][t[n].length-1])),t.isParent=!0,t[n]=t[n].concat(i)},addSelectedNode:function(e,t){var i=data.getRoot(e);data.isSelectedNode(e,t)||i.curSelectedList.push(t)},addCreatedNode:function(e,t){(e.callback.onNodeCreated||e.view.addDiyDom)&&data.getRoot(e).createdNodes.push(t)},addZTreeTools:function(e){_init.zTreeTools.push(e)},exSetting:function(e){$.extend(!0,_setting,e)},fixPIdKeyValue:function(e,t){e.data.simpleData.enable&&(t[e.data.simpleData.pIdKey]=t.parentTId?t.getParentNode()[e.data.simpleData.idKey]:e.data.simpleData.rootPId)},getAfterA:function(e,t,i){for(var n=0,r=_init.afterA.length;n<r;n++)_init.afterA[n].apply(this,arguments)},getBeforeA:function(e,t,i){for(var n=0,r=_init.beforeA.length;n<r;n++)_init.beforeA[n].apply(this,arguments)},getInnerAfterA:function(e,t,i){for(var n=0,r=_init.innerAfterA.length;n<r;n++)_init.innerAfterA[n].apply(this,arguments)},getInnerBeforeA:function(e,t,i){for(var n=0,r=_init.innerBeforeA.length;n<r;n++)_init.innerBeforeA[n].apply(this,arguments)},getCache:function(e){return caches[e.treeId]},getNextNode:function(e,t){if(!t)return null;for(var i=e.data.key.children,n=t.parentTId?t.getParentNode():data.getRoot(e),r=0,o=n[i].length-1;r<=o;r++)if(n[i][r]===t)return r==o?null:n[i][r+1];return null},getNodeByParam:function(e,t,i,n){if(!t||!i)return null;for(var r=e.data.key.children,o=0,a=t.length;o<a;o++){if(t[o][i]==n)return t[o];var s=data.getNodeByParam(e,t[o][r],i,n);if(s)return s}return null},getNodeCache:function(e,t){if(!t)return null;var i=caches[e.treeId].nodes[data.getNodeCacheId(t)];return i||null},getNodeName:function(e,t){return""+t[e.data.key.name]},getNodeTitle:function(e,t){return""+t[""===e.data.key.title?e.data.key.name:e.data.key.title]},getNodes:function(e){return data.getRoot(e)[e.data.key.children]},getNodesByParam:function(e,t,i,n){if(!t||!i)return[];for(var r=e.data.key.children,o=[],a=0,s=t.length;a<s;a++)t[a][i]==n&&o.push(t[a]),o=o.concat(data.getNodesByParam(e,t[a][r],i,n));return o},getNodesByParamFuzzy:function(e,t,i,n){if(!t||!i)return[];var r=e.data.key.children,o=[];n=n.toLowerCase();for(var a=0,s=t.length;a<s;a++)"string"==typeof t[a][i]&&-1<t[a][i].toLowerCase().indexOf(n)&&o.push(t[a]),o=o.concat(data.getNodesByParamFuzzy(e,t[a][r],i,n));return o},getNodesByFilter:function(e,t,i,n,r){if(!t)return n?null:[];for(var o=e.data.key.children,a=n?null:[],s=0,l=t.length;s<l;s++){if(tools.apply(i,[t[s],r],!1)){if(n)return t[s];a.push(t[s])}var u=data.getNodesByFilter(e,t[s][o],i,n,r);if(n&&u)return u;a=n?u:a.concat(u)}return a},getPreNode:function(e,t){if(!t)return null;for(var i=e.data.key.children,n=t.parentTId?t.getParentNode():data.getRoot(e),r=0,o=n[i].length;r<o;r++)if(n[i][r]===t)return 0==r?null:n[i][r-1];return null},getRoot:function(e){return e?roots[e.treeId]:null},getRoots:function(){return roots},getSetting:function(e){return settings[e]},getSettings:function(){return settings},getZTreeTools:function(e){var t=this.getRoot(this.getSetting(e));return t?t.treeTools:null},initCache:function(e){for(var t=0,i=_init.caches.length;t<i;t++)_init.caches[t].apply(this,arguments)},initNode:function(e,t,i,n,r,o){for(var a=0,s=_init.nodes.length;a<s;a++)_init.nodes[a].apply(this,arguments)},initRoot:function(e){for(var t=0,i=_init.roots.length;t<i;t++)_init.roots[t].apply(this,arguments)},isSelectedNode:function(e,t){for(var i=data.getRoot(e),n=0,r=i.curSelectedList.length;n<r;n++)if(t===i.curSelectedList[n])return!0;return!1},removeNodeCache:function(e,t){var i=e.data.key.children;if(t[i])for(var n=0,r=t[i].length;n<r;n++)arguments.callee(e,t[i][n]);data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=null},removeSelectedNode:function(e,t){for(var i=data.getRoot(e),n=0,r=i.curSelectedList.length;n<r;n++)t!==i.curSelectedList[n]&&data.getNodeCache(e,i.curSelectedList[n].tId)||(i.curSelectedList.splice(n,1),n--,r--)},setCache:function(e,t){caches[e.treeId]=t},setRoot:function(e,t){roots[e.treeId]=t},setZTreeTools:function(e,t){for(var i=0,n=_init.zTreeTools.length;i<n;i++)_init.zTreeTools[i].apply(this,arguments)},transformToArrayFormat:function(e,t){if(!t)return[];var i=e.data.key.children,n=[];if(tools.isArray(t))for(var r=0,o=t.length;r<o;r++)n.push(t[r]),t[r][i]&&(n=n.concat(data.transformToArrayFormat(e,t[r][i])));else n.push(t),t[i]&&(n=n.concat(data.transformToArrayFormat(e,t[i])));return n},transformTozTreeFormat:function(e,t){var i=e.data.simpleData.idKey,n=e.data.simpleData.pIdKey,r=e.data.key.children;if(!i||""==i||!t)return[];if(tools.isArray(t)){for(var o=[],a={},s=0,l=t.length;s<l;s++)a[t[s][i]]=t[s];for(s=0,l=t.length;s<l;s++)a[t[s][n]]&&t[s][i]!=t[s][n]?(a[t[s][n]][r]||(a[t[s][n]][r]=[]),a[t[s][n]][r].push(t[s])):o.push(t[s]);return o}return[t]}},event={bindEvent:function(e){for(var t=0,i=_init.bind.length;t<i;t++)_init.bind[t].apply(this,arguments)},unbindEvent:function(e){for(var t=0,i=_init.unbind.length;t<i;t++)_init.unbind[t].apply(this,arguments)},bindTree:function(e){var t={treeId:e.treeId},i=e.treeObj;e.view.txtSelectedEnable||i.bind("selectstart",function(e){var t=e.originalEvent.srcElement.nodeName.toLowerCase();return"input"===t||"textarea"===t}).css({"-moz-user-select":"-moz-none"}),i.bind("click",t,event.proxy),i.bind("dblclick",t,event.proxy),i.bind("mouseover",t,event.proxy),i.bind("mouseout",t,event.proxy),i.bind("mousedown",t,event.proxy),i.bind("mouseup",t,event.proxy),i.bind("contextmenu",t,event.proxy)},unbindTree:function(e){e.treeObj.unbind("click",event.proxy).unbind("dblclick",event.proxy).unbind("mouseover",event.proxy).unbind("mouseout",event.proxy).unbind("mousedown",event.proxy).unbind("mouseup",event.proxy).unbind("contextmenu",event.proxy)},doProxy:function(e){for(var t=[],i=0,n=_init.proxys.length;i<n;i++){var r=_init.proxys[i].apply(this,arguments);if(t.push(r),r.stop)break}return t},proxy:function(e){var t=data.getSetting(e.data.treeId);if(!tools.uCanDo(t,e))return!0;for(var i=event.doProxy(e),n=!0,r=0,o=i.length;r<o;r++){var a=i[r];a.nodeEventCallback&&(n=a.nodeEventCallback.apply(a,[e,a.node])&&n),a.treeEventCallback&&(n=a.treeEventCallback.apply(a,[e,a.node])&&n)}return n}},handler={onSwitchNode:function(e,t){var i=data.getSetting(e.data.treeId);if(t.open){if(0==tools.apply(i.callback.beforeCollapse,[i.treeId,t],!0))return!0;data.getRoot(i).expandTriggerFlag=!0,view.switchNode(i,t)}else{if(0==tools.apply(i.callback.beforeExpand,[i.treeId,t],!0))return!0;data.getRoot(i).expandTriggerFlag=!0,view.switchNode(i,t)}return!0},onClickNode:function(e,t){var i=data.getSetting(e.data.treeId),n=i.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&data.isSelectedNode(i,t)?0:i.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&i.view.selectedMulti?2:1;return 0==tools.apply(i.callback.beforeClick,[i.treeId,t,n],!0)||(0==n?view.cancelPreSelectedNode(i,t):view.selectNode(i,t,2==n),i.treeObj.trigger(consts.event.CLICK,[e,i.treeId,t,n])),!0},onZTreeMousedown:function(e,t){var i=data.getSetting(e.data.treeId);return tools.apply(i.callback.beforeMouseDown,[i.treeId,t],!0)&&tools.apply(i.callback.onMouseDown,[e,i.treeId,t]),!0},onZTreeMouseup:function(e,t){var i=data.getSetting(e.data.treeId);return tools.apply(i.callback.beforeMouseUp,[i.treeId,t],!0)&&tools.apply(i.callback.onMouseUp,[e,i.treeId,t]),!0},onZTreeDblclick:function(e,t){var i=data.getSetting(e.data.treeId);return tools.apply(i.callback.beforeDblClick,[i.treeId,t],!0)&&tools.apply(i.callback.onDblClick,[e,i.treeId,t]),!0},onZTreeContextmenu:function(e,t){var i=data.getSetting(e.data.treeId);return tools.apply(i.callback.beforeRightClick,[i.treeId,t],!0)&&tools.apply(i.callback.onRightClick,[e,i.treeId,t]),"function"!=typeof i.callback.onRightClick}},tools={apply:function(e,t,i){return"function"==typeof e?e.apply(zt,t||[]):i},canAsync:function(e,t){var i=e.data.key.children;return e.async.enable&&t&&t.isParent&&!(t.zAsync||t[i]&&0<t[i].length)},clone:function(e){if(null===e)return null;var t=tools.isArray(e)?[]:{};for(var i in e)t[i]=e[i]instanceof Date?new Date(e[i].getTime()):"object"==typeof e[i]?arguments.callee(e[i]):e[i];return t},eqs:function(e,t){return e.toLowerCase()===t.toLowerCase()},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},$:function(e,t,i){return t&&"string"!=typeof t&&(i=t,t=""),"string"==typeof e?$(e,i?i.treeObj.get(0).ownerDocument:null):$("#"+e.tId+t,i?i.treeObj:null)},getMDom:function(e,t,i){if(!t)return null;for(;t&&t.id!==e.treeId;){for(var n=0,r=i.length;t.tagName&&n<r;n++)if(tools.eqs(t.tagName,i[n].tagName)&&null!==t.getAttribute(i[n].attrName))return t;t=t.parentNode}return null},getNodeMainDom:function(e){return $(e).parent("li").get(0)||$(e).parentsUntil("li").parent().get(0)},isChildOrSelf:function(e,t){return 0<$(e).closest("#"+t).length},uCanDo:function(e,t){return!0}},view={addNodes:function(e,t,i,n){var r,o,a;e.data.keep.leaf&&t&&!t.isParent||(tools.isArray(i)||(i=[i]),e.data.simpleData.enable&&(i=data.transformTozTreeFormat(e,i)),t?(r=$$(t,consts.id.SWITCH,e),o=$$(t,consts.id.ICON,e),a=$$(t,consts.id.UL,e),t.open||(view.replaceSwitchClass(t,r,consts.folder.CLOSE),view.replaceIcoClass(t,o,consts.folder.CLOSE),t.open=!1,a.css({display:"none"})),data.addNodesData(e,t,i),view.createNodes(e,t.level+1,i,t),n||view.expandCollapseParentNode(e,t,!0)):(data.addNodesData(e,data.getRoot(e),i),view.createNodes(e,0,i,null)))},appendNodes:function(e,t,i,n,r,o){if(!i)return[];for(var a=[],s=e.data.key.children,l=0,u=i.length;l<u;l++){var c,h,p=i[l];r&&(c=(n||data.getRoot(e))[s].length==i.length&&0==l,h=l==i.length-1,data.initNode(e,t,p,n,c,h,o),data.addNodeCache(e,p));var d=[];p[s]&&0<p[s].length&&(d=view.appendNodes(e,t+1,p[s],p,r,o&&p.open)),o&&(view.makeDOMNodeMainBefore(a,e,p),view.makeDOMNodeLine(a,e,p),data.getBeforeA(e,p,a),view.makeDOMNodeNameBefore(a,e,p),data.getInnerBeforeA(e,p,a),view.makeDOMNodeIcon(a,e,p),data.getInnerAfterA(e,p,a),view.makeDOMNodeNameAfter(a,e,p),data.getAfterA(e,p,a),p.isParent&&p.open&&view.makeUlHtml(e,p,a,d.join("")),view.makeDOMNodeMainAfter(a,e,p),data.addCreatedNode(e,p))}return a},appendParentULDom:function(e,t){var i=[],n=$$(t,e);!n.get(0)&&t.parentTId&&(view.appendParentULDom(e,t.getParentNode()),n=$$(t,e));var r=$$(t,consts.id.UL,e);r.get(0)&&r.remove();var o=e.data.key.children,a=view.appendNodes(e,t.level+1,t[o],t,!1,!0);view.makeUlHtml(e,t,i,a.join("")),n.append(i.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l,icoObj;if(node&&!node.isParent)return tools.apply(callback),!1;if(node&&node.isAjaxing)return!1;if(0==tools.apply(setting.callback.beforeAsync,[setting.treeId,node],!0))return tools.apply(callback),!1;node&&(node.isAjaxing=!0,icoObj=$$(node,consts.id.ICON,setting),icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING}));for(var tmpParam={},i=0,l=setting.async.autoParam.length;node&&i<l;i++){var pKey=setting.async.autoParam[i].split("="),spKey=pKey;1<pKey.length&&(spKey=pKey[1],pKey=pKey[0]),tmpParam[spKey]=node[pKey]}if(tools.isArray(setting.async.otherParam))for(i=0,l=setting.async.otherParam.length;i<l;i+=2)tmpParam[setting.async.otherParam[i]]=setting.async.otherParam[i+1];else for(var p in setting.async.otherParam)tmpParam[p]=setting.async.otherParam[p];var _tmpV=data.getRoot(setting)._ver;return $.ajax({contentType:setting.async.contentType,cache:!1,type:setting.async.type,url:tools.apply(setting.async.url,[setting.treeId,node],setting.async.url),data:tmpParam,dataType:setting.async.dataType,success:function(msg){if(_tmpV==data.getRoot(setting)._ver){var newNodes=[];try{newNodes=msg&&0!=msg.length?"string"==typeof msg?eval("("+msg+")"):msg:[]}catch(err){newNodes=msg}node&&(node.isAjaxing=null,node.zAsync=!0),view.setNodeLineIcos(setting,node),newNodes&&""!==newNodes?(newNodes=tools.apply(setting.async.dataFilter,[setting.treeId,node,newNodes],newNodes),view.addNodes(setting,node,newNodes?tools.clone(newNodes):[],!!isSilent)):view.addNodes(setting,node,[],!!isSilent),setting.treeObj.trigger(consts.event.ASYNC_SUCCESS,[setting.treeId,node,msg]),tools.apply(callback)}},error:function(e,t,i){_tmpV==data.getRoot(setting)._ver&&(node&&(node.isAjaxing=null),view.setNodeLineIcos(setting,node),setting.treeObj.trigger(consts.event.ASYNC_ERROR,[setting.treeId,node,e,t,i]))}}),!0},cancelPreSelectedNode:function(e,t,i){for(var n,r=data.getRoot(e).curSelectedList,o=r.length-1;0<=o;o--)if(t===(n=r[o])||!t&&(!i||i!==n)){if($$(n,consts.id.A,e).removeClass(consts.node.CURSELECTED),t){data.removeSelectedNode(e,t),e.treeObj.trigger(consts.event.UNSELECTED,[event,e.treeId,n]);break}r.splice(o,1),e.treeObj.trigger(consts.event.UNSELECTED,[event,e.treeId,n])}},createNodeCallback:function(e){if(e.callback.onNodeCreated||e.view.addDiyDom)for(var t=data.getRoot(e);0<t.createdNodes.length;){var i=t.createdNodes.shift();tools.apply(e.view.addDiyDom,[e.treeId,i]),e.callback.onNodeCreated&&e.treeObj.trigger(consts.event.NODECREATED,[e.treeId,i])}},createNodes:function(e,t,i,n){var r,o,a,s,l;i&&0!=i.length&&(r=data.getRoot(e),o=e.data.key.children,a=!n||n.open||!!$$(n[o][0],e).get(0),r.createdNodes=[],s=view.appendNodes(e,t,i,n,!0,a),n?(l=$$(n,consts.id.UL,e)).get(0)&&l.append(s.join("")):e.treeObj.append(s.join("")),view.createNodeCallback(e))},destroy:function(e){e&&(data.initCache(e),data.initRoot(e),event.unbindTree(e),event.unbindEvent(e),e.treeObj.empty(),delete settings[e.treeId])},expandCollapseNode:function(e,t,i,n,r){var o,a,s,l,u=data.getRoot(e),c=e.data.key.children;t?(u.expandTriggerFlag&&(o=r,r=function(){o&&o(),t.open?e.treeObj.trigger(consts.event.EXPAND,[e.treeId,t]):e.treeObj.trigger(consts.event.COLLAPSE,[e.treeId,t])},u.expandTriggerFlag=!1),!t.open&&t.isParent&&(!$$(t,consts.id.UL,e).get(0)||t[c]&&0<t[c].length&&!$$(t[c][0],e).get(0))&&(view.appendParentULDom(e,t),view.createNodeCallback(e)),t.open!=i?(a=$$(t,consts.id.UL,e),s=$$(t,consts.id.SWITCH,e),l=$$(t,consts.id.ICON,e),t.isParent?(t.open=!t.open,t.iconOpen&&t.iconClose&&l.attr("style",view.makeNodeIcoStyle(e,t)),t.open?(view.replaceSwitchClass(t,s,consts.folder.OPEN),view.replaceIcoClass(t,l,consts.folder.OPEN),0!=n&&""!=e.view.expandSpeed&&t[c]&&0<t[c].length?a.slideDown(e.view.expandSpeed,r):(a.show(),tools.apply(r,[]))):(view.replaceSwitchClass(t,s,consts.folder.CLOSE),view.replaceIcoClass(t,l,consts.folder.CLOSE),0!=n&&""!=e.view.expandSpeed&&t[c]&&0<t[c].length?a.slideUp(e.view.expandSpeed,r):(a.hide(),tools.apply(r,[])))):tools.apply(r,[])):tools.apply(r,[])):tools.apply(r,[])},expandCollapseParentNode:function(e,t,i,n,r){t&&(t.parentTId?(view.expandCollapseNode(e,t,i,n),t.parentTId&&view.expandCollapseParentNode(e,t.getParentNode(),i,n,r)):view.expandCollapseNode(e,t,i,n,r))},expandCollapseSonNode:function(e,t,i,n,r){var o=data.getRoot(e),a=e.data.key.children,s=t?t[a]:o[a],l=!t&&n,u=data.getRoot(e).expandTriggerFlag;if(data.getRoot(e).expandTriggerFlag=!1,s)for(var c=0,h=s.length;c<h;c++)s[c]&&view.expandCollapseSonNode(e,s[c],i,l);data.getRoot(e).expandTriggerFlag=u,view.expandCollapseNode(e,t,i,n,r)},isSelectedNode:function(e,t){if(!t)return!1;for(var i=data.getRoot(e).curSelectedList,n=i.length-1;0<=n;n--)if(t===i[n])return!0;return!1},makeDOMNodeIcon:function(e,t,i){var n=data.getNodeName(t,i),r=t.view.nameIsHTML?n:n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");e.push("<span id='",i.tId,consts.id.ICON,"' title='' treeNode",consts.id.ICON," class='",view.makeNodeIcoClass(t,i),"' style='",view.makeNodeIcoStyle(t,i),"'></span><span id='",i.tId,consts.id.SPAN,"'>",r,"</span>")},makeDOMNodeLine:function(e,t,i){e.push("<span id='",i.tId,consts.id.SWITCH,"' title='' class='",view.makeNodeLineClass(t,i),"' treeNode",consts.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(e,t,i){e.push("</li>")},makeDOMNodeMainBefore:function(e,t,i){e.push("<li id='",i.tId,"' class='",consts.className.LEVEL,i.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(e,t,i){e.push("</a>")},makeDOMNodeNameBefore:function(e,t,i){var n=data.getNodeTitle(t,i),r=view.makeNodeUrl(t,i),o=view.makeNodeFontCss(t,i),a=[];for(var s in o)a.push(s,":",o[s],";");e.push("<a id='",i.tId,consts.id.A,"' class='",consts.className.LEVEL,i.level,"' treeNode",consts.id.A,' onclick="',i.click||"",'" ',null!=r&&0<r.length?"href='"+r+"'":""," target='",view.makeNodeTarget(i),"' style='",a.join(""),"'"),tools.apply(t.view.showTitle,[t.treeId,i],t.view.showTitle)&&n&&e.push("title='",n.replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'"),e.push(">")},makeNodeFontCss:function(e,t){var i=tools.apply(e.view.fontCss,[e.treeId,t],e.view.fontCss);return i&&"function"!=typeof i?i:{}},makeNodeIcoClass:function(e,t){var i=["ico"];return t.isAjaxing||(i[0]=(t.iconSkin?t.iconSkin+"_":"")+i[0],t.isParent?i.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):i.push(consts.folder.DOCU)),consts.className.BUTTON+" "+i.join("_")},makeNodeIcoStyle:function(e,t){var i,n=[];return t.isAjaxing||((i=t.isParent&&t.iconOpen&&t.iconClose?t.open?t.iconOpen:t.iconClose:t.icon)&&n.push("background:url(",i,") 0 0 no-repeat;"),0!=e.view.showIcon&&tools.apply(e.view.showIcon,[e.treeId,t],!0)||n.push("width:0px;height:0px;")),n.join("")},makeNodeLineClass:function(e,t){var i=[];return e.view.showLine?0==t.level&&t.isFirstNode&&t.isLastNode?i.push(consts.line.ROOT):0==t.level&&t.isFirstNode?i.push(consts.line.ROOTS):t.isLastNode?i.push(consts.line.BOTTOM):i.push(consts.line.CENTER):i.push(consts.line.NOLINE),t.isParent?i.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):i.push(consts.folder.DOCU),view.makeNodeLineClassEx(t)+i.join("_")},makeNodeLineClassEx:function(e){return consts.className.BUTTON+" "+consts.className.LEVEL+e.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(e){return e.target||"_blank"},makeNodeUrl:function(e,t){var i=e.data.key.url;return t[i]?t[i]:null},makeUlHtml:function(e,t,i,n){i.push("<ul id='",t.tId,consts.id.UL,"' class='",consts.className.LEVEL,t.level," ",view.makeUlLineClass(e,t),"' style='display:",t.open?"block":"none","'>"),i.push(n),i.push("</ul>")},makeUlLineClass:function(e,t){return e.view.showLine&&!t.isLastNode?consts.line.LINE:""},removeChildNodes:function(e,t){if(t){var i=e.data.key.children,n=t[i];if(n){for(var r,o,a=0,s=n.length;a<s;a++)data.removeNodeCache(e,n[a]);data.removeSelectedNode(e),delete t[i],e.data.keep.parent?$$(t,consts.id.UL,e).empty():(t.isParent=!1,t.open=!1,r=$$(t,consts.id.SWITCH,e),o=$$(t,consts.id.ICON,e),view.replaceSwitchClass(t,r,consts.folder.DOCU),view.replaceIcoClass(t,o,consts.folder.DOCU),$$(t,consts.id.UL,e).remove())}}},setFirstNode:function(e,t){var i=e.data.key.children;0<t[i].length&&(t[i][0].isFirstNode=!0)},setLastNode:function(e,t){var i=e.data.key.children,n=t[i].length;0<n&&(t[i][n-1].isLastNode=!0)},removeNode:function(e,t){var i=data.getRoot(e),n=e.data.key.children,r=t.parentTId?t.getParentNode():i;if(t.isFirstNode=!1,t.isLastNode=!1,t.getPreNode=function(){return null},t.getNextNode=function(){return null},data.getNodeCache(e,t.tId)){$$(t,e).remove(),data.removeNodeCache(e,t),data.removeSelectedNode(e,t);for(var o=0,a=r[n].length;o<a;o++)if(r[n][o].tId==t.tId){r[n].splice(o,1);break}view.setFirstNode(e,r),view.setLastNode(e,r);var s,l,u,c,h,p=r[n].length;e.data.keep.parent||0!=p?e.view.showLine&&0<p&&(s=r[n][p-1],u=$$(s,consts.id.UL,e),c=$$(s,consts.id.SWITCH,e),h=$$(s,consts.id.ICON,e),r==i?1==r[n].length?view.replaceSwitchClass(s,c,consts.line.ROOT):(l=$$(r[n][0],consts.id.SWITCH,e),view.replaceSwitchClass(r[n][0],l,consts.line.ROOTS),view.replaceSwitchClass(s,c,consts.line.BOTTOM)):view.replaceSwitchClass(s,c,consts.line.BOTTOM),u.removeClass(consts.line.LINE)):(r.isParent=!1,r.open=!1,u=$$(r,consts.id.UL,e),c=$$(r,consts.id.SWITCH,e),h=$$(r,consts.id.ICON,e),view.replaceSwitchClass(r,c,consts.folder.DOCU),view.replaceIcoClass(r,h,consts.folder.DOCU),u.css("display","none"))}},replaceIcoClass:function(e,t,i){if(t&&!e.isAjaxing){var n=t.attr("class");if(n!=undefined){var r=n.split("_");switch(i){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:r[r.length-1]=i}t.attr("class",r.join("_"))}}},replaceSwitchClass:function(e,t,i){if(t){var n=t.attr("class");if(n!=undefined){var r=n.split("_");switch(i){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:r[0]=view.makeNodeLineClassEx(e)+i;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:r[1]=i}t.attr("class",r.join("_")),i!==consts.folder.DOCU?t.removeAttr("disabled"):t.attr("disabled","disabled")}}},selectNode:function(e,t,i){i||view.cancelPreSelectedNode(e,null,t),$$(t,consts.id.A,e).addClass(consts.node.CURSELECTED),data.addSelectedNode(e,t),e.treeObj.trigger(consts.event.SELECTED,[event,e.treeId,t])},setNodeFontCss:function(e,t){var i=$$(t,consts.id.A,e),n=view.makeNodeFontCss(e,t);n&&i.css(n)},setNodeLineIcos:function(e,t){var i,n,r,o;t&&(i=$$(t,consts.id.SWITCH,e),n=$$(t,consts.id.UL,e),r=$$(t,consts.id.ICON,e),0==(o=view.makeUlLineClass(e,t)).length?n.removeClass(consts.line.LINE):n.addClass(o),i.attr("class",view.makeNodeLineClass(e,t)),t.isParent?i.removeAttr("disabled"):i.attr("disabled","disabled"),r.removeAttr("style"),r.attr("style",view.makeNodeIcoStyle(e,t)),r.attr("class",view.makeNodeIcoClass(e,t)))},setNodeName:function(e,t){var i=data.getNodeTitle(e,t),n=$$(t,consts.id.SPAN,e);n.empty(),e.view.nameIsHTML?n.html(data.getNodeName(e,t)):n.text(data.getNodeName(e,t)),tools.apply(e.view.showTitle,[e.treeId,t],e.view.showTitle)&&$$(t,consts.id.A,e).attr("title",i||"")},setNodeTarget:function(e,t){$$(t,consts.id.A,e).attr("target",view.makeNodeTarget(t))},setNodeUrl:function(e,t){var i=$$(t,consts.id.A,e),n=view.makeNodeUrl(e,t);null==n||0==n.length?i.removeAttr("href"):i.attr("href",n)},switchNode:function(e,t){if(t.open||!tools.canAsync(e,t))view.expandCollapseNode(e,t,!t.open);else if(e.async.enable){if(!view.asyncNode(e,t))return void view.expandCollapseNode(e,t,!t.open)}else t&&view.expandCollapseNode(e,t,!t.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(e){var t=data.getZTreeTools(e);return t||null},destroy:function(e){if(e&&0<e.length)view.destroy(data.getSetting(e));else for(var t in settings)view.destroy(settings[t])},init:function(e,t,i){var s=tools.clone(_setting);$.extend(!0,s,t),s.treeId=e.attr("id"),s.treeObj=e,s.treeObj.empty(),settings[s.treeId]=s,"undefined"==typeof document.body.style.maxHeight&&(s.view.expandSpeed=""),data.initRoot(s);var n=data.getRoot(s),r=s.data.key.children;i=i?tools.clone(tools.isArray(i)?i:[i]):[],s.data.simpleData.enable?n[r]=data.transformTozTreeFormat(s,i):n[r]=i,data.initCache(s),event.unbindTree(s),event.bindTree(s),event.unbindEvent(s),event.bindEvent(s);var o={setting:s,addNodes:function(e,t,i){if(!t)return null;if((e=e||null)&&!e.isParent&&s.data.keep.leaf)return null;var n=tools.clone(tools.isArray(t)?t:[t]);function r(){view.addNodes(s,e,n,1==i)}return tools.canAsync(s,e)?view.asyncNode(s,e,i,r):r(),n},cancelSelectedNode:function(e){view.cancelPreSelectedNode(s,e)},destroy:function(){view.destroy(s)},expandAll:function(e){return e=!!e,view.expandCollapseSonNode(s,null,e,!0),e},expandNode:function(t,e,i,n,r){if(!t||!t.isParent)return null;if(!0!==e&&!1!==e&&(e=!t.open),(r=!!r)&&e&&0==tools.apply(s.callback.beforeExpand,[s.treeId,t],!0))return null;if(r&&!e&&0==tools.apply(s.callback.beforeCollapse,[s.treeId,t],!0))return null;if(e&&t.parentTId&&view.expandCollapseParentNode(s,t.getParentNode(),e,!1),e===t.open&&!i)return null;if(data.getRoot(s).expandTriggerFlag=r,!tools.canAsync(s,t)&&i)view.expandCollapseSonNode(s,t,e,!0,function(){if(!1!==n)try{$$(t,s).focus().blur()}catch(e){}});else if(t.open=!e,view.switchNode(this.setting,t),!1!==n)try{$$(t,s).focus().blur()}catch(o){}return e},getNodes:function(){return data.getNodes(s)},getNodeByParam:function(e,t,i){return e?data.getNodeByParam(s,i?i[s.data.key.children]:data.getNodes(s),e,t):null},getNodeByTId:function(e){return data.getNodeCache(s,e)},getNodesByParam:function(e,t,i){return e?data.getNodesByParam(s,i?i[s.data.key.children]:data.getNodes(s),e,t):null},getNodesByParamFuzzy:function(e,t,i){return e?data.getNodesByParamFuzzy(s,i?i[s.data.key.children]:data.getNodes(s),e,t):null},getNodesByFilter:function(e,t,i,n){return t=!!t,e&&"function"==typeof e?data.getNodesByFilter(s,i?i[s.data.key.children]:data.getNodes(s),e,t,n):t?null:[]},getNodeIndex:function(e){if(!e)return null;for(var t=s.data.key.children,i=e.parentTId?e.getParentNode():data.getRoot(s),n=0,r=i[t].length;n<r;n++)if(i[t][n]==e)return n;return-1},getSelectedNodes:function(){for(var e=[],t=data.getRoot(s).curSelectedList,i=0,n=t.length;i<n;i++)e.push(t[i]);return e},isSelectedNode:function(e){return data.isSelectedNode(s,e)},reAsyncChildNodes:function(e,t,i){if(this.setting.async.enable){var n=!e;if(n&&(e=data.getRoot(s)),"refresh"==t){for(var r=this.setting.data.key.children,o=0,a=e[r]?e[r].length:0;o<a;o++)data.removeNodeCache(s,e[r][o]);data.removeSelectedNode(s),e[r]=[],n?this.setting.treeObj.empty():$$(e,consts.id.UL,s).empty()}view.asyncNode(this.setting,n?null:e,!!i)}},refresh:function(){this.setting.treeObj.empty();var e=data.getRoot(s),t=e[s.data.key.children];data.initRoot(s),e[s.data.key.children]=t,data.initCache(s),view.createNodes(s,0,e[s.data.key.children])},removeChildNodes:function(e){if(!e)return null;var t=e[s.data.key.children];return view.removeChildNodes(s,e),t||null},removeNode:function(e,t){e&&((t=!!t)&&0==tools.apply(s.callback.beforeRemove,[s.treeId,e],!0)||(view.removeNode(s,e),t&&this.setting.treeObj.trigger(consts.event.REMOVE,[s.treeId,e])))},selectNode:function(t,e){if(t&&tools.uCanDo(s)){if(e=s.view.selectedMulti&&e,t.parentTId)view.expandCollapseParentNode(s,t.getParentNode(),!0,!1,function(){try{$$(t,s).focus().blur()}catch(e){}});else try{$$(t,s).focus().blur()}catch(i){}view.selectNode(s,t,e)}},transformTozTreeNodes:function(e){return data.transformTozTreeFormat(s,e)},transformToArray:function(e){return data.transformToArrayFormat(s,e)},updateNode:function(e,t){e&&$$(e,s).get(0)&&tools.uCanDo(s)&&(view.setNodeName(s,e),view.setNodeTarget(s,e),view.setNodeUrl(s,e),view.setNodeLineIcos(s,e),view.setNodeFontCss(s,e))}};return n.treeTools=o,data.setZTreeTools(s,o),n[r]&&0<n[r].length?view.createNodes(s,0,n[r]):s.async.enable&&s.async.url&&""!==s.async.url&&view.asyncNode(s),o}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(BI.jQuery)},function(e,t){!function(e){var t={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},i={check:{enable:!1,autoCheckTrigger:!1,chkStyle:t.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:t.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},s={onCheckNode:function(e,t){if(!0===t.chkDisabled)return!1;var i=d.getSetting(e.data.treeId),n=i.data.key.checked;if(0==l.apply(i.callback.beforeCheck,[i.treeId,t],!0))return!0;t[n]=!t[n],p.checkNodeRelation(i,t);var r=g(t,h.id.CHECK,i);return p.setChkClass(i,r,t),p.repairParentChkClassWithSelf(i,t),i.treeObj.trigger(h.event.CHECK,[e,i.treeId,t]),!0},onMouseoverCheck:function(e,t){if(!0===t.chkDisabled)return!1;var i=d.getSetting(e.data.treeId),n=g(t,h.id.CHECK,i);return t.check_Focus=!0,p.setChkClass(i,n,t),!0},onMouseoutCheck:function(e,t){if(!0===t.chkDisabled)return!1;var i=d.getSetting(e.data.treeId),n=g(t,h.id.CHECK,i);return t.check_Focus=!1,p.setChkClass(i,n,t),!0}},n={tools:{},view:{checkNodeRelation:function(e,t){var i,n=e.data.key.children,r=e.data.key.checked,o=h.radio;if(e.check.chkStyle==o.STYLE){var a=d.getRadioCheckedList(e);if(t[r])if(e.check.radioType==o.TYPE_ALL){for(l=a.length-1;0<=l;l--)(i=a[l])[r]&&i!=t&&(i[r]=!1,a.splice(l,1),p.setChkClass(e,g(i,h.id.CHECK,e),i),i.parentTId!=t.parentTId&&p.repairParentChkClassWithSelf(e,i));a.push(t)}else for(var s=t.parentTId?t.getParentNode():d.getRoot(e),l=0,u=s[n].length;l<u;l++)(i=s[n][l])[r]&&i!=t&&(i[r]=!1,p.setChkClass(e,g(i,h.id.CHECK,e),i));else if(e.check.radioType==o.TYPE_ALL)for(l=0,u=a.length;l<u;l++)if(t==a[l]){a.splice(l,1);break}}else t[r]&&(!t[n]||0==t[n].length||-1<e.check.chkboxType.Y.indexOf("s"))&&p.setSonNodeCheckBox(e,t,!0),t[r]||t[n]&&0!=t[n].length&&!(-1<e.check.chkboxType.N.indexOf("s"))||p.setSonNodeCheckBox(e,t,!1),t[r]&&-1<e.check.chkboxType.Y.indexOf("p")&&p.setParentNodeCheckBox(e,t,!0),!t[r]&&-1<e.check.chkboxType.N.indexOf("p")&&p.setParentNodeCheckBox(e,t,!1)},makeChkClass:function(e,t){var i=e.data.key.checked,n=h.checkbox,r=h.radio,o=e.check.chkboxType,a=""===o.Y&&""===o.N;fullStyle="",fullStyle=!0===t.chkDisabled?n.DISABLED:t.halfCheck?n.PART:e.check.chkStyle==r.STYLE?t.check_Child_State<1?n.FULL:n.PART:t[i]?2===t.check_Child_State||-1===t.check_Child_State||a?n.FULL:n.PART:t.check_Child_State<1||a?n.FULL:n.PART;var s=e.check.chkStyle+"_"+(t[i]?n.TRUE:n.FALSE)+"_"+fullStyle,s=t.check_Focus&&!0!==t.chkDisabled?s+"_"+n.FOCUS:s;return h.className.BUTTON+" "+n.DEFAULT+" "+s},repairAllChk:function(e,t){if(e.check.enable&&e.check.chkStyle===h.checkbox.STYLE)for(var i=e.data.key.checked,n=e.data.key.children,r=d.getRoot(e),o=0,a=r[n].length;o<a;o++){var s=r[n][o];!0!==s.nocheck&&!0!==s.chkDisabled&&(s[i]=t),p.setSonNodeCheckBox(e,s,t)}},repairChkClass:function(e,t){var i;t&&(d.makeChkFlag(e,t),!0!==t.nocheck&&(i=g(t,h.id.CHECK,e),p.setChkClass(e,i,t)))},repairParentChkClass:function(e,t){var i;t&&t.parentTId&&(i=t.getParentNode(),p.repairChkClass(e,i),p.repairParentChkClass(e,i))},repairParentChkClassWithSelf:function(e,t){var i;t&&(t[i=e.data.key.children]&&0<t[i].length?p.repairParentChkClass(e,t[i][0]):p.repairParentChkClass(e,t))},repairSonChkDisabled:function(e,t,i,n){if(t){var r=e.data.key.children;if(t.chkDisabled!=i&&(t.chkDisabled=i),p.repairChkClass(e,t),t[r]&&n)for(var o=0,a=t[r].length;o<a;o++){var s=t[r][o];p.repairSonChkDisabled(e,s,i,n)}}},repairParentChkDisabled:function(e,t,i,n){t&&(t.chkDisabled!=i&&n&&(t.chkDisabled=i),p.repairChkClass(e,t),p.repairParentChkDisabled(e,t.getParentNode(),i,n))},setChkClass:function(e,t,i){t&&(!0===i.nocheck?t.hide():t.show(),t.attr("class",p.makeChkClass(e,i)))},setParentNodeCheckBox:function(e,t,i,n){var r=e.data.key.children,o=e.data.key.checked,a=g(t,h.id.CHECK,e);if(n=n||t,d.makeChkFlag(e,t),!0!==t.nocheck&&!0!==t.chkDisabled&&(t[o]=i,p.setChkClass(e,a,t),e.check.autoCheckTrigger&&t!=n&&e.treeObj.trigger(h.event.CHECK,[null,e.treeId,t])),t.parentTId){var s=!0;if(!i)for(var l=t.getParentNode()[r],u=0,c=l.length;u<c;u++)if(!0!==l[u].nocheck&&!0!==l[u].chkDisabled&&l[u][o]||(!0===l[u].nocheck||!0===l[u].chkDisabled)&&0<l[u].check_Child_State){s=!1;break}s&&p.setParentNodeCheckBox(e,t.getParentNode(),i,n)}},setSonNodeCheckBox:function(e,t,i,n){if(t){var r=e.data.key.children,o=e.data.key.checked,a=g(t,h.id.CHECK,e);n=n||t;var s=!1;if(t[r])for(var l=0,u=t[r].length;l<u&&!0!==t.chkDisabled;l++){var c=t[r][l];p.setSonNodeCheckBox(e,c,i,n),!0===c.chkDisabled&&(s=!0)}t!=d.getRoot(e)&&!0!==t.chkDisabled&&(s&&!0!==t.nocheck&&d.makeChkFlag(e,t),!0!==t.nocheck&&!0!==t.chkDisabled?(t[o]=i,s||(t.check_Child_State=t[r]&&0<t[r].length?i?2:0:-1)):t.check_Child_State=-1,p.setChkClass(e,a,t),e.check.autoCheckTrigger&&t!=n&&!0!==t.nocheck&&!0!==t.chkDisabled&&e.treeObj.trigger(h.event.CHECK,[null,e.treeId,t]))}}},event:{},data:{getRadioCheckedList:function(e){for(var t=d.getRoot(e).radioCheckedList,i=0,n=t.length;i<n;i++)d.getNodeCache(e,t[i].tId)||(t.splice(i,1),i--,n--);return t},getCheckStatus:function(e,t){if(!e.check.enable||t.nocheck||t.chkDisabled)return null;var i=e.data.key.checked;return{checked:t[i],half:t.halfCheck?t.halfCheck:e.check.chkStyle==h.radio.STYLE?2===t.check_Child_State:t[i]?-1<t.check_Child_State&&t.check_Child_State<2:0<t.check_Child_State}},getTreeCheckedNodes:function(e,t,i,n){if(!t)return[];var r=e.data.key.children,o=e.data.key.checked,a=i&&e.check.chkStyle==h.radio.STYLE&&e.check.radioType==h.radio.TYPE_ALL;n=n||[];for(var s=0,l=t.length;s<l&&(!0===t[s].nocheck||!0===t[s].chkDisabled||t[s][o]!=i||(n.push(t[s]),!a))&&(d.getTreeCheckedNodes(e,t[s][r],i,n),!(a&&0<n.length));s++);return n},getTreeChangeCheckedNodes:function(e,t,i){if(!t)return[];var n=e.data.key.children,r=e.data.key.checked;i=i||[];for(var o=0,a=t.length;o<a;o++)!0!==t[o].nocheck&&!0!==t[o].chkDisabled&&t[o][r]!=t[o].checkedOld&&i.push(t[o]),d.getTreeChangeCheckedNodes(e,t[o][n],i);return i},makeChkFlag:function(e,t){if(t){var i=e.data.key.children,n=e.data.key.checked,r=-1;if(t[i])for(var o=0,a=t[i].length;o<a;o++){var s=t[i][o],l=-1;if(e.check.chkStyle==h.radio.STYLE){if(2==(l=!0===s.nocheck||!0===s.chkDisabled?s.check_Child_State:!0===s.halfCheck||s[n]||0<s.check_Child_State?2:0)){r=2;break}0==l&&(r=0)}else if(e.check.chkStyle==h.checkbox.STYLE){if(1===(l=!0===s.nocheck||!0===s.chkDisabled?s.check_Child_State:!0===s.halfCheck?1:s[n]?-1===s.check_Child_State||2===s.check_Child_State?2:1:0<s.check_Child_State?1:0)){r=1;break}if(2===l&&-1<r&&0<o&&l!==r){r=1;break}if(2===r&&-1<l&&l<2){r=1;break}-1<l&&(r=l)}}t.check_Child_State=r}}}};e.extend(!0,e.fn.zTree.consts,t),e.extend(!0,e.fn.zTree._z,n);var r=e.fn.zTree,l=r._z.tools,h=r.consts,p=r._z.view,d=r._z.data,g=(r._z.event,l.$);d.exSetting(i),d.addInitBind(function(r){var e=r.treeObj,t=h.event;e.bind(t.CHECK,function(e,t,i,n){e.srcEvent=t,l.apply(r.callback.onCheck,[e,i,n])})}),d.addInitUnBind(function(e){var t=e.treeObj,i=h.event;t.unbind(i.CHECK)}),d.addInitCache(function(e){}),d.addInitNode(function(e,t,i,n,r,o,a){var s;i&&(s=e.data.key.checked,"string"==typeof i[s]&&(i[s]=l.eqs(i[s],"true")),i[s]=!!i[s],i.checkedOld=i[s],"string"==typeof i.nocheck&&(i.nocheck=l.eqs(i.nocheck,"true")),i.nocheck=!!i.nocheck||e.check.nocheckInherit&&n&&!!n.nocheck,"string"==typeof i.chkDisabled&&(i.chkDisabled=l.eqs(i.chkDisabled,"true")),i.chkDisabled=!!i.chkDisabled||e.check.chkDisabledInherit&&n&&!!n.chkDisabled,"string"==typeof i.halfCheck&&(i.halfCheck=l.eqs(i.halfCheck,"true")),i.halfCheck=!!i.halfCheck,i.check_Child_State=-1,i.check_Focus=!1,i.getCheckStatus=function(){return d.getCheckStatus(e,i)},e.check.chkStyle==h.radio.STYLE&&e.check.radioType==h.radio.TYPE_ALL&&i[s]&&d.getRoot(e).radioCheckedList.push(i))}),d.addInitProxy(function(e){var t=e.target,i=d.getSetting(e.data.treeId),n="",r=null,o="",a=null;if(l.eqs(e.type,"mouseover")?i.check.enable&&l.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+h.id.CHECK)&&(n=l.getNodeMainDom(t).id,o="mouseoverCheck"):l.eqs(e.type,"mouseout")?i.check.enable&&l.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+h.id.CHECK)&&(n=l.getNodeMainDom(t).id,o="mouseoutCheck"):l.eqs(e.type,"click")&&i.check.enable&&l.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+h.id.CHECK)&&(n=l.getNodeMainDom(t).id,o="checkNode"),0<n.length)switch(r=d.getNodeCache(i,n),o){case"checkNode":a=s.onCheckNode;break;case"mouseoverCheck":a=s.onMouseoverCheck;break;case"mouseoutCheck":a=s.onMouseoutCheck}return{stop:"checkNode"===o,node:r,nodeEventType:o,nodeEventCallback:a,treeEventType:"",treeEventCallback:null}},!0),d.addInitRoot(function(e){d.getRoot(e).radioCheckedList=[]}),d.addBeforeA(function(e,t,i){e.data.key.checked;e.check.enable&&(d.makeChkFlag(e,t),i.push("<span ID='",t.tId,h.id.CHECK,"' class='",p.makeChkClass(e,t),"' treeNode",h.id.CHECK,!0===t.nocheck?" style='display:none;'":"","></span>"))}),d.addZTreeTools(function(e,n){n.checkNode=function(e,t,i,n){var r,o=this.setting.data.key.checked;!0!==e.chkDisabled&&(!0!==t&&!1!==t&&(t=!e[o]),n=!!n,e[o]===t&&!i||n&&0==l.apply(this.setting.callback.beforeCheck,[this.setting.treeId,e],!0)||l.uCanDo(this.setting)&&this.setting.check.enable&&!0!==e.nocheck&&(e[o]=t,r=g(e,h.id.CHECK,this.setting),!i&&this.setting.check.chkStyle!==h.radio.STYLE||p.checkNodeRelation(this.setting,e),p.setChkClass(this.setting,r,e),p.repairParentChkClassWithSelf(this.setting,e),n&&this.setting.treeObj.trigger(h.event.CHECK,[null,this.setting.treeId,e])))},n.checkAllNodes=function(e){p.repairAllChk(this.setting,!!e)},n.getCheckedNodes=function(e){var t=this.setting.data.key.children;return e=!1!==e,d.getTreeCheckedNodes(this.setting,d.getRoot(this.setting)[t],e)},n.getChangeCheckedNodes=function(){var e=this.setting.data.key.children;return d.getTreeChangeCheckedNodes(this.setting,d.getRoot(this.setting)[e])},n.setChkDisabled=function(e,t,i,n){t=!!t,i=!!i,n=!!n,p.repairSonChkDisabled(this.setting,e,t,n),p.repairParentChkDisabled(this.setting,e.getParentNode(),t,i)};var r=n.updateNode;n.updateNode=function(e,t){var i;r&&r.apply(n,arguments),e&&this.setting.check.enable&&g(e,this.setting).get(0)&&l.uCanDo(this.setting)&&(i=g(e,h.id.CHECK,this.setting),1!=t&&this.setting.check.chkStyle!==h.radio.STYLE||p.checkNodeRelation(this.setting,e),p.setChkClass(this.setting,i,e),p.repairParentChkClassWithSelf(this.setting,e))}});var o=p.createNodes;p.createNodes=function(e,t,i,n){o&&o.apply(p,arguments),i&&p.repairParentChkClassWithSelf(e,n)};var a=p.removeNode;p.removeNode=function(e,t){var i=t.getParentNode();a&&a.apply(p,arguments),t&&i&&(p.repairChkClass(e,i),p.repairParentChkClass(e,i))};var u=p.appendNodes;p.appendNodes=function(e,t,i,n,r,o){var a="";return u&&(a=u.apply(p,arguments)),n&&d.makeChkFlag(e,n),a}}(BI.jQuery)},function(e,t){BI.TreeRenderScrollService=BI.inherit(BI.OB,{_init:function(){this.nodeLists={},this.id=this.options.id,this.hasBinded=!1,this.container=this.options.container},_getNodeListBounds:function(e){var t=this.options.subNodeListGetter(e)[0];return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}},_getTreeContainerBounds:function(){var e=this.container[0];return BI.isNotNull(e)?{top:e.offsetTop+e.scrollTop,left:e.offsetLeft+e.scrollLeft,width:e.offsetWidth,height:e.offsetHeight}:{}},_canNodePopulate:function(e){if(this.nodeLists[e].locked)return!1;var t=this._getNodeListBounds(e),i=this._getTreeContainerBounds(e);return t.top+t.height<i.top+i.height},_isNodeInVisible:function(e){var t=this.options.subNodeListGetter(e);return 0===t.length||"none"===t.css("display")},pushNodeList:function(e,t){var i=this;BI.has(this.nodeLists,e)?this.nodeLists[e].locked=!1:this.nodeLists[e]={populate:BI.debounce(t,0),options:{times:1},locked:!1},this.hasBinded||(this.hasBinded=!0,this.container&&this.container.on("scroll",BI.debounce(function(){i.refreshAllNodes()},30)))},refreshAllNodes:function(){var t=this;BI.each(this.nodeLists,function(e){t._isNodeInVisible(e)||t.refreshNodes(e)})},refreshNodes:function(e){var t;this._canNodePopulate(e)&&((t=this.nodeLists[e]).options.times++,t.locked=!0,t.populate({times:t.options.times}))},removeNodeList:function(e){delete this.nodeLists[e],0===BI.size(this.nodeLists)&&this.clear()},clear:function(){var t=this;BI.each(this.nodeLists,function(e){t.removeNodeList(e)}),this.nodeLists={},this.container.off("scroll"),this.hasBinded=!1}})},function(e,t){BI.TreeRenderPageService=BI.inherit(BI.OB,{_init:function(){this.nodeLists={}},_getLoadingBar:function(e){var t=this,i=BI.createWidget({type:"bi.loading_bar",height:25,handler:function(){t.refreshNodes(e)}});return i.setLoaded(),i},pushNodeList:function(e,t){var i=this.options,n=this._getLoadingBar(e);BI.has(this.nodeLists,e)?(this.nodeLists[e].loadWidget.destroy(),this.nodeLists[e].loadWidget=n):this.nodeLists[e]={populate:BI.debounce(t,0),options:{times:1},loadWidget:n},BI.createWidget({type:"bi.vertical",element:i.subNodeListGetter(e),items:[n]})},refreshNodes:function(e){var t=this.nodeLists[e];t.options.times++,t.loadWidget.setLoading(),t.populate({times:t.options.times})},removeNodeList:function(e){this.nodeLists[e]&&this.nodeLists[e].loadWidget.destroy(),this.nodeLists[e]&&(this.nodeLists[e].loadWidget=null),delete this.nodeLists[e],0===BI.size(this.nodeLists)&&this.clear()},clear:function(){var t=this;BI.each(this.nodeLists,function(e){t.removeNodeList(e)}),this.nodeLists={}}})},function(e,t){BI.CustomColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-color-chooser",width:227,height:245})},_init:function(){BI.CustomColorChooser.superclass._init.apply(this,arguments);var e=this,t=this.options;this.editor=BI.createWidget(t.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){e.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){e.setValue(this.getValue())}),BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.absolute",items:[{el:this.editor,left:0,top:0,right:0}],height:30},{type:"bi.absolute",items:[{el:this.farbtastic,left:15,right:15,top:7}],height:215}]})},setValue:function(e){this.editor.setValue(e),this.farbtastic.setValue(e)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser)},function(e,t){BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:"",height:24})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var t=this,e=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:e.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:e.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(e){t.trigger=e},width:e.width-2,height:e.height-2},e.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(e){t.colorPicker=e},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){i(),t._isRGBColor(t.colorPicker.getValue())||t.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){i(),t.combo.hideView()}}]},e.popup),value:e.value,width:230},value:e.value});var i=function(){var e=t.colorPicker.getValue();t.trigger.setValue(e)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){t.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(e){return BI.isNotEmptyString(e)&&"transparent"!==e},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(e){this.combo.setValue(e)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser)},function(e,t){BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var t=this,e=this.options;this.colorEditor=BI.createWidget(e.editor,{type:e.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:e.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){t.setValue(this.getValue()),t._dealStoreColors(),t.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,arguments)}),this.storeColors=BI.createWidget({type:"bi.color_picker",cls:"bi-border-bottom bi-border-right",items:[this._digestStoreColors(this._getStoreColors())],width:210,height:24,value:e.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){t.setValue(this.getValue()[0]),t._dealStoreColors(),t.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:e.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){t.setValue(this.getValue()[0]),t._dealStoreColors(),t.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:e.editor});var i=BI.createWidget({type:"bi.popup_panel",buttons:[BI.i18nText("BI-Basic_Cancel"),BI.i18nText("BI-Basic_Save")],title:BI.i18nText("BI-Custom_Color"),el:this.customColorChooser,stopPropagation:!1,bgap:-1,rgap:1,lgap:1,minWidth:227});return this.more=BI.createWidget({type:"bi.combo",cls:"bi-border-top",container:null,direction:"right,top",isNeedAdjustHeight:!1,el:{type:"bi.text_item",cls:"color-chooser-popup-more bi-list-item",textAlign:"center",height:24,textLgap:10,text:BI.i18nText("BI-Basic_More")+"..."},popup:i}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){t.customColorChooser.setValue(t.getValue())}),i.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(e){switch(e){case 0:t.more.hideView();break;case 1:t.setValue(t.customColorChooser.getValue()),t._dealStoreColors(),t.more.hideView(),t.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}}),{type:"bi.absolute",items:[{el:{type:"bi.vtape",items:[this.colorEditor,{el:{type:"bi.absolute",items:[{el:this.storeColors,left:10,right:10,top:5}]},height:29},{el:{type:"bi.absolute",items:[{el:this.colorPicker,left:10,right:10,top:5,bottom:5}]},height:60},{el:this.more,height:24}]},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"disable-mask",invisible:!e.disabled,ref:function(){t.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var e=this.options;BI.isNotNull(e.value)&&this.setValue(e.value)},_setEnable:function(e){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!e)},_dealStoreColors:function(){var e=this.getValue(),t=this._getStoreColors(),i=new BI.Queue(8);i.fromArray(t),i.remove(e),i.unshift(e);var n=i.toArray();BI.Cache.setItem("colors",BI.array2String(n)),this.setStoreColors(n)},_digestStoreColors:function(e){var t=BI.map(e,function(e,t){return{value:t}});return BI.count(e.length,8,function(e){t.push({value:"",disabled:!0})}),t},_getStoreColors:function(){var i=this,n=this.options,e=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(e,function(e,t){return!n.simple||i._isRGBColor(t)})},_isRGBColor:function(e){return BI.isNotEmptyString(e)&&"transparent"!==e},setStoreColors:function(e){BI.isArray(e)&&this.storeColors.populate([this._digestStoreColors(e)])},setValue:function(e){this.colorEditor.setValue(e),this.colorPicker.setValue(e),this.storeColors.setValue(e)},getValue:function(){return this.colorEditor.getValue()}}),BI.ColorChooserPopup.EVENT_VALUE_CHANGE="EVENT_VALUE_CHANGE",BI.ColorChooserPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_popup",BI.ColorChooserPopup)},function(e,t){BI.SimpleColorChooserPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleColorChooserPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser-popup"})},_init:function(){BI.SimpleColorChooserPopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:t.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){e.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){e.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(e){this.popup.setStoreColors(e)},setValue:function(e){this.popup.setValue(e)},getValue:function(){return this.popup.getValue()}}),BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE="EVENT_VALUE_CHANGE",BI.SimpleColorChooserPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser_popup",BI.SimpleColorChooserPopup)},function(e,t){BI.SimpleColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-color-chooser",value:"#ffffff"})},_init:function(){BI.SimpleColorChooser.superclass._init.apply(this,arguments);var e=this,t=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:t.container,value:t.value,width:t.width,height:t.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){e.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(e){this.combo.setValue(e)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser)},function(e,t){BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var e=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-color-chooser-trigger bi-border",height:22})},_init:function(){BI.ColorChooserTrigger.superclass._init.apply(this,arguments),this.colorContainer=BI.createWidget({type:"bi.layout",cls:"color-chooser-trigger-content"+(BI.isIE9Below&&BI.isIE9Below()?" hack":"")});var e=BI.createWidget({type:"bi.icon_button",disableSelected:!0,cls:"icon-combo-down-icon trigger-triangle-font icon-size-12",width:12,height:8});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.colorContainer,left:3,right:3,top:3,bottom:3},{el:e,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(e){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===e?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===e?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":e}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger)},function(e,t){BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var e=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-color-chooser-trigger bi-border",height:22})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var t=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(e){t.changeIcon=e},disableSelected:!0,iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(e){t.label=e},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var e=BI.createWidget({type:"bi.icon_button",disableSelected:!0,cls:"icon-combo-down-icon trigger-triangle-font icon-size-12",width:12,height:8});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.colorContainer,left:3,right:3,top:3,bottom:3},{el:e,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(e){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===e?(this.colorContainer.element.css("background-color",""),this.changeIcon.setVisible(!0),this.label.setVisible(!0),this.changeIcon.setIcon("auto-color-icon"),this.label.setText(BI.i18nText("BI-Basic_Auto"))):"transparent"===e?(this.colorContainer.element.css("background-color",""),this.changeIcon.setVisible(!0),this.label.setVisible(!0),this.changeIcon.setIcon("trans-color-icon"),this.label.setText(BI.i18nText("BI-Transparent_Color"))):(this.colorContainer.element.css({"background-color":e}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger)},function(e,t){BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var e,t=this,i=this.options;i.value&&(this.element.css("background-color",i.value),e=this.getName(),this.element.hover(function(){t._createMask(),t.isEnabled()&&BI.Maskers.show(e)},function(){t.isSelected()||BI.Maskers.hide(e)}))},_createMask:function(){var e=this.options,t=this.getName();this.isEnabled()&&!BI.Maskers.has(t)&&BI.Maskers.make(t,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}}).element.addClass("color-picker-button-mask").css("background-color",e.value)},setSelected:function(e){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),e&&this._createMask(),BI.Maskers[e?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton)},function(e,t){BI.ColorPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorPicker.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-picker",items:null})},_items:[[{value:"#ffffff"},{value:"#f2f2f2"},{value:"#e5e5e5"},{value:"#d9d9d9"},{value:"#cccccc"},{value:"#bfbfbf"},{value:"#b2b2b2"},{value:"#a6a6a6"},{value:"#999999"},{value:"#8c8c8c"},{value:"#808080"},{value:"#737373"},{value:"#666666"},{value:"#4d4d4d"},{value:"#333333"},{value:"#000000"}],[{value:"#d8b5a6"},{value:"#ff9e9a"},{value:"#ffc17d"},{value:"#f5e56b"},{value:"#d8e698"},{value:"#e0ebaf"},{value:"#c3d825"},{value:"#bbe2e7"},{value:"#85d3cd"},{value:"#bde1e6"},{value:"#a0d8ef"},{value:"#89c3eb"},{value:"#bbc8e6"},{value:"#bbbcde"},{value:"#d6b4cc"},{value:"#fbc0d3"}],[{value:"#bb9581"},{value:"#f37d79"},{value:"#fba74f"},{value:"#ffdb4f"},{value:"#c7dc68"},{value:"#b0ca71"},{value:"#99ab4e"},{value:"#84b9cb"},{value:"#00a3af"},{value:"#2ca9e1"},{value:"#0095d9"},{value:"#4c6cb3"},{value:"#8491c3"},{value:"#a59aca"},{value:"#cc7eb1"},{value:"#e89bb4"}],[{value:"#9d775f"},{value:"#dd4b4b"},{value:"#ef8b07"},{value:"#fcc800"},{value:"#aacf53"},{value:"#82ae46"},{value:"#69821b"},{value:"#59b9c6"},{value:"#2a83a2"},{value:"#007bbb"},{value:"#19448e"},{value:"#274a78"},{value:"#4a488e"},{value:"#7058a3"},{value:"#884898"},{value:"#d47596"}]],_init:function(){BI.ColorPicker.superclass._init.apply(this,arguments);var e=this,t=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(t.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:t.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){e.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(e){var t=[].slice.call(arguments);t[0]=BI.createItems(e,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,t)},setValue:function(e){this.colors.setValue(e)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker)},function(e,t){BI.ColorPickerEditor=BI.inherit(BI.Widget,{constants:{REB_WIDTH:32},_defaultConfig:function(){return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-picker-editor",height:30})},_init:function(){BI.ColorPickerEditor.superclass._init.apply(this,arguments);var i=this,e=(this.options,this.constants);this.storeValue={},this.colorShow=BI.createWidget({type:"bi.layout",cls:"color-picker-editor-display bi-card bi-border",height:16,width:16});var t=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),n=function(e){return BI.isNumeric(e)&&0<=(0|e)&&(0|e)<=255},r=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:n,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:e.REB_WIDTH,height:20});BI.each(r,function(e,t){t.on(BI.TextEditor.EVENT_CHANGE,function(){i._checkEditors(),n(i.storeValue.r)&&n(i.storeValue.g)&&n(i.storeValue.b)&&(i.colorShow.element.css("background-color",i.getValue()),i.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=r[0],this.G=r[1],this.B=r[2],this.none=BI.createWidget({type:"bi.icon_button",cls:"auto-color-icon",width:16,height:16,iconWidth:16,iconHeight:16,title:BI.i18nText("BI-Basic_Auto")}),this.none.on(BI.IconButton.EVENT_CHANGE,function(){this.isSelected()?(i.lastColor=i.getValue(),i.setValue("")):i.setValue(i.lastColor||"#ffffff"),(i.R.isValid()&&i.G.isValid()&&i.B.isValid()||i._isEmptyRGB())&&(i.colorShow.element.css("background-color",i.getValue()),i.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))}),this.transparent=BI.createWidget({type:"bi.icon_button",cls:"trans-color-icon",width:16,height:16,iconWidth:16,iconHeight:16,title:BI.i18nText("BI-Transparent_Color")}),this.transparent.on(BI.IconButton.EVENT_CHANGE,function(){this.isSelected()?(i.lastColor=i.getValue(),i.setValue("transparent")):("transparent"===i.lastColor&&(i.lastColor=""),i.setValue(i.lastColor||"#ffffff")),(i.R.isValid()&&i.G.isValid()&&i.B.isValid()||i._isEmptyRGB())&&(i.colorShow.element.css("background-color",i.getValue()),i.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical_adapt",items:[{el:this.colorShow,width:16},{el:t[0],width:20},{el:this.R,width:e.REB_WIDTH},{el:t[1],width:20},{el:this.G,width:e.REB_WIDTH},{el:t[2],width:20},{el:this.B,width:e.REB_WIDTH},{el:this.transparent,width:16,lgap:5},{el:this.none,width:16,lgap:5}]},left:10,right:10,top:0,bottom:0}]})},_checkEditors:function(){BI.isEmptyString(this.R.getValue())&&this.R.setValue(0),BI.isEmptyString(this.G.getValue())&&this.G.setValue(0),BI.isEmptyString(this.B.getValue())&&this.B.setValue(0),this.storeValue={r:this.R.getValue()||0,g:this.G.getValue()||0,b:this.B.getValue()||0}},_isEmptyRGB:function(){return BI.isEmptyString(this.storeValue.r)&&BI.isEmptyString(this.storeValue.g)&&BI.isEmptyString(this.storeValue.b)},_showPreColor:function(e){""===e?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===e?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":e}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(e){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),!0===e?this.element.removeClass("base-disabled disabled"):!1===e&&this.element.addClass("base-disabled disabled")},setValue:function(e){if("transparent"===e)return this.transparent.setSelected(!0),this.none.setSelected(!1),this._showPreColor("transparent"),this.R.setValue(""),this.G.setValue(""),this.B.setValue(""),void(this.storeValue={r:"",g:"",b:""});e?this.none.setSelected(!1):(e="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(e);var t=BI.DOM.rgb2json(BI.DOM.hex2rgb(e));this.storeValue={r:BI.isNull(t.r)?"":t.r,g:BI.isNull(t.r)?"":t.g,b:BI.isNull(t.r)?"":t.b},this.R.setValue(this.storeValue.r),this.G.setValue(this.storeValue.g),this.B.setValue(this.storeValue.b)},getValue:function(){return this._isEmptyRGB()&&this.transparent.isSelected()?"transparent":BI.DOM.rgb2hex(BI.DOM.json2rgb({r:this.storeValue.r,g:this.storeValue.g,b:this.storeValue.b}))}}),BI.ColorPickerEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_editor",BI.ColorPickerEditor)},function(e,t){BI.SimpleColorPickerEditor=BI.inherit(BI.Widget,{constants:{REB_WIDTH:32},_defaultConfig:function(){return BI.extend(BI.SimpleColorPickerEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-picker-editor",height:30})},_init:function(){BI.SimpleColorPickerEditor.superclass._init.apply(this,arguments);var i=this,e=(this.options,this.constants);this.colorShow=BI.createWidget({type:"bi.layout",cls:"color-picker-editor-display bi-card bi-border",height:16,width:16});var t=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),n=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:function(e){return BI.isNumeric(e)&&0<=(0|e)&&(0|e)<=255},errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:e.REB_WIDTH,height:20});BI.each(n,function(e,t){t.on(BI.TextEditor.EVENT_CHANGE,function(){i._checkEditors(),i.R.isValid()&&i.G.isValid()&&i.B.isValid()&&(i.colorShow.element.css("background-color",i.getValue()),i.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=n[0],this.G=n[1],this.B=n[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:t[0],width:20},{el:this.R,width:e.REB_WIDTH},{el:t[1],width:20},{el:this.G,width:e.REB_WIDTH},{el:t[2],width:20},{el:this.B,width:e.REB_WIDTH}]})},_checkEditors:function(){BI.isEmptyString(this.R.getValue())&&this.R.setValue(0),BI.isEmptyString(this.G.getValue())&&this.G.setValue(0),BI.isEmptyString(this.B.getValue())&&this.B.setValue(0)},setValue:function(e){this.colorShow.element.css({"background-color":e});var t=BI.DOM.rgb2json(BI.DOM.hex2rgb(e));this.R.setValue(BI.isNull(t.r)?"":t.r),this.G.setValue(BI.isNull(t.g)?"":t.g),this.B.setValue(BI.isNull(t.b)?"":t.b)},getValue:function(){return BI.DOM.rgb2hex(BI.DOM.json2rgb({r:this.R.getValue(),g:this.G.getValue(),b:this.B.getValue()}))}}),BI.SimpleColorPickerEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_picker_editor",BI.SimpleColorPickerEditor)},function(e,t){BI.Farbtastic=BI.inherit(BI.BasicButton,{constants:{RADIUS:84,SQUARE:100,WIDTH:194},props:{baseCls:"bi-farbtastic",width:195,height:195,stopPropagation:!0,value:"#000000"},render:function(){var t=this;return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(e){t.colorWrapper=e}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(e){t.wheel=e}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(e){t.overlay=e}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(e){t.hMarker=e},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(e){t.slMarker=e},scrollable:!1,width:17,height:17}}]}},mounted:function(){var e=this.options;BI.isKey(e.value)&&this.setValue(e.value)},_unpack:function(e){return 7===e.length?[parseInt("0x"+e.substring(1,3))/255,parseInt("0x"+e.substring(3,5))/255,parseInt("0x"+e.substring(5,7))/255]:4===e.length?[parseInt("0x"+e.substring(1,2))/15,parseInt("0x"+e.substring(2,3))/15,parseInt("0x"+e.substring(3,4))/15]:void 0},_pack:function(e){var t=Math.round(255*e[0]),i=Math.round(255*e[1]),n=Math.round(255*e[2]);return"#"+(t<16?"0":"")+t.toString(16)+(i<16?"0":"")+i.toString(16)+(n<16?"0":"")+n.toString(16)},_setColor:function(e){var t=this._unpack(e);this.value!==e&&t&&(this.value=e,this.rgb=t,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(e){return this.hsl=e,this.rgb=this._HSLToRGB(e),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(e){var t=e[0],i=e[1],n=e[2],r=n<=.5?n*(i+1):n+i-n*i,o=2*n-r;return[this._hueToRGB(o,r,t+.33333),this._hueToRGB(o,r,t),this._hueToRGB(o,r,t-.33333)]},_hueToRGB:function(e,t,i){return 6*(i=i<0?i+1:1<i?i-1:i)<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(.66666-i)*6:e},_RGBToHSL:function(e){var t=e[0],i=e[1],n=e[2],r=Math.min(t,Math.min(i,n)),o=Math.max(t,Math.max(i,n)),a=o-r,s=(r+o)/2,l=0;return 0<a&&(o==t&&o!=i&&(l+=(i-n)/a),o==i&&o!=n&&(l+=2+(n-t)/a),o==n&&o!=t&&(l+=4+(t-i)/a),l/=6),[l,0<s&&s<1?a/(s<.5?2*s:2-2*s):0,s]},_updateDisplay:function(){var e=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(e)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(e)*this.constants.RADIUS+this.constants.WIDTH/2)+"px"}),this.slMarker.element.css({left:Math.round(this.constants.SQUARE*(.5-this.hsl[1])+this.constants.WIDTH/2)+"px",top:Math.round(this.constants.SQUARE*(.5-this.hsl[2])+this.constants.WIDTH/2)+"px"}),this.colorWrapper.element.css("backgroundColor",this._pack(this._HSLToRGB([this.hsl[0],1,.5]))),this.fireEvent(BI.Farbtastic.EVENT_CHANGE,this.getValue(),this)},_absolutePosition:function(e){var t,i={x:e.offsetLeft,y:e.offsetTop};return e.offsetParent&&(t=this._absolutePosition(e.offsetParent),i.x+=t.x,i.y+=t.y),i},_widgetCoords:function(e){var t=e.target||e.srcElement,i=this.wheel.element[0];if("undefined"!=typeof e.offsetX){for(var n={x:e.offsetX,y:e.offsetY},r=t;r;)r.mouseX=n.x,r.mouseY=n.y,n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;for(var r=i,o={x:0,y:0};r;){if("undefined"!=typeof r.mouseX){a=r.mouseX-o.x,s=r.mouseY-o.y;break}o.x+=r.offsetLeft,o.y+=r.offsetTop,r=r.offsetParent}for(r=t;r;)r.mouseX=undefined,r.mouseY=undefined,r=r.offsetParent}else var n=this._absolutePosition(i),a=(e.pageX||0)-n.x,s=(e.pageY||0)-n.y;return{x:a-this.constants.WIDTH/2,y:s-this.constants.WIDTH/2}},_doMouseMove:function(e){var t,i,n,r=this._widgetCoords(e);this.circleDrag?((t=Math.atan2(r.x,-r.y)/6.28)<0&&(t+=1),this._setHSL([t,this.hsl[1],this.hsl[2]])):(i=Math.max(0,Math.min(1,.5-r.x/this.constants.SQUARE)),n=Math.max(0,Math.min(1,.5-r.y/this.constants.SQUARE)),this._setHSL([this.hsl[0],i,n]))},doClick:function(e){var t=this._widgetCoords(e);return this.circleDrag=2*Math.max(Math.abs(t.x),Math.abs(t.y))>this.constants.SQUARE,this._doMouseMove(e),!1},setValue:function(e){this._setColor(e)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic)},function(e,t){BI.DisplayTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-display-tree"})},_init:function(){BI.DisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){return{view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:function(e,t){return!1}}}},_dealWidthNodes:function(e){e=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(e,function(e,t){t.isParent=t.isParent||t.parent,null==t.text&&0<t.count&&(t.text=t.value+"("+BI.i18nText("BI-Basic_Altogether")+t.count+BI.i18nText("BI-Basic_Count")+")")}),e},initTree:function(e,t){t=t||this._configSetting();this.nodes=BI.$.fn.zTree.init(this.tree.element,t,e)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree)},function(e,t){BI.ListDisplayTree=BI.inherit(BI.ListTreeView,{_defaultConfig:function(){return BI.extend(BI.ListDisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-list-display-tree"})},_init:function(){BI.ListDisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){return{view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:function(e,t){return t.isLeaf?{}:{color:"#999999"}}},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:function(e,t){return!1}}}},_dealWidthNodes:function(e){e=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(e,function(e,t){t.isParent=t.isParent||t.parent,null==t.text&&0<t.count&&(t.text=t.value+"("+BI.i18nText("BI-Basic_Altogether")+t.count+BI.i18nText("BI-Basic_Count")+")")}),e},initTree:function(e,t){t=t||this._configSetting();this.nodes=BI.$.fn.zTree.init(this.tree.element,t,e)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree)},function(e,t){BI.SimpleTreeView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-tree",itemsCreator:BI.emptyFn,items:null})},_init:function(){BI.SimpleTreeView.superclass._init.apply(this,arguments);var n=this,r=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(e,t){var i=function(e){t({items:e}),n.structure.initTree(BI.Tree.transformToTreeFormat(e))};BI.isNotNull(r.items)?i(r.items):r.itemsCreator(e,i)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){n.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(r.items)&&this.populate(),BI.isNotNull(r.value)&&this.setValue(r.value)},populate:function(e,t){e&&(this.options.items=e),this.tree.stroke({keyword:t})},_digest:function(e){e=e||[];var r=this,o={},a=[];return BI.each(e,function(e,t){var i=r.structure.search(t,"value");if(i){var n=i;for((n=n.getParent())&&(o[n.value]||(o[n.value]=0),o[n.value]++);n&&n.getChildrenLength()<=o[n.value];)a.push(n.value),(n=n.getParent())&&(o[n.value]||(o[n.value]=0),o[n.value]++)}}),BI.makeObject(e.concat(a))},setValue:function(e){this.tree.setValue(this._digest(e))},_getValue:function(){var i=[],e=this.tree.getValue(),n=function(e){BI.each(e,function(e,t){BI.isEmpty(t)?i.push(e):n(t)})};return n(e),i},empty:function(){this.tree.empty()},getValue:function(){var n=this,r=[],e=this._getValue();return BI.each(e,function(e,t){var i=n.structure.search(t,"value");i&&n.structure._traverse(i,function(e){e.isLeaf()&&r.push(e.value)})}),r}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView)},function(e,t,i){var n=i(35),r=i(765),o=i(661),a=i(168),s=i(767),l=i(46),u=i(969),c=Object.getOwnPropertyDescriptor;t.f=n?c:function(e,t){if(e=a(e),t=s(t,!0),u)try{return c(e,t)}catch(i){}if(l(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t){e.exports=function(e){if(e==undefined)throw TypeError("Can't call method on "+e);return e}},function(e,t,i){var n=i(662),r=i(717),o=n("keys");e.exports=function(e){return o[e]||(o[e]=r(e))}},function(e,t){var i=0,n=Math.random();e.exports=function(e){return"Symbol("+String(e===undefined?"":e)+")_"+(++i+n).toString(36)}},function(e,t,i){var n=i(719),r=Math.min;e.exports=function(e){return 0<e?r(n(e),9007199254740991):0}},function(e,t){var i=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?n:i)(e)}},function(e,t,i){var n=i(46),r=i(172),o=i(716),a=i(978),s=o("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=r(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,i){var n=i(14),r=i(665),o=Function.call;e.exports=function(e,t,i){return r(o,n[e].prototype[t],i)}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},function(e,t,i){var n=i(30),r=i(64),o="".split;e.exports=n(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==r(e)?o.call(e,""):Object(e)}:Object},function(e,t,i){var r=i(31);e.exports=function(e,t){if(!r(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!r(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!r(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!r(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")}},function(e,t,i){var n=i(14),r=i(31),o=n.document,a=r(o)&&r(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,i){var n=i(14),r=i(47);e.exports=function(e,t){try{r(n,e,t)}catch(i){n[e]=t}return t}},function(e,t,i){var n=i(971),r=i(771).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,r)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,i){var n=i(30),r=/#|\.prototype\./,o=function(e,t){var i=s[a(e)];return i==u||i!=l&&("function"==typeof t?n(t):!!t)},a=o.normalize=function(e){return String(e).replace(r,".").toLowerCase()},s=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},function(e,t,i){var n=i(971),r=i(771);e.exports=Object.keys||function(e){return n(e,r)}},function(e,t,i){"use strict";var B=i(20),E=i(1037),m=i(720),_=i(776),b=i(664),T=i(47),y=i(57),n=i(19),C=i(169),v=i(666),r=i(984),N=r.IteratorPrototype,V=r.BUGGY_SAFARI_ITERATORS,S=n("iterator"),x="values",L=function(){return this};e.exports=function(e,t,i,n,r,o,a){E(i,t,n);var s,l,u,c=function(e){if(e===r&&f)return f;if(!V&&e in d)return d[e];switch(e){case"keys":case x:case"entries":return function(){return new i(this,e)}}return function(){return new i(this)}},h=t+" Iterator",p=!1,d=e.prototype,g=d[S]||d["@@iterator"]||r&&d[r],f=!V&&g||c(r),I="Array"==t&&d.entries||g;if(I&&(s=m(I.call(new e)),N!==Object.prototype&&s.next&&(C||m(s)===N||(_?_(s,N):"function"!=typeof s[S]&&T(s,S,L)),b(s,h,!0,!0),C&&(v[h]=L))),r==x&&g&&g.name!==x&&(p=!0,f=function(){return g.call(this)}),C&&!a||d[S]===f||T(d,S,f),v[t]=f,r)if(l={values:c(x),keys:o?f:c("keys"),entries:c("entries")},a)for(u in l)!V&&!p&&u in d||y(d,u,l[u]);else B({target:t,proto:!0,forced:V||p},l);return l}},function(e,t,i){var r=i(32),o=i(1038);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var i,n=!1,e={};try{(i=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),n=e instanceof Array}catch(t){}return function(e,t){return r(e),o(t),n?i.call(e,t):e.__proto__=t,e}}():undefined)},function(e,t){e.exports=function(e,t,i){if(!(e instanceof t))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return e}},function(e,t,i){var n=i(170);e.exports=n("navigator","userAgent")||""},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t,i){var n=i(35),r=i(30),o=i(768);e.exports=!n&&!r(function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},function(e,t,i){var n=i(662);e.exports=n("native-function-to-string",Function.toString)},function(e,t,i){var a=i(46),s=i(168),l=i(972).indexOf,u=i(663);e.exports=function(e,t){var i,n=s(e),r=0,o=[];for(i in n)!a(u,i)&&a(n,i)&&o.push(i);for(;t.length>r;)a(n,i=t[r++])&&(~l(o,i)||o.push(i));return o}},function(e,t,i){var l=i(168),u=i(718),c=i(1005),n=function(s){return function(e,t,i){var n,r=l(e),o=u(r.length),a=c(i,o);if(s&&t!=t){for(;a<o;)if((n=r[a++])!=n)return!0}else for(;a<o;a++)if((s||a in r)&&r[a]===t)return s||a||0;return!s&&-1}};e.exports={includes:n(!0),indexOf:n(!1)}},function(e,t,i){var n=i(170);e.exports=n("document","documentElement")},function(e,t,i){var n=i(30);e.exports=!!Object.getOwnPropertySymbols&&!n(function(){return!String(Symbol())})},function(e,t,i){var n=i(64);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,i){t.f=i(19)},function(e,t,i){var _=i(665),b=i(766),T=i(172),y=i(718),C=i(1019),v=[].push,n=function(d){var g=1==d,f=2==d,I=3==d,B=4==d,E=6==d,m=5==d||E;return function(e,t,i,n){for(var r,o,a=T(e),s=b(a),l=_(t,i,3),u=y(s.length),c=0,h=n||C,p=g?h(e,u):f?h(e,0):undefined;c<u;c++)if((m||c in s)&&(o=l(r=s[c],c,a),d))if(g)p[c]=o;else if(o)switch(d){case 3:return!0;case 5:return r;case 6:return c;case 2:v.call(p,r)}else if(B)return!1;return E?-1:I||B?B:p}};e.exports={forEach:n(0),map:n(1),filter:n(2),some:n(3),every:n(4),find:n(5),findIndex:n(6)}},function(e,t,i){var n=i(30);e.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},function(e,t,i){"use strict";var n=i(30);e.exports=function(e,t){var i=[][e];return!i||!n(function(){i.call(null,t||function(){throw 1},1)})}},function(e,t,i){var n=i(57),r=i(1036),o=Object.prototype;r!==o.toString&&n(o,"toString",r,{unsafe:!0})},function(e,t,i){var r=i(64),o=i(19)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,i,n;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(i){}}(t=Object(e),o))?i:a?r(t):"Object"==(n=r(t))&&"function"==typeof t.callee?"Arguments":n}},function(e,t,i){"use strict";var r=i(983).charAt,n=i(65),o=i(775),a="String Iterator",s=n.set,l=n.getterFor(a);o(String,"String",function(e){s(this,{type:a,string:String(e),index:0})},function(){var e,t=l(this),i=t.string,n=t.index;return n>=i.length?{value:undefined,done:!0}:(e=r(i,n),t.index+=e.length,{value:e,done:!1})})},function(e,t,i){var l=i(719),u=i(715),n=function(s){return function(e,t){var i,n,r=String(u(e)),o=l(t),a=r.length;return o<0||a<=o?s?"":undefined:(i=r.charCodeAt(o))<55296||56319<i||o+1===a||(n=r.charCodeAt(o+1))<56320||57343<n?s?r.charAt(o):i:s?r.slice(o,o+2):n-56320+(i-55296<<10)+65536}};e.exports={codeAt:n(!1),charAt:n(!0)}},function(e,t,i){"use strict";var n,r,o,a=i(720),s=i(47),l=i(46),u=i(19),c=i(169),h=u("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(r=a(a(o)))!==Object.prototype&&(n=r):p=!0),n==undefined&&(n={}),c||l(n,h)||s(n,h,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},function(e,t,i){var n=i(14),r=i(1039),o=i(1040),a=i(47),s=i(19),l=s("iterator"),u=s("toStringTag"),c=o.values;for(var h in r){var p=n[h],d=p&&p.prototype;if(d){if(d[l]!==c)try{a(d,l,c)}catch(f){d[l]=c}if(d[u]||a(d,u,h),r[h])for(var g in o)if(d[g]!==o[g])try{a(d,g,o[g])}catch(f){d[g]=o[g]}}}},function(e,t,i){var n=i(14);e.exports=n.Promise},function(e,t,i){var r=i(57);e.exports=function(e,t,i){for(var n in t)r(e,n,t[n],i);return e}},function(e,t,i){"use strict";var n=i(170),r=i(48),o=i(19),a=i(35),s=o("species");e.exports=function(e){var t=n(e),i=r.f;a&&t&&!t[s]&&i(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,i){var r=i(19)("iterator"),o=!1;try{var n=0,a={next:function(){return{done:!!n++}},"return":function(){o=!0}};a[r]=function(){return this},Array.from(a,function(){throw 2})}catch(s){}e.exports=function(e,t){if(!t&&!o)return!1;var i=!1;try{var n={};n[r]=function(){return{next:function(){return{done:i=!0}}}},e(n)}catch(s){}return i}},function(e,t,i){var r=i(32),o=i(66),a=i(19)("species");e.exports=function(e,t){var i,n=r(e).constructor;return n===undefined||(i=r(n)[a])==undefined?t:o(i)}},function(e,t,i){var n,r,o,a=i(14),s=i(30),l=i(64),u=i(665),c=i(973),h=i(768),p=i(778),d=a.location,g=a.setImmediate,f=a.clearImmediate,I=a.process,B=a.MessageChannel,E=a.Dispatch,m=0,_={},b="onreadystatechange",T=function(e){var t;_.hasOwnProperty(e)&&(t=_[e],delete _[e],t())},y=function(e){return function(){T(e)}},C=function(e){T(e.data)},v=function(e){a.postMessage(e+"",d.protocol+"//"+d.host)};g&&f||(g=function(e){for(var t=[],i=1;i<arguments.length;)t.push(arguments[i++]);return _[++m]=function(){("function"==typeof e?e:Function(e)).apply(undefined,t)},n(m),m},f=function(e){delete _[e]},"process"==l(I)?n=function(e){I.nextTick(y(e))}:E&&E.now?n=function(e){E.now(y(e))}:B&&!/(iphone|ipod|ipad).*applewebkit/i.test(p)?(o=(r=new B).port2,r.port1.onmessage=C,n=u(o.postMessage,o,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||s(v)?n=b in h("script")?function(e){c.appendChild(h("script"))[b]=function(){c.removeChild(this),T(e)}}:function(e){setTimeout(y(e),0)}:(n=v,a.addEventListener("message",C,!1))),e.exports={set:g,clear:f}},function(e,t,i){var n=i(32),r=i(31),o=i(667);e.exports=function(e,t){if(n(e),r(t)&&t.constructor===e)return t;var i=o.f(e);return(0,i.resolve)(t),i.promise}},function(e,t,i){"use strict";var n=i(20),u=i(66),r=i(667),o=i(722),c=i(173);n({target:"Promise",stat:!0},{allSettled:function(e){var s=this,t=r.f(s),l=t.resolve,i=t.reject,n=o(function(){var n=u(s.resolve),r=[],o=0,a=1;c(e,function(e){var t=o++,i=!1;r.push(undefined),a++,n.call(s,e).then(function(e){i||(i=!0,r[t]={status:"fulfilled",value:e},--a||l(r))},function(e){i||(i=!0,r[t]={status:"rejected",reason:e},--a||l(r))})}),--a||l(r)});return n.error&&i(n.value),t.promise}})},function(e,t,i){"use strict";var n,r,o=i(1057),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,u=(n=/a/,r=/b*/g,a.call(n,"a"),a.call(r,"a"),0!==n.lastIndex||0!==r.lastIndex),c=/()??/.exec("")[1]!==undefined;(u||c)&&(l=function(e){var t,i,n,r;return c&&(i=new RegExp("^"+this.source+"$(?!\\s)",o.call(this))),u&&(t=this.lastIndex),n=a.call(this,e),u&&n&&(this.lastIndex=this.global?n.index+n[0].length:t),c&&n&&1<n.length&&s.call(n[0],i,function(){for(r=1;r<arguments.length-2;r++)arguments[r]===undefined&&(n[r]=undefined)}),n}),e.exports=l},function(e,t,i){var n=i(663),r=i(31),o=i(46),a=i(48).f,s=i(717),l=i(1063),u=s("meta"),c=0,h=Object.isExtensible||function(){return!0},p=function(e){a(e,u,{value:{objectID:"O"+ ++c,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,u)){if(!h(e))return"F";if(!t)return"E";p(e)}return e[u].objectID},getWeakData:function(e,t){if(!o(e,u)){if(!h(e))return!0;if(!t)return!1;p(e)}return e[u].weakData},onFreeze:function(e){return l&&d.REQUIRED&&h(e)&&!o(e,u)&&p(e),e}};n[u]=!0},function(e,t){e.exports=_},,function(e,t,i){e.exports=i(999)},function(e,t,i){i(1e3);var n=i(49).Object,r=e.exports=function r(e,t,i){return n.defineProperty(e,t,i)};n.defineProperty.sham&&(r.sham=!0)},function(e,t,i){var n=i(20),r=i(35);n({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:i(48).f})},function(e,t,i){var n=i(14),r=i(769),o="__core-js_shared__",a=n[o]||r(o,{});e.exports=a},function(e,t,i){var n=i(14),r=i(970),o=n.WeakMap;e.exports="function"==typeof o&&/native code/.test(r.call(o))},function(e,t,i){var s=i(46),l=i(1004),u=i(714),c=i(48);e.exports=function(e,t){for(var i=l(t),n=c.f,r=u.f,o=0;o<i.length;o++){var a=i[o];s(e,a)||n(e,a,r(t,a))}}},function(e,t,i){var n=i(170),r=i(770),o=i(772),a=i(32);e.exports=n("Reflect","ownKeys")||function(e){var t=r.f(a(e)),i=o.f;return i?t.concat(i(e)):t}},function(e,t,i){var n=i(719),r=Math.max,o=Math.min;e.exports=function(e,t){var i=n(e);return i<0?r(i+t,0):o(i,t)}},function(e,t,i){e.exports=i(1007)},function(e,t,i){i(1008);var n=i(49).Object;e.exports=function(e,t){return n.create(e,t)}},function(e,t,i){i(20)({target:"Object",stat:!0,sham:!i(35)},{create:i(171)})},function(e,t,i){var n=i(35),a=i(48),s=i(32),l=i(774);e.exports=n?Object.defineProperties:function(e,t){s(e);for(var i,n=l(t),r=n.length,o=0;o<r;)a.f(e,i=n[o++],t[i]);return e}},function(e,t,i){e.exports=i(1011)},function(e,t,i){i(1012);var n=i(49);e.exports=n.Object.assign},function(e,t,i){var n=i(20),r=i(1013);n({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(e,t,i){"use strict";var p=i(35),n=i(30),d=i(774),g=i(772),f=i(765),I=i(172),B=i(766),r=Object.assign;e.exports=!r||n(function(){var e={},t={},i=Symbol(),n="abcdefghijklmnopqrst";return e[i]=7,n.split("").forEach(function(e){t[e]=e}),7!=r({},e)[i]||d(r({},t)).join("")!=n})?function(e,t){for(var i=I(e),n=arguments.length,r=1,o=g.f,a=f.f;r<n;)for(var s,l=B(arguments[r++]),u=o?d(l).concat(o(l)):d(l),c=u.length,h=0;h<c;)s=u[h++],p&&!a.call(l,s)||(i[s]=l[s]);return i}:r},function(e,t,i){e.exports=i(1015)},function(e,t,i){i(1016);var n=i(49);e.exports=n.Object.getOwnPropertySymbols},function(e,t,i){"use strict";var n=i(20),r=i(14),o=i(169),a=i(35),s=i(974),l=i(30),u=i(46),c=i(975),h=i(31),p=i(32),d=i(172),g=i(168),f=i(767),I=i(661),B=i(171),E=i(774),m=i(770),_=i(1017),b=i(772),T=i(714),y=i(48),C=i(765),v=i(47),N=i(57),V=i(662),S=i(716),x=i(663),L=i(717),w=i(19),A=i(976),D=i(1018),M=i(664),k=i(65),P=i(977).forEach,H=S("hidden"),R="Symbol",Y="prototype",W=w("toPrimitive"),O=k.set,F=k.getterFor(R),G=Object[Y],Z=r.Symbol,X=r.JSON,J=X&&X.stringify,K=T.f,Q=y.f,U=_.f,z=C.f,j=V("symbols"),q=V("op-symbols"),$=V("string-to-symbol-registry"),ee=V("symbol-to-string-registry"),te=V("wks"),ie=r.QObject,ne=!ie||!ie[Y]||!ie[Y].findChild,re=a&&l(function(){return 7!=B(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a})?function(e,t,i){var n=K(G,t);n&&delete G[t],Q(e,t,i),n&&e!==G&&Q(G,t,n)}:Q,oe=function(e,t){var i=j[e]=B(Z[Y]);return O(i,{type:R,tag:e,description:t}),a||(i.description=t),i},ae=s&&"symbol"==typeof Z.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof Z},se=function(e,t,i){e===G&&se(q,t,i),p(e);var n=f(t,!0);return p(i),u(j,n)?(i.enumerable?(u(e,H)&&e[H][n]&&(e[H][n]=!1),i=B(i,{enumerable:I(0,!1)})):(u(e,H)||Q(e,H,I(1,{})),e[H][n]=!0),re(e,n,i)):Q(e,n,i)},le=function(t,e){p(t);var i=g(e),n=E(i).concat(pe(i));return P(n,function(e){a&&!ue.call(i,e)||se(t,e,i[e])}),t},ue=function(e){var t=f(e,!0),i=z.call(this,t);return!(this===G&&u(j,t)&&!u(q,t))&&(!(i||!u(this,t)||!u(j,t)||u(this,H)&&this[H][t])||i)},ce=function(e,t){var i=g(e),n=f(t,!0);if(i!==G||!u(j,n)||u(q,n)){var r=K(i,n);return!r||!u(j,n)||u(i,H)&&i[H][n]||(r.enumerable=!0),r}},he=function(e){var t=U(g(e)),i=[];return P(t,function(e){u(j,e)||u(x,e)||i.push(e)}),i},pe=function(e){var t=e===G,i=U(t?q:g(e)),n=[];return P(i,function(e){!u(j,e)||t&&!u(G,e)||n.push(j[e])}),n};s||(N((Z=function(){if(this instanceof Z)throw TypeError("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==undefined?String(arguments[0]):undefined,t=L(e),i=function(e){this===G&&i.call(q,e),u(this,H)&&u(this[H],t)&&(this[H][t]=!1),re(this,t,I(1,e))};return a&&ne&&re(G,t,{configurable:!0,set:i}),oe(t,e)})[Y],"toString",function(){return F(this).tag}),C.f=ue,y.f=se,T.f=ce,m.f=_.f=he,b.f=pe,a&&(Q(Z[Y],"description",{configurable:!0,get:function(){return F(this).description}}),o||N(G,"propertyIsEnumerable",ue,{unsafe:!0})),A.f=function(e){return oe(w(e),e)}),n({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:Z}),P(E(te),function(e){D(e)}),n({target:R,stat:!0,forced:!s},{"for":function(e){var t=String(e);if(u($,t))return $[t];var i=Z(t);return $[t]=i,ee[i]=t,i},keyFor:function(e){if(!ae(e))throw TypeError(e+" is not a symbol");if(u(ee,e))return ee[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),n({target:"Object",stat:!0,forced:!s,sham:!a},{create:function(e,t){return t===undefined?B(e):le(B(e),t)},defineProperty:se,defineProperties:le,getOwnPropertyDescriptor:ce}),n({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:he,getOwnPropertySymbols:pe}),n({target:"Object",stat:!0,forced:l(function(){b.f(1)})},{getOwnPropertySymbols:function(e){return b.f(d(e))}}),X&&n({target:"JSON",stat:!0,forced:!s||l(function(){var e=Z();return"[null]"!=J([e])||"{}"!=J({a:e})||"{}"!=J(Object(e))})},{stringify:function(e){for(var t,i,n=[e],r=1;r<arguments.length;)n.push(arguments[r++]);if(i=t=n[1],(h(t)||e!==undefined)&&!ae(e))return c(t)||(t=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!ae(t))return t}),n[1]=t,J.apply(X,n)}}),Z[Y][W]||v(Z[Y],W,Z[Y].valueOf),M(Z,R),x[H]=!0},function(e,t,i){var n=i(168),r=i(770).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return r(e)}catch(t){return a.slice()}}(e):r(n(e))}},function(e,t,i){var n=i(49),r=i(46),o=i(976),a=i(48).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});r(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,i){var n=i(31),r=i(975),o=i(19)("species");e.exports=function(e,t){var i;return r(e)&&("function"==typeof(i=e.constructor)&&(i===Array||r(i.prototype))||n(i)&&null===(i=i[o]))&&(i=undefined),new(i===undefined?Array:i)(0===t?0:t)}},function(e,t,i){e.exports=i(1021)},function(e,t,i){i(1022);var n=i(49);e.exports=n.Object.getPrototypeOf},function(e,t,i){var n=i(20),r=i(30),o=i(172),a=i(720),s=i(978);n({target:"Object",stat:!0,forced:r(function(){a(1)}),sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},function(e,t,i){e.exports=i(1024)},function(e,t,i){i(1025);var n=i(721);e.exports=n("Array","forEach")},function(e,t,i){"use strict";var n=i(20),r=i(1026);n({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(e,t,i){"use strict";var n=i(977).forEach,r=i(979);e.exports=r("forEach")?function(e){return n(this,e,1<arguments.length?arguments[1]:undefined)}:[].forEach},function(e,t,i){e.exports=i(1028)},function(e,t,i){i(1029);var n=i(721);e.exports=n("Array","indexOf")},function(e,t,i){"use strict";var n=i(20),r=i(972).indexOf,o=i(979),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,l=o("indexOf");n({target:"Array",proto:!0,forced:s||l},{indexOf:function(e){return s?a.apply(this,arguments)||0:r(this,e,1<arguments.length?arguments[1]:undefined)}})},function(e,t,i){e.exports=i(1031)},function(e,t,i){i(1032);var n=i(721);e.exports=n("Function","bind")},function(e,t,i){i(20)({target:"Function",proto:!0},{bind:i(1033)})},function(e,t,i){"use strict";var o=i(66),a=i(31),s=[].slice,l={};e.exports=Function.bind||function(t){var i=o(this),n=s.call(arguments,1),r=function(){var e=n.concat(s.call(arguments));return this instanceof r?function(e,t,i){if(!(t in l)){for(var n=[],r=0;r<t;r++)n[r]="a["+r+"]";l[t]=Function("C,a","return new C("+n.join(",")+")")}return l[t](e,i)}(i,e.length,e):i.apply(t,e)};return a(i.prototype)&&(r.prototype=i.prototype),r}},function(e,t,i){e.exports=i(1035),i(1049),i(1050),i(1051),i(1052)},function(e,t,i){i(980),i(982),i(985),i(1042),i(993),i(1048);var n=i(49);e.exports=n.Promise},function(e,t,i){"use strict";var n=i(981),r={};r[i(19)("toStringTag")]="z",e.exports="[object z]"!==String(r)?function(){return"[object "+n(this)+"]"}:r.toString},function(e,t,i){"use strict";var r=i(984).IteratorPrototype,o=i(171),a=i(661),s=i(664),l=i(666),u=function(){return this};e.exports=function(e,t,i){var n=t+" Iterator";return e.prototype=o(r,{next:a(1,i)}),s(e,n,!1,!0),l[n]=u,e}},function(e,t,i){var n=i(31);e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,i){"use strict";var n=i(168),r=i(1041),o=i(666),a=i(65),s=i(775),l="Array Iterator",u=a.set,c=a.getterFor(l);e.exports=s(Array,"Array",function(e,t){u(this,{type:l,target:n(e),index:0,kind:t})},function(){var e=c(this),t=e.target,i=e.kind,n=e.index++;return!t||n>=t.length?(e.target=undefined,{value:undefined,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,i){var n=i(19),r=i(171),o=i(47),a=n("unscopables"),s=Array.prototype;s[a]==undefined&&o(s,a,r(null)),e.exports=function(e){s[a][e]=!0}},function(e,t,i){"use strict";var n,r,o,a,s=i(20),l=i(169),u=i(14),c=i(49),h=i(986),p=i(57),d=i(987),g=i(664),f=i(988),I=i(31),B=i(66),E=i(777),m=i(64),_=i(173),b=i(989),T=i(990),y=i(991).set,C=i(1046),v=i(992),N=i(1047),V=i(667),S=i(722),x=i(778),L=i(65),w=i(773),A=i(19)("species"),D="Promise",M=L.get,k=L.set,P=L.getterFor(D),H=h,R=u.TypeError,Y=u.document,W=u.process,O=u.fetch,F=W&&W.versions,G=F&&F.v8||"",Z=V.f,X=Z,J="process"==m(W),K=!!(Y&&Y.createEvent&&u.dispatchEvent),Q="unhandledrejection",U=w(D,function(){var e=H.resolve(1),t=function(){},i=(e.constructor={})[A]=function(e){e(t,t)};return!((J||"function"==typeof PromiseRejectionEvent)&&(!l||e["finally"])&&e.then(t)instanceof i&&0!==G.indexOf("6.6")&&-1===x.indexOf("Chrome/66"))}),z=U||!b(function(e){H.all(e)["catch"](function(){})}),j=function(e){var t;return!(!I(e)||"function"!=typeof(t=e.then))&&t},q=function(p,d,g){var f;d.notified||(d.notified=!0,f=d.reactions,C(function(){for(var e=d.value,t=1==d.state,i=0;f.length>i;){var n,r,o,a=f[i++],s=t?a.ok:a.fail,l=a.resolve,u=a.reject,c=a.domain;try{s?(t||(2===d.rejection&&ie(p,d),d.rejection=1),!0===s?n=e:(c&&c.enter(),n=s(e),c&&(c.exit(),o=!0)),n===a.promise?u(R("Promise-chain cycle")):(r=j(n))?r.call(n,l,u):l(n)):u(e)}catch(h){c&&!o&&c.exit(),u(h)}}d.reactions=[],d.notified=!1,g&&!d.rejection&&ee(p,d)}))},$=function(e,t,i){var n,r;K?((n=Y.createEvent("Event")).promise=t,n.reason=i,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:i},(r=u["on"+e])?r(n):e===Q&&N("Unhandled promise rejection",i)},ee=function(i,n){y.call(u,function(){var e,t=n.value;if(te(n)&&(e=S(function(){J?W.emit("unhandledRejection",t,i):$(Q,i,t)}),n.rejection=J||te(n)?2:1,e.error))throw e.value})},te=function(e){return 1!==e.rejection&&!e.parent},ie=function(e,t){y.call(u,function(){J?W.emit("rejectionHandled",e):$("rejectionhandled",e,t.value)})},ne=function(t,i,n,r){return function(e){t(i,n,e,r)}},re=function(e,t,i,n){t.done||(t.done=!0,n&&(t=n),t.value=i,t.state=2,q(e,t,!0))},oe=function(i,n,r,e){if(!n.done){n.done=!0,e&&(n=e);try{if(i===r)throw R("Promise can't be resolved itself");var o=j(r);o?C(function(){var e={done:!1};try{o.call(r,ne(oe,i,e,n),ne(re,i,e,n))}catch(t){re(i,e,t,n)}}):(n.value=r,n.state=1,q(i,n,!1))}catch(t){re(i,{done:!1},t,n)}}};U&&(H=function(e){E(this,H,D),B(e),n.call(this);var t=M(this);try{e(ne(oe,this,t),ne(re,this,t))}catch(i){re(this,t,i)}},(n=function(e){k(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:undefined})}).prototype=d(H.prototype,{then:function(e,t){var i=P(this),n=Z(T(this,H));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=J?W.domain:undefined,i.parent=!0,i.reactions.push(n),0!=i.state&&q(this,i,!1),n.promise},"catch":function(e){return this.then(undefined,e)}}),r=function(){var e=new n,t=M(e);this.promise=e,this.resolve=ne(oe,e,t),this.reject=ne(re,e,t)},V.f=Z=function(e){return e===H||e===o?new r:X(e)},l||"function"!=typeof h||(a=h.prototype.then,p(h.prototype,"then",function(e,t){var i=this;return new H(function(e,t){a.call(i,e,t)}).then(e,t)},{unsafe:!0}),"function"==typeof O&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return v(H,O.apply(u,arguments))}}))),s({global:!0,wrap:!0,forced:U},{Promise:H}),g(H,D,!1,!0),f(D),o=c[D],s({target:D,stat:!0,forced:U},{reject:function(e){var t=Z(this);return t.reject.call(undefined,e),t.promise}}),s({target:D,stat:!0,forced:l||U},{resolve:function(e){return v(l&&this===o?H:this,e)}}),s({target:D,stat:!0,forced:z},{all:function(e){var s=this,t=Z(s),l=t.resolve,u=t.reject,i=S(function(){var n=B(s.resolve),r=[],o=0,a=1;_(e,function(e){var t=o++,i=!1;r.push(undefined),a++,n.call(s,e).then(function(e){i||(i=!0,r[t]=e,--a||l(r))},u)}),--a||l(r)});return i.error&&u(i.value),t.promise},race:function(e){var i=this,n=Z(i),r=n.reject,t=S(function(){var t=B(i.resolve);_(e,function(e){t.call(i,e).then(n.resolve,r)})});return t.error&&r(t.value),n.promise}})},function(e,t,i){var n=i(19),r=i(666),o=n("iterator"),a=Array.prototype;e.exports=function(e){return e!==undefined&&(r.Array===e||a[o]===e)}},function(e,t,i){var n=i(981),r=i(666),o=i(19)("iterator");e.exports=function(e){if(e!=undefined)return e[o]||e["@@iterator"]||r[n(e)]}},function(e,t,i){var a=i(32);e.exports=function(e,t,i,n){try{return n?t(a(i)[0],i[1]):t(i)}catch(o){var r=e["return"];throw r!==undefined&&a(r.call(e)),o}}},function(e,t,i){var n,r,o,a,s,l,u,c,h=i(14),p=i(714).f,d=i(64),g=i(991).set,f=i(778),I=h.MutationObserver||h.WebKitMutationObserver,B=h.process,E=h.Promise,m="process"==d(B),_=p(h,"queueMicrotask"),b=_&&_.value;b||(n=function(){var e,t;for(m&&(e=B.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(i){throw r?a():o=undefined,i}}o=undefined,e&&e.enter()},a=m?function(){B.nextTick(n)}:I&&!/(iphone|ipod|ipad).*applewebkit/i.test(f)?(s=!0,l=document.createTextNode(""),new I(n).observe(l,{characterData:!0}),function(){l.data=s=!s}):E&&E.resolve?(u=E.resolve(undefined),c=u.then,function(){c.call(u,n)}):function(){g.call(h,n)}),e.exports=b||function(e){var t={fn:e,next:undefined};o&&(o.next=t),r||(r=t,a()),o=t}},function(e,t,i){var n=i(14);e.exports=function(e,t){var i=n.console;i&&i.error&&(1===arguments.length?i.error(e):i.error(e,t))}},function(e,t,i){"use strict";var n=i(20),r=i(169),o=i(986),a=i(170),s=i(990),l=i(992),u=i(57);n({target:"Promise",proto:!0,real:!0},{"finally":function(t){var i=s(this,a("Promise")),e="function"==typeof t;return this.then(e?function(e){return l(i,t()).then(function(){return e})}:t,e?function(e){return l(i,t()).then(function(){throw e})}:t)}}),r||"function"!=typeof o||o.prototype["finally"]||u(o.prototype,"finally",a("Promise").prototype["finally"])},function(e,t,i){"use strict";var n=i(20),r=i(35),o=i(720),a=i(776),s=i(171),l=i(48),u=i(661),c=i(173),h=i(47),p=i(32),d=i(65),g=d.set,f=d.getterFor("AggregateError"),I=function(e,t){var i=this;if(!(i instanceof I))return new I(e,t);a&&(i=a(new Error(t),o(i)));var n=[];return c(e,n.push,n),r?g(i,{errors:n,type:"AggregateError"}):i.errors=n,t!==undefined&&h(i,"message",String(t)),i};I.prototype=s(Error.prototype,{constructor:u(5,I),message:u(5,""),name:u(5,"AggregateError"),toString:u(5,function(){var e=(e=p(this).name)===undefined?"AggregateError":String(e),t=this.message;return e+": "+(t=t===undefined?"":String(t))})}),r&&l.f(I.prototype,"errors",{get:function(){return f(this).errors},configurable:!0}),n({global:!0},{AggregateError:I})},function(e,t,i){i(993)},function(e,t,i){"use strict";var n=i(20),r=i(667),o=i(722);n({target:"Promise",stat:!0},{"try":function(e){var t=r.f(this),i=o(e);return(i.error?t.reject:t.resolve)(i.value),t.promise}})},function(e,t,i){"use strict";var n=i(20),h=i(66),p=i(170),r=i(667),o=i(722),d=i(173),g="No one promise resolved";n({target:"Promise",stat:!0},{any:function(e){var l=this,t=r.f(l),u=t.resolve,c=t.reject,i=o(function(){var n=h(l.resolve),r=[],o=0,a=1,s=!1;d(e,function(e){var t=o++,i=!1;r.push(undefined),a++,n.call(l,e).then(function(e){i||s||(s=!0,u(e))},function(e){i||s||(i=!0,r[t]=e,--a||c(new(p("AggregateError"))(r,g)))})}),--a||c(new(p("AggregateError"))(r,g))});return i.error&&c(i.value),t.promise}})},function(e,t,i){e.exports=i(1054)},function(e,t,i){i(1055);var n=i(721);e.exports=n("String","replace")},function(e,t,i){"use strict";var n=i(1056),y=i(32),C=i(172),v=i(718),N=i(719),o=i(715),V=i(1058),S=i(1059),x=Math.max,L=Math.min,w=Math.floor,A=/\$([$&'`]|\d\d?|<[^>]*>)/g,D=/\$([$&'`]|\d\d?)/g;n("replace",2,function(r,b,T){return[function(e,t){var i=o(this),n=e==undefined?undefined:e[r];return n!==undefined?n.call(e,i,t):b.call(String(i),e,t)},function(e,t){var i=T(b,e,this,t);if(i.done)return i.value;var n=y(e),r=String(this),o="function"==typeof t;o||(t=String(t));var a,s=n.global;s&&(a=n.unicode,n.lastIndex=0);for(var l=[];;){var u=S(n,r);if(null===u)break;if(l.push(u),!s)break;""===String(u[0])&&(n.lastIndex=V(r,v(n.lastIndex),a))}for(var c,h="",p=0,d=0;d<l.length;d++){u=l[d];for(var g=String(u[0]),f=x(L(N(u.index),r.length),0),I=[],B=1;B<u.length;B++)I.push((c=u[B])===undefined?c:String(c));var E,m=u.groups,_=o?(E=[g].concat(I,f,r),m!==undefined&&E.push(m),String(t.apply(undefined,E))):function(o,a,s,l,u,e){var c=s+o.length,h=l.length,t=D;u!==undefined&&(u=C(u),t=A);return b.call(e,t,function(e,t){var i;switch(t.charAt(0)){case"$":return"$";case"&":return o;case"`":return a.slice(0,s);case"'":return a.slice(c);case"<":i=u[t.slice(1,-1)];break;default:var n=+t;if(0==n)return e;if(h<n){var r=w(n/10);return 0===r?e:r<=h?l[r-1]===undefined?t.charAt(1):l[r-1]+t.charAt(1):e}i=l[n-1]}return i===undefined?"":i})}(g,r,f,I,m,t);p<=f&&(h+=r.slice(p,f)+_,p=f+g.length)}return h+r.slice(p)}]})},function(e,t,i){"use strict";var h=i(47),p=i(57),d=i(30),g=i(19),f=i(994),I=g("species"),B=!d(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),E=!d(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var i="ab".split(e);return 2!==i.length||"a"!==i[0]||"b"!==i[1]});e.exports=function(i,e,t,n){var o,r,a,s,l=g(i),u=!d(function(){var e={};return e[l]=function(){return 7},7!=""[i](e)}),c=u&&!d(function(){var e=!1,t=/a/;return t.exec=function(){return e=!0,null},"split"===i&&(t.constructor={},t.constructor[I]=function(){return t}),t[l](""),!e});u&&c&&("replace"!==i||B)&&("split"!==i||E)||(o=/./[l],a=(r=t(l,""[i],function(e,t,i,n,r){return t.exec===f?u&&!r?{done:!0,value:o.call(t,i,n)}:{done:!0,value:e.call(i,t,n)}:{done:!1}}))[0],s=r[1],p(String.prototype,i,a),p(RegExp.prototype,l,2==e?function(e,t){return s.call(e,this,t)}:function(e){return s.call(e,this)}),n&&h(RegExp.prototype[l],"sham",!0))}},function(e,t,i){"use strict";var n=i(32);e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,i){"use strict";var n=i(983).charAt;e.exports=function(e,t,i){return t+(i?n(e,t).length:1)}},function(e,t,i){var r=i(64),o=i(994);e.exports=function(e,t){var i=e.exec;if("function"==typeof i){var n=i.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,i){i(1061),i(980),i(982),i(985);var n=i(49);e.exports=n.Map},function(e,t,i){"use strict";var n=i(1062),r=i(1065);e.exports=n("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},r,!0)},function(e,t,i){"use strict";var I=i(20),B=i(14),E=i(773),m=i(57),_=i(995),b=i(173),T=i(777),y=i(31),C=i(30),v=i(989),N=i(664),V=i(1064);e.exports=function(n,e,t,r,o){var i,a,s,l,u,c=B[n],h=c&&c.prototype,p=c,d=r?"set":"add",g={},f=function(e){var i=h[e];m(h,e,"add"==e?function(e){return i.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!y(e))&&i.call(this,0===e?0:e)}:"get"==e?function(e){return o&&!y(e)?undefined:i.call(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!y(e))&&i.call(this,0===e?0:e)}:function(e,t){return i.call(this,0===e?0:e,t),this})};return E(n,"function"!=typeof c||!(o||h.forEach&&!C(function(){(new c).entries().next()})))?(p=t.getConstructor(e,n,r,d),_.REQUIRED=!0):E(n,!0)&&(a=(i=new p)[d](o?{}:-0,1)!=i,s=C(function(){i.has(1)}),l=v(function(e){new c(e)}),u=!o&&C(function(){for(var e=new c,t=5;t--;)e[d](t,t);return!e.has(-0)}),l||(((p=e(function(e,t){T(e,p,n);var i=V(new c,e,p);return t!=undefined&&b(t,i[d],i,r),i})).prototype=h).constructor=p),(s||u)&&(f("delete"),f("has"),r&&f("get")),(u||a)&&f(d),o&&h.clear&&delete h.clear),g[n]=p,I({global:!0,forced:p!=c},g),N(p,n),o||t.setStrong(p,n,r),p}},function(e,t,i){var n=i(30);e.exports=!n(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(e,t,i){var o=i(31),a=i(776);e.exports=function(e,t,i){var n,r;return a&&"function"==typeof(n=t.constructor)&&n!==i&&o(r=n.prototype)&&r!==i.prototype&&a(e,r),e}},function(e,t,i){"use strict";var u=i(48).f,c=i(171),h=i(987),p=i(665),d=i(777),g=i(173),a=i(775),s=i(988),f=i(35),I=i(995).fastKey,n=i(65),B=n.set,E=n.getterFor;e.exports={getConstructor:function(e,i,n,r){var o=e(function(e,t){d(e,o,i),B(e,{type:i,index:c(null),first:undefined,last:undefined,size:0}),f||(e.size=0),t!=undefined&&g(t,e[r],e,n)}),s=E(i),a=function(e,t,i){var n,r,o=s(e),a=l(e,t);return a?a.value=i:(o.last=a={index:r=I(t,!0),key:t,value:i,previous:n=o.last,next:undefined,removed:!1},o.first||(o.first=a),n&&(n.next=a),f?o.size++:e.size++,"F"!==r&&(o.index[r]=a)),e},l=function(e,t){var i,n=s(e),r=I(t);if("F"!==r)return n.index[r];for(i=n.first;i;i=i.next)if(i.key==t)return i};return h(o.prototype,{clear:function(){for(var e=s(this),t=e.index,i=e.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=undefined),delete t[i.index],i=i.next;e.first=e.last=undefined,f?e.size=0:this.size=0},"delete":function(e){var t,i,n=s(this),r=l(this,e);return r&&(t=r.next,i=r.previous,delete n.index[r.index],r.removed=!0,i&&(i.next=t),t&&(t.previous=i),n.first==r&&(n.first=t),n.last==r&&(n.last=i),f?n.size--:this.size--),!!r},forEach:function(e){for(var t,i=s(this),n=p(e,1<arguments.length?arguments[1]:undefined,3);t=t?t.next:i.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),h(o.prototype,n?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return a(this,0===e?0:e,t)}}:{add:function(e){return a(this,e=0===e?0:e,e)}}),f&&u(o.prototype,"size",{get:function(){return s(this).size}}),o},setStrong:function(e,t,i){var n=t+" Iterator",r=E(t),o=E(n);a(e,t,function(e,t){B(this,{type:n,target:e,state:r(e),kind:t,last:undefined})},function(){for(var e=o(this),t=e.kind,i=e.last;i&&i.removed;)i=i.previous;return e.target&&(e.last=i=i?i.next:e.state.first)?"keys"==t?{value:i.key,done:!1}:"values"==t?{value:i.value,done:!1}:{value:[i.key,i.value],done:!1}:(e.target=undefined,{value:undefined,done:!0})},i?"entries":"values",!i,!0),s(t)}}},function(e,t,i){"use strict";var n=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(1067));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}_global.Fix=n},function(e,t,i){(function(ae){function se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e,d){"use strict";d="default"in d?d["default"]:d;var t=void 0,g={$accessors:t,$vbthis:t,$vbsetter:t,$vm:t},h=["$accessors","$vbthis","$vbsetter","$vm"],n=[];function r(e,t,i){}function l(e){return typeof e==="function"&&/native code/.test(e.toString())}d.each(["slice","splice"],function(e){n[e]=Array.prototype[e]}),Array.prototype.splice=function(){this.__ref__=c();for(var e=arguments.length,t=Array(e),i=0;i<e;i++){t[i]=arguments[i]}return n["splice"].apply(this,t)};var i=/\d\.\d{4}/;function c(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"bi";return String(Math.random()+Math.random()).replace(i,e)}function o(){if(typeof navigator==="undefined"){return false}return/(msie|trident)/i.test(navigator.userAgent.toLowerCase())}function a(){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}var s=o()&&a()<9,u=Object.prototype.toString;function f(e){return u.call(e)==="[object Object]"}var p=/[^\w.$]/;function I(e){if(p.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}}function B(e){var t=void 0;if(d.isArray(e)){t=[];for(var i=0,n=e.length;i<n;i++){t[i]=B(e[i])}}else if(e&&f(e)){t={};for(var r in e){if(h.indexOf(r)===-1){t[r]=B(e[r])}}}else{t=e}return t}function E(e){if(e===null)return null;if(Array.isArray(e)){var t=[].concat(e);if(e.__ref__!==undefined)t.__ref__=e.__ref__;return t}return B(e)}var m=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 ae!=="undefined"&&l(ae)){e=function e(){ae(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})}}}();function b(e,t,i){if(typeof t==="object"){i=t;t=e;e=function o(){return t.apply(this,arguments)}}var n=function n(){},r=t.prototype;n.prototype=r;e.prototype=new n;e.superclass=r;d.extend(e.prototype,i,{superclass:t});return e}var T=typeof Symbol!=="undefined"?Symbol.prototype:null,y,C=Object.prototype.toString,v=function v(e,t,i,n){if(e instanceof d)e=e._wrapped;if(t instanceof d)t=t._wrapped;var r=C.call(e);if(r!==C.call(t))return false;switch(r){case"[object RegExp]":case"[object String]":return""+e===""+t;case"[object Number]":if(+e!==+e)return+t!==+t;return+e===0?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return T.valueOf.call(e)===T.valueOf.call(t);default:}var o=r==="[object Array]";if(!o){if(typeof e!="object"||typeof t!="object")return false;var a=e.constructor,s=t.constructor;if(a!==s&&!(d.isFunction(a)&&a instanceof a&&d.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t){return false}}i=i||[];n=n||[];var l=i.length;while(l--){if(i[l]===e)return n[l]===t}i.push(e);n.push(t);if(o){l=e.length;if(l!==t.length)return false;while(l--){if(!N(e[l],t[l],i,n))return false}}else{var u=d.keys(e);var c=void 0;l=u.length;if(d.keys(t).length!==l)return false;while(l--){c=u[l];if(h.indexOf(c)!==-1){return true}if(!(Object.keys(t).indexOf(c)!==-1&&N(e[c],t[c],i,n)))return false}}i.pop();n.pop();return true},N=function N(e,t,i,n){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return false;if(e!==e)return t!==t;var r=typeof e;if(r!=="function"&&r!=="object"&&typeof t!="object")return false;if(r==="function")return true;return v(e,t,i,n)};function V(e,t){if(e===t)return true;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return false;var i=void 0,n=void 0,r=void 0,o=void 0;if(Array.isArray(e)){i=e.length;if(i!==t.length)return false;for(n=i;n--!==0;){if(!V(e[n],t[n]))return false}return true}if(e.constructor===RegExp)return true;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();o=Object.keys(e);i=o.length;if(i!==Object.keys(t).length)return false;for(n=i;n--!==0;){if(!Object.prototype.hasOwnProperty.call(t,o[n]))return false}for(n=i;n--!==0;){r=o[n];if(h.indexOf(r)!==-1)continue;if(!V(e[r],t[r]))return false}return true}if(typeof e==="function")return true;return e!==e&&t!==t}var S={};function x(e){return S[e]}function L(e,t){S[e]=_.cloneDeep(t)}var w=void 0,A={"||":w,"&&":w,"(":w,")":w};function D(e){var t="";for(var i=0,n=e.length;i<n;i++){if(d.isBoolean(e[i])||d.has(A,e[i])){t+=e[i]}else{t+="false"}}return new Function("return "+t)()}function M(r,e,o){var s=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};var l=r;if(!l.$watch&&l.$vm){l=l.$vm}if(f(o)){s=o;o=o.handler}if(typeof o==="string"){o=l[o]}s=s||{};s.user=true;var a=void 0;if(d.isFunction(e)||!(a=e.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g))||a.length===1&&!/\*/.test(e)){l.$watch(e,o,s);return[]}var t=[];var u=a.slice();var c=false,h=false;var p=function p(e,t,i,n){if(c===true){return}u[e]=true;if(D(u)){c=true;o.call(r,t,i,n)}if(s&&s.sync){c=false;h=false;u=a.slice()}else{if(!h){h=true;m(function(){c=false;h=false;u=a.slice()})}}};d.each(a,function(e,n){if(d.has(A,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=t?e:function(){var i={};d.each(l.model,function(e,t){if(t in g)return;i[t]=e});return i};l.$watch(i,function(e,t,i){p(n,e,t,d.extend({index:n},i))},d.extend(s,{deep:t}));return}if(/\*\*$|\*$/.test(e)){throw new Error("not support")}if(/\*/.test(e)){var o=e.split(".");var a=function a(){var t={root:l.model};var r=function r(e,i){var n={};if(o[i]==="*"){d.each(t,function(e,i){d.each(e,function(e,t){if(i+t in g)return;n[i+t]=e})})}else{d.each(t,function(e,t){if(t+o[i]in g)return;n[t+o[i]]=e[o[i]]})}t=n};for(var e=0,i=o.length;e<i;e++){r(i,e)}return t};l.$watch(a,function(e,t,i){p(n,e,t,d.extend({index:n},i))},s);return}l.$watch(e,function(e,t,i){p(n,e,t,d.extend({index:n},i))},s)});return t}var k={},P={},H=function H(){},R=10,Y=function(){function s(e){var t=e.get,i=e.last,n=e.listener,r=e.sync,o=e.deep,a=e.id;se(this,s);this.id=a;this.get=t;this.last=E(i);this.listener=n||H;this.sync=r||false;return{id:this.id,get:this.get,last:this.last,listener:this.listener}}s.prototype.getInstance=function e(){return this};return s}();function W(n,r){var o=n._stateWatchers={};for(var e in r){n.model[e]=r[e]}var a=function a(e){var t=r[e];o[e]=new Y({id:n._modelHashId+"-"+e,get:function i(){return n.model[e]},last:t,listener:n.options.defaultCallback||H})};for(var t in r){a(t)}}function O(e,t){var i=e._computedWatchers={};var n=e._computedOrder=[];for(var r in t){var o=t[r],a=e;n.push(r);i[r]=new Y({id:e._modelHashId+"-"+r,get:d.bind(o,a),last:undefined,listener:H})}}function F(e,t){e._watchers||(e._watchers=[]);for(var i in t){var n=t[i];if(d.isArray(n)){for(var r=0;r<n.length;r++){M(e,i,n[r])}}else{M(e,i,n)}}}function G(e,t,i){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(f(i)){n=i;i=i.handler}if(typeof i==="string"){i=e[i]}var r=d.isFunction(t)?d.bind(t,e):d.bind(function(){return I("model."+t)(e)},e);return new Y({get:r,listener:d.bind(i,e),last:r(),sync:n.sync,deep:n.deep,id:n.id})}function Z(t,i){return function(){var e=t.apply(i,[].concat(Array.prototype.slice.call(arguments)));i.$digest();return e}}function X(e,t){for(var i in t){e[i]=t[i]==null?r:Z(t[i],e)}}function J(n){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];d.each(e.reverse(),function(e){var t=x(e);for(var i in t){if(typeof t[i]!=="function")continue;if(d.has(n,i))continue;n[i]=Z(t[i],n)}})}function K(r,e){var n=r._contextWatchers={};function o(n){var e=r._parent;while(e){if(e.childContext&&e.childContext.indexOf(n)>-1){e.$watch(n,function(e,t,i){if(!r._contextWatchers[n])return;r.model[n]=e;r._contextWatchers[n].last=E(e);r.$digest()},{id:r._modelHashId+"-"+n});return{p:e,value:e.model[n]}}e=e._parent}}d.each(e,function(t){var i=o(t);if(!i)return;r.model[t]=i.p?i.p.model[t]:undefined;n[t]=new Y({id:i.p._modelHashId+"-"+t,get:function e(){return r.model[t]},last:r.model[t],listener:d.bind(function(e){i.p.model[t]=e;i.p.$digest()},i.p)})})}function Q(r){var o=false;d.each(r._stateWatchers,function(e,t){var i=e.get();var n=e.last;if(!V(i,n)){r.model[t]=i;o=true;e.last=E(i)}});return o}function U(o){var a=false;var s=[],l=[];d.each(o._computedOrder,function(e){var t=o._computedWatchers[e];try{var i=t.get();var n=t.last;if(!V(i,n)){o.model[e]=i;a=true;s.push(e);t.last=E(i)}else{l.push(e)}}catch(r){a=true;s.push(e)}});o._computedOrder=[].concat(l,s);return a}function z(o){var a=false;d.each(o._contextWatchers,function(e,t){var i=e.get();var n=e.last;if(!V(i,n)){var r={id:e.id,cb:d.bind(e.listener,o,i,n,o)};o.contextListeners.push(r);o.model[t]=i;a=true;e.last=E(i)}});return a}function j(e){var t=true,i=true,n=true;for(var r=R;t&&r>0;r--){t=Q(e)}for(var o=R;i&&o>0;o--){i=z(e)}for(var a=R;n&&a>0;a--){n=U(e)}}var q=function(){var r={};return function o(e,t){var i=e.id;var n=e.cb;if(i&&r[i]){return}m(function(){n();r[i]=false},t);r[i]=true}}();function $(r){var o=[].concat(r.syncListeners||[]);var a=[].concat(r.asyncListeners||[]);var e=[].concat(r.contextListeners||[]);r.asyncListeners=[];r.syncListeners=[];var t=[].concat(r._watchers);d.each(t,function(e){if(!e)return;var t=e.get();var i=e.last;if(V(t,i))return;var n={id:e.id,cb:d.bind(e.listener,r,t,i,r)};e.sync===true?o.push(n):a.push(n);e.last=E(t)});d.each(o,function(e){e.cb()});if(e.length!==0||a.length!==0){m(function(){d.each(BI.uniqBy(e.reverse(),"id").reverse(),function(e){e.cb()});d.each(a,function(e){e.cb()})})}}function ee(){d.each(P,function(e){e&&e.$digest&&e.$digest()})}var te=function(){function l(){se(this,l)}l.prototype._constructor=function u(e){this.alive=true;this.options=e||{};this.model={$vm:this};this._modelHashId=c("model");this.syncListeners=[];this.asyncListeners=[];this.contextListeners=[];this._parent=l.target;var t=d.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=this.mixins;n&&K(this,n);J(this,s);this.init();W(this,t);O(this,i);j(this);F(this,o);X(this,a);this.created&&this.created();k[this._modelHashId]=this};l.prototype._init=function e(){};l.prototype.init=function t(){this._init()};l.prototype.destroy=function i(){this.alive=false;k[this._modelHashId]=null;this._watchers&&(this._watchers=[]);this._computedWatchers&&(this._computedWatchers=[]);this._stateWatchers&&(this._stateWatchers=[]);this._contextWatchers&&(this._contextWatchers=[]);this.destroyed&&this.destroyed()};l.prototype.$watch=function r(e,t,i){var n=G(this,e,t,i);this._watchers.push(n)};l.prototype.$digest=function n(){j(this);$(this);if(!this.options.define){ee()}};l.prototype.getModelID=function o(){return this._modelHashId};return l}();function ie(){return k}function ne(){d.each(ie(),function(e){e&&e.$digest&&e.$digest()})}function re(e){var t=b(te,{state:function n(){return e}});var i=new t;i._constructor({define:true});P[i.getModelID()]=i;return i.model}var oe="2.0";e.version=oe,e.$$skipArray=g,e.mixin=L,e.toJSON=B,e.nextListener=q,e.Model=te,e.getAllModelInstances=ie,e.refreshAll=ne,e.define=re,e.inherit=b,e.watch=M,e.__esModule=true}(t,(i(996),i(996)))}).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);var e=i.apply(this,arguments);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 t=BI.Loader.prototype[e];BI.Loader.prototype[e]=function(){l(this);var e=t.apply(this,arguments);return u(),e}}),BI.Widget.prototype._initRender=function(){this.beforeInit?(this.__asking=!0,this.beforeInit(BI.bind(function(){this.model&&this.model.$vm&&this.model.$vm.$digest(),this._render()},this)),!0===this.__asking&&(this.__async=!0)):this._render()};var d=BI.Widget.prototype._init;BI.Widget.prototype._init=function(){var e=p.call(this);d.apply(this,arguments),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 e=BI.Widget.prototype.__d;BI.Widget.prototype.__d=function(){e.apply(this,arguments),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})});var f,I,B,E=function(){BI.nextTick(function(){Fix&&Fix.refreshAll&&Fix.refreshAll()})};$(document).ajaxComplete(E),BI.history&&(f=BI.history.navigate,BI.history.navigate=function(){f.apply(this,arguments),BI.defer(function(){E()},200)},I=window.history.back,window.history.back=function(){I.apply(this,arguments),BI.defer(function(){E()},200)}),BI.Router&&(B=BI.Router.prototype.execute,BI.Router.prototype.execute=function(){B.apply(this,arguments),E()}),_.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)},Fix.set=function(e,t,i){try{e&&(e[t]=i)}catch(n){}finally{return _.cloneDeep(e)}},Fix.del=function(e,t){try{delete e[t]}catch(i){}finally{return _.cloneDeep(e)}},BI.watch=Fix.watch}()},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){i(79),i(668),i(669),i(670),i(671),i(672),i(673),i(998),i(1006),i(1010),i(1014),i(1020),i(1023),i(1027),i(1030),i(1034),i(1053),i(1060),i(674),i(675),i(202),i(203),i(204),i(205),i(206),i(207),i(208),i(209),i(210),i(211),i(212),i(213),i(214),i(215),i(216),i(217),i(218),i(80),i(81),i(83),i(219),i(220),i(84),i(85),i(86),i(87),i(88),i(89),i(221),i(222),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(676),i(677),i(678),i(679),i(680),i(681),i(683),i(684),i(685),i(244),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(1066),i(288),i(289),i(290),i(291),i(292),i(293),i(294),i(295),i(296),i(297),i(298),i(299),i(300),i(301),i(302),i(303),i(304),i(305),i(306),i(307),i(308),i(309),i(310),i(311),i(312),i(313),i(314),i(315),i(316),i(317),i(318),i(319),i(320),i(321),i(322),i(323),i(324),i(325),i(326),i(327),i(328),i(329),i(330),i(331),i(332),i(333),i(334),i(335),i(336),i(337),i(338),i(339),i(340),i(341),i(342),i(343),i(344),i(687),i(345),i(346),i(347),i(348),i(349),i(350),i(351),i(352),i(688),i(689),i(690),i(691),i(692),i(693),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(694),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(695),i(696),i(697),i(698),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(699),i(700),i(701),i(702),i(703),i(704),i(705),i(706),i(707),i(708),i(709),i(710),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(711),i(712),i(713),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(686),i(1068),i(968),e.exports=i(658)}]);