From 6f992ce86ff558b6cbfff7ce757d56d313af3871 Mon Sep 17 00:00:00 2001 From: dailer Date: Tue, 16 Jul 2019 18:51:53 +0800 Subject: [PATCH 1/4] =?UTF-8?q?BI-48098=20fix:=20=E3=80=90512=E5=9B=9E?= =?UTF-8?q?=E5=BD=92=E3=80=91=E6=95=B0=E6=8D=AE=E5=87=86=E5=A4=87=EF=BC=8C?= =?UTF-8?q?=E5=9B=A0=E6=96=87=E4=BB=B6=E6=A0=BC=E5=BC=8F=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=97=B6=E6=94=B9=E4=B8=8B=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/input/file.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/base/single/input/file.js b/src/base/single/input/file.js index ce8876c7e..51fc59158 100644 --- a/src/base/single/input/file.js +++ b/src/base/single/input/file.js @@ -270,9 +270,13 @@ handler.attach_array.push(attachO); } } catch (e) { - if (isFunction(handler.onerror)) {handler.onerror(rpe, event || _global.event);} + if (isFunction(handler.onerror)) { + handler.onerror(rpe, event || _global.event); + } + } + if (isFunction(handler.onload)) { + handler.onload(rpe, {responseText: responseText}); } - if (isFunction(handler.onload)) {handler.onload(rpe, {responseText: responseText});} }, target = ["AjaxUpload", (new Date).getTime(), String(Math.random()).substring(2)].join("_"); try { // IE < 8 does not accept enctype attribute ... @@ -483,7 +487,14 @@ self.fireEvent(BI.File.EVENT_ERROR); return; } - self.fireEvent(BI.File.EVENT_UPLOADED); + var error = BI.some(_wrap.attach_array, function (index, attach) { + if (attach.errorCode) { + BI.Msg.toast(attach.errorMsg, {level: "error"}); + self.fireEvent(BI.File.EVENT_ERROR, attach); + return true; + } + }); + !error && self.fireEvent(BI.File.EVENT_UPLOADED); // enable again the submit button/element }, 1000); }; From 5c4d00ea1b1b0d203ff0516b9f9ce189631a562e Mon Sep 17 00:00:00 2001 From: dailer Date: Wed, 17 Jul 2019 09:10:53 +0800 Subject: [PATCH 2/4] =?UTF-8?q?BI-47693=20=20fix:=20=E7=8E=B0=E4=BB=A3?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=AD=EF=BC=8CBI.ResizeDetector.?= =?UTF-8?q?addResizeListener=E4=BC=9A=E9=BB=98=E8=AE=A4=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/detectElementResize.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/platform/web/detectElementResize.js b/src/core/platform/web/detectElementResize.js index 724fab307..0ca867207 100644 --- a/src/core/platform/web/detectElementResize.js +++ b/src/core/platform/web/detectElementResize.js @@ -112,8 +112,10 @@ }; var addResizeListener = function (element, fn) { - if (attachEvent) element.attachEvent("onresize", fn); - else { + if (attachEvent) { + element.attachEvent("onresize", fn); + fn(); + } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; createStyles(); From 469244159871d6d7343b11d60d7155ac97cc14ab Mon Sep 17 00:00:00 2001 From: dailer Date: Wed, 17 Jul 2019 10:05:32 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20,?= =?UTF-8?q?=E6=9B=B4=E6=96=B0font=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/font/iconfont.eot | Bin 100824 -> 100716 bytes dist/font/iconfont.svg | 200 +++++++++++++++++++++------------------ dist/font/iconfont.ttf | Bin 100656 -> 100548 bytes dist/font/iconfont.woff | Bin 51340 -> 51156 bytes dist/font/iconfont.woff2 | Bin 40704 -> 40400 bytes 5 files changed, 106 insertions(+), 94 deletions(-) diff --git a/dist/font/iconfont.eot b/dist/font/iconfont.eot index efcff305986600e1f1c66e98f4a821855595f861..14c8ba13a37c9d68e73f1e298c999a597d349fcb 100644 GIT binary patch delta 18215 zcmbV!3w%`7x$pY+o_A&@nRk*2A(KfmBtXbxG6MvX0TJZ=5RivJK;8vJ%R;OyM_1NldJr?m%>SKoXXpgqq)|Twt|F>6ypy%9k@69j&z1DuL zz1I5H_g*_Wl{S5PyUDa-7m1g5?l;8@Z|&Os(f-6O$ybG-%|eLjSFN1C`o77_OhQ=B z2vJ7w}y1H}X0$FsOEVoPzs8Z(_j{W+jw>B_YmU3
JT};<$KP{6w4-&xmJ1@sGtPA}ey@toWmNUi?YCApS#qDn1i` z7XK;wh|k3r;xFQ_;!E+B_*;eeyZDFrTKtOydC5n93Q!?cQGcqZ25O`zHBsz9_G%im zXa!BBX*8W?)0H%b=F)sxKv&U1T11O!39Y16bTwT=>u5b~ppCSNuBEkfJ#D5NC`DW8 zM%qSu=vKOo_R)U2ozm1!_X~v{0C5fU5Ej8C%=B=2VBSP}B)v0ly!BD~A^nIRqaUX~ z$ZIv;F4E%ebeX+rY)1S{yeM80FN-(C&&4a^7vfd%OYxfcH}Sgom3UM9FYz0CT>O@v zpriC8oe*z{e;03y--%P=9dTN`EB-0YiB6%3E~0e1-QOlk$U#oZrvh@3n>bc{OaBt1>X=_&dNJwwmZbM#Yso?f5~{fu7hnBZ`bZ=B9c zf_~1tB|-DjtDTo8!JS#F1b9kh!Icbfm&oQxfX_tME&+}cS%(C8Ph_1E;6jnjmjFMC zEQF8&&J^i+S#AVCbVQb43_yrP7Al4T zaT3|E1O!WDDdl?1D?Y(xSAD6)MRNj&r+D%BE@N|CLRfP9KPgAhROdUjouAvb7SBW04&o0f`pbItj?O$kt0h%0;$80`e}h$wnLih`z{1C7=XE zwn+l&KxAVQPz)j)mw<{8*?|&J79u-H0%}8K2TMSKh-|Y2REfwAk$_SW*`X3i=ogV~ zk$|QV*;WbG^4Ww0w2#ORlYkx)+2InOQK>|emiXbC7bksTue6(_P|C7|p?cANy%p2&`ufC3cR2@+6+B0Et6N>OAd zNkBb{>|_ZjN|Bu+A^wW>&t5J8?J2TTC7?$|cAA9v8_MYtP^}_+g#?tW$j*>}x)s@( z65?MdXGsv|mYpp@UX)i#kPqb?Ac+I{QJE`20hIG3*l=dsB#60qz63GzEs!8)tg9r5 z8Ec^gF<&i`peV}464Zopi3G)1{+Hqepn)itNf0yBatUH)`kn+aGp&#yW~P-A#LTox zf|!@CmLTS()e^+Kbd3ZtFRjs$6vWJQtpqVMt(72Vrgaj;%(PyDn3*<65Hr(82?8Hw zuah9=rA-pVymY+;F)wYFAm*hTc>Qm{?3tOiNDwm@wy+9AYQM-66~&K+a(A~mAzkrcv&8hAYPUS zC5V^h2NJ}~@{j~E)s9FIQ|(~}n1Gm6k4O-c>W31K&9-DB#0^Xm;~{_ek?)v zr&Im_J&?Z3AEt-W&-n+?!yTXce^2yC$Loc^rFy(8XObZFkuysW-kY;X5Z;@!O3;rx z-Yia15?$wNB;YWKTwe(RLg)HP2oO5gUqXP;xmpPULgxlZ2+%lJCm}%RT)l(geBP7Hzl$T0~ z4wNG$LCC~uPB&^)(8f+8qymY_Z;cS%q+%l~ei z091qW771b!?vWrS+pQAR7v)|F>WA_+393c8Pl5)Z+%G|OC~udbILfpHU4ilr9qvE(u}=x?6(4JGp}rv>fF<62$y-uLSWD-6ugz@Tl9J!&3qe%$<}WwYgkMYFb8ci2|hp0l0J^XCoBTb!55JD7Jo z@7H#xz1BX#zRJGa{;2&mhsn|4SmoI5IPQ4e@wwCO+~WK=e{TNig3AhCbJe;Ix=rpi z?!E56c~YKFy(7IxedWHnzQ=rD`d9m33zP)z4SZgh98=g{R9@6pbhg-3yd&5zczf_v zNqNcbB_~QwmuS5zdM)VH-s{uSveK!gkM$nY`}4BbLdBsyJmqahwbBQ)$`iR>{ynJchrE^ERN8T~=y-`C(?HiT+^JO<)_WEf5 z=mn!+95Z6f;xPxud^omnY;^37u|F95!MK6r4vjaAe|o~=iI$1}iTx%HpEzaWiiw*h z-Z}B*iGQ0^Fsa|9k&{xBo|$xZvUl?I$#+eDW%8F(rcZffO7`-)%U_wAnEL#*x@kM6 zJu~f3(<`QLn*R0`Q?K}7#_Acb&P>dFbe3h-+F6<8?0&PKxpMiO*qk5C`E+i}-1fO& z&fC*g)As26KJ$mqe`G<$g1HOcysGf3=NB$t*uL<~MUO4g7Ef7x=i<{#8kV##(U$I5 zdTLp0S=+LgmlrIbvHZpF)qd~jikcN~ubjKeuxjqA?A3FxKD~Oz>Q}FsaLv&*Rcn58 zZTYp^*OsllcU{@Kqw8zd-@74MzG2^nV;hHTJbqo>b${8E*tB-j=;cH8!a z+wa}}+D$b#O}XjLn;zRyx8v;1-kXQtyzu5TJLm2^zRSOB;jZ>wpY9&Gd&TbG+|qK( zW4D~$<4o?kch9+7*WS8!@4&qu-d23u;@ghzE8Mqn-#_**+<*G^G3l!Gj`W}IsJdg# z9gly1#P>6I`tRI$VD5q6+*N$n!n-YZFTMM@gDVcccu${uV)snAXV1NsdvCwbaNpef z?z->np&^H!KiqJ5=i%dr&$Vx9f9-z%{eOC3FQ;p}wi*m-Qe20G)o#&Yj66r4Ux`8} zfW}e^ILRC;uZqSR({J|iHMKe2ZYQ{*0s=LIkte-Jsy^?Hi zN4}Y*T5pZQf`Z(5qP6?<^aV6l?m(euct>u<Wh?UlR4xHf!;1BRW>%nnq1MoWb}FQXgoHQqE+TdqhGJ|rE;^$r-b{Igikb- z74UpwB|k{RsL<8oDz@agkz>Y> z`eUqUNK}f^LUT84u@&r zB@Jpp-awnv5Fa+gYkfSBq>5l?B3MBv>6D)m7eCF-DASooA4My7-H0J6+CTEWnn^aWC|{w1@ui>Z z-#3{7bqj)A{x{e#jr#|JDKnG=0EJjL3`z2`5q!qe!5?ClBl`gzrH!=Q~F4o zv%^G9kyj#3L`^3;QD=WXHmkBdeMvx_s*E%$m zx}~gVkpm#B+SZ9Rt>uGUm+l3u=QWDDBuK z^VW7|3ya4`PR!|R8$*MHlIo_UEU#}4g#1;)3 z^~Fp#L~!)IKwP3`J}IFa!4Mk|>yI&wmBZt#_@X(pJ6eU;~>Fx$c^63 zyXsFMIDN%DbQ1^V8Um)6uPVY@e4rmR5cpShVlz)yHc1au4Qy1b(a5$9dWhLOp8|ep zC7hVURRb_u6nLnaVyzUZf_92D#o~>~;FXm6)=wBQgs64cz^VDgvrJ~QY57uXW9X7g z@?7e|O-75ws7zX7u}?D*nFiX;i$|IZ`fzF6SvTx=a!KU8_W=u9qiVT- zNzXN=2y|K3S;)A65Qre@d;xB8!D_b<1a(p=nat$#G7Gt)anGy&X=VRIJ8M!c`8Mo) z=UY^hb{6Yk`CQ3pUs>(iGJVx=p}5)Yw%Ocnv-V3(zhtvpDKG69T$ui1U@EEeJoIK* zM1-ikn0K4b8!72En42Jc#*igjboG#aNjm@3loc&KPvKdnsdOhYC>&7EaS+)DTLALK8ZiZ5sEO?uYeKM6lj^!a zXEwtyvhIWpWDBCS>ADKaPAgMITZ$*0($&jAr%ngGE~``qlg(aWB9lRlIX^+|oh&N& z)kOxSNZW@#J7kq|BW$stSSkE8GJ%7uT9n?TmK0Q#IJ7C=LGF`wrKHMrkFq{b4OTj} z%e|`qlY+_;L*9~fZs>yKyYN?G2!x3HD?DKbt<>nQP%~-mwDAM&sCM)n8@;3~nl?`RNPB`N)7mzjGo^(^ z8)KEb(q|=~L80KZamns??`gZZSG^;ctcPH-xKT`zjoiv7=ij_;-nZL8_h4`-OehcD ziD1@)S^(oYNsUxFVZF^JufL%cGT(yT{dlalfXs?`@EwEUod@MHJ+U>AJb(7!JM_by z4qMoMX`#GDe-%jGQF$%vj95c&IGIj-Q!pL^WiTJJ72A%P4UjMr zd2SERaq4mB@kqPdW7OO})Bpj^CsX-=q%N{Fo)%yH3gz2xkT1AanaVGybitDN;h=c) z(SI#b>cakh_3f8^Gk`~x?Vy*S%9x*RR-`gLDe+M9XX<01y^obirQfLx;5nVArx%(8 zWCd|?3B8gNd);5=*Iwr;MN!3N z9KU_9oBQm)N@@S* zTAMDve5g$+;}=-1j+Y%)>jINgn|Z;V_DoV&boyf|#9A6Ws${`rwcC>M?%oKCr!OhGPe%oYXDi1s7R~ zHTBp;y&)8p>TBeun_N(CN*U~}r;U4-<`+ur!ZX%V8NN&Uu`JUGr!A$3l*iEqoz8b~ zNMN#DFX3aG6K>r3TUsWCA2djHBrffpPdBIArjDD}U^JS4YqqK5Rj0A@qp5Gax;c+Z z%gMU*$YY}#4Sdh4j92pwGe(q7ePo5(U*Mi~>!n45T8u1pcJnVxic#4yqV)0~@;%Q? z+#A?>{+?>;$eZ>kC4Z@&RO7-0m$4cwAu8eYf}0@$rDTRb1(#T7ZoSSI^}Fm_@O3BA zqz(HF)(19T_oTn4Qe;y%Iw0 zCmY&rvz8mIo9E2AbyiQsx1l{|PR%o?I;LGQ*kG3fY!Z_(#PkcZn@TI0@j^Y82GXYo zfNWd6Cgr`f|H`Jq=}vcN>I_r=Ot(=@p>*$0ue!2-u#4TeP5}b~i>eCw0K0UsqxW1{ zs=%1H!KupcG3Or6uCRy6!jHZxzjbbe)L=NSGu#JWDGPe{qEl^liV`Wc4EH+|-DAqg z^1}002tr46-Zo0kQ4+dYYY31ZB!>$GTNJBTw04?PCN$KhB&^y?jtZ-T zs&LIyY@?x8saw@q$}p_4s4R~VY;i-t3c2>Pp~Q=9+Dpj8*zgTpm95CjXD``k2)|QH zzJoq-PkY(ct)zdd{6QZOw*{+MhI7em;USC;oZ#!-8TJv zGjICg+x!JWJ>NDcVq$Xo_1lK_wClaEp}XC*eWSYDweRz#kMH}1g+1ZEEV4K658GHg zh>=P^xxdWBk!>oIes_O`R|72xo0wQmGradV;a5e|?%SWC#`LdlAFnz*o{nDWLrQP2 zs1pe>0!~_ex46Rq!yIzxS6)?l;EUN5Osd^6FKc*~)BxmiE{DotM?rz3^L@m6?qV0c z2+`lp%3(Vyn>n1?evxCXJKBep5W;iCRqRq=dwy?sxqh{U+ic;8;YN(haU&{(5E&Ak zDXFL^Q7jPbR<=zY+wc6uGWHDSQic$)4^~JZl7ep{T@#2;D`AMySX>PSy2otpjuMP| z@iZBTLe;Ze5WfCWIK9PeZ(B_d!6tGD|Lkr4R0=`zZ2El2xDmMuS-OvcC-_F0Mjqe z8#CekdGn|9@UEa1nP8r`MOC+qBc+}NG}@oVHNCC9vg3#C3-gh+6cXOq3I+)|o{epn&5UK1ERY;d5zzo^K6 zP3@Xsu(sFuUTeNq#8X4UY1 zBTaB`D$`@19_`gq|5OYJH=d!vo%YfQRrgW{r;j{6GQT}xP}U;ep-Ac4Ue&4exu*wo z^#92^V-lVxGbm@b*xQqNm_~v>%CQ{o$p}zCGoQa0jj1W=Cs7&l8BR^N!5So-MMpcs z*Qku^ZPH=V5;!@71TE)4v=mNYm61H-T!_a(@&gk1b$j6}}>S>u^}k$2N-C z`IM?YwNpPPdMY>-9aCSew(C5YQMbXJFNRj)D3;wmIX{kEkr@X|n(@Y}7<bc~LG4618mF zzoT3tP=EA$?PtLXB#eEBivRD@J3 zng~|5vEI`)PG$@%gpJ7IC(o;)Gr9)nfxoS%a>K~w!C^y`iFmHOD%q+hj$1e`RH`CX zh|=ItwotT|OvY}vsypikUrSHWApLuRi^rQsaU=m<%4OA7n|+(bP73*LHFev!jid3~ zx7At6TWl?#H#ZiWJ5O5=MXb-5OGXmp@66~c)Glu!)1RS!)z$zhc@}spmcEU>qN{Jc zy0LfER_rEQrN460!bz3>FLYxd+pwya@94}hpTgDCGmMBw1b!@-eMaB8kYN_{*(GA4 zm@UMCx_;zMum0U-Q`>u1;Tx|{+bYFF7o1~Zwnx|=asT@N`fA#CYIFe%Xx9<-pXz+% zQRjp5>HAL&fI)2Hh?rx2kQy9bOG7ElVLAeTDt8iAfwP0Y7`O>uCcMI-%U4YH`zBz< z%^Sv#-_VR%cD~N@_c<#gBWr3#Mk<{?ChlHmN{Qxqeb&hAVZ&xetUhnvraZSzF_l~uH#s66joWVWh6o`JuR2Hc!IQ@0Qwwv23DjL4-J$YI)Y|m5dOh4szI4TwiS7bvt5XVZE~I#C!dVu_b$+_LDATW|5YTqNSGLt7Vk9W##m-D7lb-QzKc$7z zJKpUZSNE-4xliSr>Vumyn;um0vJ_%uJu#W$-D&s`+KU(DCu6~iidZ`L?xjiW%yxaC zyHNqy;s_j>L0IAQ9#aoPgFL#o*XWBQv&xE*b$jJ^DoBgTF>0xU&WeyHCC@THqVIR2 zUJFo2M4^KA(n#qldUX@gY^jEAR^vT~tCJ@FJf!DCx5I$LDXI z$E2EPO2nPukWuN)?+;Zft?6gq|4m2#KTK7N-cVmw>)^|WM1QfG|9B$qkxQFC_;If$ zSYc#=A}UrIb_(l{iTg~@_na)NRmwRx1(|NbGc4fnD_f{3{prU=N$fzIoeC@4Mr==y zTxyP1P_`m!UTU>g#(Hf>&7JPH3Cf`+%pX^6E;QQua;VF0D0X6P|uvJkk6|R1@ zeck>-#VR_2S+^3Edx0s4pH0tdN01O}g&6wS6oJ~VkQ(tJV7b84@uX*+4Hv4sr$-)b zC5ZD72?PeZ_@vTzo((NlJRX*lPN5`@9N`VI&URjO6_04$F3iORc!U{T#tB9wd4pi_ zMvS8=6bbn_5FmsH*e>Se1M2`VxhFkwPhgUo(vGCG(<(j%WgxSln>lpfDRiE`{tS1m zAKJLa2Su#f@JT|Otr|C!7j^!)C`1%0Qhr$+(&l#@{NoLV{twb;dKNSeH5uYmvA;pF z?>Aa(+8LY0xZhAfMbDaDL@x8QCee}j^Uo>CJpS+MGPM>t2J9Lm$Ak|g^ek)uwjPWc z!Mh0lysH#{M;4=KAX*D|I2uqazQRIZq1lwz`S*e{qOt4 z^lhkdChSFK8fSI8JC}J}RvK&ItY6pj>Wk`dkr%>N?f}kYR`Ld}jIYcQd?5hk9>qq0 zsWM&vd7bZBPlOOleCBqaHN&sRubH-__x-iH_{}`OpQ`=7ygTeQdDov%4a#iAtjto> zbLnS4ubYgn1p0$t!zR5F!U^s3jYrHrFvpl`I1=`SaS~_U&6{tLMp#_zot3E>CjYqv zj>+pS_m>eT+3 zAL<3;q1=P-3L2cwTHXw>WNgLO4BNHcFehqbMM-BL7wn2H}lxb)|Fuh$sTBBR(@nW@KGU!4t!ot=H&TZ(;gLAQlV=``dyh%n@fo^XPCwG zLmSulK(AC4g(okb94@LF*s421vqp@V1$K2)YkPGpHYFA->(-3;^WIR=O=Z4G>p#Ye zXVW4)gx_v8KDazQuWjJKwt3~H%Ub#Ec#AS?1lL-Z4J3Zil$bbqD2zWYMpBuxL99mj zBNyn(Z`>HE*~w)LM9jX%AjO-i$yJ%^aaOujx*F_!f7JH&Km7EXFSJ?O5&F${lF6M! zTaUf*Ty!V)u1`!jr{x`h_5yQp$b4XJB~42bIPI*O!!>+Xg`FNU*9)Sbb&lGE3e~b61RKxxCR z!<@PM{L`;mFx|gz?wpOv$sbkGm4(>Bl3%!dhkSwWe%~TLfRH;t-;TTPNhz5W1oB&- zxqOGFoK4GgNuwGhQP2eqP=<|bo*E9~hz_5i6rpxT+q`OUuntx_$b|Z@wxVuWHT)xOC=K?9LBGfkmbpx zGiaDvEBo|!i_au1s7(7n1wnjtCmEabNCD^)l%BAskc{a!)(4YHf)d?K73`54Tu_BB zI&EioZu+5(Yka^5e&Bk2&OMbNKFZO(2VF+ANe{F^K0bkmaj}n+xVRPHJbC+-bVULG zfj45HH=&W(B1Q4f0|fDKLrsl6F^@hIupm5+CVW)ah;XMC;j6hRh7^sSTJSac0;Wh4 zySMO=(IWo zTOql>)GwP0u;k;MH#Y5mATYKpIVC7g@(eQT- zqU(VAckm6n%N!977ZZ>KZ4(>CcK$S1qybD@FrCIy^iJfHMSb|=sDTpwS( zs1oNZ-5;))FQ`|V1C8-W9Ga7J3LJ*R%Y^=H!H2aCezif*vw-}ttWcQ{MD&S|1Mp#| zy>k=x5bQKGtleAHK$L8#QudNHIQYmtr0GW4nurHM}^P^M?f2$h~^?d#hJR zS6HnpETyiuU8R<9ss{^-3-DVQ3KiB5!)M0z`jP&foIC;^M}is(WcSoi^)Po?;!gkP zEx}|))(`&zKZTk6P<|%g<-&n0ZnySMey}u{Pi1wXL6oSkODIaBu08<+!+STs(-);T z@~crKEvJaN0)JOjc@g=2VZ^9%Y2pEM1fNxVTCkbqg+-}_rHLi^GY7BV`2R&^y0=n0 zEK?u~=PwfSn}PRlDP3~L>Rsu;pKla9d}Bs>7fbR|+jnS~{GW)JO7M14LiY0WpYu{^ z>eE*YOgw|Q=r4gHD(>GHDEC&6?k7KX-S+=RNJWT~XIIdE1^>pS-Clk2!K-N|Vv?7X zmrtHsLq6ll;*Io@>ExfV2}Kt3rlrf4&R@0Uz_}z1J1{my!%wDDG|W2Oea*T>*DhU# z+iRE2Uv<^et5+?tT)Xb-jmzd=U2k5D77ORs+t;pJfb(mYF2ZBZ#fw%gS&3)msSy7g D$kb8T delta 18288 zcmb7s34ByVwtk&^d*71unvIa8lQe_K+%DS zj^n5}NEAlLr5SxLqmDj@aTJw_KJ9kq`5bi|M;UYT|IV!haCF}9{n77M-?~+Gt4^Ks z)u~e#KHY74J7F@ty_H1G)?KEsAvJRS&v!*{jXfs>trtSfTC#G{>PH@LIwpkWZ6R_# zzhuSrt)+_wScNE?Bxv+k%a<)$8n8q%P_`2YFGq$oYA;s&u^+$c7Pn23vwVw1Q@Y!=Um*C~$*#agkJiYeBY zip1^WeQ{ds6n_%CAitl8-D0o!Kzu0vOWZ8Bh+9OP*ebS(Tg7&<~2Eue+eLW^iA zEu&VtgqG8#bQ!ItE9oj)L)X#uw2p3|8)+?FOB*Ogak_~%)6KMnZl|5Jn-a8#enNZc zUb;^x^fL(6Ko3CpCSj%r6XWbt>7m3O_Q}@6^e{a_zoa9H&+JWVLhMP@IT|NECQgXo zi08!f;y=V2;sx=dcuBl0ek)!PuZq{i@5FzKH^uMiQE`%vQU^UoPl!K=x5OXC+u|K@ zO1vxH6aN%lLKEF2_IZqOu(>%I} z=F`Qrgf6EQw31fQdfG^v=oV_Dt+b79rR{VZ?Vw$>kM5v5X+PaXchgVl03D=uXx$;Y zpMFlipvUPLJxRZ&gAl0#37CdRaUB3gB2wHs0CN#3t`ER)M2g=5z=T99C;?*MsGC6sZ9cuuhQzaWG(~B2_5?ixsIV z3D|B-q^fZPz>GzzMgj&cQneB=ZIP;zfRT$-y#&l%q#7h(_#)LP0SXYQums3Jq#_ca z1(6yk0fG>zL5vt){5XCLmH=yr)DQ{qhe!>T0F#K+FbQyqNDY@@7Ed)vfM-N1Dgnk3 zsb&dqk4TM>01JuKND1(fNX16s0)U!CYP1AMN~Fd}fUZPptOSTlq{c~zB+~H`ATyDg zAOTtvsfiLGIFXtp0jd+J$r9poq*Ekf;6IU?Dgh=Gsc916M3I^<0d^Fr84}=0k-9(v zj44txCBU5`b)f`URHSA}fKNqgwgi|}q~=I~V?}B%&;MME{yW^vlORHRkp%gX&X=G7 z(u*Z{F-$Fxpd6$NB`6nZiv+Q&XfUVm(&Z0|#Coz;f>=+kl_1uW>m&$z5=&i=8-Q3*)=3a6$_*04in3mU zSWj-0Al8!&62yAKk_3qLBrZX$CmSV*^<mB#5Va2lsjhdd+ivy9DuE@01{(>s=DW zbG=)Fc&-x?#M8A$f_S=qB0)S|dnJgcXrBbJ`0tRQ7>oZ-31ac@mmn7ZT@u71zgvQM zPJb#vJf{aFh^OM91o5ESC5Wfu9tmQRACe%J_`N*;xDbo{J_%xx|4f2dBKJ!WOXTMg z#8P-bf>;W_kRX=AgA&A2cu0a+3J*&V-j_No0e>eTQjg#U5DL;?O3=>|NBlv0AaT-P zO%HY$0)HZUsNl zC?O#3bXY<_-06sffVk5GB?QEs9wZ?k?(|>@0dc2?NC=2K4f0_Kh&w$@La=OxONhgu z*>n?b0KtNaN(dHIvxGQ;bcBR>6zNC_aTMt&3DJRcw1jvJ=@LmfO9L-(Liu7~| zIJ_b~Ljta^NM9fUCs?FoGjRdn4~sO|hXK!6q-ROMM;2)i4nzDNDF}xFzgeU~I1F(T z={yNysazyMES32Z#8SCf0-m-=FOZ1A=@#jQ5^%poxzP(ISQ1oc6>QGyDP zZjzuN(wiiB2cF(6L1jp9mY@*QEfQ3Y^cD%~kF-sK2C)5a#SK6eNViE)CDL0Zh()zs zf>=7YNl+Ei9THTH^mYlVMY>ah>X7b|pn9acC5ZVVp##e-YwjKiV$J=D1hMAsl_1vK zeG;?;=^YZpdUB@(v7YRgAl8$+B#8CoZV8T!q<<#@OX_|JVoCj6f>#2hOeTO5ZR&p1vyG-uek*m=PDr1K-^cdkO$2-hPS zWf|?6`I+0Y99gTg-gA$0KjwbJGtl!JZdC^RLsJ@iJuc)#D34=vwT{$Bsf z`hPuO{eUAChKf-YS5@q?%Tw6Wtq4HP38*azx>XBO}g?960hfqjE=WANA$vs?jZ@e>?h{ zF%OTe8oPGvTjTnVYa5?GzIFVO@!w6DKjHL5F|lFd`iVy;{%%t7r0Aq|lTJ<^Jh^?! z%&E%M`=%b9`qI?c>8YPhvrO|(tDDv`ZTGYz(_WpHnqD}4-t@NVk4^u2#=se^Gxp5* z`hsy6Y`Nf#nXNNBFI;fp8?(x0&6~At*7LK=X78C(Hs{FP8FL?=S2yqOi`*A&xahYR z=U%*Jfp@|43-`1rEfZSqZuxG}yhUFw-nk@m$&MxWFLf+!Tl(FyG0Q$}y`%Mat)Ij$ z8G6ZA%f~F=zx?#2#g}flG1uMcay#EAv-wS^4FvHLE_mV*l#m z)h}IHeC2~z6<>AW>iny>uW_$gv*s_??7b$ncHG*Ju5G#YqwCgO_u2I=*QeIaT(|ZH zal>^te6{}AjfNWs-gwoGFKn2#;nUdA*k!Tz;{N!o_@<2&8?V|JJGm*mY5AtTo1WS9 z)=k+rExoDzrnfc^-+bui;+xyIxVE%x`R0}xw`{xRS8dsC(YDQP`?nTseQTStt!CSd zZNIy9(yfQK8@9J@KeYX`+XmmZ>b8?RqB|bh@t4~(Z$EImwsY;yox29_`e=9l?&Z6W zC2|w%5@+_b?s@MgllJ!8+qU=9ef{>W*>_~{9b@iz^3KdVui8In{~LE@-?jK|)7`Ci zKl#(kewsW`cA(+FqyyUynhx%4SK8;d?`==rGx(mT4%Hmma_H!xGab>;Yn1VUz*0u_ z1r%_Rxu`KwSnjKhQgUHTQDO^|T9Tqli+bmpHFv5}W$m0fYn51gJKM0r7qy@AqR10{ z6PJ}2B(|3KX_)`}s^8ZuX6+x5HvEZ@RZr21Rr?25z`Ea^RFi5{*x{j^i?M%WEnwYs_j0drZaER5qOYlHZ%4V>#|;TyA%s$8*@0Yi)B{OPp=iMD?*iNcpwf z)h+PMMYw8BRy-}SI&ZP%@~f!(YrIcY&LkG}e>kR`q0!;+RGY!5m^a2vMzy?oRF2a# zXl$X;Y?v~|Y_zM2H4?U1tLn3JR7<#aj7haNG#D)g|L~!OhJJm^ORUBNMnk3wpJRi` zY{;8F11qJ8-=yB7Tqm56L!}rh#)xS`lr|RC`2#+$*%S&^QN-(y4WYV7co;R5nS+s{ z#)fbtj2wT!--o!6ACJPJvH?_VHuWL3D60tb0eOV#!Vn1ZvlJg?G>oOI!hV}5Z#{#$cDJ~Fzt zxh7afG-hBykvr4h>?? z>#Z4T^~grE!(kpcvQEvkUuSa}BF#fhPNyl-TxW36lxURxqW#n9CUQG}Rvsn_muvqd zBTsP8ElnZ2_2>&8m&^0YF`EN7$6s~3Tru~HN3C|++clrwilXuamm75__lpqUP1f%w z;0|+TgaSURwyVt|3kp~+8bvcyrKs2h_4C&kvAl!DWub`A>krhc9%vB2DeD*8Nc=>HE|*B z1g^J{JKv4}m2S7IYXoQ0%MGQsZszeDwZCV0wH#Sdc@=5b2eNdsw*{xiBX~dv>MM!Y zDvM+9DF1~q`9!H0j}iHTjV4|C+;6t-NPSk2^NGeZgYr8xNJ$6(bEc*4OE3 z%6hBMoH`+zm|7V8Rn~|s(489m#@y~y9W}O2m&sw*;tE)%qKdancsr_w}gZ{R*Yt+Yz!Q;8cTkq}q4)PS;e^T#BM611H zFio{$gqVVVX>V+8O(r#=w^dQ4Y%mNqXh|u!xJ)SD>+^ZLmS*O86e`IhA+tNi z)^<`fM+8N^h>DpQ9W>0G1^ojfNGj6_0;6CPV}lz;r8?W4vomAj!uq0EOH?v}!n5g$ z!l1haNCAeWvwc*FN{Z-8!m^}hDCST$A$Hci-CFNF*tCPyB=xv|J+Jj*o=Vb;7Ntc7*{(({)_ z)IGOOs)a4w*DfBWtA%GFi3yEDAqsJ$3EV&q3QrBlsX-UdX_SSOl%8o^t?O^z>eZ`{ zXi}Ha2sfv}2SB>}p&WnjS|3*l^fCY=Fq^6I0Q zuv$hSsc^vC;42HcD1)Wwi#3KL_5QxdA41?SlQ~$NK>@$K!D3pCo+1fxvAQM-m4$+3 zp+*Rw#xJ+l7mpa>$WoTAGg{21Z3W)7Q=5l3MF(E!%H3}=ld&z+Jn#~WeU^#HG|*vb z9c#|)$G@j#nkQ|uI9BlQ*i^e^Yn?f>#Yh$-CADRR{i04g-D)wGnapb^Eg$SUFWU4p0?!L#0gskn$o#1`55s?lE0Maf8<`(>?fE#1e}3#VXZH0fE4+O(&5qPs7J7G% zn?$!KN8852r?uS~r9q!BSnBFdJUDP)>{Tp^m0;O&Sgt7bVae!K(nx*d*#!`q%1Ro6 zQxYn2kuS?w)MLhtN@0)UaPvv6$Ig_vG_FGEY24*z>XeJ*$`(RLxvwp-L8Xwb7C&_B z?WDLgSS=ona&r(#$5Vp}h(hcvCjK^f!@lTr3Mfi$;?W_&#Ni<`sVTARaJCNx!QZ$f zk>p`85ePFeacEx5>?`8`s+fhs^+i2~#0y?yQ0dg)qW53EQ2+URt)5=fJlp~0aDtP> z)mLK#J+{+pLkD5_a5I>dSgFzTXtKvWjw^B9(G{M=%R?V5j4SQzfLJMHwvq}%MMacU z+O=dnswI`gFNZCTwHt&Q=C2P^Z-pWX*k}Ge`D|Z?%VZ?XVWN(YjJJP zic`9-{MJBf3)i7CgIaH;dUr{{ARf?;m^73^EyeJyvU%}r?I{h7&;zKZ*Na0=abbm9 zROT-AS;=Qm7LaMtx#r{FdvkB4KlD@zE3%SXIkV_o+y7ce?iAvfkZe(scxqU7Ru!35 ztN<`*=#vXU!bIPuK&O=;c@C7nQ=iv8F{z!wt&)+8<;g8epS6Tw8x@ z+LE2fi6&!jt2e75_+@=yQ~|#WUpbgcLS^nq*bwk%8X*D50R~k-$}>+gQ$BsI_T~K9 zIhU`d%+^I(`?`Bo_1<;*_0=bNbMy3!vej2p=A!w|OD@+w-`D#PMS41^vY_*Dqc0w# zu!_j#re}Ahd#?4=39cqx>GgG8)Ab!6Py8S&ih>>YHNQeJRd_%Tys$^aSh)UK^;w}F zD+0&r8#iMB-U}SZCb(qAA9+qck{6G+>o4bv^3TOqtMhrM)wldQi*c$xNgh1;*%&{b(kh{KogZ>7&Zc<@hK7f zv3eh52DccrJB+|@dKv?37<=;B|K~+1;Hz&e{gJ#ZU(pZp3BCsU$!ny*1q__*Went2 zCBN(Z-Yv|#rFSL9bBaedZ|?C;T3UD%7(^UA%Rh06#^V^@d3TEVUJeG^VHw>w1Lsx! zW=>jIV0XHAxdWy~bBUwto0+e_wBAky#bjN6|HEU?KC=WJb4C@+d|-v!pXr`=+vuD@ zC9YyaK<$&YHPhr$R*WjR;1~SNGZ)VWmY(;lVg+^MQNSL)ZqzsZlDE!_6_u-?L`^7OyS@8~mou%RZXZ|x@IqcEY*WFuII zmn_{G)mOK(+avbB)WnjD8jDq?_Fmr!X}c@S<2)E1Pc%NP2&DHVj$PCkyoaSueWmZz z73Y)}GL(tSvR(g~Q0G^6Oq^e!#Qvl%Q42+eZaX2^4R6M-UcS4T&{q68K_cHT?TAsS}IcU{An5V>#M82XXZ)5de~ zi*R;h#R&Xf^n}MmWeqfm%XqB%YteJ;-@$RhN+2vx8FW4Zy zc)TYA>~~%`t{)qz%L7vPvfHdvdZMd5-*Iny56!?j5?^e{cG7xDVS@8J{^OdufYqo@ z#sX0##_hhXf&7W^ZDS1960bS2@wVogOto)j+;7Xh<&|K;^0jueBgb*WjTzpKt<1s3 z?yl~~3|u`|G+@&>Nz6%nep?aR@a&k~+lDuB(~c2_Or;<*@!K8!Gt{$n@qAbNL^8Z{qXYUv#J<#G4sj$2^H=cLvS8I>nRG#HTw8ZE)cfY~6u` zdsm5v^xxcDEE~GSf{6*co}}VL#_s$?(e7Fmg6Oz#_W?y;Ci{s|yZ{$voxihXzf-N{ zaEy_CYqRb?yCCLLgabMJqRZVJ#QvC97c8S#ap3($dGYG8Zr)rz!0vL;k(ue}dLIt8 z8*cq`%s!iWE;dhKCR)!wm4*7M$E46h4&01JN)hjuiR-~@?fR25GxN0=ZxCYK%0{lb zksA>mkNxCh%j6Hh;>CKX42Oi+LLuhGaoG&Qs)$`}5l6!6)uI5FL49k`vsEy1P@_n> zcDfaBvb7;JYlX!mJ~|ML#b;P^JeD?Vp6wRa&*@CL_rwuQ>Fp*$D^W04RP@^E&k(M| z8UpUYW{-`8H+D>6@Z7@w0Bi#cV1|38R8#4BJ{6Hdwfv5T3f%zujd#wRGvNK%7uY9E zeQ)97SvJD6Su}j%236g#P!D;pAf=W~tD%y~C-K<9(vG(eF3X6)ZSQ_lO(#E`AOfCIRs=%MflZZl zwa<>*-B1}lIyY2nGQ8ljmO3Bb%01Y6%!%L1?UmKluV|CLc%?RO=rc9{z?drz#yovs!tTaL())ZL_?2m2Z&QjBrfx*$i0d)4t$}98pD+?wST=}gsiOHtxF>v5}kK6KW z!CIWqMUEIukBptuSUbDesoJ==IX0#EDt~sizbY5KMSWDR%+J5_U{?oonlcI0DLM{3 zdaKb~jR?wIu`E$@yuhcjs=;=KAlNCxnDs@JSbBWCJE@H+zz4>C&YV#U1_j>$#}g-x zkI95b6)ITMr#xy<)+h#wCj7suMsQ}-uhtr41pioub%ziK<9Lr)=Qs9x&vLEq2|$|h zq_?!1M6BckHk$5kzEWS8`@5uc<+M(@i={$-a@L)LttnA0hP*rvH8YV`X@O@w*bKXL z^UH^0hs=C9siI@jGap$7c0Z`TrOwi~9{6;-OoYNB;uq>4jM_h5d{O&{5#fXvUnDEV z&$}_=VMoi0vjfNQ)E+)!9#X{lzS(*Ev_lvL z4~%xk=Q(I2&)c>s^Wm!MjDwP$@t)CYEzCbU^I%!Rw(bzzroN!}G0@LO z4o5S0vahCx$s}FMDXZ6c>4&t$JFA}9V}#v5>g?|E<)V5T3v1nRo|~Tik2-<%^*X0B z#*6iIEyd3+k=)zM!O<4@dDP?QX`Hsm*`nkG*4FEsL1(;|*E+$zT3j|jobtFZ9dD`k zszsu>KgPBIG~zdvMH;IJgORb)vywkMWMiWHWOl3$R5x6yB9jN=I9u9xPBiKvDk@?> zus4{ukVmjk4w{lkwTCLKHpfjC2dL3+3)ODkG+vo}(@ixN@@CtL7hF7$8s{%O8a=Ox zbCnm;a~`kPb1_Fa^%wAjDdWPFjEo~17x|*X8X(1Py~$yI?~uM92D&zP7QE#T~vjGEC@I; z{f{08)X4`=%~5Q4%D0T2Kh~0O zQfzK}JBkfyZE9*A5~pF8t(fljHQ-!l$hDIvUpoZHLz>{z9-pf;G^T(5F`-hIj}ML3 zxKInt#edLT91mhYciJgXUNGr>$s28#4oit?OC~12g4uQj5!@7>tFZ zCXFmI8WfMK1=&Rcn%Vudx=$U4Z4&~#aL)ZKra2cD-pSAIM5Vrc zkBq)=P}ntsDT4nxQ+K<1SZxvWbVI@v>c54AuAeI-IoVnc$(Qd}ARuQ`m>EoqUPnlJ72*54+lvNsK&^e5XQb z2q!*!XFyolwQ|KSHHwxDht?%;IHaPh6jxVFpRq!TD;rvpaBs8|;c*HqP8upk6G==v zHF}KTwV@LpUJxE$wHSyP2u^iNb+r%ufOBztD0j~+vIrJPSPN)1n0WbAUbW(TG$UA; zMUq+1?Sy-z*5YzMflW%IbvTPi8=31&R8Vb%@mC|;j4{FJofG|rNox_+q-XOKCeEl4#a}##rL+K zVMO~jmXJ4wFdLtC^7$vs9KIvGN30sqVD@<6P=;~Hz)#PfU6;Wzl26$mg58%P@XmyQ z{Slv>nh@4El}T^OcBS+dzmcN-xw~fsVNOxDrJ$1ED#o#=sY`?QS*iqk7h=AKVCcvU9ykD zi_JEZ!8*unE`~xjH;GF<+-^*bhgals0$7$t#Jo2k|6TT7z#RD zZ!nd~68-Hpr9(<;$X$^O3FPKhn0X*P9vG~^moFX9zjvV;ORCRd?f2khr&6pI*aAm9 z!Vv?+7P&lS!QU;+kYJl=8;R2;@xWcMwGNX+cRGPOd+<@L#fbC$+a#LdorAiu1%WbxjaNn+YVYtMm zR?k(k99j;J$>#b3O5ERd855xbn=Z-gD9FZ#6&@G*V^mBQN0~D>E2mFRR<5(uX>pSN z6l9lOK)7{#d!NRfWe$s@e@13TM&BxXw!OL_1HV1>eH`|xf=iT3ODZZ#y7u)MT9=<+ zH}nd{$@AUyH#0nvFh{uf@=~Bs!NOIAB~mHOwmTGOt~p>f2VBl+s&qImn++7>f^WM=Dh8$s2bodwkbrG(yWTg3b#LiJ+ZZ<BY{|e?%y)Rgc<0U1D{eXV<=_*v>`?Yn6 zijRs`QB^dGvp1pQlo&+lcB$a>XqQly-SscW>OH=&f|DVgoByK6P%Y>MtIHttfM>WU zRD^@KUe8v=s;9fec#>5VpnWy7D6l|{W3!{3UaOr(v>Y4v0%Z;ML}La`BAPU)Ydfd0 zwc1^;@jCSy_i0S;MG=EhGTtqs+N1cvRi~nk7Lj$8*W+5UBlqJQ4dw4BZr+rXM#B2K z$yBOjo-o@T+6IT+e8S}Y`iw0Qu$?h?JpbqapbGx@>lyVo>IhWgBn$=w@{x=&v+z-$HxZQgb@xPY$q0VEfLAgjVEAtdp`_%6DQ@P(~ z-{a_SryCNFep(aL4UR8xxB29v6yigyheI;*2pxu|2e>F03i^VG&FEjr@X2zhUN^O1 zRE>Yvq9$1^-(kMo%5Nrb9@XS_ZWuXNp`kUjV?n=gxZeUk5L7t&E~i~Vg|46a?|p#o zb7YV*bx6%v7ye#r_1GG?SRJeXCrh2dy8xj)2j_)Pt18R&LR9bw7_^ujeO96P($M2=d%M}pY~?Im+SE~J)-@T?)a<8 z^jAQ8H{tpsucO}=ucSk&cYc=gEV}rK@++6S1l7mwH=F6eFZ2*s(u&IPd*3>{n~b{L9ryly zikii8KiB~Pf!Q(gB)89N49(0!(VmcZ9z}hcYm85{WtyjcW;uL-E%{aV&LYUc}om9 zQ`q<4wAVW~iPkeEh5y?m@E8*JpDF5i`OK*z>mIcQC!hU9B+)XWAXZ66kTr}03t}Vd zITkATef$|xsZ!X^8rY6$KKnzPjK43RXsCVSFHh7qLWiDI2xzO%P{ zOMAQa+W4EpFTWhVc|2LPZ-!k_dC}at7gb&{j4WGpW37Kv?N1M#mDw7^>7 zFtV=(j)oNl%J}>#$W&g0U@()phnYLufG<0geGhvmA1aQs2tRExJ~3#LLa}Sf&^W=| zx5!{A@oRs&Ry$4i`YhTy>Q`XZ8C>V`u}tWEq1Vf@gVS24l?F=3Ow&IES}_AV0t|ts zJ|Z1NpU>|DvxCuTWTV}e1J3Ugl%#(l%2fkB3sOe$!i5ovELa#UT#xT5-LB~?6=mgg z{x#`_K@^!D4o{C9pND-E#bm_TgtgO)=|G6RRNp8V10nuMG(a9b)={qSCQ6A#ad!0@ zPIMpLjXgrw`-bLrcKjDy`31)!_G>BLIlQT@I(x(>Loh{LsQJ-1o@y9}0tgZu%bogb zJ`vL<-hqD-U|ggtDR(|fG%{`>Sy;DN>BQ^XWaabLTU7OyR_%430jiz2RHeleiMsw$`Oqb; z`|_iCn`h11oTn@qzkm!&#@CD@{sUD_YVwl}jc}T&5Jb zGA>?XvBj2#>#w@?Zo+q1o0z^X7vgwc5zWtz^?rvZ z_$xfnx}SHs|L3pp&JPY!VGDOy@;!gB^Sy8J;Og}3PGw3jqj0`^AgCS|8t<*yDGQzd z>0M7fu7B>+JNI$ZV0tkS>sDXD(Sr*PSh=W!`^EkO)I~o!VI%Q-aL20=M`>`&W`&0w zye+K@_ZUx45j~UFb={(-Dr2+pr|WUg?AD>iQI|~5P{z8mv)$)1-k>c@xrnyT9SCTz z<`fmx6&K^5gdUsx-9 z9SmHGPdJN_hnY&wpk@_cUnTMNl^36h@F&UBVKe-xQZH2?GRp)}f7ba6=*u#n(cvS6 z^L`ukqoh9kIX@ra^?bUZM|C4O%X&e2ePl!m_me%lCv`6op5WSk>8=VFP>`yP%QyAc);sLC60w zi$-J~zjy`yQV^Xuj(;s=lX`s3Rpc`&kwM2dT}!_;IULtry5@>imt1nqqE#!7PuxHr t+SeMRX6JRtxO&;ui&kBB>7pz4-5;ZoCgb(jtXQ<__@D9Eip5um{|9p+W0?Q| diff --git a/dist/font/iconfont.svg b/dist/font/iconfont.svg index 1817bfb60..862c7c419 100644 --- a/dist/font/iconfont.svg +++ b/dist/font/iconfont.svg @@ -23,43 +23,43 @@ Created by iconfont - + - + - + - + - + - + - + - + - + - + - + @@ -71,40 +71,40 @@ Created by iconfont - + - + - + - + - + - + - + - + - + @@ -113,34 +113,34 @@ Created by iconfont - + - + - + - + - + - + - + - + - + @@ -152,10 +152,10 @@ Created by iconfont - + - + @@ -176,10 +176,10 @@ Created by iconfont - + - + @@ -239,7 +239,7 @@ Created by iconfont - + @@ -248,7 +248,7 @@ Created by iconfont - + @@ -269,7 +269,7 @@ Created by iconfont - + @@ -278,7 +278,7 @@ Created by iconfont - + @@ -287,22 +287,22 @@ Created by iconfont - + - + - + - + - + - + @@ -383,7 +383,7 @@ Created by iconfont - + @@ -482,25 +482,25 @@ Created by iconfont - + - + - + - + - + - + @@ -509,7 +509,7 @@ Created by iconfont - + @@ -539,10 +539,10 @@ Created by iconfont - + - + @@ -587,7 +587,7 @@ Created by iconfont - + @@ -605,7 +605,7 @@ Created by iconfont - + @@ -614,7 +614,7 @@ Created by iconfont - + @@ -638,7 +638,7 @@ Created by iconfont - + @@ -671,7 +671,7 @@ Created by iconfont - + @@ -725,7 +725,7 @@ Created by iconfont - + @@ -794,40 +794,40 @@ Created by iconfont - + - + - + - + - + - + - + - + - + - + - + @@ -839,7 +839,7 @@ Created by iconfont - + @@ -851,10 +851,10 @@ Created by iconfont - + - + @@ -869,7 +869,7 @@ Created by iconfont - + @@ -878,13 +878,13 @@ Created by iconfont - + - + - + @@ -896,10 +896,10 @@ Created by iconfont - + - + @@ -917,10 +917,7 @@ Created by iconfont - - - - + @@ -935,13 +932,13 @@ Created by iconfont - + - + - + @@ -1055,22 +1052,22 @@ Created by iconfont - + - + - + - + @@ -1187,7 +1184,7 @@ Created by iconfont - + @@ -1223,7 +1220,7 @@ Created by iconfont - + @@ -1283,7 +1280,7 @@ Created by iconfont - + @@ -1295,7 +1292,7 @@ Created by iconfont - + @@ -1367,6 +1364,21 @@ Created by iconfont + + + + + + + + + + + + + + + diff --git a/dist/font/iconfont.ttf b/dist/font/iconfont.ttf index 436e1a6039e3b6dccdd2139bd9cde11cff0bcdef..c5e491413bcf2fcecc7fb01e46ef6b06cb7471c3 100644 GIT binary patch delta 18119 zcmbV!31C#!+4gzwojo&?%${UI$YdLmK*%zg0RqW@EQ0K^BM^|ifQW1&GJ}8u0)nHW zfDpA(ODRR7Vr^^3wbpKat)B}nrCMkB+S*TBYimnx{^z|XVQK&V-~az(o_o$c_nz%N z?{?mE@$|i>mk*fsmnB{kf;I~wrro%5{_2M(Ei(yWIWI(E-I5izF5dTk^ZPYezlbl(#b3qW#8=`UB*;rX@>78Fsgn9pJvC4xMW~6Q2U~8Ufs0nq6q-uY zXg1wIb7(Hjrv-E)Eu=-Xn3m8=T17X}&9siz(+1i|o9Gr=OSjQxx}B1=mF}Qzw1@W6 zJ+z+=(7lwRc6vl8^eBjHpvSQYCSj&;r1sk;&=aZiwsF=I^iBE}ouqH4qB*U`dqqk- zl-iinlt_yg#Ear3@v``ZctyM_ek5KKKNhcxpNOA|pNTibe~4ewDe)`%4xOea=^62+ z_)qbccw4+9-WBJ>d*binqUaQw=prJ8R5Fl}Ok^etS;Fh0rDe37zDBpw7D~`|+Cg{H zU9^*S(Qdk%_R)QGKRrMP=|Osk4$)ycLJ!kXI!2Gt*XcN&p$ko;CBW%T4X#>2Ydl@i;P!7{2ZxIf(nrO zC8#&jfCTkQz2OWbLbxlGpkky!2`WKaBmo%_nO+i*7Lnoi0LYEVaEkyWNMyJU09g_l zZWn-5i44>b1M(#@WfG7yktr75|_5M7b!D*+)EnSK%wXOXFufM6#?rax`~$hgSVNkG~~rd|SaFER}h&;TOS zC;?p{G7$-A1(9izfPN5}s01{H$iyU|Gel;91hj|93}htGF%)oSkOWkU$TUkpxroeQ z38)#786p9NBQh-#P(32kD#4Z@6PJKG5}BbAP)s5-OadxOWUi5bvJ#oZa9jZBEs+@^ z0SzWHBPF2AL}ru(w3^6VD*^o`GNUD+=|pCX1azLrTqgnTCo*Ftpa(@}oCGwY$c&dr zKsk!c1PQ1~k(np~g()(VB%nG)X0im7sK{I|0d*=eQzW2RMP{mm_!8+f3FumpnJxjX zD>5@ApnpYXCa?cY%>Ey^nI%EE&CHe{FVY(%$cJ=}1o@H9m7oC9c@k_~Gi?&YOgvwL znE4h+5cAcI64Ze8&n%Q6W~@aL6hXRJf|`&nk)SBjr4lp%=`smoW?C*m%u8RBAm*hN z62!c;Qi7P5RsjiIh?(go31VhiEkSXlH%kyR(;5k4X1Ya!n3>i}5cASH31VJaFG0*p z8zhK%X`=*zmlBy+*F8+J^LT31YGxmmntFHzbHD^@Id5rM@XaOsNwR#FYA$1Tm#f zN)Qk1+Y)ew0wQw?Hvl`YneRx@qp8n)W%PK;>+etB=os$*HPI6t<@vv&dNiLkNf5ft znk5KbWi1kfuCi7M`gTX3!UQESnryWMoGOv6kq{t#wy%T$>9hSL1W2E)l@K6(w!ee` z>9chb0;JE@O9+rY+aMt@!)&930O_+4keM$6w9ht42#`G+l@K6(HYOoJ`YaR+LxA+z zff53w&km9hAbqx3LNE;mO9-aT5DCHbXps;np=PtKxB&!cpN&fhkUcw8LV)zyVG`mr z(rYBdlSqe4h%-n>NQe%kBPB!{=_m;}sv>)>1YA~;9nDCfp zCE(kN>^KQ{xgtAW0{*VZPLP1-E3y+M-~)^7Bnf!KB0E_EezC}2F98o(WD`?x0pKi) zER+cYZnMZjnK0l$i|lj>@k^vLB;Ztw>`V#qE2Og|h^aMOf|y!2NDxzNjs)Crk%jVM zB;b*Y>^uqh<|5lB0WV!-=S#p}7uf|8@Z3fAMhW=vBD+um-n_^zl7L??vWq3);fw4N z3HbUVyHo;RzsN4*^u9P4Z=_&~_AiYU~j7V2YkO}F{ z5@bfYMuIFzZ;>D?)<3&ef^10FNl*^b^%B^Fh%7W9Llhz1C_xUSw@Q!`=_U!vMS7bA z6yCsN8xJQDRYWlOq393c9UxNB0Js?4K zNbi-P7}AskO-Fj44wzZy==&vzIr;$!nuYYB1Tj-SC_&6X4@nSsCwoYOmLokZLCil# zB#4*jVF_ZAAC(}c_%Z#0*)s{-C5TD*hy*bSAC({`;bRiC6Y19_h{^f51Ti&_OAu4@ z8xq7+dqRSE=HHZ{1ke101o6zjB|$v%lM=);|F#72%uh)W&-^`adXDA)hqwWVE2brgE50B>T=7K-;)*Xx5Z8NIg1Fu*62$dhl_1o^?;`{d zhS6>%Pg$>I)M4rr^?CK8q1JGp(U34kjGK*rG|e!bFb^}IGJj#&YuLZr@d;Oufq06~2%SM*9l|4}Q^KxhT#`5zOGb)wJmdYbxQ+Rmzi$25pobIDlO|1H`dU^F{ zHRUxMYo4vi^mX=)^j%SFuf4W*eScH`<%#~M>TGqDb>r(!)w}CQ)*opQ4GSBNH@wq0 zzVTdSM&y|$(X^-O%jo9lo3TN$#j(=^_6=M;@U20mgPv=i)qJA)?}Nt(7r?O9acJQ#jq3CM6TI$jW&GR@Oy{9Jfd#I+>!2)_ln|kNe=cfK{TKTk1)83jsW%`FRR?m2CW_;#}S(aIAXQdOf`_6vu zhUIgjbG|<34|7}Qw$J@y-k!GVwiEOF%pW%Yi3Q~g<}P^S#{3(fU$}f>`@%04om`|X zp1k;h#pjkZENNe&ExmK;JIkWW+Lpb%Ja74o5{%KQu z)7nj^Zc}dCx4C@tg3bFk|MB)dw=cc@zAY_Vwr|NKu1#!8Jdt=KaUofqT%SCXys&lR z)~D`>+;L`G$+k7yZQB=aKeGMx9o0J~?|5Lx$vf-ryl|KIu3>jAyzBhVxjUcQ<=?e% zSNpC%>>jXt#qM9;-E#NIyD#iVWO-=mL*GBN;?RqS`y7rQ z9)Ebx5zCQ#A2vKZ_u&U0zHoH#(dUmf9NT&9sbd%0x3s_hi2sq_J-UxWx?Nih1~nmW zMZjve=$KRaeVX$#kq-sXSWE#YnM0+Ok!WM6g<`c7F7x#xN~bqHrmBx^(%PJEx0BlE zB@`twFRi61u8dV5TD$fk)m`LP*3X!+UP-jK>mECz$bFPF>~+b()i)xb>r3tF)2nvQ zo3+1cRD|}|*iQUnWR2~@FQ)yKtlD4oz;jnxO{;N{gAG7cYU0VlTu;F7HI??K%5Y_q ztA$cW))hHlN?JXI)}02$NbaCJmHt_NZ(5qL6?#x+uvkg(I9c;h*O!P@tExz?uR57P z1bakNbfV2*RLse(CZkd{bVPyOJ!oXeXflkSU^3VZWQ|6x*4oDWeAOIn7-?3lkw%l* z=pQn;#1QUXRbeq6H5pt6vLzBmiy=7idYD)v_oRMH*$OI_iW)IMj6}~(kyx~u8Up@a zqK5!NK{LeUYa_Q8{ z`rf|s;;NRK-o@3Et4l)E+A!c|`huDpwM@U3c!8UOwZB-~kZaGIoExN}l<#VB6^O6Kv81Zh5oWnydD|rpe@R zme zd7MtqbH{Btlw&>qJ&(ibZf@UgwbR zP*9YMYB3l~k-F(O!Gs57ca@b^hGRajznN5z--jhIhcJ4uRV>s%=fT9c<@tPhxAkQH zp~aQ-@rnrdvhLs)PAU&}#)IXAl-}`E{OY&48l^jP=;KJmt~)R&Mf+Q>S2O7qtU={3 z$Y6viZ@-#E8uZN*UJUVC4A529r1OSOM~Gpp(N#vJCU6c$D#=_{;VY9%5NK=wJ7MT$ zP2itc6H6(k#Y>>Z<1X)`H3NwT)*u-gk85Xhz24k!IC0Tl{YS2c$djAu+ngY3?)#6+ z_k2qqYjf^2QB(NUa1&9}Go49FyB#k&-1;Tn;&zleTzFj7CqlTX(r-#}(@piXngrDi zIBoKZ-a=T(9HVd`7N$@GB)CjhE8!TmP;c@lyk=4sX=`$}(%x&=4_M#%mXc;B=#1m) z@F}V%;#u$UbapC-wVSuvY2Rb~5_y7dchGaqCyD_l5$n8--p-56tXT5%Sn?8KhSmtO z?D1NMhETVh^(=A#WL4Wbv8J_rkqg&S%=}iDmde!rB4I)|Y4uUe z(SdFXMWtw9LAR32Z!(8Wm0?$9G={Fd%xAR}^EDc=QeG@9E7ZUhR3M${BGCr0px581 zKT+Coisr5DOdAFmkWySrD{*w*`ncA*fthmNhFqU7m-M{03wgRu6X1C;o!hCf##7^6 zLW|4#$`->QLzhTX=T@9JmA`O2$?p}pyAv%5@zEvzeTG@0}p4X({s>DPgre$&-!Vdz7HoS=vMYxsyoJV2zi)~$cU9Fv4kgav+lWwP0(oGh$!*_&K zC}6)Xh!_b!AI_2)Lyn|IM622E**>xctsgn8<&Kl+Pdl&hI(r&lWBt8va8XYH;;>V=31z0-Pn2LuF5IRRcUy1vBg+vGHZ)M;kYA*?lzk$ zjh3w&tz>F6SvMSTa!TYp@~8#1k+nRsq^FE20{zx?0dg-O7$QhIUw~U&u;ncT;hj`W zCNufqq@XYo^St)oR`yD?3ntZ)Yr|=Iu0=Iz7qAYN&y=+G7pq-crmyX>Q|*OHK(~OHM4oj7`pU)@`{$8=Xi^0D4mKl5(gA?3`F(89)MhMG=2E5iESBc zL$FShntHD}I9X}aH4{{uR-%fwB+n=rmlNas69T-S zq!teT-r!Zr9WcCtqQ!8_$OP7`Y*BiXT9j8=tGbj|CI(Aui+k4us?p5yy_UUohC$1D#WF@!q$)%Rp&HLv%P%0Q)5);aSDIc`q^1-SRPb9kWL z4PemRK&SzNmrJ}iU`eELwD{^K6mH?l24wwPlqp=l!UY52hcDvIMgO%#$t&OfnQY8< zc|fVXt?9%I>PgVo$C{wR?^OEp$S={%3pD`Jfq*Ci0UxoEzu11Je$9}_-!~ZEe;n6X zW9KRL^!DwiRsE{ii~VFfQ&ujY;(Fb#80GXl#!Ef3*4HSAb*ea6TSEoGhNx0WkvzXY zPy4CA#IOC7vlKzL^5Fa$@{+$JZ|F}bkt;mVA^k<8xJHa(U%p4mr1S+`jjoCS{1?oE z7Xv$zZYjL{oc&EHnU~Aj(z=4dr8cRITVS<1UUpcm3rtRJ<`qxc(}~NksgTT0NT%DV zvV5{0icPiV6Xjc{8V&#Q3}&!1$!{yT#yitW9Hd~yqzjV}L&XSePR4-`eDI%o^%y2L z?QDyh;fO(JCUk3cMIkGkrXG8xSA=V-`WpG|CKnWuQUY7(Y2%)yX@nZO@{ScvnxB$> zElGF6$x13B>2b6{2+gxhuLk(N&4hYHD#2Z#60rMptkUO#qTgVAXI zmD#3_Q=P`nkEi_NwaqzHTuRoZ$4`!GH1IR4GEU7k%otug<%tz;f1Z2R-Vp@@TZ}9^ zcJq%+icz_9c=7e$F!LPXX>Btws}dU?gOb;XZH(s zv5VCyU;|+AR3TqrcME3j&$Ek_n)7NK9G=`BYwO`i2z!4l+vuy}iu=^yxxu>kxN)>4 z6K!^q;z_jx1)cHk-qSMezVFyJcMm1zC~@8NGz7>Gn!^8p2N$C#bvmpxgq=6-oOX_* z7&OGD#I4#(j&iGmDpBSsw9yc&RDkL%WhfR=RFsAZ8;gd36@u$$V}^!o+DizH*znO> zrLDlrcQ4s!Ft@2C-bJ5yroC+I)}%jBexnbF>w*`ovN`fAKfp`QGVHg*+PivlgKf0U z!2`k|^|raem#%CF10tRbkHiY4YU0sRoTmc!R69qN2{s!T5L)8N@JM*NuoFBr{G>4& zq7MoR7WDD@8_;9~EtQ(QnCCwg&}Wy1$Fstil*X*wd6ePJy3^|3KIVqTT_XN7<)QLG=T_XF^=W}&eR~2;>Eg0?T_;g)uz^ba_pr32S=v4XM zh*C_cnR`bX&H4EjW9q;@Z|dyce)V>XJ>Q=6+Y0acNm=pI^*LsHf&I4IbG;qAgt4o$ z>nQ}c#$hws1cf*bpI3@ls(EkF2+2ij(S6e|wKmPDx0L$*zUn-oUaA=sQ86i1e$No@ zeZf7WF1_zfy>L%s;lJ%&r0n~DWMSX5hNbk^`^#()P!}$d3lb`53v1m7rN+0Nc?uz3EPp`%sZUz zSGl{o`+H0YVHd5q3SA0J&adq**Uz?aoh|Id-+^&C?m&jHlZAMvi^|K36bq!hl}%E| z`}cohx$ZpXQ-WPtAFQOn<_3O+bSofKt%M;)qA@iT=pM6~oh*#msK+Rj4U=?l%4*g9 zsg(0rSt2nBLP6G@aE0z-ft#fF|433Fz-9f?3KJTa8@Au5htv=pI0PeO?9zZ#yyeo> z3xX0o8a`}BEY*n*G%IvH55;aSroR%^+X$lB*iV;}aP4R(!t~Rw&lxlRgL(6(@$jZo zi;Vfs+oGyl#*$LcVjJnlLY#WyPmPy1|FLDOhcl+U;o-q z-wq7j7Wt0Ja0;Q=hl?f@9UHakSg?o+COkN>&aT>?-evO^*mgZ_E3yt4s6Nxbe?Qdw z=Gy^lWuMck`BY?koRY!d(GjbU7ES1tsyqD~S5`fM0T)9IhJukX#8l~%WeIE!;97<; z9PAG;vaqhPb^SbM2a7 zu(sE@UTeNm#<5%6*#U~Z`HZ#5T2}9jI%D54m`{zG8LgXM#$(@&hgPNR=0JXNexRS; z%+3AQV3M^(MK>Sqe2O))G7gmQ`0&ZQjpjNrM$8h6Q>)Jw`;8nN|ZI2t2wb;B+xOi=^s$^=)v;8}EJiE@A zsBq~#%W*08`((7Fkz9J5itpsUjjeH+`BGsdswTUG2_=X+I5piGYY=>vCha_zQ3>bU zr0b-`adRG_RgP3>N!-9bBkaWy3y*_jLH8c6WB>ENwSc=-c#YVqur1cAYKL>Nfc8g-}+!_hbi<9YN_&AgT>6HKWDKDEr6IH{A{*=C58M zDfFAIJbdDDI};DTVz9k)^w?WA<<$?`xg@Q}T0&P0M)~1TchNka*HHKQqep+P8h&x~ z=&!XiEYBWCnk#AI$^m17kfA>y0_K1(5*33m)2416r^l~!o#%r)(z7fvI{3l}#8bo2 zfb?tah0E%J{S)nnOhu=rcSY(L_9Her97*1gP0}*_>>EnDUt2{`5wfNxf)#D7`E;F= z9>XeOBf{;8ON!{cuE%+tZ|O1DG6dKrB|uedBXX&}pvi)%?IJ3bX3!Y>PMQX`p z?DnU+LvhgIdej7Q+ADlJKIDlZGUrmRt+Lwe+bni`nC`b#*KOZ6md0)0R%az|p|y10 z+-P*}JZ-&nxDqms!8f3GXIfv7b~z=4F&ImRkG&>jG$mS?e`C!ItkTagrD}*Hjyy5 zNM%^XYcNGni6DZ{1Rsf`TeV6l$C)79O?ZbT9o}RMPM0gAtxB|5Y2fH3N1&k$641Bd zN}L*-oeFE+MjR=RTxyP#Q>Hv(UTU>gM0*N>m9R)b9w&A(M!OzXX{C9lr zn*P=9GOMCk%3XbHYux^P#VR^(`NXX>%hS6ggwv+Spu-4>wL(aJxVBkX;x=DbBc;r zwB*6GnY?g^1@pe#EEo}^4TAd{F@mO0IOOBq0AY`Sqg@U>bng*72R}DaV4|ATjwiKq zD!$odAlN{0$^D%|Pj5TVz3G=W&hbSNt2TTR*Ji864W$L0-!2Fdg$k4(7lyR?9e=uT zyP@A>^eMYi2mn=vLr&hZG${51MvF~5Z?hN=81ks#duA7r%lti)=y>qcR|wHy(e{rrsCLHf1!fv+b-O#4d0bYy&cGqRuIJSk)nOthgmc&a z9LB8R(^k35GKX=T53SFRx~U?S_)~vBea{mnY$-lAA)Fhw>lKhm>&G2$@It1OeXDI>YHB#J6`$Xr)nPcG-_jc zQD+|)Opax{*}UDNxQkrMJ4NLeFDUPH_BmuW)9v~(LE4HsyRhgx^-;2|L3t@yWX0RwXlU- zzn-_X>(;ZgpnD;|0xkQ2mfdE`>r}!O(6UD8W_DKp&9Kyd&M2At|>ghYC?U-H-#XUFl zxYOftKJF>s^P-<#-pF z!<^|+e&^K^d=u73M8x&t1{8KHx>zWn`v5p)*41GMF&}7TUHy^qU~@i&5)lpp`f=FK zdKk3rQG-S0x^|?uOMKc~il0Bve5PO8IL8-ywX&dW(&9;F1(gF@bw_E|@Zqz-vu7deiZ370h%_}Wl*2=A;6=l|N z&b2NZK-|#es5tv&DgL#vL#le#B={=jVBQk)P9c{u5H|Z7gA{A3B3DJS$EoR7@Ub+Ir>}-;eCXQSvk6FKRgl558DV^AZH6x}avkTlnG$ zM>>#eXvB!_4?~<9;fG+Y+1O#}%K&&A`VJl?2obdqERWm>E2eQQ09$SNgE)-IUbj%C z1=msGj;YhO2bIxt$#COnp7Gr6cI(pFRfnHHRCPo1GE2^mxhpt2VZFmvV7tT0A*Io% zhuV|p6D^ozTr_6%e5SdwVb0wB{%JQZnC9O3af_a_)D*6v>@$?>yvmo%V35_w$^_7a>i^VDz=XJJ-; z6!6Mbbi*3diy>m9m;jTRvV2}ap41Od1X3eDcc z)%V(8Br|Co^I$@x%LbL;67%NX5L&}BiJ_-GsC;1hTg z-NBgdBz|=*Ep#(Re3YpaLPm@_iy9O8%#s-HR1V;o{6ORLdXI4Vd3iiYHyjm<_gH8cr{?5s)8=gqv{F6MX7EDQVZkEjaa-5ws5N zE4vj!`eVJ=oQK13UZD;$v2jyeXE>a2(c-r0&rKW{?0oMGzjD#y%E3ZtU$G$S+nA5k zN1$^tFvMs)dc5VI2H-@5;D0w_K3aP0Uk1PimCpXla9Lw0XRaOs@2R!NFO4-J2g^Ez zKQ|Cv2i3oVMc57IP2eyw9^uS3u~BU2f16HaF0gB?nccf{a<5+f z{_53{6;|sCOR?)MSFz=C_E2779{%z}q5S%x_{_InztVq_lSjbgi1&1l^c&n|kvo;U zCzwdf{IMV5m!HlJ<)(98E?hX{c5CnE28)BaR8kijNb&l*xT3`C>f>;E`Bdg@eKiov zg1`RuEbN&=4pu&EQfl_bP=)Uqx({2B6gv9pfYUmRr`{v~k(|o9fMrQDfo!di&aS3vhqS(nWa9xp>j4B`fi+ycObq0qgHm A?f?J) delta 18310 zcma)E34B$>xu5TxyKhPEnvHBX3xOnLy%)lg8-%d0BD)Z_hzN*^h^X8PB1QxRFBL@# z5v`>v7KuXL@KUYXx;|@t6%nJ=d)q#rT5GMMIeGu@OoI4q-|q$fXU>^3bI!~+-}j$y zzB$SByG=)KH|+{WpA&+v7edTjvTD(qM;>oFCWPgWLS%h@$;xZnN)`>Y3Q;;y(C9Ch zFI%)UU;_~A@y^(9ZtP2YzUqk@7pXgNZ4r2%{)0MnGM-2G(#g&QZB#lN z4Yw-sZnAX##$;BaC}RXvpaQ@{4R7i166$Nn<+oNKwdwf=^`KtH!1<|@Jv~AsiI2EO zOOHbF-y!AbHoO5ow#1yAU2Aqh>1;Nv$#=g5huj!ltTq#omfXj6wRkXahrHg zoDsXk`(igl`V(=xxI=s(J`{fvH;Jv{X3;Kg5!=MAV!PNY?i6>49b%{WNE{Q##pB`$ z@uc{bcnYF_Mtm%iA|?JT{v!S=o)!Nk651@elEp_^0?< zd?U_^?{bOAPXWrLEXt<-R895NKp_g#U>dUbSF35rvdd`}&89iDfEH3KEuy8gjN0fD zT27bJ3R*)~(3P~7*3-4Lfv%$)XdPWc8!1XLx{p@gL$%@q2nyyhTT;lOCfd#2>`l;y=Y7#XI7ZcvqYj z-->Rbi5?PrTUJx~v|Q>(c@(4)Dy1?irvWsODyWjKqN}Nj22l;wQXMtYT$)Go>0(+! zm(faEMXTw0+C-b_W@@KfXdB&1+i3^wq}_YhTuxaz575u)7xXwCqbKPpI!?c$r|B6w zLC;d6^Mu1mzFcSve&{6Yjsz`^cR4SNZon0+i~-FNN$4B{IwX>I322i@IwYW1BI%TX zhKZz00=g!WuucZFP9)PMpnoEnApuPkNw)-aQY1Y>MEL;q6iKgycpa%vf^v}hC8z*t zKmuwkk}zY2ex8MMfQpc2OHe*it`9)lMG_)lK<`Dep9Cx*Dw27)0ALIv$&~<@g-8}i zz(7Qj9{|8qM3P?uFb^ez5-=Z;ES7*Fi6nT20h1ERQVAHBNR~;!%tW$3BZ@+Q!b!OV zY)>QyNWcn3a-an4Q6xbX3|OW}R!YD|MY2i))+&;NBw)89SuFtz7Ree3*s@60O2Dc` zGFpcN00S4vdI^}iNH$2o=tVLl0rMBhump%eBnL}?5=3%{1js=o8zn#!A~{q7gdvi{ zBtRV^Ib0$N77@u25=`aECJ8W$NJb>UF(TP40k#pzkrLn?k-R_x3?!1HB)~-?Ia&g& zB$6!>;3ttBBLSuo$+0~CW6}ErF2+fKzC?1o1c*!|CrE(OL~^18$W0_CNr=ypPL=@S ziR2UsP@hOnl>iBf0TbeRN&k+wt0f3Jl3XW2tS8q< z5bMc$31U6DR)SbhHb@Zb$#oLMdUCx4v7X$(<9`Es&x*29f>=>FA0Sqgm;|w&Y?2_> zlg$#udUB%#v7T&^AeO>S62v;QRf1S&ZkC`ZD^0ruu@2lKK?{*?lOWcCTP28fV7mnI zSnrS^9_yVF#AAJ%1o2q!k{}-H-4et@eLIgo4#Z;}mmnUmJrcy@^%Du=@w!8Tc!>5& z5R3m#31aczB|$9yeG!!$8^60@lYI)ARdYi3F4u+SAtmN z2PKF_exC%f$nTdR7WvO4h$ZrX1hGVZ&VZs2B#=BLK`ez|NDxcmK?!0hJS0IZg@+}G zUwT-A?vH=&3((Kv7JrZq#Vh=S=)unU{`ZL<>KvB&d#XXXlu3e6KV_DnN03@1=$A;X z5_F_9k{zWenv@zKA<(4MKnVfirYa-^gqy0A5D;#vN2*@^7BOxH$ zRIP-7Y*Td-032_AJND1*M(hDTSQKX|JL?_bG z65=tWEfR1rMQV%$TuqT0D*>ldq{cCze(*mu1G~^-~hng6)8{+1CFmqfod3V zfkg`R!Vtel3VLC{Efy)T3q!nxbgl%kROU$#OJ%+Uu~aUWfFmtZ3nZfOsYPm`1iWjJ zYL$SWEmDgl;Bkx8VhQ-(BDF*UUbsjtm4H7kQp+U7X{2ou@X`ePKzf}7xshHkK^~+xNRSul zMj(m<`S?VFa*@U)s2|cz5|oE@vjhc^-YCIq?$j0uDn)ve1eGD(DnaE)Zwt&An!87WSaW|OL9DrVNDyo8UI|))^iBz4J-JJQSWosz5bMd^62y9Pj|4|UQa_a- zmh65O`+oGEMSDPkSX3Pn#G<-af>=@qC5R<;p9Ha_?w25z)XyY{CG~&=v7~-3K`fC& z5)|cL{X&AcR}V@M_v#@D;$A&0LENju62!fFM1r_izmyI2+;4aWdw%V$^0s@w@GbRq z_&)WA{6_FQbD;49Oj$ zH7;#DGIZ?FKMxx`tbN$2;T6Mo4*%nb#Unm!+S&Ac)7O!f$Q_Yn^Ni*vM;44cGV<&N zgD?2?sO(YOM}0B6YIN)9-;Msd<>4_^W7ds%d+dO*?c;LCwT(M6?z{2x$Df%XCe%;3 ze!|fSuT3nP7@4?X;#-p%Cv{AoF-4hj|CFOsUYZg;Gv(8%mZ|=!wNqQC-ahrn)K{h^ zrxi?_JFR`%W7EExK6rZD^gYwRx^V1;TQ7WLM%#?8ixyn;#>~>0b7yXw`TVTXS$k%e z&OS0{`kaU7*3P|Wo_pTLdB3|j`{Jz&ybGRRxTjTV9p8FS>vxOhF8X5et|jS9b}o5f zsbgvT((jhFEc>MG&bHUu{v5qz*d<>sZ&|)?`I$?LF5P%(a>a}lM=xuuRnH!;fBFCTzSI_8)t6(Bswg*B6>RJkIjs2 z-c+&a%1zO?HitGZ-+agB6Pw?@G4sZyH+J0k_LdP_4&GFBQ^!`<*4C|G-#q>1Z8!g_ zJ+nR1zNLNNEqS-Ry-nFxy>0ro*KVD7>%r}Y?QPo+ZvS*gvrwh-MIUs+jDPUe*3X_c6>wp?4Gtgr++f>j{bMF-|@-b{(IN%J<@n*%bic& zm44Ti`)2QZ-SIGzwLnOz^)FZV}8dS9m#te?|u4U z^}($Nj~+bRd1vXXbkPR_QyJCeQNTs!!iK^T6t1GOps$iBk=Ssbs@}Iji%?==R8gV} z6Iy~IN~?O;+O>D75oO)%+3S>OM+e)q!Uwg#@}kHQ`Fj%=Q&Ifm{#o_&e_!?cI>oI0 zGu)1!Fj@5!kFje1!cl9oqI|K{d9y8>TSPryp;@Y`oQ)qVe>kd~rO~0#6q~`Qm^Z~tMzy?oRF=~- zWK4n4Y?wURY_zM2H5{^7tLiedR7x~wJf5fl?L;w8pVykh#(U7jfS=neZ z8*-*i#}sSgSE=_Z>xB~ns}#dTid`wc>z~Y2%*o@TQ#X zJq4b$VAktzX`f{J3(5}U49dtYDXR7tk~2N$fIH3m7wuE>hey)5hTNjO+_&d^d}MS@ zb9JzksAX_op*!8*>?OuvRjY7;BmP;FCVixaB=(BMWsrs*2)c4VlMXsCG`|>yRP2*4=2@^bg#uFQaa(+-lQfjq@BcZ z2f1_I_^2tf87Q%HIL6Y5s=ILq`Eb#@4pl{q&R#)^i*icuit10WP zK62{#NQU?1z#&9K268eb64BbzJf5@{U0$zCd*ItNuQx4T(FkH`toZg@&Wu+!5;ay* zLHAY@)%Pc3e-=Rh_qv;@C&Q_AJ2Ntzq&hPqBiznW&J1cOYe5NIwBUm3%SPdLbV{2sMk#QDha3C?d*;~n)FiTt(DzhI5yK4S9d?< zQ&e|@XPw*K-Q6qopH*(J)c(HNL4RM@J?dk{;PG7Tt@Cz&2YHH~_tksV0%3-RFlW5^YeL~(9!W{#4`E$-p< zR{V>q*Xzx?BK{ivvw$KY=iOE=Jlq|lguS7yEs@ZK{;Y~BWuu|dpe3XnV=|#!ug~Z0UYefcQK&eF zgv{b5J;Q2GkJ~lw>xYFVG9NIJUpxRHBpL_hx5|AFeH|X^lu? zP&z`aH=a}&|4m(g5}lvaHBodBsGsc) zhSbLoLy4J>J7aDr^cl|)Nqva*s1WmEt-s{_=@E6mpDWdZR&Hds;A1PxG=brXV0a5~ zp$S|-#tI7>%(H}<#C-;3ktn@`vPM_NoHc9K9MPm=;vxJv_5_gfnSM21%4r>$G zBoB1)8@`{d-7Y4tp3~}MYLQro7pN|55;FOOJy3nj9he`(5MLx(vo z!gc<9HYb9YPxyiHj85=pGT+I zEw|K~(_4*XF;YTXR?t7pQnj5ZbI5*`%eOYtEa6`%pUF6F!7WP_dgHoVtjHYW( zLhCgyB_=JZ0LmM4xtSg1w79C3&`@q`D-2KRCuBK|(=LihE7f8V{c&*`oY`4E#7b1g zeq?-nV|4GMQz;PdYP^=3_Wlj0QI;Fn8ixdu9CRcML1ySC2qnN2J(PGh=TtXKv#*f< zRWbF1>I!@9jVHZ^pwcC~!J?8)Nbu?JwK{rL^YE#1IL=A@s;kf^m{@^6d-vMffk=XV z4dx=&b95$>h^G&GsvxFxu+w3sGP9Lb*e}Y#%T_wHL@c5ul(>2L;%J9Ks3HCmqQPJ6 z30f(r7|IUORFj6S{@B;{?(e?2e(@|CMKLX=&0cv**OuQINNwdhRBBM`tW@VN4j9BC z?TAT3Db!L7-zZxa&(faO@DMtLYI?mGq!klZxI(4w5}%cP24xYM7JdKt*bm;^SLqME zl|qWF3+QmWp4D#4@>o%bZ|g<7Up{Y5z`cSF*pxw-NCkQPrl1kCrzcdact5c^)3n+& zm-PcnW>hKB-f`qwavU_s)?3LSE0vgv%2dp-AZxSYwPadSR#zImhI*%MHX7*2A7{F~qVz@cotIpueZCjVyuKp6uT^;v*o)EUn^Bl}bmYz$B(ljxZC+%ShQEYr{V#WZx7dVnlaM6ta;y!Hk zM|EPc4*lhPP`+JkwK|`7TCIysF74X$?$GM!c~`1n4-7OTXG;}EXuZgqNt9{5$T;jr z_j*KkLWywkm~PiN;%h1%D4j^MKqQr7I2Hz@@yQX~zd9de1~(a`3@6Yh(w~JFc&+zzn<~> zOV`^euZXP6A9#4oxqFtNWA>=L8HZN7{ps$xJ4R;>DRvbZ0&2gEThdJ~W#y>63xC1) zJacewaLIZ1ItR{pkerEg@qwTi6puZW&D1_Nu=iv(WsQxuKd!2ex69+IU8=fkm41wz z%WQvqcwZ)NJ@aq!JFlMEXs8bA>$*u|4u($#A7ECPy>!=8pXko5jo3d^<4?_PC{mfq z`+O^;9j*+I^FU}E(YTNzklr76&1(qW%Oa+H>05QjIORDFWn!{y_kYCa&8zIZZ(g1< z@O^a&77}T?p_IW$cqNAElnsPelqKg~$3M9^r{X>RdBr(0(dNWxWK3m;4~qz_FO)>@ zYx$}(ykI*;7c0%e#q$fuq|8e2(|AFo1ZX&WXxb_5lq+a;&~RI}64st$&ZScA6jLek zgrv^J%4mK@35BW%vs9@IpRM`-S6+Q5K(Gu}Qc>`4Vqa6BNdxxJz!)!L~d0VyzA|Uz~ zc`@yjeiy>DqD9^;n-)bU{&(J~bB*W{>AY}7N1%n=6CRuMdxmSCaxf-54{Fa@`MKz6 z_c;M`jxMDizFaSkcW3mCE*FD*Vb_0LG|rO-(myXC*PqQT!*k9vVseHz9gmI8vftOy z%Ng$6_{Q>V$Muqp1m|}4ySg@DHL8=q^;KeQeD?Nw^2c{>Z!uVlz2^8k+nW&(%TJHz z@9<|q_Qsy>p2rMaJX_Rb!8Z{fYl?9E^6fbW`11bvWjkiciZAY%X-HS{(&I%t2c)Uz zYUPNKm>QqIb2!T0y>pB#o7y=hlgq~Zw(Of<4(2UiXE!^t9M|2D=IxA+z3oMZD$00` z!V{1u9@rH$^RyC6MB<}%71-d0DOhs@@fEv@J*1zbsm%AffP(RZyPiap^Wxo;RCKxX z@b3MJKDYH3qj=UV%s78N%7RmCIHqD`ciF6a#4cEK31WI2L(xTS4q{cyQv&8bOcQYD zB0S^t+AhKX#fR7f4m#4)9o_H2M|Q(ge~wvX3rl^=cxIIA`BYh`PgP6+y{6BP(MT!e zRW5Noc%9wvJJZu&jk3=l<)>`os+;&BqSNt{k1dlv0QDB>@h)r;VpW8|6~|!H2vb^p z6Jh#7Gu6TX<}Tga@AdwTdf-F3W||dmvb7_?YK3vchwTqWW7Dl!9!tA5$96NT;xwkt zdt-=z^ffb)Qxd_<8xegb`7^}aK>VN?tl!ukc&)~41-~og55Npy>}L2x${;E^&k-V0 zsD|HBU!m)I|8dS4vj@I6>q7hZDW?}Mo@pc8n@J-UZdBEc3-ti^N>Xaris~zwXX1_n zC7sm=mZe4Ehxfdx#+9>(xnv-MSuKV_9Dy*r6gZ}3@aK>O%qlmKT{E*356dfnRVL(x zg=cM`6l+d@APh=TRtCzPgPSUAYn~l@dwpf(=$x_|li>xIwZ!@OE!=`zjyZ9z+*Ubg z(97Dyzr9=&GxVF1yT9e~{W&?57bu%^w7IhW_HJ8sU1ie{SDE$?gXskqIPvjYKuBD> z#Ok7w%9>cs%as0d)%@Jt{iD|$$eofa;-h}~LB?n5-KtOI!PuH0*Rs-3JaipYGS z8v8t4ImPw{4b8aIS6WRV@bLlLNKX$RDc|M(E+O45txK*$setdCbGcwzN<@nyFULd8 z%#c-D;8_orvo77*a^ZX-GZ&7e=)C`#k1T_G9#r2}XX* zQTwM60f84^BrCpCK%cMZKF_hb;Jj6qG9UgV#1M6&WLK=WyIL#rjm|Wf zao|87gu9au8gIdfH*gG@xsrV>J^Urt=^{=if9q~wg9x@H<4q{2c3l5_gvb_=;v3w!%d37lvTRak9~8!Zmdqu*9m zvt{!*Wzvl|R$IuMX)9WA@nCA0zwl_}yk~H2NP#Oq=ka+MMgjB<0p@T+J-m*9e+1RTuXRxs4F}4CMOB0;r;3W;sA5du zjYH*paKyYWD)Ypby*((}MlQP|>@Ko^jM$u%i9 zx4i?!hPE{|wGEBY@D(ek`F-`+uo-&Iq)FEd#lDXwcpJy(Dk*CjFrcNZ#O34NptUa4 z!sB8;dRz=QqCa}=P;>Q?E0)3j%?r*%uYu#rN()rTqLOqwgOQ za*bpfiSmGUsE5^7F;_P>45+?Q09)fgB@-YA7W5seIz7xTx2@Rm()VYO$7}XH0x{|v zTDqBG?cNs{?2FA4*6iv;gdpLO>EvGk&5Y*u+J6Cs`^%|-Zwq$1*jU_7Md%d7fj-0w zp{-6Xs&Fh*YmF%#D9&+E8M^QFi8yK1Gr?aG`N{%*jDG0ivj`5k?gFR0+1-&yKpOGP zcPfaQv2?pT_4ibYA;J_AciEbEWKjLca70T5zi!qF7DeMV!9E=y9%84qz zN7I4@85EJ6a&G0@E45aa`w6UD8YG9ZOIRE#E~cCxri<6vl#D!g^Y{D_)*{^USRXC9 z7F}-yff2~!L*hq-cy}#Sy!UWEIrQH{>v>oGFn;9Jq_jnnAx)966E0s%-0|*krPvmq z@a~(@=hbJ_!I+4>_-OZ2bQo%bzCfd3?Vtu;75Wiy<9$%x83k*A9pI8;YJv%b>IZ=| zkTC-L+ftSE*a3)~tp#`49mJzb5uj&&fr9a#stMtLQz`C7aogn0hbkfm+S%*(a7a3U zf0!ZouC%s*pIvfPf>VyI3*H3a*M`eDgSR=uthShG0zP&?d!2aRy_FUL_gQ!9;kvRR z=oSK78Z}o@=8lrb@=$1cC{*M~OS9L4X_DI>%X@sOj_?EDn4@QD?D4 zxoXIo>B#6;o-;nXI4i5vXbcByh^mXj=3rJAonq(h^7n^M+gLR16T#S|tv1Wlw{f;z;bts}B zE{Df$&$NcnqGGeT&T23@Ee4Nsv@I>oHrnYinC+-qEvr_e$*Acfy=s~x%kRiSfApFm z)U*sK&(02_v84`2ZE$EwwL8ciL7o|1L1XI-rczwxp~wJxb;;1;YI0X(Lju{^6=v=U zcSv;lPtQ}c66$mCEj-x#sT6C(Em$>sMlf~xrKmTw&GBJcdQ^(Y*Po# zQ8FA_7BgUU zE;EmC>GqzxTk5blq65;>)6(**?3wmKd1*NJ)b(@NtMV>UE-kL8DDK|dZ&+<^Ztbwk z6(^5g_utKMSbB||=%qk`f_bb8Gp16IX?G~jY;(YD4!E3|CR4zio#o0z0k5kf&7+`z zD=XVfh3%VukFr}}|gsgN-M_OhMA zjb+pTIIfLi1g{Bumlpa)Q2;@Jvb`TnqRe>fpB!0K=L^Pk!M+ZinZ;-R?W$fBdw(A9Wp54az*ltjtwZ?GwA-Pvw4} zeUD>+ovw=y`>dv1;AH{_IO)78Q3B~98pMGcxuK5s>e~?%U-U`V^oSb!u2oI21ir)2 zxRqZ|+A^xi?c8|59EFBe)6NC`L!tf)c#luvAi5l31r@q~dfy?s-;qYjl%dsQTvSVg z##F<<>U`;w40SqA;D|m4&xLoP&KFbKVYAJlJ>amJ51ZU%K5g}St*4=T2$(@i&#NcZ z5!jD&2tPgpLDNf&yj_6UL;Rng&8qq8j5qUiw#U=-i1t&u^D~p_GeCRyp-%iJZ@}Tu z{$kBZ*Ye~{OCP4^h|cKeuc=X%|Fc-IH0#0VK^*AtocqG5ULQhUmi^!p2RK%JOJwW- z*Kypd@A{y}sl-@h-7%*pTiH?E&`{icmCj*w%SpbW=}yqI5p6SzYCOvg>ZWvQg750? z(sU4B_m`6R6h}$@cPH7IVt*>p(R;?jD0)t*o78%!O)&x+&GGqPW=CaYFikt_%5!OF(+c~gQ@wI4+Jk0Mt;^;71;QVe1VXq8j)Fgk z=3z0c)}d|98Tfv|vc+uPVo}_=8OpP0`TN0(aMxST z8#)i>BA&I(Mhqc)PwXFsuz`wC8vf0@`bI8(;+x`v|7(c2gK_Pf!p_38rwZ+R)K+YI z_U8`*;)|~K#$Ri;L@UV%R)<|-l5AjOz>EfWk3U2zQ3^U(O*^0p=T5Xq_{I8oea#bp zeWIp5GO&EcCj2WOs2!#Rigj`MuD7Gvj-h-ZKsO@I%@A z-?D|2$ju2hxfb zE(}w6!NOp{_4u;V?V7eqQC3akvx(OYq42a&Xj=IA(SG<1|ELT*n=re2F&c=`m*}eq zW1x&b7Y&d{51^FmON|m@8JwHjMiAXk_kh;A-!n9K@FHNr6@TMk#y%~{WcQ}F`ukOf zz6vSiLd}o9@pS!I6u^gY$Fiq9#hYf@ggfb{2y1jF?R$zfSeZ}KkGCYx;& z2f8m)nw0i7JV{@1E*U>znUd#9yLgGk7F|N7>5GUKO*bwZKW>qthi|UAc){-O&veV) zjPJ8HGq+vFa||z~6S`}`+mOP8*7tf7$8Rg3NM^L}^E|;H=V3zd^O6~k5A?BbHT{2l zocI0CczuWpTDdcFrr?i!e(;GNoTT1mtxV~+D4gpaj7b8<8|$mtB@3PZjb3j(uD`H% z(;LN)FBn2E2BJOc3)tIm!F?+iwQ%0p(|{`Jdoye~evUlxJjMYaT(YgryVFZEyzy+ACRwg|$UR z_+uVhx!4agv#GqCs;hmImyfj%#-FQ&7%O2*_;d>TIt}*3A2apw2SUNj8g=K~#(+Md%YeuE=f?PoJy^pF z?FH!>k`XCfRQCR!?DHh2{wr@WkBNW>irGLv$&5(aP$o1!!9HYv`oj<$z#p;RDLvYo zHpSQ)^jxlK#xpSUi{p(mX;%92$1lS#64A-y_yZ!F)#I;RK|Z4r9&-HDI{KZ-;aGp^ z+RIm8a>><;RH%F=2 Is=I~%1B?Y$b^rhX diff --git a/dist/font/iconfont.woff b/dist/font/iconfont.woff index f3afa2b4a7ff3116db6436e2abaf940254a4e203..59f5242bf1550c1f13721db5e505eca492cd8962 100644 GIT binary patch literal 51156 zcmY(KQ;;N0phkx~=8o+h+qP}nwr$(ij&0jJwr$(E{ong^JK{ve`RdEceCUqo&Z>5k z6BPvl1_HcB7lB{^2jK9b|MUN{|NjzGQV|3cAOR^80KvNN#w$4`Iz~Xo4RB!qs@(1p zV@5Ux_JGVE2nhNC2ndTlN5SHknYD*05D=_05KuWb5U>bN>?YTyxru=>5KwbGU>pMg zR&*@7EptE!$c6w;2!I5N_1CJojk7x-I|aBB5D)|`QuNQEwVe^5*8-RqH2goVPT!7BH!;fsF|uI|Qsp1PBPkhFAI9$KK8fu#Qe@z&qWZa1wCO zHqtlN*WWdaH<~rjcXoJyGT7DEH}D6Fhc%Kl^(2yqodBJv_qTv2FbxU^0g5CBl>_?U zF$SjDeSH&s{fpzyp#cE}_<~G5ru2q~`uh5Y`X;7*&>-{LN*Fk~47_|Jo436IgrV(e z1xVzRkcpr`R|&9P?%7wXVLvMi_~5rrnanH{SH%IpB%}t(%bA&rjY)%>RMwTuDIx{A zWF(lYgx9=od}_O2KD%X4c3z)uA3YwcXI5T(ZZ4dryMa)C$v&J6E9}i3ALbSq&4|!;B z3T&#yyjZ*Gt49a3@ooi3SVd5=qfq9Nzvp286mV$flWG>YT;7bE2ep`oJ+p(C?lWh{ z!k>mS%|e+KGIiurO$)L)iy=G?t!<9MZ4OOs20G2*gWBW$+V|G>hjBon9U;&T>~BL! z+jE5NM{Pq^Ga#=Sp@$uXj2% zptbH3wH`3F?pNK6v1xt?5=Y!vc;*Kc2WzOwybcd(gC+(W7b`NoL z!oJ!2a!0M*bLk3TyF=R^;d=e;cYyyH^&^g^FMwuffM%e8Hz1@DJ*)wuqMrCyJu|Ex z_Fn@I)q}XI0nPHULe*eL)#$r*p8-z4kvlbZ0}}QF$@3A%<*1VfFx|ls&HxpAY!Z70 z6MIr4d)A5reC-Kb_ULd|Myowk+P&)bh>7;}h6lvWp=He;r|n7i=D5yg|3_Pv*DDbI zp^$faoIM@>QO_$iTK|t<%4{#C^POFrUWQ46vN$+3BTRX|h$kUx!x%&H09r(-@(|HR ze57VE&OBiWtW20D3BDpj6s$0%Z9=FxDYYX~d9jEfQA)#@Wbr&&d4zMih%Zq}y|`j= z16oF;@-&f7!UT41+zRxF7 zv$%b+C7MR8@)prjf~EQ)m!eEmu~>yk!kc(A%{=}Yc@!Rhh0z?OxR{nRsG?3(Du0F9 z9J=@uO(tl0fJhhtuF)Ks_^9S1^t=NaT+rfdp;bJVMiacEQPj79rQw{g_^6gM@;nsU zRq*0sVQIWk^r@FKn(>@ zsQ^@_$~ZCsSDB)>%rV7cQECJ%U=1+2i|EuCPLb)MCxBl7M2k!fY7`pjXUa6v?G~x2 z=`GRFuvlQ&Fj-)tqSt4JMXye#0MLkD?I9OEo0ThkI8_43Qut_`EaTCzUCiD24}(SB zEsI6nYI@6BRjlSemC@@-OQKifSVhmq)e2TE(`77Lc8i=_CX1XlfCaH)HOpp2YnD!l zeran(zqhwwIn%anl;t^Ooz)~?*9YnJZk6TT=`Q3@UeTX++2;wIgnY!jueo74yRMqd zt{JqRZKphAIJ>&{ITuPG08;m{{Kmn-UpcsV45ycMD*!11$TKG3%w)c|*Ji%=hMjy5 zEec~X-A0q(2 z0Vn}r3S#8LOnzI-cN#kRb@YP{APs;TfE562C5ciySc~90m;kUB!TB%%0Gtotd;sqS zcrU0RI8_55RvkHYHt(ImoX|$C}#8iO}oX8i~-G+PaC*8HLdg z2S&ycw1+U>5~Hw)mF@{g#*)3uhNsZm(}!^}+S`V0FxrEMyD{2}hv6{WlZSOM+na`~ zG2iH;KA0Raqq3MCHKMp!966#kSR6f~yjUH@veh z`B~de`FT@+@qNpDF>{KAGU*sIMdATa1qW0GiyTkMitddP6dJo$%QSk{01TID=o&6^ z)3R8)+WrTVrE4lC3)jDx^}LN3%^R+005O`qsG`+7l10mQDGC>@>lkjOT_a`9+E$C2 zHB6Q?E7;AZZkSJ-*wLQXF`_&#WJS4NjS4f}!(}JimWxh1Hj7SnOy})44Cn2w*iV}; zSWlZ=(VitA{}JOEn|;==&46sOKd})aNEF+H+@6wEG6BXuEZ#?1jg2 z@#7iusb>@rABc9_^(x$O>2JR9p=?@70=_plbwl}M52w&?)@q)sw%RsN&qbS(#E{HH zpCpPV#@$7GZ|rWo9@cS8eSwD&V+4l4t!|19U>d@bfL($?9oSO*VTJ|zf@>t=GMz(U%qSEC`rVu6cu!s+b|vXtY{k6Wh-U{q{b^23} zRG`uK!mmjkJnz^s={Fo0+UqEA+#6r^SA@aMb>)v6Gu)_ea{64ub@VsQ3Nsu_H&V5* z?6<%SHaOWSezMzsFC+QU#hsqU4-m>1s5kh)Za6!UDp)BZ5+_)HtjtL0L+oKRo_-v1 zz61FgIM_g;ALRWW;&0uuwX0_I=-WN~HETZ4^st>WO3kE(g^^3da0tp6BD%$rl_-5k zGdqa)Q}9`80z^x>ik>bTH*@s;h}si*nsPRC~{%r6v$e+F6d8aC;#yiVY(?3W1!W{+d)wO&^{wCFZzH zW@9^nmrO~mlWrvbO`I|T{j02)oGZvoIq~u^JaM%qPwGVS|6G zW9hnXIIa3}uzZ)kE=?z0#Yf$)ZE2vU)CKoD;fSmAAPx=$Fgss(+N3< z^zxtcZgHgr>3&Cum!hb2C~!`c%sMfOXs;fIzOpI3#KW-Bk9KSbWR)Ys0To70sAmnp_?+lKr%$^(+7=loH z6(rn2eHz<&gvRzDVdB5(IlSic$mh|m9NGY`y&a@i9!V>Kj9$#Xz2-lDw^>y#`B}nV zBrO8@VA2iw^^I(=Yb^b`@a@ciY1lq&#~7euMO>v=F27SZ37L8aC2+X~qT4{uVhS{; zn?XiJN+@mU77Zn7CTL-FPs9%9eUE5$By~h&Aacp2f=Y$zcUw?X4y4q1%h;$mm-p~1 zXq(QRezy0Gt@c;G2OkUOp5yyrZ;aeP=ll4Ig#4rrlNuN~uU6%Nc;A&pI^Pxs~0`3Chg!baoKu*9bdjx?&l(toSO$#&W98ME_O67GiDwAlG#Ay8a zibWl3z3*I~;VWTxG~vWaiRhOSe)QUXD#}%Z#nF3x^vU;&3dNx2K=hoy65W3*oJeqx zs(bO29j>ZbK?YTwL!A;sn*LkF*mqzlxfbrKJx^=sImTNdK}8p11s|ujn~%u-DV zbzRT1Sn?TL-GNgA{S2crBEf1f|N_qX?RWInXPQ18}j zs&b35GauZq`hkNCVl#Z$13uNekinjH$PiKOT6ta!hg`d%wNz`?O|<1ojNP5Fwq$Tt zs@2RYdF0qZ!ag6|R?zHj;Pp-R7IBj(dUy&le$lExY{4@4zCw=X6~Umn3lpYA}ADi0P12RjN_tbhDxcEe40&8gU*@X`{WHziQth(T=G`!zFaVkq$x zcJt-^vg`3zv7J-Y%=;N`kW3Be{?yzs3t00A4F*eNht`urNUkI0qZ%|@5`i3e4vVU8 zg-hhz3V~CiZo^nkgJIxSBA1H6u2fWUQl@`|(MQU!qTMQ&BVgcgx`VO1Fxy9ls}D!; zEZFmugn%gY3^(y9lbc4K$&=tx@_%WPqtSCk^a`2^-Wa@$jX~0)evZ1AsfkjCpNZOY z$n?3+j=-p%BDfEgF(_vEe^A>vLoo!`1j-|!!CZvM2s_MvB#q>TWHBiSdJj?tCoWbs zIgIAwZHz>A!T;f^>(?xh^&sf8IEJe@iVLRR*dBw7?edKef+C0H$2n-;^N&sUfZ#Cq z1c4BfRs<9CqFxxoW(bGX)v#uQQK^4@xr{c0kGl96cu_!7ut?B8!dxkf!T*TKO zIJ;oi^$~;|r6PV@xUNBsIYNU%9kD-g=AV~hDo8-vXmj80(7OF3(M3SEo>O*gDIM9f zVA~b8W1ig$cj$jc1p7^oj7|c!YJ(la!Sc@rhlSsP4Symg)g9Hyh79q+_RPka^xMK2 z<;9I3hbiMAt)6BYv|FEfBbR!aOCX0DOC~JHD}hPDuVg4CuRX=}1s%!(-#B=H#jSdO zxh%o$Ql%;Vy{52BYV|nkoyhYI6aq>EBL+NRKiIRJh7aur)u2IY)!&BV;PjYSks^5t zXbTYTXGS_lW^oAvL0RGm>IHBZnbK;I)@Nr*HR=?Y zJxJz1f@!oFOpx^4P7_euB~OXeQYX39D2a_`TwnW`T9@!)IW!xG_SK0%#T2w}RUQp? z$ir!Ghazn3+34c)ifIS$ftMTn?OfgP7~RHmzaX92m2{Dglcyb58xyPYGA30vW!n@| z8(c@1^5pp`#V1T!y-uNb+kXflZp#k(WuCZ`j&XbtUYvmM3K7{(VX?dke!OixH zjNrA6cR&a>)Ne$L*Kg6f9a`5bVslKevO5mh+!nd@Gho%BGMLLEG9IjG&NW;(6l)BD zo5+PGR!ynTq4tD6B`|E7?MelyZmKh&!S9Kg?vG-nc;NH?)st`E4L`U;m;-C8i)F`Z zCXO4~A%+eoa~JTI$PV%TQ5k?6&{@SJ0gbTd*HnCI2|SZq4P z(?-G5rN;qmZ=}vEZTR#&Hr-|XH12zkOzRm0{|y0xk>WO%(S4D38M`tmuueO+RP>_c zojZdTB@#$edQ|aTBuiV)fEi#wxtIujRNEkv_?IS?MERg}RC2t$d|cva>3am}F>5{* z`4Dzq-9M{O!7&q#&gRH&l06k4p$`K&RA8K-E)eUEbQIwW)6I+fX>l;I7j0AZTh%j* z+?p9OS#o%@9|TVd#f??4GZ$zM3K*ea5BjnuqnM4U)@2PVkx%=W)Vysd5ZOjY*fC~U zEL@r~oGi$g@c{Ph9l5$pvD4RuSo4Nya4AeVJkQ(%W8X*I!$tpTcN~#pVxv;9fzN% z+M%-kG(O>u)vvv_5TA2pC6XsME&b`z+Hh zBSD9B-VsnOIrylsr0RDrnMJjOj1C%*@MNuZU*7L<6Q~W>2p@ z{YNe_NqJR&;K&}{+o;Ddsck=&NC=xufed(}UwF)*S*>>9S{N@yolU5UFu^3XE2kN6QHqt`Rkz}WS=a5Mk;gx}GJ zpwB$o8}d4K+E`T?gMrc~QdNAMEjt|C?r=tKRRe?1Fl~jc?U6ivTw=lvaD9qqT733D zm~`N9q$ZN$Z+biEQN1~c^V0H(V?&l*`|XnPa0}L%H^X<`!~Us(Y+5(NX(GW_)?x+S zG|u2!isN*KrsU`5E?bIixP)lMC9XrtU_lJhSxte5ndH#YZ@Zo9 zz$~o;!mlmj<3+#0oAf0OX&-}=2+>3#4n<&TNC5LwZ5$}+MYcf8QK-PNGS{#BP_O#) z`GMDE*F$yg$ezaid?a=;qY*K4_t5SCh$28_93F~E&d^Kz+u4|L%~g#4AU#;_Ew}d@ zMGyOd&f{`?RGe}np4eQR>X}H4ODkP&)7s~Qxn(K5cXtLcA(>1-k|K{|;A;%&o;7yy zWhR$W%R95MP0y8T!Xi;j&#b+10~wvlMOC&KH+5|4o{|(AQAKslCTvRxzIw#XCJ|j# zyqH@wZo!v9DV>U17%zt$Oi5ez5)o;DsgEE;DC}eo2kk;zalVTtv+x(+JbD!zCVfm} zYbda^I{dR2>;aDz3&AaBHXdA zE33zZ5TF~|qH!30MRYW3yOBC+Hute;J~NgyCg4~YF|`$uU?fzV$QB`&jHfa(mJGH- zo&~OP>15z!w|KvmayrdnCY>BBUcFeay1Q{M70CT_OfFmhf|RY_IlS+e(wM zppnUCqDW~s8w~B-NJ`qx%E)a{R>*Evs$d{t6xlAS zg`UlCG8oVSoNYT~Ck+xolPG@jFi_;g1xL*T*wEAx8TOEk`g9yR&v1gMQOXprKX5>> z(jCZjsJ$1GturShyKnd|)8!RkgJ09tjZ{h^eq&}?_cdb$cZdmnJcg*-ZQq{cM>U7* z@tbF*ouBGkB93k=9hBNB;-$aeTM~FG{{6iUn8}!cL7-ryB!NZoj$xtL≺OjkTE= za5h-gE}{xy8HgYmoJDjZ;7u({BV124-R+=BFs~YGt%8je<4mSC6{i^z@eh&DXgKHV z(7PPPPmxqAoQ>-(e5)kd>zPw8oeB^&RxY!xiYGvXSEX8NiM+ET9&xkVv?+=I8SXiS zsD5%k)Yk(4Spj1e9A2+W{JSoiYkeAW{(g&mCKFqMG`a?p2!iz{X8i+{wt7&LGvJJ+ z0TnbW#_h+<^R~_LhnWIg#$n+8m;;_>W&1a5U&GVGeugze5=Z8CwobddD#z8OfF(gm zMb1LllDU(Y7}0X$B}wUCqy z!ARbV@#@eyyi3c&h+Ujz%W_oU+6|}L7=_}YLKk0EWb1f>9#g-oDCUeIMr|OCSh!9l zinNVwc25Olw|Rn^)~c1QgGo}wF4aaZ<#br|^9Z=dnT4rJg6R~|A;<`R?>p{*2s#K< zVdyYonc1M}TH)hZTjMXs_B)u4u8)iiou;`MNBj0Ge2CoV-$dylcRHlu_brk63y{T6 z4uWb3q)3KJG|RP-6A!mWqb#rI304^h8cVS>uKr`&ddymH znP=nc@lX?&W{avnsp))PX>2oINMEujrU~%RuzYD<{Y1BReRI>nvKIqk^AUNto-NIB zDUs{^A)3O4)BezAZhA}n2d4rvE@E(e&G}b<&SuKw5Asz?fFf(!BR|-H2U-wonqFmh z{##DG@^88RzuPGM6O}u=mSYId;dq3EC<&s7Skgd9_u6V;*~lnW$>(lVabSN3B=VV%1aYe7N6f8@)5BYAkI|6~}ZtkE2J1oNm5( zg+iB6QNsmfObE>jSa1 z>7X$4ZtIQ-$`iOT5^DK0OC>&QGvx00HSO*7F@n4Cpw7){C96k(=;bCBO{8fZ=HPVl z{GHS3DSNqGYSibex3ob?U#s|G(G1@?^l!LMZ9%59j?;o(w&7nyQ6Q?D$^1bzxp2W0 zhW7kZbmoK@y|Oe$<+4csh4SjAn|E?kK> zSZ#w3Kg}qcrJE$EB&KKUVm6fBy!0&K#oQf*EF@ctBTal0=TIy*VF6Rc_2-tw*AM4H zy89>l!Rr&3U`&k0LuIXO(gto3@BRTgLLDIDK66m$pYlklI+9}6suN0)pG@ojhL}@> zY@IG7$rv7|C9mok;@mJq2yLvTJc5rA%u=dLg!2bOF$$VumvVF3pvWN1JUBIkRy7)V zX=DmcD{O>DcaZf;_1Wv8y2&#ETJ|Gho=OxxscdZQgx(BUTP0fx1sv~IX?rNvctKUi!AA=oG2 ziESoE2Dc$;agnr_h=HrqR@U&y$XQM+?4<;j?K(mc*9`IUHQ2NO^e$9B7m@_&G7wEP zo1Ca9cC(v2*z9yJGC zwX0#Uy!XWFNnjDRQR8>R_YQ;%u|`I1w_IJG*0QdMx~-01s*7nv)bAC&VsUDUaaq`Y z`;mO|ao7PwmY~_C=5y}TeHaHmy#k}VydZuDMk0%wN>u|V1Q*h?jnjq?!`;)PWD>F* zS3B70jiTD^9T)#pDjF?B__!r_=X&=GmTcd}Psw4VsMTRl&iwl(3N9=k6>nK;7~cZ$ z6G#TRP$@NO200U1I7A5TU2j_~_N+@f_4;BKTFr-g>Wy9pBk-Tc8kNe94$)W}!`0`B zvr;wLWxKO=1g|GcT&sa0$XLIkDPpu$N^ca?TA@_ZJc7z}*e{{FMr^P)r`n!#{*!M8 zFa)v4Wq4=C0zpCH=K2?jKrP69PZ?t7N2rB(JpvEIj%2FfAbu3IJO6M)Pkw3wC)p}| zBw!)^Q*V(WDRp7uC}>+D1+vM=t^$)4lo_9i6EDiDUVKZZ>j~>+gS18(X1@oVTz(E9x;#C(uXsB~LNUdtLm#)iX; zKiAI2`jX7#N{B&a>{?(+m-E(oO}KC|!{Nkad7U=^n}}UYU!vc2L7;NVluMGsGYAOc z-g->taqNJt2ybx$E>@(lm`0M&@>&b`AXv&04mcAGaBRwQ>vEvq!Uj*w0?Infsv#40 zIaz7Qoa`sIYPHlGXd9caNjTOGRu730Z?0ch8pz_{5g^F3Hq8ktCy5!f zoo_^O&NW-UHHQJ`6;2pex7<>Rzc?b z?BBJC!&pvNd{02pw+_MQ6YJPjT4ftBiMk7Y79s;D8IY|iiPA~G8X{UT8bzrkou&rf zOw1vZTv9qzkdc#DGN%{B4n%b-nv^iXyX&4{b% zRoG?OHQ2+7$Jd(b!Gw59PHiCDJmfJ(7>N=mXCy`10w8q-`=yKhJ2TN0b;Ru_{jD*f z4K$J$I4HCzQ%yK+#h^%|OKO=r(>z3q3>=5BHg>Tt2sgIPa} zFLZeFw&*)@b4W-wxf`}GXGj6B`?ud6$3sdR1F-^W1gA`XV}xJA*sb0SUn+&FfmGof z6K?KMMIh+nU8kb0#pbz_=a^)X0;Z31nG%$tR+8y9AP+lens0^~7nRWsD-54cID^@}$a)Ndi4fVy}si0$;)ZaD%a7g{8H^F9^&u zKBNi@M)4e*5_X>H34f33%y{r$Mft)P)(3?hf{KW8A%eK9Kf;UoTCDO^R} zmdsT@>%G{*Lyv(E{8?x@-6G;Jw_idC^i#2f(i0n@)PS%xJa2f1AY8%pd_)9hB*CJM zis>yY>6tc|MoDtJJy}*_V8S5dZZCFqk*ql@dzIJ| z?6Ix$*rnmsR0PLJr^inw{Eg$m*01W0v@4PKj*vX63j(f@=q1%ZM+St9pwy1-Z~Ux8 zViUr6BH_YBf-X1UtxT>T;3qq@k*#@or`aHWQmMPN=ITdLju3kClC647QgymszaUaUkl;;jGT5m1|#{@O;xdB8Q8x`wbSO zFM)jIQkfz*BZ&>ptuK|dcK*#^+|#w5#Vj9hy|xbR`+Sd}a>x>}GYF49yu-iLGH@HR zZZP-0&RE*gr5(Fub+h8hbd!v8V?M|r1cDGg3|t7X;7+~Bn}+-#bbuL2AWuISTv+cB zmMmRJ&`x28+<^uX4&HsIIisO-jJ#KtF5Lt{Hae8msj?}oS*s+fn2#Rcfq57~5L)Z< zgW+UYTO=ZO#!9XzC^90UHrI-Swu){I^4mwmG5~50@u3ZZ}s1?UQUgp zD=0+{tt@QSw8KSPKwor^vH^kyitToatLXL(#xVUa_v(TAA5eDFb5+B?&(wzwjBpL5 zxS1&C*7KIuwRcy)f9zc$PaUAxQ8Ynk9X^|@LCaeVwVrruA=WiB*R!Y1X>p=QR#3FB z|6=}j+ZpZ&cuh7=wXh|N#bHKANjC^Tu?*W{x*BS@-M9*GJ)sa!pAn+&$qBT)FBCL5o)k2g(~Vv6DwVsj*?s@>Q6hIz-!tH>km zG0d}ZB13jSEe|R)n zdCwJ6+FaH0M?rVz*u3&7u;a`$hGJS-T7^{bp4=Z5+>~MH7V0LW{ZAwi&|HXfyQHEZ z&VXM!%O$(c$K87_TmDTLT~qVGQq1RTnUA?X*EcehIA-z?9Wy$T2N9dm5znqhQLlU0 zKx}$IFkk%qHRJpHgU;M2Bg?b<`A{g+*}>asF;^&)ceUPJ{#{kM2JD;JleMAd)EOS% zD{cy;t%{pLj=Uh=GQkp8iTFX(yvXLZJ6ZmhL&!>Pxx(7|xMyX1r8U3yhNo?mPbpiqpy?~Y_pIYN&M1x=ZW_!+@m~h)QHJR5y7#W0PkQbusK^B~A@{oG_vcYv z5wXIBplG38bbD3I9!7hoCxSGH&*#05*LU;Xsqea)CT<$jxg`wCblAIl193j zY}`{^0X(Gc)j!Y3%~~4>A8C1vuOIzNsXJ@!qn|qwIU6B4Tr?}{MjLlNPfj%)Mlnkw zsf9;V^mj3IJjad_mBr!SftQ}^@2;>Hbf#{hF-129I=eRzR-n<}H8!)G3viV?e#z&u znwr`xET5n#>|J;1*jz+nbxgEh0`nZsxW5JPToW^5n5u4WxPip8oI0|ZD)+Z8S#V~^ zg40n>R^A=*awIPzUQrF_HT&zn;;)c6#5y#)l4I~Cghb-|Z5{0xal<>!qtp~Xo?t$f znodf5IWXYLq?ggF))XJb&wFdT4W~Lk-7=YuaNAIAZx-l`x0cQ;zCP51(t7fa)b?UL zW|u0mGPrP5XY%fZf8n!Pjr2x)9RA zLOZ>3JcHR5N*o+wda&KqS<6aFaVYVyO!{OehYbnx3K|yDmyC13IabLN-N-^+Vj1u_ zI7&BOP^ELxx9QUZ#WmhWLltSM;sh<<^8NS$m(^?!9gTa)=b>(B4XoHo$h3^fp=Ibn`&dlv@E zm%0q%?u@#BRvC#@#xFm-z4oeGQC4SO11#sxVV;d{Jw|RZ3hc6I-jhSvEYyX{v z#KeH4xPP!SVbY2nla1NUA)!HjJo3#F&X?-madP=kD^Z( z+rr-+2#=DI(gQ~+zx?LTc@!KW+V^$pCa0YZBJC$e-*$fiSnAnzK5kv8eEV=aXlb*J@{A*Sh zB(Bxu^pBrYbs1C`CEi7hL#UIS;wTJ~=(V2UdCZk_>=BhCzr5ILMT#WHD|gyBA^6E? zC9&efDpBUSyt#H^V~2oYL(ODDUr3vIMy99QOj@&D;|p>J@Z1q*>p- zQOvStoWs8JCOgq779$rZ2C?vMrUOolrH%$`3EiBO94Ba|g^X&qSmHH<3k_MOHE1X9GXMWY zVxC$cs0u$))%fRH`&-;Q57RGad#@eCD`2Kq_yE6g70vqdE!Xk8X}{wy`pFJ>Mc}4P z#-F45qJd=5{#t7kC5&c4hPws|(NI5uIQz|9eCf(M^W4Ma87+{7-Jr*{tzPm|U3e`W z%oBM3%~Yxht~u2i#r@LP538Fcub`Kk$1oc#E@@zOXaOw;pQLz*LaZ1_Vg%X#>M zpGjiMO?S~dM-+SIy$QGF@w=s34>1u(KtqMWrIVO%zp?}HeiwFakle1B*QAP1d7<6f5W7guq$76@%9k+3jW0N(@h;^_`$=kkk>|3bNR57aP z5eG(x*>dfH?v!KNd*-k<%AzN!8bwNm^BMpS1gGUWXPFVaPm(DhD0O@#lo-q{LxqK- z+8O=DNCAfNg9w8U`2QOd_0RPc-QuOhPe_gb=pH#+x9jL1z3ZkoWx3tiZvE}YFZ>2l z$CRudKkV%$Dh6bJ4?MD&`Th8SR7B5^^cq%*aYHY1k0rU_wSpx!8TU$Uh z|5lj^N3=()Vc!&>7K%3<9a%trIt`2lID*xudD7@tIZU(TVWmDBgP#97%rNc;!#$<_ zunn@3J#5lUi(2vxy`{cwCJ|HMho`|3vdDRQHn`E5P1aX*rXDu+G8m8Q3qapvx*g5< zn@sU2gzf!qvFT(sXRy!)&-6)1nYC#i85Ns2k}=7>b$ z8v|)-7|%Did>oRqE)V4DzOnuo>75zvrvzIhz5Ltkg_UiEb=V6-Q1h&}M0$?NMM|ph z=o;0J!gk**l~bZne+IfeQ63%!Nun-SgK|Lw`2i=>03nMO-BH?I<|k(hK43*R$bYNm z=el{+&!Y9`-T_b6^^xR|ZX;-laKkpMwp!!-)6ib*h}z1cilXApZJ)*0jb`2JnH zV{4_#vugw0N2_i=+m?{BiQwlC|KLF6km`6xyW^T3SqHJu2Qjzj)k((H#>@4mr}U3C zH5|m%4PWz3tLul|i%fr%FT$Z9f_L_p*TO%p>#tau&jD9)v6pVU*4|#botw+|cW!Re zpD(7MG;S2e=b-vV9WkC2m&FH7F|Gs_(cYL_r-1bYw^w58gD?gBO{z2k^_kJ-BivVM zq(4$pf{N0S3C3?c%P%P>3+Q^4b_-&|=Vn%NYSa49jS>^`p+MZFd=LTnKdaW*twF7r z^5Tw|emchdeTcwt6rKsN4kCACYN>BIVc)}NW3$=lW5pNvc3^; zd9=D{67-R`KR9E zOOhH3X-(V!S%{)eIpjcOwYO_mo^%Xr;V?QU-EA2c#u7(y_s5|?zdt4>8d?qu3?7_9 zgI$w2OFR;U_9SAGHA@+f%;;Kz2R>_k9nYnIE02-yCdz^2{#k@~c;cW{4J(^t`hMyd zcNoE$!V@8_mB2&dPJ}d6PasX(muV%-mTr=mv;fT#aw%spDK01 z$>={y8puTckGJ+z4b&r#<`OFM+TJ>G)B-)HfBY4wnF=0u$az&``3Ef>SXRY4mMM$t z(Eb&4I{mkC7+ik3q`6>=q(w46Vn!`!oXqj&>?hY}f>s-I_TJ^YVCv`*x5hHfv znhG}m>9D5@iPY?C6H~jVH>kavPjvbWxX?m{>5&ydi&y@ni6-j zt*?EHM4tRLkwfkDMXal+@#tnYF4E4Gyi@&W-P)BSiziO50R<6NWeEp&f=jpIMR7^h ztwO20*K{yx$BjXUxQz_{%->zEoouJU{1%x(Yx{V^@T^+w`{vL1_y(C`XU~#T^!De- za?%D@TZQI>Y*FyN6%1=Ph|?}Zgq7ml4< zb9Kf^%6>zoV~%6ht2T=4{+Ail2Lv5jIZn#TzxWc8F&1KzqS zh)Un1pWb6%^H)PRZKiLPSgzB#JSq>wUWXCUvr*dAa)`Voe`plki4L5%Yx{26M{!?& zn_u^N9`X@i8u70D(dNZlv@L}EumSg;UYEHvEVV1y`}3E~R|v)7giH#)kn=3Q1#)vN zXA{3qS$!{>5S3D*pzaaKcCGxwpoh}K>gOt!9W^cD z_v0_$Y|3myPa$TL6k`Y3RIxq;9yIJ4);7M#{{byP(!U{&1;~10BDKmFGpJF3WNG3;c~D%-B@tbG1_U*(sr}bEgemw6?c*?L|Y=&g}}9p?M)b6ra6t&Xsw)OR<-CEPV8B zo9*pKkGrmHS6ue|l|tReX`M$TJ2!4+5gC)7@$Do>=c$h|Z=Ahbyjrb7$!l4oFH`2)Dek3bk?lmup=ZiCiAh(bsoJmv6NxWQ!dwBEraA-D}f6`-P z3FKy6icJl zr1TG50f)ooF~{=(n;_nd;~D05?0J%LWkN}Rfg@>hJ5cb`IE5pHT!BzFLQJs`qV|%% z9WiM*cuD$`V&%}t8UAZdo&MCRr*89~F>=|j6#E%>ea^Gu@+ztj(VI@IJ-!e|np&#Er*wrTDGT)Fr=RYdx3W-J zIS=fs&jmQQ_8^RyG-DOpT{ZW8fuwL5vdb(cLpI^i$>O|2&!5b0!ZL>hOz1tQoFa^? zXXq;gAS=iaxfe|qMe`Z({Zk;K|LPR|SI^fU1y7hc5ILpxee_-ixv(89TVy6AqZXcf2<;>m^~%mIcqwqvkGnZZ1i6^4kZl z=(kam*H5@hE{5o?(V<)E%<+~vwwcswyinmDF>f}UwGty&zdhGBi)`HLw{86mKWgl1 zgy;bG4U`fCZ5kU#)YmnGO!(l{SK)WBzWRaXEZ>}tQfWo0R0V;&yp9SRE$8@#fNrfQ z)%9H??63Tc8hP}{lf=aM#6*N~dT-?8vEFv~(r8cGV+XIR)m1y)6=`*`T~4#DRW{N%Rm1h) zBrwgUkaoib&1I&=i0PAp*sHQNZn{^R7>CL^KDYCFIV@lAbo5n@&GDCpj`6U57{01VV@D^0Norj_icPll1b{Vu zgnn3U{H^UD6OlH03YLDr?qleO!TX%U`@zqj7#@ho#9U5uERf5L@0IcWh=Y@r`-OA-F6T~1$bk*_pG^X)!$)=Z#OBrU-}_=!Y(h%IN51zma=9)>FhvLDx;ZqQ zwkr(x?5ur}J0I2y3G@K`i8$XZteJXI&t=;NYBPxSA5bN z+;_cTZ}hc^`(Id0GOqGR^sRi<&e@L!y_WclkLc`KzN7ZG_B2#Ev1=YTIAZ*dM<0PV zlSdtbk^$bk$6W*q48)P1SU%w^5Byv?*MV>n=c8cZ=;Osd{lEcxcRixl{<-mi2fjen zzd*osFAd1Ow4}cDPYsB%r|v--bq-PlrrL}v# zbJ+=_!q!h-7H|FTjdb(D-)E9LZ~qi@oUu_lYoW)i(;Uz*BiUwEHT;L*~4$^tRx8qzU}1w#c94~z;Q6@#}MPulXZE?T?_z$w?xRGLEII9~O9 z+O27IedIy$ApdrSllx)pMvieVo&3?#IXcx?$fd<(NGu@7sHLrE;;g5aH0${|OZ@f9 zZ8Orl(=#r*YKYwish|H*ANj?8K=K=3?>1dCRCs*E^lM}K#;H<_Fp3!0pIEbI+dcZG zF8!}PouDw$zz?Isk+0nL#e~1s!|WLi{~+UhzF2Jc^4xeYWwqX$pq2&GxL-45?EF`c zvyt(d(-J8w!P>m)1YIllYsUlg!d+CLb+(9kar} zQNfG|hMeIq;wlk@0mB&P_tSL47wkjWG(o48E@~es1QBz;XB5x-Xd2A$1w& z5M#Ekp{Bd1_&O$EGyUJ@sWWEoTX>_pUG>~}(l1smcddn=eSM)eW7czv?h|t?*SWdd zI11S`++~a1J?+}A4qy4-j@vhLhI8JHq#wRvqRCjfyaKYSf0gdcdn1|wGz z#=d48H_k`)0ha720rNNc87}5`Tz>y|ucA6v(Nfz+K)Q`DJgx>FX>Mp8}oJZE8=eYu|MnwNLov#_}ekm0jj-?J7 z30P$J>p)mOXxHym@|bf!ga#U@VsUB8rIPNiAvU1+RP7XMXc+O7wv@$V25{{H3hM&Vo z4u3MGt%sBNQPv!5JKL$WPm0@p%RH^&NNZe{SI0sZ*u3d<)VVg&8&^8|Qs7?`$iWFs zgRQGS&LFAZ5YDywV6caE_6$Oej{@vB#)8K?dHldw{DHQ~PIdB7u=Ti=$w)SC>*}&a zJBH?*2ymjw4z^Ei_QY1euh(lGQ90G&UFopJT4SP?@UD}+8v;q6qov(@k<;DPm$2pf zw2!F{{m%i7ZC+jJxA_v2LTqdI44~1!6Xym0&IRKNG*A4P)ZNW?d~IpfqHZak4Yzfw z&Rkn;Q=bG7giD0&!X3DC=Qx)qhbByk-8!e_QuC-& zYCnd_%WxwM3HMI27mARl5=xK?mngd6Sh6fu7pgJ!K@A|NZ?n#ezS}yp5N=GZFEw#$ z^%wb6{hCi(_{dWT%{ydyhsVRin-xXg5e)8-6=eth*`4;W)bDy^`Am1@(^0q0*P3fg z%mF^L=}E^hvyU8Y3O6ma`Rq#^jwN=VZK>l2HotwT)49~{w=K2XcZ!lr97}S%S;q+( z(~FzOKnZ28g5(GD=-5gRq!6xf7WDBJwI`xbm{WkQ zVkcsO+MbChqqf(jx$uw7S?&Jm?KF~^zP=21;arX z2^YuYFe6Bjv~g<^tM)K&I0mkNnjpwMj##Y~$Eg$--aOPlZCd}(&3Duz3oY`Rit}eH zSN_b&!{W3;*NVw2x(d@8k&WYhs2RRs_HwzpK_@K{)(fW+Z))Hz0%#i2Owt%suFT@Y zYBx|cUj@9;Mm%RfHnb()**rgo$f%`BKLy83>^yV;2k>iwlxxV9)P77OU!gHR&!ZWBg89$5D?mNHy;#^6V~$6B%wN53E~j_qeJ!&Ad5RsF_4AFDeD{m zfq`SvF|K~t|L=pw`ge!y;@=;;CSxr-jFtU{%`Yu+I+sZGCG8fMs_Ih7C(@F(tZBvk zUJ&^kJL2}^n+K=QJK9p^{RV-;Q65%}jqQlbvs%YVjfhbHw%!QRYGGj#+1k~8 zz?*JNhfSJCOhzU;Kjq)xW0x)G9{UxAd*WZNzeGgXzi`@hoc11O>TimI{s?Sc&b>+Q zB(IP}H!kP2*Mn6n$!2;Is2Ft8PsRJhB!@ns9OmC6sv8WIq2UJ-u?pG65cg(v>-Ygc zzY5sGLN_PKatl2tta*F&O6PG)-r8{LYHIr$7&5u5t3>gtMZo$=s65ck&v)ledTYfJ zSi1796W2!Op0=7dea)vW3|Ygr$*@h!(imoNq{fODY28_8zjyNRIoZj!%P+T0N?kPf|5_2@nGfbNnfbrCAlGBR{Bq|#mt6Xv zl_CFfY5si?JCd(<(lOyM zW=eVD7bGKtI|;G#6Yz)Uv3|H*)ASu$r>0-4X>f(s370q{Zpo?dXqw)nU+0wE5hrYM z#a(duk@LmkTdv8jx13JnQu~TT{=VPxc-|skX3|@-3|CT?^p@BAlX})T8;?5wFC6ZD z!{GcQ7D1*}Ze}$>_8dc8G&#TD)H(BCbMIq#H5pao`)Ln|t>(FtF<$jBo0f@bFs=Bl z_pNClD_8t!=Jla*+QW(3L|kG22?8-MW4A3SeS`7My001+1ikUk(dSHj@C$#p#8vbp zeKv*gwXrzIdHclgiA!*v^2q-!;@%_a$#p}JGHg1eA>cm z+M4@j&$+2P5Q@-P=>`mvOB%bN`6^)CZk#Bp=CIik|~9d|QKG0Y9?h zWmVC?`tM<;=B^nooGWgvp`#gUyo+|09RJuy zi9XIDTJ^PJzk;vQUsV9#=T0eZ{oo%At?b`_(|G^s{B+|-`A;{rLw&AXc67|04xLpji#3QcI5_Q`<&(vSw~#xnDi*~GrhOvU;d_tNI;~+Ald4;+ zjr-;R-5%Gxt66p9sZ|z6))Q9EtgK>N@NM`~vz-&0ci*Yo8QXrUKNR-OTm!IX=6%#q zLuyOyq6U8*2W7DJ=kzd$4>Gp;VyJ^)fUNzY+ zwx&RA-O{`2xraB}p)CpW1KVchBe5%&ExR%n$*GTP`DQ)c=vyH4(S5VfZ!`Iq*Jfj1KH{8C`55~{N~tXbFk9-83y-Zc zyT{j}$hVHUE0(iK*1hNS@sv^rjKzXUWl}ZM2%Q&P6 zv}IOS#uB&E zdRBG^cD&v8wv0chTIjEFq4kT6maz8tQ3}D|s^#i6`1`=}pxUVQsV`a{RnsjAuzrGZ zruC31?JIAK&x=F2uS~_2Bh`-~B)IcsaqNRov?G)5$^7_l{oB+0KCX>Vy4xLYxL1v; zaIZp4sQ$@~hHi`w!SOHNLRE_!y2KIK;a1z-P*oJYsx$?Wm^iQI=4)gopU`)zhS#_% zwDR;zT*uZpLqdF!^&8HDVFHUB9081IO*B4$LG2W+3C&t8W4!|v%|nMELG#ezNEnyW zM*|-E&MyW57>kY`wGemsj3B6g&$z-8Pk;u3()BCXXd6jmjr~u;e7gf+GVbPR#B(kx9r*c*8c9^ zp7;MVGIRUD6O!%mj*R28%}bjfn1A5|@n(oEy=SURRG+z?mhAP*t zvHy%H*-1}|^5X;7RG=D<@0$CuUCm2dO!~2c&2Hg-7ZT7yz>}1?uLo`xSmfuFLkKw{ zcZ?%8`!z_%YkE8lL0^zvd{S#q0#3S^JxW$*@H0n?CPm!`-IQDF~Avi0XfJ9_g z@P-Zg({w1OLAO>o?-A!;V{5EG*`R%LX^EQ;mzh8if5GzQ7hvc(=SESy<*Yl-y^)DG zo&(j!dceElb!T|{LyU#`y=Pn}8gubW@phaG@5=CZ`Nsdfm!T zWYY&KN&|-BS&lm=HpwarCCY$drF@26E^wr`Rhu3Ytl4pH;{QDOJ5X; zMkC$)DHnBb#>wqzZoX(&?P)s2#TFy^Ak=+&kbjQ2p=0I-DtvB=2KQCq{=Xxvi<~_K z_Hz!#5{11Jb9l6_@7vFHYnz0R8)wHup1Qkj(~Qz^zik*P)IWrl?KSLNjIa0RibHkJ z+@@h>-I|2^3oxu^N_?n|(;N1L<GcV!yA4Xi-bc^uYz&23X?v%%If<2Fs$RkyV!w-JZ35X z{#IekxMqfF4Ps5h-}4hPp?n97zket92r@o^036_cLOQw6kg@phj$DN8AFDhnjKx7X za=tY_7MS$JZ~6CBJlr?3pe3NKROa?ZbgVKmK55m=+>!k^kp3+jFldFqxD-?^R0cdU z{kY?%#}fvUNPK==>X~sa8%()fmHnnMCqiA;bu|Cgbl*C@_4%Rul-^4|C89+1#bWSP zpbI6U+}T7uuAglw#eP$F(h?w-E&5&~MP4Sj3zyXx*-LjZ(7X5rj4X@)1ftK{a76Qh zkUR>N(>R|f9~K$^y;}?U#*9OYpC5OzkZW@+WE@;^ln)^rIOfmd*TrQ*lzW^+WI$iq z&Gs_Hw#@hjFKKvt*f1fJAsA*HF*E+*pa}nTD-&J~w2Ik>-7f8?XQ)~AjGt;Q_rp2X z8c4)S-9cOOhM?Qu(fs0SSI?9l*XkFWJN)k84M|(DyA<2|xpN&6?cf8RjF|k6-~XMY znDIPtP>VRGxNXV)<`;Kp#bU}He>~RQ9D6)&PZbA(J6??ElQ#Ey)1Nhsaa`yVjuX}k zXJHRMg4eKz%n$z*lA#VT9G(<1>0%c5SW;QInUZ0mB-z5q5C%hi|Ccj{k7sV?TVt=A=C)7 z`+xL5MN`QbxG>~Pdt#d)&sz}Wtx55gar&U7MF)8CJ!k>FyMHhol!;QwRqy#w5+&b{F|XQUa;sB6@>NvoB# z>+P%EmAz~4%J$-d3tr=1*9L5iZA`Tdp~x68CZWX`2nMq>12zy!AcZC%kZ?mP^#Xx~ zn~*}eIDs3;wZ`9h&Y6)$TVigiAYJ&YI;5z}UZw_;m*tS>^hi(<;+ z71fu&D|#&{QGA2!#`-XIgWwffL{WY3+k)6ED&j9diDCS%iQwmH_!i?gDg`2mndsB8 zTZLEzZ5l}m#_H&wxl`f z;`MvTrd<@Tzg{FepJfl5V?N;T;VZc$xhu#RXeau30gR`bO z{jUdS^*Q_)s7}5n4GHrv8 z1+@4Mbd6Q82W{+;NB-*_$?KKg5j9!>-g6S? zBJW8S-o&(i^n+oF&|YtN>&2+wCOF7jv*fK=ThJlc)By-PeFps)w58-D27YP@1_fb= ze8Z3+1cMee3uS&q43bY%zbJkWp8Hi!b<&3g`tU;(yuw5D8d{i0&@x_gSK4Tgzyt^Qdp-AxTNHoZ3 z_^jsi5&^cC!N9AW7Eo>o@|bDpfI(z4gfcX`BsIk^_dwV&dW^CTBh)|R^Em4KZqs~2 zi)A~?@z-wNd@WD6D66N)mecG>8J$o~%JwhG0krVgt3E#V>duWqLv=7NXtaoH;86%% zq2H`0j8VwPlzgd2b&^OAs-;rN3DUH>V+h04_qEtwY^VNQmyMaJJ>=_zXVbrV;=lN2 zw%C$y))PF7NLpR+RUpf+@0q;Glz(QFPuBo3dbGVcSR=R>pS{>k<|!*5+IH)9zMkBo z-(LFt<#0<)8QZDPy2~x@=B^3Nc3JYyURhAL;FR~b_gcGK5;6Tgv4Vqz+ zP!kdZ=iRbBXtIU_CimiV7JuE=c-n0#_e`DNKh++PY_?{K`PWzcn3{779%15zOSszha;e1Q~zcK zkW`=3slH-Tm4C7;kE@E)(&Bbd;I7L(8;dObXB&p?i) z+c3X%>CK|o&5P^gav?UWm{cD|pz5nDLpbNOZUUsgO;+ds$dV~;^7vq@$g)Cql9z6u z6L@K<l&`uR^KH7~G zLrrT;^S`B{_n?NUjg35-T!zx(l z9le6dyPB#S8u}UvR??SMh$s$~E?3AB}N1k(#xp#Pj@|u+0Lmil=e@D2=Fv^A$WOrI^FObLORvG>OJ#Ey=1B=f5g)}II&|b9I`jg% zlCM8<5C_$5`a5AwSOo7hOBi!%J$enjwh%UIz2@`9&Xe~_B6$wUhl|udqaX_M3)vA0 zs(*%@l5&u{&E)0u#jG5~_mRXYQ5zi2(IJ}@|l zPCVSImr1|ROYT(6q7pYN$+#k>1IctV;0Kb2puWGR)pyl*(|<*M_3{~K_?KTee*A^Y zN}s2`*wxc>=?Z20c4bBBvnehRqNqtCMNl%XBAELblFVlHA3yt<`VX@iNk6;#X`X-j zYP#hY8c&c5cj#xxwm@TNsQqw>?J(x9c#P*CyMk^rdV*~Advb&(k^vD?Orik%y78my z-+om6K`*jDio)x0cI|Htsn1VD+#zINi@0I;DKtoO)GZ?M;$AfS(YMzl`+D`mM{%}S zee?(P2!$V|?ZVd6C{UK^6q5x-15v@}4Wt9?@QarN{D_N+4Ezb|M8wkZQa6IKiD?7u|s`s!)xd7U3VrT zt7IKF{GEXmTf3v_XriN?yfPq~dGboFs=Qz4oy{ZOiF!tP=Sfu0&jBq%c;rfyN)tw| zvqlN{JHaRhPr(+f9ySS*=`ris&p(2!<&Vj-Nj=Pqe8z;;@0nx?&-jIUUii;w@=TLg zLhG@q_-u%w%$dnj?L@dHS&77CH9!d=N@bjYoF-X*tX%!#k>}5nA2Ug0j&Wj(S?ogV zC9i1)%KSNep8E1kERh#}51UM-xK+tgZ7QE66iht=mYO`h7b(>5-A#c|N(dThpIJ7W zu}j)#L7srL5xK+eO;Ui+;|96~dvCGu*nW#8=&@{6H`*Ky8``_k0z%kf-(aM)03?Qd zfF=PU{5?qKz%n}BnJ)PTbT)nWCjHfxeUb~C$#<0yPx+7O>(O3#y}EIuMG08;IWTV- zj^Bj}Xkk#r z>O*MiuxFDKQ|XC5#CXB5<%Bo4Q})t@M(=VehUR``vuCPTc4o;A4Kl<92zajaMq{ zlQ&r_f>_>Z9s4`HmYH%z$RwrCw_#tUZLht+BmI$lQx7+to5wBX)^c2$ijX^uhCV(j zOV)93(hwFRYB-F7Tv|Uwda!9;PsB$gvJi8g>zQU2m-hB970uIn5X7x-X}3*ZJKfga z0@xFU1CS`_2k0S&RZ^!#qCSr8^KrI+@?`RqosNOt-gyYk>+KzI>?ChG**B+u)9&c5 z#$aw>HXh(e!QZ;v6M0!ZOvnZ2%P#{ynR@u;hd(lzK6;pKHG6_jJr3qu>+s;gVj59E z0?oka$dK_N%dDLj}t>&6U3<;P;q~Mmxrm zrj2%^fichU@!8;+F#B8T>!+V8Y(5)}+jf?sZZl9mWNLV+zx8riIY}%$NcPY&P2yRP4p1RA9x$WN{fy59t6${7gQ}3Zdrc zBsZVVbgamj$i7F=`DtErS_VvPZ#_PjP?^H zwz!F!WM@sb{2rT3vrmbG!3G^HU zCaT`LpAWdzpQ*R86mp|A{I}Gf=cn+uZpA-x`;mG(T20dV8SVgDt(D^r{5Tm=QHl-% z@+C91y`XR)lTaa$d<8Pc-RONKTH{2MA#9HNjI$=Hs0_gZKdU~2247Vw-6rdoQdwnK z`qFB0Re9baW%NQxKdXK4TaU-712@8AEP`Uu#oYM2Qs zSHjY0y8J;Nq8)Ssu2{Uo5CnpG$oo=7XP2~2{|xirN`e!~d+M{Lp|*RELE>w)!DgfwYoK9fLDNjQup~B)5B_>EV+CRHPlG~gsqmHcF9to zs%Ssssx7Iib~)@pa@-%Eck;Zr|F8k*4}b#LGx8vu2P8m5vH$Wpj?--_2Q_TMqDAHM z(Q$6g24AJ5hK0cVmcCj3;K+cy>J9^T)gv)*&5M!Luf9R<=-~Lb6}kZ1KXZ&@I*%OS z|H-c*YX^AS_FzJu(~5A`NU@KH7~uoEJi7-E#(V$RSMxP=T| z?P*9rlTO>z@Au6mAKtxf&YW%CP>h$M7(PclIc?myY00?52Zg%Yk;Uy+uTM%YpFDYa zQu2AN=UY887RoKtS4_8*3t0A8f6~3Kw|8AP9-OeE!9Qmq^ES>2rP zP_W4y>6<+@YBpiT0nP)_{KlI{JnH7scP$iKPCDzP7LoD85AoOYO8|LMNo(5F5$aM9 zYA0#!c$q4gQpJ&E!u8fyZ98`j)YP0>a&AKRqsM8N|HOs;Y>o=p2&I3L~`uRL=friRLn-SLa;hq*LN=LJ`z8)1?Tf=Q}16GSp z_UT3&$d~HiGcLx_fc7j>g1!mMIMbiGbl*`}2FM`P*7QgLSLKW>1|mC49>uZ^P(%@$ zN#;Rq)M(Hw+yGrw3Sc6+9HoH<2@Nzr?HpiKXJG9x_`n#VY8PB!2&WIwnXqOKqb8Us z1k!YM8Rl$~W6ma7-2^j>FJ7HneKA&_Gul9FDCdz3BO73hs+#Kwf?CQj5+bV(F+Wul zDG4p#TcG64)YcjNe*+xo^joOKb77X!N18rcrF>~JVd=g{@ezpvX1AKX*+JH3t*LT{ z&|ZM;rd&!{>7FmZ;GAvc$$G6Ls`di14$gd_L&XojJ+c<=HmQGqSrFDd zI92k7Y-+gbQmGZba4*J80nZi5`vOC7c*w1ke~%MMAJd2s>&EG%4jN3;z(22 zbhTsJqF)Xj<93hor{bnp&IkTo1p zxBJdY8hMLQnPNcsM%Cr$Tf_2ywX1GrAMRawV%U4_)0XB{i|Rx3S4Iytl+B*q&@g*; zS>yfDmGeUli&i#Up1IZ+TCgI6r>?BKVzbM2>q#eNOeR8(vJsPiMoV0*?R9wyE>6F6 z{{1!oQ@(|ab+DZ~gS&#`AjkmiR*D~j2UR!WIIqnBJa8#S3?2XxfFODl{M!enJJbRT z;J-m|M)6{p%`C+QPjvR;&Pv?YgJIeesBJ39#3Ayr1N$j{f4XzpsbYH#`mm;5JXMn7 zomKg4RcBn{o0jlyn;N#c`6b=}&Ia-u!0Q0UX-(Oqs50PCkm4kd5U|-|OW4BhP-Vzf zMp71A6*=i~2C7I>@!HB<#WUlaZkMyF$r`jaRXH8VDX>_I&JyCL*OGYL?qq!=Ya@M-r4B%A{-4^ZM;2X@ry#x;Rp(%-x3Zv0#S^; zjs^!@5VVKF7OPCo+wE{(EDOHrsc#Q_U22BU-2Sb&|zG&*B-UtPnKn>L5KfZGiqt1v5yW zztOO{{Q=~xIH4Rl8`Z;su1r@zJ&c$2pcM<8RQ2DT_w>K59BU|xztQWN27g@5z&#S&jtDp=szF~Ax&0} zEPJoY_IDL#NyMR?Mp$MtS(f4>2o84NqfqOp*U7o;4`p5E9z!4i0($5jy0JrPU$7{eKCy{h`5)_b2xM00AM=g2X*KQ zH9Kmnvp&tRUd*JXSs4iZ8cjxh0Oo?C@MR-wcqCpjpH&ZJ0nP_f#uU4vh@&O4t>V@468K~s~Efk>mb z(kLU~Isg+Og$tx15g;HKOnEd`+!*B$o3IX(Mac04#o$9{F4vujrvkHc7GB}=i7t!T zWHMV^qR*GVtK^u+*`u2Mc**9Ga6_2g-SVqAGwv*66aVhSfTqtk2Zj_iNP*7_U;p5UkZ~f?4iX z3lta}Don$XESir%WD8(Ie|PMvQGeu$xSGns8Bh0d-7!x@ihHDp1$ioB6;j4-uhY&} ztZgB?2sLDl*zL`&4sw#ue69LXcgQs!3wgqp%4$?Ssjo6k9-4MmSGwKKEx}d`*rCE% z@&d9OZxtOu+xTE>nLR+x8tTqRX8HMq_T%EIj-*If&vponLkK|TZy*xtPZSKnFq?rU zB(?f=J0Xq?WV5d~CzH(pmHdX}a8)_qmb}v2&MKD!z*Frzj$NO*|6RWPe>2r7gi_TR zIwx$C?VrjPPmTONLHHijg#4*p!MU$hb=utf4xv9HTttsO7T4xgF=>>?X}XE1I~9oQ zktcP}OM{p6SWDi)U&6;ea>g0!%c>EoF5^vQG`M1(%Pz#?azOQ8MhD)qW#DGHd>P23 z^D|4J($dCL|Q3*-6hdFpvIXy|46M;5lz00YaGfd&Ph>6O_t(GP|Zx76+f z--$i}8x!hO7p1EBHf+1jY?0L=*H*s!=A#5HIH8@!sRk*!0W^k}Hq;Q!7ha1Z9jp4>HcBntF*SC#x zWNaZ3&6Yf#{07A>p;;!{Z=U9#Jl>4O5x)dHu|(BO%0-x-lP2CEBzK=u415@;em89q0Ei?y$jao~+pZC^9*GsCQB zoB`DbD`K&(SgfLCx5iVZ)OYA&!gl2U*T=umpfYkgbOt=5E2id3_qzQ!>%R;mWjS~; z$BlD;X(-P$`WNyO1?i9)iFWi2dpo|R5hnJ=CYT5tX}YNq((1#W;X#hKp&RL$4FKEs z+1DNspErRm4?H_8v1haQpb4dqhlKh&bR(QoH;^q3e$yeN*&berhd}!oPa777cJSkN zYsx+7lz>Ao#-C*KMBS4PEB}Xc=6#H zG?UOT=y>&U*zNh`lOu1Ttf$t4vNng#3pl=b*Bg8%tRPSCgX*p5rcVXo)6WD!ee2Mp z=s^^)+0?&CWiGW+6IXuVD$}uJZ{`tK%dLR8+K2(crD)g(CtziZ05HlsU>Qm(6fHX$ zBXpJ-)FR~4YQYysG^1AVpaT$PB8la)(tE`(gR?I-Z2s&WO*JH_U9+m?DNR-z%nBh~WA?y@6U_6jbO z$t3!$0*@;t3Cn`Xf~v#3(`q6)(UfRDB!{I&`OydQdHlbbakP9tZ<2cQNc~_GpTP;o4ESiuY`LW0&6n8q2ndeQd z^~eGu4OueP+j-A@7A)`B;SgeuD|cH%9yp*e33gv8hYNO32gp3>qH#v459hGH*cK3d z%#dn?K^^jPbgdJVwJ}hp1>p zv{IZN%iIY6PIb@^`r9GUZ4KFMLvqN2q~u%bduB6=zV#N0n$7BaZyC)mL3DaQkV->R zl{`ev{M46?7n7U24F+ah0e|CJ8rx?avxm~-_;e!{$0v}WcrhfqLi3#j>LZE9Ew;(x zHo+ro6J^_C7}IO*ZZG=M>$blkB1@y_@mNK~`K4<_@oL%6V)^)7FmPP|lx!c`rDoA2 zI%VXyNyEQGF@)TyM+`+y8T~u{TJjk{Xx}mNGq9C@#x;_k#TdeoF}{Q0EoJ$3s$c5R zI8z9Uo{W=u#w;*Ea=^EYcLsQkr=TASvp-u8a#R)Is)#z(e>y51>OY;)3Ky!u`|?@T z=5RD!LHeF0N5)hRIQA=n&`i~o=WE@hQ&}z*#Y-*NQ|`uZme(BlGk!B)d$TB_3$K6< zn3Kpogj?9He&X=xb0ov-Euv>}3=IObc-kVQL*Rlnpr+t71JBGHn$t?rxw#_^Y0*b< z3135pBpaFLU|YcR#S^cRWXD>V07L4Ty59UXwj{r%3!r$PO*%xbu}SJehV2XZ{jsa$ z5X_rv9rCZ~s&X1#bLuIX@EW9J+qFGZ=loUOLkTKc^$g{{~A0=&}#{?N8W{8hxAswhmh1rni0d{aer;Y|d zISZmLO)ZsYZkhw7daHuc1v3{s5@x5i7Z8Qs=_lmRW3aP zp&4n+boenGhyL!&~=dUZ|M!?Gn|1F>E>N#@(Zd%lC#CKAZQal^*`gkz2U5mY2doM?3OV~l_AR_ICR zo(uhP>$yPd$>*L6UF_Jiz>KZhO{8aT-3lw$xm#gAptcyVkZ*4U>vpE)9RA&7d==ja zv`?+O!h=M3tB5=m^A1vq zan!PlA#xWGeMys{PQNyV8{y#aqi0fs`?DUIVw*7Ofw{-mG_~Ek04=pvS$2Xv<4m=7 z`YMc9O`pCJGV z&ep>#=%nm8%E2^>Gb=ipQ~$Aj+Z}Gl*{6H>D);Wo%A@byc=5~aEe(sWXW}Yq_@~pc z_#?6g*HMg2EdUP1l8RDlAixBx%wsR08SRl-OPi97nY{>y(K_&%%X6?r>yU%gFf!#V zNP1fGk{UjklPphKKrEw9v{;_8kUK5+Wl(O!q&ss2=U5}IS8 zlRRRg)8TODmx##a6Zcug=@*H-+bdon3Dc38X5JzT(=QaU+b8al#c8@t=s)=VWS8V7 zffQ7st)n%VyC4W4Wz>tvAi+>_l%`6fQ5v-u-GJ?i1LG%IX|+=KVTWSJ9$IQzc6=FW z#bVn%Awf!ga+F5C2Y*EI{-N6PyPZBK9FZN~MzhooXuJco@%BJNLpyqD>yFIbQ*7Ih zNF8*83{dZ*ZdwbP-FCDf3?!vzeEBF1jYnzcNAVr>yNchus`$-oX~RBjV-1U?`)!WB zca4&_5wjuiJ>>9`YJ*01yJ73Wc2YZdJw5x$D9wDFNXSXcK9YBlfLVW-#<05iEFKH1 z+e^(ED5)SC(t$DZlUkZqn<1SvT;m(%`r-L}_Wv~)ZS>mz2Qc7TOuB~%y=Eo+WNR@d zrV@j&5sZp77iqDg9gR5LbTHscbr`jFW5vh(Yyb~2d)y&Cki>w&Xjg3+7U27G=IcNv zb@fl^QA%pfp#)nojkEbdoMWohL3kF>ff0k1EzTJpSXR@U&1Oopb;ER;*OIjfbOy(9 z{oG1!19xu0_PiT0Mph$&bg9{B(ldTE8{#oEoMY7+V#=fOlYva?>w{%>N*$GHm5R9L zVa-fBKcLxC4XU4&+8YhqsJ}80zi1GiGzA!hzCNJxr@(`arb%dUH1p!zXd3K7Oi@#z zF8y4BP#~S87Db^DM3<6}tb+|V8K5dpV>Jx*+vAdB7sMg~6;VIX`@b1k=Dbl1izoCu zq_`bIo&bnwzxp%AsEk&Sy#CQ<8oTl#zLxq9HIW{$$ly5yaE@B=R|B;ar8L`2Gt()xNOmo&MQE|H5~dF7l{v8jMTO z%fg*IJPyBS-*aYEU8U|rn7{2$5ngdxJ$(3QyOG0<-FEf6xVn-L|KxIq*X**NdF#tB zKreY=x@XbScNg{xv-{t<(qL)w=bg`#;pz%p`G@_A+o!JJpWWvSB8TNfZzwe zC!b~Eih*_WyC8gVK7oHw--S?DeSS9GZ*=+nQJ-&1$?ki%h$0`fIO$HrnPq^)y)2`y zgFU_(?tYm)1-I9CsSA)V3iqL5`|E8&%0d3^I^M$rWIlA#@+P@7S!r0DkWuD4ew4iQ zXx9abGCJt~gxpByhFB-mcSFODho7IYM^W~8Q{Fuu57~wG?AgO}hSQ`c4-Ki=;W?S% z8Q5NYhDA@}-^#*lol|gSQLu)CiEZ1?#1q@LZB1<3 zwrwX9<0P5bwtZq_f}5+V`*6Efb*+cJ_hYYGz5D+^uEk>0#RyirlryDh5!~UAKF%~Y ztB>Ib?AyW+CekV$`yx4UaE+bCn%+Mnr^#mU;L2C`Xkmbp!QeyCs#rc~U-_r#6hXm` z{%d8s8{~(MiTtVS{_KCQKAVICt*m7|&X852kzAy5^%L}Ya~EcGl?ZE##$QhzG>UY0 zBp_!2)Y`>vk4kdGkM_Rh^A~HeO~4Q7Z1-pXn7RHrB8i{)ZC^>^cb}I-^4q>R+`g4> zB~YG>J3ELSKC6nUH_Wb66=esDlt8Obq!J(crX_NF!nTBiqFg@`Eo1!ZY{VEVbQ{SL z7_2dsha~e&#IOX=?R51duHqM;D6cSnGMhSHaEp{x37lGpD697rm4ux{-DEu@R^c@F z!}j~&ru0E-+@%w1OtJ8-w38cvQoG&>wH#59MC{oCeWE%^dlcG9hdA1~?#0!j|#Dr=rwj;BS_OPLEU)j1A z`@U{^z0(aUzVVNcV~=s0Mu+);wsVTlbI3jO`X}DZrWNbIp3^_vQn#BYw8?cTiR`9! zkN2zTNx|ym2HzZ!D-~YlTd#cM{Qq7Tv{Qx7aE9@gK5!&YY5R5T+7h1wx~(~w&|ORvH%3$ zS1RY!i~t>vRdv!(NbyUyX-muS@h)!pYlmA(sx6XfU7~#EL6h+#**qMy{YOtFnT$VZ zUt6x$A~G7h?H-OT%_^s{?tj>FsuE0H9A$oYcXjM7GP?C+7PFW*_=In5H~I?mti{c^ z*xB0FpJrxd&g;x=x8M5MNjQ6#SGY$pL^}2l;q`25@$tQMv0_4vP-tIKooQ{qGp(U~ z@^n%DW>5>bS!~_+>y4y40g@Q&%+=@5GN?9<1EXWYo~BF8F%+e!4V)b^M@{<9$|)D>pLU+| z@P4pQhcj)zR!r{rMGkK1sl)-n)F{6ecG7%OGp9J;&YpWlb^zeC-ciN{7;F=vG&1MM zL!pvJKg61flRa0Yp=Gs24-d#@6`~hGw8eQIK|7BV##}1BqEPc>*jp?OjxHGg;9r8X zX!2!R{ayqYqXj!=WufSky_QSF8^5tJ_4!DKunX5$P#;Ug8Z4W;yQ$#O9shxj$Q`#n7JI1fu{#vy^ z|6wJqi}+q=rZ;{6_i@GHk<@MrYxQO%yocwThqt&SY}NmW>&wd@T~Z`+(~J+?UrZ-r zxxdTGG{G=5&-}=`EQZ!&C16U(l_D5k<|T!abJ{1*ZPRc0_ZmyJVT#5AVW*SZ9iz}T zM%Y$~w_%q2%m0V(dY*ts8{}?5rKCI)Uk(R?sum*DTRvp-&hUn*v$PB6NPG}GKJt{0zKl=AUd3L%ig@A+2aR;HbqGw;m-UP7ItNQbyn_7B8r6-0C!At-Xl z0x0Nv5BRYM(yt$M5``chv1Ab2j`J=A6UJ}kj~lFS>a`p^lXNSxxhSM$J-Q#YUBk7X ztvNNp3R6J$z=Za-y(~_f*ZrYrEr`Rhk%ff28N4~VS@jOyUo)oMg{_<8Bf`MrQ;#Fh z>PJsAAM{I@p-q(P&NV&8kB4&Q4!p}oHHxyQN`b{Hk&&7g1pk2gJs({?(1TzR2nh_J zhE#aqj0`4&Z~=@l-5EyKzo>n~yz(<_vAz1g0FT%kH5!lln+?*qw_j9?9_5QXRI-gh zPPTUs@4m_Q{QYQYd^Y)+TAXxezv}unczuV*^pgclPn0Z2q-CxLB9#x`GvRuW!>VOJ zaxQOw*~TBQ9TvU&`syr zwZZcL16CKi((v~fRtaD(+^pP5xDs>N)z^Os>_NTKm@?oaxp?U|_Zzv@6NJJj8yveT z{}Cx(hD$c*tp%TAZ>BA7gmpONxAyhE?x~A7CwvsKn}#36$2ErnhEvPZEL^w0gHo+O z>S+&jl_tC|;?f)*lscCrxDIKf7#gh9B&Oh6$)V3J`OYCKnw?FM7{KaTmY}mekI8I#i7HZbbworUYv+ zu3qNE(M`B{b4HYLAm>OJNdRhBGedPH{5k=x`Gq|ik9pruo76C*+0O&Fj!lzCqC+lqC~haXMU-fT9jRt_^eh5Bj~eq426G|X=p=O`hB$^KS?zAHtSPE2 zIrH=aO^WP^=@spi>Dg5G?X}uA_vhTczCDiR*(BT7&dbTSPo0unl}#smyk~|h<4!^! zmE?h!zDDPpdOy|);m0a}9SiNJsTg?9Po1~C4#RKbEv|$s&eVPXv;yX{Cz;)H!3bqv zK{JE|9t~`e%x~wOcAqpeOmxKJ_pOo`@%LFN@llserdQpxQp|Hus#hH5xaj0tB4`S$ z6Jhj6ZP_>AllZ*l!x7XtN>@GpC8%Q{5 z)>GnN0@!1xEjz5}&BNjh-M`Q|!3(d$Z%7HGFsq}6lrAIg7gg%;tUxs?KkWFRImU?h zpq4;g3z{!8`}h`?e?hRv==iJ^O<=~`2wJK=*oPN!U8#?!3WE`~znVYBTJfysd)N7n zv=mEpamMO2SV#{E&+I+J>V zT`bQyd6qZ1Xq?F64Kb~!5L^wVGS3}QU%QYe=>|l+*<8wt#E#RM6Y8`M8OoV+nJ!2M z@!}GE^Ino9hdbne0w6TNm+}A;c=QE1=3IPyv_78~mK~_Wu0x*v$#sd-@S44suReUp3F8#4( z*}{U$88*XWVgE8^4mtLlgHshbJt!D)Qa3^ocXz7Zsbdq02${6zFZDOEt0I{9THO!N z9~Y~HftQf^oF-oamrTo&MzKgqLmbF~rnp&Lg?a$|TDP_X3P3b3#mpb9*#yy`MGiG{0!z$$ertT*tbD_MXsn!25*j*t&lGQ_lXji<3=~RQQ}-%tx&et zzoXN{iC5Z3Ul~9d2Y4sUTP=g3klOx0F>ve@Gq*fkGwz5vXe_H{C}ehb(8@LfT~pd{ z`ba`Gu)6mm{zZ)&UXf=*G%TO?t;&?$e@dwl#(4-Q?aJo16Gi3x;(f|PPw6v3483`W zE1B7MwD=)-dRe0I(=Wp4$D7IYZm3vrP9Udk7Oi&7TPVkZq_mA zP}-xxRT$KvY35tAZloW;G?bR2H6g4$h)iRE^JtXwX!ni|j#SEgytr-8$s@~0f&GC+#|SkSmc5@>W-@)@6B8D4qB=TsHGH+L#@`Pb-?wH^7c60H>OS7j() zbL4A4Uuu29XNRjUS*8}~K})#!@7V@KaOC><6#QUmFfbkwHX?vn2s6T&rbHCg7XWe& z+<6>JBpHvX4*mxvV}^mN(!$UPpVwvz&9i}oTQZfwiU$KReiGVB;nVO@tc6+gwJD4B zj#E-^0Qo0f_R!UEboDV)#_6+$-lE6t;n-pCzxv{?^Q^j1v_QclSK!)V7~Y=O!|mO$ zS*&wY-;Aa28QmvgZ(vF}rZfuYD!U?)dY{5K8gsx=8-MsoBDvVK+!0J^u$cGT-LFa1 zIF+8LNe!~`@y*-pRX?j!{^*JzlP4D5`7YdlpGp8obm(-ZPj{E5Q{R(Ie%(k~I^Z>R zS$qUE+1Gey8q1JGmUiO*170Rx55Z$-4LKPRUWC(Ne?2vc{ii*klf=P_(hEcY))^$% zXUr)(AG{e1U+4qgt^tpZ_`9G2sFM+Y#9+|LBJW<=cq4BT$5`tu}S9TqT zsaaoDog1L21uQ|AU8ZtK%jHye{pN@bQJ?(If@~EC%tBGYSHjUhI}8%jE$4W(-gq{K zq9NM_~$&wWUN#jS}X7HCjP*O=cDX_0uJmM1! zX+424U*=I&6;vy*!kF77Zg=@u%qc7BS{^!b!37L&e}Whj73I`NdKXWDKAGE z54SKrlD@GRi|js4QbTrb<;UK81B-yEmNqLe z)cOKP&5uLK4JLXAEy}YC2yy5DR~pW>f~nG>i6?CLQ}&79f%5K^m_u;bf=qxv4ef!R zG+s@>EA~A{gA$)l7ihl*9I%N*R3@bt~4K&1~nxs*ps z60DVmj|NgwdC@Ll9^#&uPl>CP84Z+wcY&Dv59rK0+8Mnd)o;H#iK`2|-|=QuczS8a z+b|?Dxor%q1re9NXu65pK+N*R9~}qX3_<}`Oe!f*tMW@v-mBAyM&>q@Z4f{If&w$+ zZ{GA6;n`Oic@op{@Ut0XkS%$41FLcpN-!z3)=I!Z zRvoU$NZg4b3}K4D0iq1h0&pEuWWtHDT!W4Cd!b_p^5P+**V+|5V1bU^!BMjh+sSJZ ziVizRRJIdo-ivz+QQ(*?vFL?BG<^_pY=G^@1ja@qJFNy=zWG>S(F>vGYN1iM2qF@F z>UtcTUq6oI6#7CIL6-g%qDjY>>)sSRKOt=W8B0RFrl>lZ<*IaCm^e+%-VODL^b{;t z1qF6Qh0z=yerfxVh%|%fLzDR<`l0c3#9GPJ$iG*C8(&j7kXMpIDw9xZ4FXfpSu*M} zD|L!6NpJcGj3*6}Ub=-w@8#WU^ZV-H;QFjLv*x#>Xr?NItf|qv{VeZislWgoWOCQm z;^EsUa_B2VK`(TH%rorYLEq|P3xDTozme!sV{umbIY!l!waa?xzycZc5+X~Nrt!XU zvVt#AsBDOR&*y~TyPeIHpBJwp{Z|*Yznwti|1c$e;@^084#&FnoF4}_J0NR zo7a~Y^e`Atzesj1I?`BYeiJxgcj3S`(lO&)}bt!x;2h2<_AIpeg^52 z@ilEzRz4;X^x22=6?&>pQx>j}cL7D}`_;1ip|>kOmyGMf5pzN>g3HawyY$8@>MiKq zvQsKG1cFRbiW3P>51P%`b^F7PA>R`*$v_(R<1i?Q%{i=d;oqSLO^oJZ^})OGR70k$ z7R5J7S4ReEC3?n@2GsRL7Y;1nTvz99-%+v_E1Y7Jk=IO`h%`{ih;z6?G*gUS5-yR1 zaPQdo@6+EI`Nf9i!A1FJd1bc*$83@i6FF_D8z6$u+(0fY;UYk;_X3)F6GYX(mD7fj$r{r z6~9u;t)H9iWO`Q6CU0{j9v>w6@t0CkKJf$`*+>H7ZI(>6LU-U6rxZkIC!?(Zy1kWK z((z*EXk4=VB+5q&n_5ctRBJntNB$HFdg0|~4MU7s{ng`L>^rM}n=;?#b|>m8I|Rit z9Y%54A+X2eC8`hyQ2B$WAj%EqlrlN>#4I;w^C2GNSSo_^lUB=6s^*H!0>mnQaj(iY zPp}lNu$>!d``8_&2BGcWz0I-Rnlchae^Ky-ioU?;R*ThQ*0z5c7zy;e*AYW7n^SG2eg zX8XCNUyPm3BxPkj%?ml7t^BrRRoa5=p_$42%oHTux&v9lL#(aTpMSgCYB@Fs=!>9^ zwBJDr(1h5fW2-#8X`OFwJ8S%AisDZ`JnJXzZ_EB1*%!9;Z}h-I`Xmf5loRX_qh7MyK^r=Z3M&WT7=nc|R= z5taHN<1wf=WhCBnr7N*gr{fR;rKZdUp>yWqAMd%6Das${9s$z2m>4W-49Tp+B0-W^ z^sP)-3LPdxN2o)al><&0PI!)>;oGhXV=NmeSJRjER#&0KCez?ME>c0!S$52 zAahD1O7Ut@1;`)`Dv&Aoc5s3f&QsxkxaGJ>qA+V<;rOF(g?$=O+`=@ZqLMjpQ~Xm) z2ZZ>^COj1USSvrLJdhfC3fwxfFI5?aUECw>j6);cX_LrRmNQonshwr>W+e&H=2SU> zN({H#H!&76CS)H>U!;2)kE1RnL`g^e$FaDO=-yi2z1B|U8=j$XmSz|6a2KR+S04&tp6 z{&`K&qN=rZdMH))jVnu~no{=huhnk$+yDD$Q^hasLj!G~&dyc<;e~!#tPO_q%4c_R zUYa%Jxa+bO?ad}X5SW7n$jQd=X}x0$*tf#N!}4MjHjU@R*I8Co*v>7l*DU-j)42UtYht$#D;F$)8lh zQ|U{BwEp4U^u;^@>05!gaLf>P6qn?z(Y6BdYuV-;L^9F%#5InPK(nRWxu~{(CzEIX z-l1>U1TR-5N8pk^hEf&zO25SFzCq21!A*C@=2f*z5S&{bhI2g8m|W$-W9%MV^7)D> z7AMV+VkP6&h5?!TXD>!240um zP?n<}xmkEHB1u1W`81tQu&Jc;1h}54aDU_AVs!sFO`saZbfvB znycI?#%b0H3_0$!NUq9#+EAW=dh|VJZWLNfcsSCYtR4j|R1GiZXTPMkrY)^_zTVUq zE|QY$qP6v_*s){cO0ne`D0vc1L#x~{jKK5?0oO;#!b%>YDoIUJ81l{EULVLFQ|0Hv zm@JV*1eGhwzKS($HWKi1%B{?$OGy2FrlSR2MUkHbDsCojBCC$YFvdR~`;+SVVVp9l zDw)gT$;p7p6-bYj3bu*aq7BRC_1AtNV!}UZTeL4RBUk2>xDY60sDqxfnx3^ z29wI<@LmfzD~RwQ#h!4heW5BBp)%x7cFi~?J{#cp$y~s7M1+6vV}D$bMN54ckU1W+ zXhfMVvbE;&6nPM@a034*&=G*Z?!Vw{a;Snwa4fJt=MayrJK2ZWzDCBH4DoNPiTUdzm#1$g+3p^-`)`o1 zk(O_NT<){hgim+rM9^OW88x>ttlj#JmRIhW`VDw}uXKJ(7CsM}j{2B|pG^AuBPfh$ zq;oCJmWP`F=T{udwFbKi5ZJf-R8uP#L7DkK~SY=ONmN;9n=Nd-0wRfdtYQM zFQI;q2)smF6}_R>O0{p4*;`^Rl2s1HVtKG<2}3Mc*@*qJ4hi^#DdeW&G%QG)i$0Qk z5ox&H!zzQl} zy%WMHM>j#%*>srA5iuhusEw7_#VDK%m7rDc&?hRUh$N|oG||EyvmR6 zm~>AwO7y4|oN3W4{&`zGyjdu;z%|0KGh&_D2I)<-)K~xYEf?i!GuYI`(cYfdJ-?$D zy`sQc%i+4)&6E!}3w$dawBpxu`65J|c3h))RFPocVSyppw!Vi1)6Y(IH_JL~ki$uT zAT95q+Awi9HYn0>3_U7~`6mB7N=wiZFxFSmB9&K{TUdvF`W14p_GBGp_FahFyV+kN zv_7(nW9-Z?FPA|Xh!bw)J&#{(#5s-rmdHUPaS9l}1QskD`R<%LAFuFYog@;TRf|yM zMPDH%fHx$>m<)J)MgzDr=pDHsORs82gAM}+_W{&#QLBYQk6cY&MKv3znHAGrCW3l# zpB`_m0%>(yne$yu@HSw}OXV*oua#`#+`A4M3pX43QGd6@yUck0C>^?1M6}d7hQ4rY z-a&j|sgD>hVLdTt250*;40@^iqK& zw#=RGDA%HspjRvEBH7Ffte5i=qVW!>1kFmi@g%4?M8^gJG-5x6s9*+)&Eq|Dh;#f^ zk%wXI3k}Jhm}ipn8bWmB60_Ov<)WgOGRsVO8JGv<0ZJp2BKYw8$;^9YMqDZf#Q_;l zP@0=U4e29(qYk^|8Ql*Bz9c##x2$3QFd9I`v z!Zg#>_0h9=T1Sr%c$tcLw)I^{@#in~7OKTf^RZvv{;i_ZHEm6!C%H@M)NWflNF=4I zQE21PLlXXcXL{dNLK8Hj+8|pJl4>gC9!N@GDKqBEqwJdn!g=A>=oxGcQ8Zv!{f zv9aACp1nD?UQfGh(c7@Z^S0Visc`DS9e7t|U8@~Ej9HutIoloqdYnKDvs#_XxFyLo zuXQ_@ufdP-Fa??jt^N{M_&WjHrZ+LxVehs>c!P_mDaf|9(}knAtX@6SnQ5nI5r^T7588zxk=uG}mqO zQRl4dHyYwR53ihsgF1n4meyS9p z%}`+}TL5bLPWqdz3E3(G~L)m z?$Ta=R4`#K%QMQLh=vG_+RqR!5+@=#6D6eUZ-QNP^Z1`3%A18B{jEcoE)mNNt+T!y zLZh?PC8p6VF{E>Y#f9+2AguQJ-9s3TkNXi&dBPQ^L7oz@dB;^wNfui$GeH44I5M;5 zaM~=UYzYd;As;txupy$`_4lMuuUM}TswUghj?xyf#}RakoJZI?wXf#w{QC>1 zRp-!hO^FYo=4D$@=s$?=g=vc-AlT%E&f5?t53%?v@Kid&CBYL_Nv#J%+ol8vD;I8R z)2FTw(+&O@52+pPU9G`pEiAD^Y4CJo5coy{JRqg+JCtd1Csmr>_y~@aL_|>Nu3I;S#uk;t%SwRa_!?nv9 z)EW>7RErk}`x402^S4D)!|!u%d#bx!KacPFG~JS3xq8-Iam$^w8)4y;PH7KxM2o7} zg~w@^gbw>_3K@+2o@xXJ3jY#p_^u$CaaI2bij5}A`~#uDG)pq(lggi-{BrMKuX~$b z*RPDJb@!g$4ew{)>)vZ$f8XBqY0d#>9Ig1i<(N~Hv@xW3=ZhCb6MLcw0&fC1a+5*M zGyG(2w{C=!#d73}RPH_y24h?4`c$ItB^m)7UiosGzuQ$N}rrwGv|B$0DnWy%PK z8+j_em)hc1hdk;B7*jlXs$(^UyGAfNq;Lg zsc9rb5Ml2qgzJvNB*0)$;tybuEw=S&EhB4c+!*2@MNxgK=&VMAp1CNeC(T(C@2?8S z28~YYN>F;A;1W_DMphw&Hat+7Z1 zj$2hTj881dx~k2n5^J1m6B{M@nh}9jQH>**@LK&vI}4XnQM?8>keNbn_kNEs)jrPRcc*ei2@(Pl9Y|GJeq`u=eq=R7)k zDr6Pr*W%TE6NM=se71oLe4>NYBU-ge#je!xg)`7V6!c+yfJXNEtEiW|C~?0DBi?$^ z`U?yxcj*9Aa@*Dw(I4DE?@mtV*`i%W(=T=}5eV+9QFB;#D^kH@qEgx%M@@3>r|~i> zOQFVxW`vIO9F&0vjKE1=WGBF%A!0#}5<>tLb# zR#XbPPR=viqzy1kV$S6KK#xpDyw^)Ut6Kv_hJ)MgFdxi$K;BZK6B5w|^A<>xw}$j~ zVxgh3sw*stVV)ef+vuepAj=!_s{7 zqu;FjZM`C2%6Bcoc{vc5B_PJ)ROzbPwSAn_{9oF#9xGv))+sq!*t^=x1g#S`N}W*e z@Y7%80voa(M{_2ID1ts{?gx5L;j^hcIS!Npd?+a2JqV!hJv0YFP|s~vb_Cq6evg}Z|Do=O z!XNTB78HHAM!$gz5^CEhg!FEW_D^VOwV#WU&_Ak-T+7#J#NmBKnqwi;rMRY+zg z*Tg<7xnNyU>TXrd8R-JsH;Q#HYPW9!=lH?0+q)0d7!Xb*sW*DQiOKR=>*wkJcE&g3 z6wB@!nI>r5Q7UaeQxy_4(Q97LajrVD0reVW|i>fYQdVL_+`Vef8-267z83F3Y3Q^Dyjrd9?JfT_(M3Ul&6Ip zt)SBw9iQ^O_bF#N5I!X`0D;g+>RnP6Y0VU0Ce)?D`GWX8aWDenk@GElGBgC)ADKG2 z`g_0O^X*V!1QM7XXkgHP`nB`9(oD(n4Ay}UFH5WhQnHOC4g&JO@7TZW0FVc{@4wo< z`n1q+0!T*#Zka(^3!t(8`xzrcLqkv_C~Ab^uRfAhmjPWx+27t0KXY%s`k;Ad?F+N= zKa2MR-DapMBQy$c`Je)`PlLX`0$+1oj|ICz3v|Y2WRh`W^eA zh@irtQDDemZeYjY!r-dlz2NUZ7=NTd{D5GC@PW93)P$^p5{9b#HV^fIZiW7Y;fD!> zwTJD7J%z)Bd9!FtB$wGxhbwZ6peL@RByFeF5Z@?hM(8s93c))bP9LK`P%E7w9mc}l? zA;mGoImLy<4a1|yOTt^lC&f>~Z^d87|0EzMFeWGcf@HF0s$+&_rev09uKS7lQ~YNR3kZuTOBu^5t32yEn;r#WW>SKKd$U(4L2+?_nyJXJhzyt2G`d?0+%e2e_50w4k$0@ecU zg3yARg2O`eLP^4;!nVRyB5WctBA=q_qDi8E#hAtP#Zkpm#5W~)B@!gAB!eU;r7)$8 zr3R!$rOlR6JEeS5jBXP#RWxP*zv2P(D^+RvA_mRP9w`Rtr<>R0FD$t9z+0Yp7~$ zYdUC-Y6)spX+vwfXajWUbvkve^*HoO^e*)I^$YYL3}Osv4Xcc(jf9OVjLD7ljb}}; zO?pkOO$$sP%xcU&&6Um5%-1bgED9_>EyFBVtvIXA_Pp~F z^m6g4^9J*d^C9;!_DS%$@}>5*^iA>O|K@HU`%C(JeaoI_{Z9jE1Ka|d0!{-J16zXF zf|`PfgPlTPLrg<*LdHXBLzP3*LTkd9!%oA|!-d05!*?U}BU&OcBTXX4s=dZ?vGsk+>G4QJl?$Ce3tx( z{FeOp0>6UsLd-&7QQZI34BkoVF=7A+n5^I=LJSXz$vhX+|V6|h_srVz?Cm4ieTOO#ji+#wgj~TLb?Lofkv`6y1!?w-d0tfhy^)=dKC77N@)R}VhE02VR3dcy3 zfAs}r>R%^?*3JWSY;^uosstApNU7vn>1?T7tcaYDVrV5-!Blfg#f;ak0cRobPVSWI zu_6gWD33HvK3j*u;v6ADDG+0R3S*l_jGvzJsF^?1H;N4Cd#m$Jow(?rFMc_Pf`UEF z=&E!!&3key1o9c+DZ9GR*-zx9uqEnGNuf3g>o2#e3Ijno%rxRqymaRx1*k0~zd&HL z?MJ^$okxzVCWH%~1lqJL>O|`(zO~A6=O0Z*R@P>(r0MzbJ3ZSoV<|K9|BS1d$?xE5 zc1X(MxE|u<>H2qhabu0bsQmSY<-053frN}Xh^h(8ha8}P8texx3_XAxNDU7l{&q@= z0Z_;EvuGmH8B){)JsSFIBH#hS8c=NEvjJrdIJSs7fV2h-TZ9cjD>LFo{}VIl&j=B) zq=X{;LM43mEVI?FOU^xPSeh4j}l@Q2qT5(D<<7{d*2S z@L?qS=N#bi;YRvz9l&y+srttpU=Mdy8;Fr0sDltx6oXixD*$Y&Mv(XpMhKGw_=^RI zgf*d_mV#*74!Ajp7Jy6#%p8OhK!*ci4iXk1)B!~oJ{?f%fTN430Z4Vg&_!4Q{Ba=A zMdAd+I-qUBw*hJ$@HP?M0l5xXn+VT<9tWaLBqTua4Kgo$JfQdnn-@_5kbHyAi!cLd zzQN~3Vgf|ppmxL81FCOuyAgi_vTrcE5v~DUroqp9WH(AL*gp9Dp!p#R{pEYCH(D?F zK7_p>1|dxS>3eiHYA?7x1ihd;A;0_E_IPgeUI=}N{6GXki2CFAsBTnVaNhC#K>I=r z`s?>NZ**P=-U&ZJ{6hr#^Y@r;G+yxD2|hu;Lj3#t_5^MWUWgcl1^*7U|427Rf^5M0 z*FY4EJ-{r^90kr5A;J|y#ua7K4xfGis~cJEz^6;3aRAv)VjqHcK-o@XAC`T9*-l{} zs&l~6&JcIt*3Kty2!D_PATMK%#hKhEzY5^lmv3ji3hLUoZ|AuR^xoHR=e!F3x9`_3 zKo|hEFXX{Y7!kB=9_{;&^3u$i%(*fNJZEslp0p1H`Z|Ls>o)^a6@N1@^ z+dP^H8t)8bXDFtpCAV_Uul{XW0X1Z6D6Z6!6-#emIj^bQ0N7gd9GRO>`XD zO2iaCkv&8x4)3u2|4s7Phap1$HvvLGWw8Mzpt86CQ=bNsoV3f7s)1>mZDyRhqeMBK zI+gkEIqfwkX#}Ix%kGZHL&|RiuH|M3hNt4?} z6%>>~4Uw_KMqXw5cR%wqCcJ~RJ& zaX^($30XNSuH&b0D3>BQtrM63PZ}n+fOq=eq-_4~BH9|AE4>cWPZcQ_Xbr}jnzO;KPQu)%as+|_wZg;H*tStPgk2J+) zW09luTVX+CnRi*}pP*)wn)Mv^wk@K%p9ZP8O)@RKOyZah(U?2~EmKB|+0W=Gx+alf z5{*EP?u4S$XQY4N1fH%dr%o)GR_pir+fHkRG)0h_{QRY+*tDL1a1u$!l-fcVMfQ@m z1rNBPDh`L!TK>lPOZqsjVUpN6XMRk|k`{GnM}7K+m|RmFUkLZakA378Z9&g;iEY%o zncJ|e>f@b1V~v2}j@QU2?RqFHWf|ccv506t1B=%4#-GMbPMdmMXO3bh(k9#GbcS^o zu98)nQ-pn3Y5#>xDdJM5q`MpcOY0$CGnrOtar9=#T_Cf{b@POt8PD}%Q$>;gzAM#P ziO0rJ=rovvNw=?}%4_pcjH{9N_RgBdb61z|HBK;)@ceyI$oV3FQAqkKIZbnRV*}V&0$Z*HFx^`f} zY%J0>9UEK-7YkQJ+0ISLy6lt&3jNa`gJJo?du> z;e>rolLYFMBc>=uNjEv!GSt`z5yhaD?B}Jyh4Zm!_k!3uE8+`QEF34+*^vm!`a19B z$n-v4^hBtG9}9I%#5!lMmb=YF z)8mpCa%@rX47|F!8bp0{cv66{9&>P1M3h690!b&0*oHbKl5g61*%=X3M^@o>ia=FFpUhIH)ftLMl>>yw~O`@>Mkw<%`1u_dKOj6llOjrnFhd(L*)pk@JGn}?L71Vk(C-7t@%#u|EDUTHHu{x!wvUTfi3YD3I zMfssbHfJhP(li6f$q4&58;(>>4Pc+#<>oCXLKkOavg9OCNE>rb`U1^!i%ZP_DZUh% zWxKcvVYnM`hOt8GE{YT7$6b!q(Ddv=Sq#gu?sc_xm+7l;150v@bM$c6yO7^<6@NtY zEA)Ku7k4qu%CISQa@jJ~lTCZ$+8wwvp+H*g^9z=k_heKsLRnSjF@Ks8IoU+}(`d&o zLh&fH8lE%Kjip>V;xlJO-5QT}4`U0)@pa^6cO`Pcy2J{9OqVFISWTH;*IAit%gT{k z5o*|$RUc6G=DhZ86`^(1mWlB>7S+|3w@=a;gBEk-v~eilo619I{jkrL4T@CoAjJ*8 zK{#2dRl$mw^>iv4?Q-Ac&Z zO1;*e8}^4adq&jkDs_C(4jzwvsCF+uG1@*Ur_ut)eJ5A;X3~|%I=PT%1a z)44LA{`IDz(ruA;DbWTff3*bv4#ByH`uMP9%*v3lWBqbOCujwmYga35mlC1o;-O$fMSq)%Ycs2fdW@Lhr(xE zz1Jdb1}BZt_ORr+)wSxRrP6DCX%oT2nsrjM42O`4VAX?!wAYjJs7GPN+C?KN$HB0^ zCYN9qGe_!JhewA8HLr`Nwf@_z`%y_xLY4XZ{rxd+R;Z02k0ac$ zo>%Xf9&!Ro3E~Y$_!7D=Dob%v7(Q;IG#xtBs)w4csp7rs7zGhhGSf!Am zu91XV&A<0~mM$m-*(0h>b)4URV>;Hk0hZ^hts(vmz<9(4orB!8UDQpgVfD9XN7Ziv za=OhORB^-kL_6rJrbn*DimNb@qkPAmYni*##pG~dnY!r}Dm6Dm(M!U&WcN+0Xj`vN ejIn^qqOp)FaXR1A^-43s{HnQV(fZ95a&&cwEDTNB&X#I|kQw%NhNnpn5Ldw<=t*0XlMyY^dE{pWP| zI@Rt9;^H8nAi!%p1_TZ$ppi`fSO4ez|4TweO&Az}2D+?3gzLYWt`t-lS%4lNuoeZP z&gUUDWMXIJ2=oF#KwwuuKyYqrTLfDzY(33EK;Sh&Kq}!uK*j$3G@^yEG&3><0ciyS z!VH813z`$j5@-UwbYM*agdBzga@Eq#)dT2t18Zdv5U3w8G2chF4ko}{8!`w8c*uW% zw`hRb8F>KL?fe7G5dk3v+XDS*Z)9f%^qPVD5d#4MvlCGL@^y4@aRmYC`T*`H4g>_( zkCv=<$0OUs(A3ay-#Ec!-pJ6^=>f)Q-_Xz~03-q4MBdzsR1tm>e6k_H3X#}6I06hL ziVR!<%ls@|3Lt$$LZrx$eKD)p7`~yWlar@%yjv)SqJxN(4!Ca5{wnOpWfn1LTuZQlupu^zg9k}=e_Pn6J-(vKRa=u{hHDLCR zA-$jo9$0(?8QkIdjS;;>n?ewdMpX|_Ru7HZ4wmu-Qa0i!7{j%i(&kRD@`aW)A}9dP zY^PY)h@x6b;zpw)W+d;65ks$%3x-lf! zQAXHtDA#Bqegrb#;6nk3c6ubx)GM`uw%`@6wS~T&EOWz@T~?yJVz)F zW3=mGy>`5;1_+%7gslef_d8_5Q8Ev7#(ieKILce{+`%Oe$hkxA?ufKombOC-d%*AO zefjRFwOgLu{wxnT2LQoGWZxaq*H6s=2(5@vtq?J-7^ns=nR;@W2DYhN!_;FEx-k*0 zTs2Rwsyj)-ks_@uH?8=`jes#ny0In_ygN<8F~CN4&qnxZ6C>l1W8A)^{$NFS5-V4@ zizj>CK}+`7g$Mts3yQWxjnM8J=C*} zl{Y~8@-6uDQRcPs3*nizgbo$9B0x-?1fyA!zE~LZHB@z-bRr>2(-c=(DcV(p#yrtQ z5=x7lP}wQ^QiR4RF-YShY_UpG z0&5Qe{VBYvVH*gOSP%YbQr|?H&A{(k(`uZ$l-LzOOO%*2nOe)ZP4N(Y5?)27SQwdF zo1{xIE@nrZYlzq&*-G=cS1}pAGEqgU*cTar*}@M=2_083WxMF#zbZ`@&?MdHaltEc z#oUQk+AL9uAu)Y}Tw}zVh}oO}Vi${J+66DK7rH0JwOA4t1L!)T&pe{lg{_Sj6eQ*7 zGhxquM9&KIEEM)6WNQ7xUX;R&4O`wW+)B{aY{plXiS8A#He2wKq||XGR87T3j5Pos29tGf^f62vC*8XT~jy z%uQo}u~lHqVmT%T7^48j(162Iz+uxO^CK2uBnlW=DaXkG&ZKJ(#ArE278tE%vlcf8 z##w=JE%BNGHQ)wpfeXheJ+Q2mfA(zx83nRh{+Va7EMV{-4$A_2hCnQr1?D)d^RTd6 z<~VU$G~i-4tFnOT#BAn?iPwDA05L9F^@~)p>02&;)Hh%D+XceFX-%Y#-GW3LyBV$~ zUh`~SwCWwJbkVa4j94stZQCzeZY)RKcdjeuE!Q2-m0{g> z`FYQ{6R)JER7ZZ(99YBO?HozYKBJ(TX;8_$R>_4wWxUO+8obF9n({yf?N;XL{Vs5d|*0xA(u^MINMR0E(I0Cf+jdq5Qg zsvuDNfZ7LCf1vu)+ZXZd;v+vRn`&<>Ccu0Y#2Kudh{PGpoLI#f?3^UT8BCmX#0Az5cVl!{4AI90~t{=xGG`DXPZM3%^6XToPAIa7l+rP<(%pzDt1vZiO zl5Ow``MaWaYK9h<-}SacNpSFr%A(XhWwKGjBM-Gmkq z0#jpng>%kmBL8IUtt0#*jG3uoG3^Lx`^ z^OhE&2hS)Vl|m02qyI%&fio{50N1Gju9IgJ@il%0zd+Q{L-I!E&Lrx86c_e4-lvqr znJ>>Qf?>h}uTaLBQp8p2+7?*p!7u#ms3Pek&ocp5r?|i|PT-ip9CA)#7hWN&Gm?m_ z__ftC&p#I6OuOPWQba|oM?OWX#dXX)yw9wndq-bkf3x`dk$sb)a0?yoA%K++@C{QS zu>i*g{;Lv6oS6)4BQB>z;1hj4%Sjp;kyuCc2<=r*Vwq?j#BozR)3AYLelaQ&ngLA? znuk%KVG=vp?Idot>ruqw5TumBxllfxWvY522OMT#rFkd?MpS?iD`4ap2!^=Xifd8h zxpYyZb(qoy>r#1lhMDTFE|6&s8j}<36lRy$$@D59HZeeAwaYxkYi8WU&E_6~Ac!B& z!~*dtx;GD0;&w__V(pqQ&*<3zGE$zQXS%$-W4#^dhqx8QPpIeWd`wQcoN*Pe(HiIIWBc7tr9|^vp{UdE113qESgBDv}uTuVy&SS ztBwh_WFvYMMFDC`5dN9LVkNvoe9&2x`UoC#zsk*5#oy~3&Pj2?lostgfN^32# z!`d4$fGujl#WZG@%}rx6y9;!UR?bFw7qPAQya8?Mu?sycoQP_t2FX%dG^5E)OFnMo z2W-X;Jv;j}!R-^+F23EEXYWkHh^eoqr+nzWd7u26)viVo%d;~CaUm@<`q9;PU7MsL zrw6frnm);urf;MdKDC<86Y!Gr2&_;#hV1xRm&)aVFzF5CI4-ZNEtG2=15F(388D$N zIRh>Fl5$y2(Oq)tdPaRtty9N#4toHE5}h7to$vtgFhQa15kHC$CM8)g#I$Uh67l>+ zxKP=4C_`J@3z5Q?dG#V#6TDjU%X0*iQEb%>@w?t=#$JW$MwzwRoocc*TR zX`vzWaSGEBBaY&;sxNh_%Xb>olOL4lI7)Qc3!jNs^hI|>6c#Ntyk>?MZuDgI4#SlT z$-94ji^fd>J(GwZ8la&DcRf*eggrqgyXjmM>JV+n7>&Yx#F}=aPbQ2^K~lQ}PE4qX z`|uNKU?OJO6utp2r39oT6ny_g!U5q(83zw;Wldk*IMxG(!fQktI)4cCe_requ*vZM z8|s)*o?F{U3*KxGC}HoP$5yNNQNOd-&?%2)`Vw4MO#D>SjD)e3`EmN2gwZ6TDU+e6 zTDU6ce%fbxHGpMuL9#@abEZRfq+udOYUA+dQe4{bMvBMwPX>Wq5^iaRRjsstl%Ha{X_2S0I z9m9*7dT6V-+<6H6P?oFel1wFxU!y>U5?;DJ5_~mp52yd4goVBivIvc*C2UQYhtT&w49sWzrvpHOUgfSY zU(S?oy?#GVet$v#6wAu>7s)6mQQ& zKb>{vMa@aSg$$D3P6|MJNpW*Ax4{_NoPZUF@xzxQZj}n%DTM4QVPN0_62T{7pkex1 z2xWl)9UKR`%<(=fnJHPEZ(B3sN36YQbtvlWU;azy5y~e5l_Y*b&rRmw!o5!;H5XNL zBpLlW)eQc>^M+C_unu_s50IciyK}!&KqvJ^_xhzCmZb+#9cdMOMb_9pR~Rb@W%=H< z6_!RG^SAsO3US?qx&pmQ^Fjdz1DQo+%hV>3@NdhkFWT;@8oZ`wB zQ5jk!nZ*E!Qm1e!j#Q{4DRHz3oxwTKhLp;|0YijIEETSP<@h7jqo`(hv9Zgt>PtaL zr(yZH%M2Z-bNbkmD~zM$`UkHOcfQyq!lTjHyRZYR#9s|}`RaK?X@|5T9a(inyS%Z2 z@518S)#Lg@HlG&eXAPrh-JSLazXD@nSe{4{U`(Yem}v38DbO@)1V$@YXb$k`9z>qt zE*&(-VWR6zxm1!~`W5q_-PA3S<&gKQk5yQb;Vc%pG+^M_mQY|Lz@T2y%c$p|)c9I) zp?lW(2@JhB^-|TVMiKLB-}P68NoG7=9C{VU-Pe|JVrJ6c+WM4s_4rvq%>Vt8_=JQB z;~ChH^1bw_62Kb;*Dtz8_|Z-51-_D)?_SFZQZnd67Z~}P9#Al-E33uz4>wN4H{u(` z0Lu;#q*D*?3<0Yccu!0si$iE?vTHc6Q%Cx5KZ~F9d3o>U_`n zbSj=fm2J(sM&`Gl&K;sXnd4xlf?73=2<+47l_neNw5$W8+D(8U61J!CPcFeT0?_Qd zq8H5JD(VTSSyhuL;q;Sjx&&r?+!mfl*B>q5MQARV4y2v@75O3OdkEAJPbpq2*+rw+ zPp%obYbgZQx;q7b=_{S6FC4BOT`Su)&)IeDt;@>NR#J(#!DTALI&|Q#il*>n)T--6 z3MMiebPH{XakX(BMtaA6YJ3sKCPK+D#x^*Kr%_Vb_QNi!m7&uLLAUjl zm3xuL(`Y+=eK*F~4C2NEmx+}n?m^sUdXYEMmCRbk^sd7d@JtGJy=Ita0@qXyWWJbC zk)nODHxEZ|9D7)wNa|)kcHiW2gR`$VbY4ArAWg0pt;%9!ae`jyey5m(1%o4eTc1E^ ziySzX`$Y*Bu;Pm$PhUdXHO75v_g|@&-9i5>hyjGaRRw_uHJj7a2pvTecWn#l)zUB| zm@OP@oVU^XrH%JmeyBcT&sF%Pfjd|ed#XxK4CGfr2A|*$oHG8>7Q-MFhIRibq;NX5 ziVFf3i7`hY;O+n8yP;AL^=@s9iVYy1az7CB;KMrGdh(DM7oju+@;ypXV(ZcxRWku+ zw#n^i{d71R7-2lV4UG~=Oah)O85id^-8wQZyZw9}4*1B)W~z@~e)Lu?GvJXjI3O+ddmmntV{=(br_mj=KnM?f5mh-IgyZVs>pm;ur-v zwz-hKnmgt$q#uq%C2@ALEAcqk=@x7akpO#id}eQM3om4yo(~B@i8q!>06ou48y`&6 z^c=7C15wzUbZHuoH9SiLleb#Vp@`Wr_#swPSIL#^PFG8m@`y^7Z64*Z=EP0e4j~c%zJ_PkB0o$$$p!4pLA9 z4fK6=XIR3gY&jokTAU|RnKMh4fFXk*__GV<-~*p?G!G5y(bIb0uSpKKjJSTq-8WZp zat`D8bezkRkTZ^~`W^)8`iBX|vLz$-cf$)?Z5F~htda<9=6HEjE;Dn#Y&mhn)WWyjXkM5Ge6HeIfglI zbc6HXJ6u%noIC@^AZ8XxGpGY(wpk`}0`s5a7Wim{jPj`6{X-%K)7BJknpyxrkQQFC+$orQ@3)?4R zAzY+hx8IFl4F-@@Z!&e44oD3y!dHG94^=WShk!d`Xn@ytd*sl^qLTpw8lr_W7j&%e zz3aO`B(J}T1iA_uukpd{hH;C)?~oej%X*z-sGC2cg1uoEHBi*641?JnOoi#A##O|X z+3Ps3sY(O~-PT>G+Gc+!z>nzR9R07y(j_J_?tR&*sUlw67e_iORq3zB~vn;g8o zYM0@e9lY2rH2#^6Khi%%njxUW!!9&_q8X!HLQ)3R2IU5K)(H=*L>eJ8 z_)wL|vwtZ{k!wq;px3=E<+7lol6 zq6vqiA3LGUMm?EG)!?agqXI`Q%DQRx zT0P@3(2>Ep8Db84cKqdY;|ynlx0{Ql(~+&wW1ZHl)Z+7NI%XonpPms+Qu8BQW#|DV^o!Z>SPdSYlH;k8 z+4CURl9HC5o|cj%eMNrRUCSo+W3eW@nt^#!4QlKm8L+iqp)cya2d=>#2gn+RNike$ zM~+cn&tQ8x%B$DHF_zRrPZ~8j@K(i=CT?i6SgB27`2Y1LnY#C9??Q*G}|nm)BVz(R@z+74Y=X{3nm^8xlAMu z!xnEY0HwGj9yEe#TpCx=ajMI_yRM(GIdEc)Zkk=S({KK&l+(0{O`CjkWPr_=D2_qf zFzewP7rvp=&tv|(^e3;wn9ky3e(7A=BVVEAoNJngn_3SU1%Q$^B3zq(u@-d_d}G)` zR7Ks_sclt^Q* z8LI0Ctv;mMlzRt$EcwV_l$8*Sj0+YcEK=|L#QGy8hu6xBzo9t;McyVxRmU& zfAB=NfU$d}7Byv}bJF5%w1wraKz*`hBO^6Ea>;4nrbj;YDbY95omWEuZ3999`tecz zANr%fu-B~OE%X^-b(_PeGzsBf#R7`;;U!0UASZJ5f^lm8{`f2(i`MlhJwshm;^HDWm41EJZx3c_!+O;h`%xJ zxrf7@i>0E-gGLR9p)l1)t`h%>A-E60cHhJD@29Bf4ODwgQd@KU<#AJv!;haF_dk5d zyKQ^V^%z{c_AktEoYI~)8Tf{~^b@$|YD2#CM76G0=rEgDuQPXp;5p)YZ^wVe&g>gP zy74-K#D~3f!ADdF&@rd3cqL<65WGjy5nHm6)lcOfCZ6d2`m)4wm?Fn5CV~0oXlEN? zR^2*hE{GMR3kcuhC2^yM5k-JMKIr?SD>-rEtTllVJrP>V@YI>t0)^>wIG{jxJIu%M zoFvirA_?H8z2gRro057)Ar%g>OekQ1Yj-BmU`U(m6z0~T6gcJ$998)spsPPxpd>nO zWLC)~CZ*h&cRyzF_{?$`_$-q$mrg>Mb9KwFY(i^snEmV zo@UZqij|>lC-A`*Mv2(TtYx4v5}TB4uvtz&$Fquus?vuTPEE9ETR6N{@Gr|muO z5UoL5qulx^Q@?R*g>eDpgE08wzs-%2@TD9QMt{MC{QC{rTEeYLq4EOw{3>GzVM)R17GbCjMKY z`1kWJA)z4|;`t$#{3F2JgS>j13R@w)yR1;|T$JsGwk|fe^ zmQPF9x}Y4427YUQgl$)sJwsieb`kJyCW^aaa9(qxc>LqbxPEGI^s==qDs^1uPL;N# zmCatso?h?NALQCrqV*VSPKf)M|TjdvQ%Mni|NM-w<2B{1={Hp);ycFY){dGge~ERu1@(y2l|iD6p9ZFp2e77c3eq|4 zsk!xwTwg&6i&kJrN9Us472DOx7z#s>wLcZAxoyY0>OM}zFz2nHECa>ZXhMuu4;mEvWaV}CjEW^Iv zv3T+9&Fpa$9#oFnimFTN%$Pa?g1FZE6{CkR0N~KXtllj zQQsME`kd>=-cFM-K^|)}MySG1_{jVc^K)z-d**^isr&1s6T?XsPPlD;jCoPk2z~8_ z^uXh&Zxxy{2|btzT}q%LZC&l$(y3myumLqGL76N3c07c&1m7y99l9R7R#6=w@hk)W zQlyL{jSj^n=kR5%wmzakW^`?Cs#|VXokWHFv{u;?SNZBdHtKG-ZB`O7Yr$^P*FzY8 zc~gG)-5G!l|Ltb@Q>P`C&ojclSGE(YEVjGJ#h)imKLUMkoXq$=yxkS}(IRES6MPvY zH4V@wUSE0OU~zojM$`UNSle#od7+!8KmHUJRB!wFAYetE)V#}SEliG6RRf@kHZn6QPW6(&RY1`-9RxZDM z1Qz2IHz0Sn!9@9)E7W<#LBk>b_o@DKQtQ*I93>kHM#)*uv-Ia~G)J?!)OcvecAI1) zMuYY53ES)*EsvT$PLho#clfv#o>gX0v?hb!sjZ*@6zl(LWK1y`#U-dpW z?>QMd9W6Aco1^Y59NNFGxYxOMY~s%0864rXD{S*;P`I9j6%0>HgdEsBrqbN@ew&P1 zmAyT_GtT!k>_5(p4r1v$cT}VyB~SOU5z0H9D%5x-3@hmn#I+%rUu7(ey;x&IIOk-&BrBLQN)wsI?yOfgl!_(S~hh7#rQ0$JtL0!#f$-#&BNv4o<0s`paEK>v#;W&K7Y z-l8QXH8iF(N8GW(DR*sIbmt5LFkq#l;rM$_wRCjlct3Pi=5Oz_0o~3*^r25NFYO@n zpz?50kkw~sHB_36Q^6lwXDAK~EfF?jozB?_()N?vQ`>c^Y38FcAs)&L=F?aoZ1s64baKz3gD*1jcxPJv~coO&@DMcfp% zaGmOo8J#*ID$lRo6T}{8=E8;Y8hgFf#Ds&l-Q@GBo$xY`m-6d@;Eq_#m{)$Ax!sO; zXWLKc=8ez;2AphC?Y;$^k<7CV1yJ$G3)!?0yVZtZe7Bz6@i}1lfwcudUjS^)Wbw8l zT&{0;8^<%Ffj^C9E+~b*uDs1z$9Cud{yA_yjWx^JBtRyUcV~0aY&vPomim#N3!(GS zl@REU(r?hG(@?~$;2Im6Tf0#O=&3uQLUKwk1-Ltgkh59t>6tshzVtq)z96sd$qzVT zllW#NYg^Wqfo()ZyrPIxBzhGS1cVSD7l2g|9+9W(=&{KKsghm^{0y#b<2ncwJ-ixj zfH6r%M{b(V84u$V8V~v#0Huqvw#AUvFmdL%z07U5xoEWndmV5D8|qtliB-kTOpKGI zjn&$_vj~R7rQ>=V>OAoa!!`bnGJMF&HtD!c&j^ChF(M&ove9ZORZYAHWrytTU;ftS z)EGBE8X9B*oR+C}qmv$yvHbSsTRt;3azAtilat!DVKXZILL)9{7sIdIVl1YStcVx0 zHkbIj^bAuI!zi$hLhB-$A&EptDN`aQiHT8kNvz@!Tg!w|aSByzu3gpdXd z$Mg!cW26+^q&Yr^zw*I!r5dn_ADo#SiRP9%f5`=k zQCm)C5H#XtwY%j7#vDxin|GzFuqyUtL8yC_{~=dYm<<>SC7v!hr$9j|bbv6BUtj}@ z$VFR5Vg-d#8sS-TaXQ}Z+aJtCy!~%KOI0ySg{=TjO5enu4P(65Fvz zN(Bs%m$1g(kyd(9F@A%0Fr^aa@@BV^-(=w6e6U)SP*cg{t6?tNdO9u*lS$B1|9ep~ z(*oQI97P)8X4qNub=FDffV z!K=HH+YOUaj!T;)n@`&0w!8Mp%+cii(Q~Zq5_>Byv{+G)Zaig21*l!Qj8JxMk2-u@ z`9*jhB6MSi}=;6eHR35`xvR^O){4Ch@zOZ_b#zeEJ3K~zT0eD?e8(DBJ+ z^t@;1-Lhk`5#nH8)7OAgrrBWZOoBgORqw7`#kM$@MuEs$Fo$H?g`BX)F~moG>n?^$ zplJwxu162uK`<@coq(iob9(!3x>}qf%z$6mPeq+rfAYzMcgCsG(K>)@pY+s)wSVL2 z*FxOSE2o9rc(aY&SiGti3)edBl^y=yuHZwhYHhX^e&a8e&-&|j%eb0oh;hUpS$2d? zGc|`$Mo**DjmJyVG$n)I^V=H`U_L%=4c2>qdeEQ=5wU7+vIaw}F|sN+P6Nq3LXm6N z;A_|Yj3Dpf#?Z2-LXF9Ph#H|FjX$;+qhz=ke?~xKgR0cYz~a*tl8Gdq{>H)>tRBbP z{4IA^UH0)+Mml;kL~xzc0f(@Db`8zg?#M6~yF9ZkmZQJa|;>dOJ_NFz>Z7&uKTCihRT}oQkBh53D+s zBdVCq68MzXzlO*%>|b0Fj0B|YqaF=H<>~xl5TFChNu6Tl@|n=&7+88X*^zgAEeFR1qFw{}q68UvV?%M3*stXbpN0hEMT~)r zVw?T5AQ=0s+srK(o~D!=A@n)AxNu(rcT$W?65YJ5)GlJwTG4mR_dr<~%3>FAmTWe5 zhsgLvj+J%Z;W#nyD!-w&2c3|}rM2=ux zHEY^D^gt(7NLMg`j*?;CtTNf0mG7EDxO}ALFw#J*JsqAkxLNLlW__)3sVr^On*($^O2ab&0RcsA6gKr8h*vUM;ah1n93M?nXL+xq4ZF-DBQtjDGP zlHf=omGOY%Vio31-z)&OZAb-%hNC2Pa@thB3kvEQHEEsVSyt11?cay>8C(Pd9F_p8rHu^?TyBCMU> za|T@OiRXWk?6kY*1-z+$K`}Az;-dsc!uNv`N7pBD6G0^UUL&0Pru*Lil@3TL;tP3y zC%+q*BI92)9&>tN^z5wi9qyzgq3pU?Ww)N+*%IPd*-t^o zEO{GsQtb)C7sU6JgB&(7T(*9N5&Bg81OWe1?-IJNQk4r-iIh$1;GSQV=Ly7a<{!4z z6+?NsOD1}mL@bgn<@7(ecG!Z>VGi_p7&CCmBb+}r zB_IX?@JBHOBA&_DcOrASUSceose@ITc}Ej1_+;*#x^3fFuObQB?aiGcjn~)s5Dv(E zRX~rV*=#Fvi&BCtSx6U{a-M$mvnM#Az@@;Bpjy!nGPS;?8Bv^%%$Icf`SIj+4Y$wx z&WMFkKl(l|TBZ5HVyaKVX@#3*s z;$xDrGr|B|gt!qqbW3R>JY>$LOU#XfW;jtLw23B%dycj-(^eT`9=+Do(IODsV!wxO zAXdg+?E?gcdriG5)dRF(x1pNG{{#@q%ngo>)>!xuScwwx2M=F0Zu}fa8Zf3QqW!2@ zcLZF}@Q36r*9(eTu2)VQJHUYIBD|0{Dpxpy$_dbi7AEkJLw!xXknqEXsjYZK{_swK z;*!;$@kky+hDQ%M{J07?W#6hN@+|u;!1D1++OOPMv5$t_BMk>E{HPdOX5`Ys7pyZ1 z<|cS|CVER;j2Ws@%I3zrD{<8xO<6e3CO0&DN0_mufhprNr5)aviYTQBgEXa3lmTU- z^L?8ay9==Ga*aH~J1eDLDmsAnuivrm@J^TM7Q^qJ;k4?hjpI}t!ll19RQVAzpF%511DJV`vVG>)K%yWX-!^T08y zvab!GiR!k{g)oovG`acng~R$r9bh(7K3~6~J9B-?@%r&$9Vc0(HSB~|upj(OGSxK; zF|Ne)jBrnbub0>c&icB}axt^#!yvw07Y6?&FjZJt_&u;;td47+rb<54k zpjQ&p2Tn?~1CJ8%6=X6n8eVH}rlaa1^IMj%keRHgXE zxzx!s`RsS%6cStpG=(&Ie1ofR2U`xvm|NHsyvu}m%It3>wMpBX^XYxV(l6}LDl7dO zM1UZGImWnb!(@E{K@a2a1#B5V-Ogr-Yvt4%jmT%ilPPm#@%S$py46N%l<1#tDw&nm zV~YKwkgQ<|I6ttbnYzQQNW+E*>(*2dyl)NGrz0UW05X0m+Dh<0a&nFb8))Nk^wO;u z%Xp;ETs3M_Z_XzTa&9J%05&@Juc<9}-SgNNke3|Lr_gEN4#bpLa^Pe3`3PaEWzYkB zgUAPBzvvVdKMX)`muHjKf3_kHAKocaEtI~ZF&luCM%dl09H(l|?WcVkfHbsK{Ukh# zauqc(sxx?Kc^Vx8f7R@|yqRz%g!uzCGlVc09%>U3{`DP7q1-UijE*4IZl1fm$YNCy zJ&rCbyAI1wDUFm~Zb1I`^h{R;@@`S7zvoL(PsA9@h9IJicw0w@-Crhq|Ju?{OHY2- z3j{LvCJS=J*rKG5^$@93t1|ZF`Q9Vx_qX0CI%RkW6MLm**|mv4Xb z>D$rOauI;)NZkyXf6;!i6~0JN61Pd|gX`Md;@ZB`AWV)fQ%&vFE#rcD-J9i0a7R7C z$hu93-(khTRzJuzw}RARv5|6okYg9oc1kN5GbcgU8yk+FHuwDx?PHdG?Y5h8d1U19 za%1H1a0kEcc_w>fZTL~)X)b%h1OnxB=$6 zSPmEZX_b71R-^5lr4p%Un&#??-pWIT`oqcY7m>*P`+kgSQp?TRPhxc{ z>V%IcXGW6AVco(ivrXYSfy^me{^BFT@`$I%&a<%cxE7HkrMi0%M15%5vEOX>?l|8t zHJ7e!D6ZeYUk$unf^KhzBW3=T-lu1=7J5U#hxVz*=r#}C3X!s4)5%6q(POSjP0sX3 zG{e1;^pA6RJZ@f|*W;ThkGNUb9XF=$?^sXI-;mcWk`=nwF##?aw9bAkzSO!7aT(mk zqXPMbaPN2@Y9UJ=LGmhs0YAtVY_Y%WU*j_T(>qMK@wT*>Fc}OGzqQvlie0)Aze=5& zzqzn3~L+0UX+`Aa1i|f(eYk@8!_<5m~bK+bF<$wr@Z)ci9xiZkhM`1@s(dHnY`i9m2ibF%OW-F~6q*@S`BqDDdFcZ0W6% z-fCJjs$U_#?S7Z}inI+7e2#inm#OQtxZha+<#=iwQ1dVmXr3Nh%sQCI%NK8KF<(CyC41aiOe31=0-IIJ$arBBN?&R~)&F z^b@S5lyO&qmrhq-zw$o}zsDokDR0nq+GC%Q@6{}zvCv}wq{=2MHbN5|tk&t;lVc&5 zm{EMhh7@_?ygCZs7+Ff9;R#=zydJmJw#g_RL)554bPpT# zU19HJ-MuIied$aR`F2-Yop;9p$_%xTr+K1}#@j3pmM?lE%mp%bnHc8Ze>qY|RrTtq z7f@n$&sRGc5!+|8oSEWhk;{B^B@Opc3i3%e6zJtiuh&H13?@VLWAL2WX@_&z(xB8$ z>7Jy*%36{QPbBUAsKV*n7@G5Z12YQnLDYY8@A9p0(8|vomuJa1Xf&~p`%o_?14F*U z^Dh)BQs}vKQMhZ;?J-{&91Jpip4dOy6`LHy-)=IswFkWe48$o;&U2;5EnO4OQTrw| zMYineGQwV5C^U`Gzj^hLB$bxC{W-!&l8&vQKgW)oB4p>tY%PM4&B}dze7rn(RHNHd zHgIseH1bmRMS12^DrkIGoM8^lEu@YA^b>BiyDllK|CH1*?MNXeV84JMg&kikN-EO( zgZ{5{3Pzjs^1#k@|7^-xQA6t3_|J-mq_6yHuzgZ>u0Q_-QXdVsX`l8tt{}NoV{_g3 zp8@f9uHC%^3x&U{yn_929Ti&E>9hC~)2}31Vt*53G7qG)e5(yNx!6ukdE4&wCOXW8 z9M&z3bSzH@Y=`h$BzK1J8EJUzT9XPtV=8vS8UyYIerGKx61n3m;xx%A3K(Va&_8%_ zy2aa!;G(F^F#j&j|I%li3CJZ(LNh5hWhS2}rNVC{rqCZ!vl7htASG;Aws@zkkd{9$ zm{{48aklUgQ!l_ekgbnpt$EddD83-)Iz(kL3qL80Ks~SUHrNtbeUy35(tF|*SqU}EERdQ*Q{iH$ z*;ea>TFp{HwvZUyEaT9QKVW{0Opg23nZIj4@7$2n<)?lliRg7Vy=F`U^{S~27_x3ZCSTgdg{X6@2G?t zv9A&WX&Y))?z=C+H@R%_zGv&MR3-k+kV2kR!r3vZk2&1Ag8M8wg^0VhH;a4k)p)*c z+U2zyRN`$jTx|V!?qOKK7))>+0TRn_OuGirMU+Ig^L3Fz)Mcv7j=e?y)v~Gyp6*hn zS`dmr3qEX~c1G^Wa^pZL1oH`x{p)zVgQodOYjUg7%O3C~s0FGq_XXXcp@p`SFbm!5 z9N5*J)Eo;S1R*xD54C3OhbqR%rw|wLaV;fa5NrW zRW^YjRE>7LY@6Q$md@rXwgXH_u}2wOS3ce#HFcD{+h_WxSjx*Qs$R@i+~_?9N3Y;G z@NXEx%`LQao@%1gwd)q9ePh%)L}?%TXAD1SIu2!ib}n=JB)Hj{#KlDKp$Bdix4;T7 zEN79rGfW`kRR2kMn2&U%6#pC|AP`tDi2q^KRaZ1rKAC0qk!6k>)wuhktFEQR&#N%) zK$iCVwAo6$*634;?b!FQZe)p@fH{;LZ?;>J3N9rAIpqiMPo;tf`qd4tC2>v_YRvT8 z&O4|ww4k~^M4_^!m!S)VkIl1>M>M|d^K-dL;JGX9p*TH6e~Bu#XJL|$ez8j(dPcjx8}{&*4!eZNtJj{T z*LQyJuYI;vq`{(DK>=2uiL#*+KPDjug2YW8QYSa^AnTwwe1HYUO z(>Ouf|1h!($$w?a8L$Xo%CSVMKGp_RbY@vb``DYIZ#TIzQ>P9Z*Nm(H~=GV$l(5m>ga7nia-v_Mhvwy zB6NYGgvuBq5;9bS8N(&@ntVEl>P5<`5TiEUn927X2XeOYVpRnFdKs(SgPNnvXQ7hT z{w9lLGhKeC@->H`f)>-E%`WB!DwzqLNgjl)WI9pw!g3|WiAI3x!rOnK%x}G&a|vr> zE$j3y#=f5_r1G3ui=7ylnGskY=l@xz?VE$U7Yl{-*tcQEXTjEFAd z4|*=R?aK8`Lqv!5W7r=%PMqTmQ2#=_RjKpO*6}HmdqA}?olg75$^!$?_Q+`D7e-7s zs;1=2=prjgS)g3F)S!M*?Zb3|s1Q$y#QR)C57~zwt?Ksw$*+^UDAaL-SA`m6 z@_n|VL$#}}vg+l2?ylEzhIA{7z(-HsH2HMOXt1r)aef1vU^uyac;(aXn%lvMq;4#f zj*_^imveJ5tA{2XIg-Jhh6GzQl%Mr~)^N}xOJPI@P42$MQ%{=@OPKN5%0vQ+0 zqNn2Jqf85Lr(HOLk$Qz92Gy(O3Za@a0h$J_@r$Z7%o$Y6IV!(A^U^6oz+sr)g!9u+ z4(4f0RbdzK=w*U3K~fP|Zjg9fui?Z~EQ!1!swGbBwZ$)=*L>pY_6VCMffOO{IAt9z zleGPnP6z(*t|}(~oOQAC&l~r2Q9-6u({>V{UZg4s`vfeT^m$b!s4K=jVh|0d?7R*9Y@Ju_w(Fv;K6>YCqjWE|^TkbRI46rvI^w)I z7(nVc8>d=M9!j?Ojh*-0Jih1NPHIGn&(vGU)AK(7I6%k0EZ~WGWw#N4 z1*+t$|CcxFRy-C?Fq-&rx^Ob}%RH&YrBR3$$npvJLCjKv95VfAjBqSK7A4&4gE%4% zCRx<aQx(vV{fQ96_0c9N|SD~@rYz&$E`i0Hm||7ofPPd_fh6evb9UpYBi|- z{haEA$R|yj zfnGkFE#{x}=~x1}8IR&n!`}M$pY_Bt-f=;3y2D~BwQ19}fm6mV`>o^saHq1+ zSiWV8fBwp1apin)u09Lktonm6X3>l_Y=rC@ zK){62d-BP`qY49zVROHYMlh+<-p2Pz5;4>5LY_{N+8tBEuK7D>&34S)np)o5 zJ~MX3px8ICt)z|}Hg_YJT?M1P?&-iwMZnLD`E6FxC{?|5%y)#ejpFy#AoOzGZg#tRkh6$h<`vvy+S8n@>;=8$P# zA#I#gEKlvzI<|NG1#HANkn}^L&=2qUU>!n@X9Oi+0GZv?JAd7l*=_h{63EV zH`>k?jsV?SQEuqn#@Ju@xjFJOGDs2=^V1tq#+AUq;voO{1~O?8jTPvCswt94n`Vcw zWmW%{9*Qh zV`I&eK3oq^g4=u=X*XQZTy|TET7EK!y{g#bDQ=~cIyes1GyPuojdDc3(e3r0NxqM2 z&C}V>)2{k_)89hF?dXJ^J`*76xz**m)sqC%JAKEb1EiBLO-$2E0egl zas+#D`-ua4{4o8P)7(?$V)7)a^ynqMN7s99jqHSbwj0PLaF>{DS5Gk56Do#! z1aZ7R{9?zw?3mf+Qg_7N#-)WwCtXD{>#l!iREo!3(wsltcI)do@lqullKHKj+qV5~juel& zq`B|ja?5L3s9C4XrJp#RKasSLdR(5ErxsCLcD$BuJNI%-#ywYGs|BCF>2H3q-A{M6 zznV#&aVZkBanBVW@rCx>$aOuv6Y9j?fRi`y* zTt+g@nriw~*<;hah}`c5_ok$qt{@uz2}mvhP5{ojMNpG*Ndo5QHRURL+{Onl1 zdTJCSd?F@{FRWQ}?Y+k7-Ns*fr+~sl6FrOzhre?B8*2`>A7WE!`YV~_gT`h*ILHkM z?f&~R2dQMiI$)ri@^$`e#M#(nt!bGbM6@@rc95QRtVVYKwOaGSU1rqBENv*c;ppH5 z0S`CY;vEfsvB5u*CtTz&>2F-HB7!Mn_#bhV2)L^V9P356zZug-fk~t{DeoqiF+sgo z!2h-5pPfA`c4tA!=U%qz zS054@XWt&e`AB{vJB7K#SrIoiF>2iR{s0Y~(^OiJ?Esl5=PVCVjqQQ*8ruV8kgpz_ z;Ivz_*+HhP|Y*%*m+bj0B0@6wSYaH*>C7qWAJ zb0euRyiRD=_=~%ZauH8Ac&@j_yTu6Zj|1k{I*#PCt|_k|qG@Ks0tS9}Hd(Ho?Fo9C z5#wz->oeT*Vmdw=PwzJqu*zP9M~rUFXRGmkbT|sLdWx<)F4C(Nn~~CyMY+vUmb+TZ3#?Ii;<`^-OEZ%heFi9qRBrv$uWo- zFE}ZmRw(92BhgCK^uHJ_;7_Ks{h$;-N?TwZXSkJYXTs@UrnN_+?Fm_49S@)D@MSVF z_u6P*Lh0&HLtss?04KBzx39j4LCUx(QfT+Xa4(zEI}CLW1=wrCg2$)u_`Zqw107S{ z>eP`?`>`ui(R{+u-R+2Vjm$j};6#fh%ua9B;w#|o^?FxKPIviMx*YNLxTq(6>tx@C zV9M`m%la;Gd%OFSjzYhFzUngm9Msu`tE&SJf3h>ouI`xy1pSZWxZvMeU|xa7i67az zr`3tCEw5VKBPH^Yjw!0U&=Ehq*#K;eUYIktWu;(_-512K4S&Xc!3Yq+kDs}haW;{-7d@9HI0Y2DvG>46xuE;%69y7x}6iL zKlIA-sovvQZffI6;cR9^O2^Fq}cQClm>JNWeHDiy1@8q=Q?O*fofQrc>j_XAwfwwaO%K<#x5=qFYA> zX3Q8Ex%JLQWRXo~Q+5A*<;tJCd03iJ>|QZ-MR##VGqQ2AZ#UCN&2BDRH|eD%!g^s7 z@uw!CUoAHA4=+Kt<@zwogXams;x2*9rf z)1DDeO8*f-zDh9O*9=zkNqpncBBH&|CR!1@bS+5WdV;gMKaMNPr_I-Vn5-Q%KY!m! z&ncg9dNK2LX8w3i+c~~UY)hghv)iAQ* zDp9=3WVOx#Hb8Rap&k-8L*b;iRxE*~E8jYCZFC-1Ape|eK4#;~CflaA2zjzu%+Yr% zNpDUcq9v?=jfs-&Mn#^47))h*0lYou3@4M9KbdSdq8Zr&cICYtcTdO9Gr%OzB{KM{2e;7bj6=;T|YfZgLtq;5!cthgFs)Wo49RD z85>BW0m4_z3r@Ys&oSm6{NU&RZi%btNyaf0!dEBa9Ovy3zauWeaT?_EQ2G+VgbF4i zM@Ou$8reW62a4-M!F>O~hhlKC-8Yb6^Xv1O-kvSh zTsn8-g89RdmaC3C1-Y=(uHDq$U)j9qx{lWVW9Ht{-5DD;K2cn&`=<;HoD>aZ`rNQ` zl4~HrWbm%B&C`aR_}Ri`^o=OfNg|({ws_?T`4dhRC(2M)yKQTDt1hoBPg4^Iee;nS61ZMEbDEr0<`L0}8&%ctrtxpEs>|js1TzHM4*J zO$UE-z2}4dx?A6(?Xt`i6b6y_-P_+)I*6x2*hyWQ;_IP;NQf) zHd{O$VKBw~CY&jrAl8sR51g*A=NEnLyV$jxH($$I z5O+*ne&&qo)`vvIC8xm z{aCezMX`cqqsaC6zQeUnZ<@xW8&+$RzJ)-yCpGUHR@=C##v;gi!m8QTRctH14PR=t z^Wf%vV$(LpwrvW8BmUWI0M^X@1U1x@-cmdH*#1cT5{|86eP0;o5qBp#Kvwm6jmelO zW%w9dX3dEFBKARdHtpCg%XaaqsZOyy4PyJ&zE#gYw9yG2DUctycFtfle&w=dSH`1* zb2^_qZVO{uj^iP`r>e$RCD*9pbru{>n5)L0Td`S>1@(n5ZPg zJB~k|*oxzizoXBaY1GHit+vo3965*P8j+kZPvLXptK#EGPee_BUAcx~GC#W1Jd`1e zN7qlbV>*e(E>IM5<*g3m=73A&UyrVfJ=2L~!-`lRA2Q50>zQWXg5eMDn~i>(jeIxP zE9XAotWM=9`$O8Ptu$e_HX`R8U1xSpu0@e=9(7l2=acMv&z8xQQWs3bkEj($9ihwz zd>?6}UBhoz_Zx?N1@$oTNj09Btl6W8XdNZ`U=;!r8vgnYQ4cn7+MD8S;uOpN`-s@K zQfM5)8C%>=>)F{I*#47_pUC)wn*FPgNBBadJ*+=*ghKGQTBUX! z{@$}as6K9g>I=3<)eTz$n|Xv!K{Ea=*yqF%+*hXK%8?pJ5t7^~v^eQ_VSsc{T%H;( zHolh4@8jC|h&SuyxN8Xy@q{xvs5wj)eFk`?sY9(+n0lIGQk`J<Wg09g)O_-E2#)BGCGZX}2B07G=LfjEGPC?^4<`tG`K>`G&8&|H~Hk0Og z+V6{ZvA^=~ROa~?Rs>|IBm7%U#3PW$aaoL5A5orkrie?MXdOpMWQB|d(v0k!Xu&&e zv}bVOg@tzx^;Dl)R~V2S-_Vqt_n8}MJGt>oUW~KbdiwfaHU9MKK+Vy%v~}nFf7zKx zKr&ib_tfm3p*!npf3atDx>hj$?2x{pWfiPUHf>lrr)ZGt8K@1s3jSAnPik%5Iq&=j zT9>vqXv->&R~z>ak%TsySSgA7q~K5wc2ypS#+0Ddq+6#w5MX_1K1+LUSTXZ04NMO&g4->Clc~f3KT=>CUz`Ws@!{ zWF&50TwwyOhI5xMKNmySnKz5#M^C%+tecs5^O;aSG;xJ)#tlQJtdcgzrJ!E;v79%zngoX}~ ze264W9duJeStyxYS&{oIkFsuZNDqYXXaUaoUHUAV|R-yY@w;-4xr zO)Sl??U+UkjSsiw`%FU^^NYfTl66Ref^o9<8g#-cSIbf40@$?rvsh{1Rqz5;ZiM2tJcXvB>(Y^B)m8jfUwF8Y8>uE(S(7zkr!#^YK7*TL(gPP!Li_pnjTX7v)1DOt7=0%?} z=Gw?RxZ(&OXEt%npT)0<%Y+#Biiya8z7U-6V~A^+`R!oR{Pwa@;9t2PWgICp{-GmN zs?LO0g6(4dA+JaO*(qvXJ>_S*$NNx$wFi^&a!<&Sx+&xhbhW;)+S5C&*R%SC)~M6%}f95P#RNw!AmJ?I21p=?7#GLlPem&}%=5?e7T3^_%mr7}8;)!@`Yy63X zGhG@AZGRy#m~wd6TYk0)#tEDui?~gKkoy20gdauVuARcx7mJE1$dvN9y^;o;f3lmS zOHQ&i&eh0PZqzJPu3!aGIFtt&Gv+4?(AD%0yyD0eh&&s_J8qu z;2Zpc$-2k9QX%$#DI7c0a&aRTxVWvW>R=Z$2UNFGv5TEhrEIhM#qd{KB3T&a1$aQq zXncJ9Y6pnd;25X46lsue2t(X%GR-%X5I3)Ee*Z5Tm~cA6gfljr^wC0RXW^qKZTRj) z^o&F!!I> zyL1FDRfi1$PR@jR3MCU=iNvyGXM%+M1erSgR-!XWZb2L&yc3DA_J?qi5L?)kr%%ff zVx)+On3NMN8M|^5ido4gYA<|K^hsG!e2oMXWlTF+@ChBFsJ;CaL2MUQ@n<01 zFz0JJ*npbyV$P#lCXtx>J{`ODht-Aj-U4Jdg9whhT4tv;Twe>VCU)(OF8&IDf>88ou zacAp-g!Xj8*}5>1WOq)vps^v8)1GcvzNmxT*z1b(?w&x9uj|PAQGd+YdUO(YZfj87DW$>H*4-Smy2yRA z+<`Kki1E|Z|F@M4voff(Afk=vDtFAS~ zxb`{xpKr=OpZun%(*p3F<2g6^PNw`NCJm$+hABe-yy>eu(V$&$lCKuXR}1!#Q?P48 z;7a>+ni;gcDicFLmO>#x7$JEW5rj}k(h5-Km&6dsn)cU9e(2r=|0jNi=7&RLazlEG zk(){u-0n&iP`sRn;@GdsX|MiO<6A{4Uj{exNfR-QxuTgzP%tqY$~rAWoS$+@IOH+7 zG1HKz?4#7`DYI#SQ?L6&6ivJvzDQ>Lcc@{>5$2h~={>AFht@`P2Odmq)L`Z~yk4Bw zc9N4C70raLahvueWgSp;#VQ{JY@f$b<9NGnJ6b8<5zgce2o+4eg!H|RPAeqHI{T?4 z0b2gqD?k416`mW1j_P4Mq4B)LfyE*03jK;s)@2e16hLoPnIl}(v#z4T?fqQ z(?e^hLGY|RYo&+GRW?4n+vzHFe zb_8X+y`AFCGkN^ud_O0XJw*#Qg`2}2%MEd-0xqRtuRvEHveJ-EG!U{xGd!9xG|6->U>mS|}iXlY5*XY0vdM;?LGO1*aRlTf)X zSEX`Q-xsW0b079ozl_t#&SwQkaZG*KY>PRn=YkCMU(<8<6Y{}sSEzCs`qrra>iXAo z*W;O9o%U>X|8zS4Px>b+^VP^{Fz$&j=T{s)(9Ex>;<Wb1BSS ztv&XB4kb_`_rCTRdFjtO4{7%e52IrbbsA+dp7W6>Rja6`tZF8uin(AW*ADoC=xVrj%+H+I;`Yv6oo_nskw)))^HwaNwC6OX5nO70a z{RGKYtM>Pw{6zb^)r#bweEkWYf8y)($S*fvAUEzZu8?C@xov>xtiL`N;P_WYJ%|dX z6Zo7?qZbKnq=5WD%z$_R1wHtoEpI%eeXk!m9zu~VxUlJ02eoIWBkmw_Y(iz)UVl!d z4xZy45s5qd(ZYw`*n%8ewD%sug?{a!@6j_9d5Gqdt*ddMGILqR7m5etg5MX+1#_7c zpAj>9rF8Q@*lW3>@%>wFdA|`|*`O_uqR(Eo|8z7hwf)5_ZtH)32U!u(zsL6ekmrB6 zH`ds+e8Km23~%kxo<8}N^RL}}1|q9v6F2&s!7N+D&Ga^?!9Xu4&fr;C!rCE=AX^@`o%PIjk*)S&MX_jy zc#+Rruy%t*k@38rY3D_Lk7mxd_++#NTPp7c|IeJ2EZHuE8!}NOW)c87gebMK7`ZHp z@^G#8*Y7@art+{wCUcDoOIC3z+9LZb^HBcxk@K_{=3|+B@CIzLRO4G^swJ*`hEOui z2)5Vc?fpol_VFGHm{LX9$os5{)r#HnJ_&h)@>b-Dc(%zwFEZ0F*msk}W5-QW$SZBt zw%VOeJGyqO1Ps|xc`#F40475+pmRgWULUx0pgo=I%~j&KD}9ia`~VU+_f)F1U)OxBYeC;){(xR4`>`hUo$~ z21Bg+-N<-%Pu07BI$Jw@_Q2U_0HN8V-c2sdrWXbf+rPfa-@!NNIILuDY^yjQ^f0-3 z*+Zc(kkvOWBHPlGu~f0h50uW;-NawPLbd@bol8R1fzCKdMrueo=_DDHe@UQ5Wc{SU z^bowHpFD=IC_k>E6HZb>>>*H*CP74{Cu&&cMwg-UbCiK8Ww#?E`(2-rc^r}D!%9TC z7&5)>Jth2^IsS(dR!XvbF(@)@druy#n=s+N;B)Q5e&h0yB5-h=n9ASii~7jlsBbq- z{B1sA5IH$U#0V4S;1P$i&d#fKj+xtRbs?-=Vw*T0K54#E7q-aR^X=FlwO{Kf@0I?G zFievs-HY~7EG(s1_}B^LEtfcl z`umq4w4}d($ax9*(g}`5oBH}TEpnXT^j>PjFZDW&bUdhop_Fz_D0N`CLc{zBKSX_2 zHB;RV1k(+<7x;0G4V z2M@BNu5<85uanu~I=y(f5=X-f>zQePkC`Jv>i# zMbYxEsH`2QoBlTh1753HvBzA}oLRRtIN=pOwGbrO3%{(rdfG|Csb`@{JI++K9VS1~ zlUbg=K3;IeLXe&>JV8Bk2by%|X~IdTX|FzG@)?b8u2{Pl%*tBD3i?T*4D7-=b&QrH z1)ltJVba>2WP~ixeZ|6tger=%6IN`iE@5bp7;x`_-lt0XWnX?0$ z3G2|qvuU=p*^fWk9N}RKw4|=qpXt%H!@}Q0Um$jdkX7M+lgMZ)&AnjJP zfy7JmJVCTUFUM{85i+9U6iEd5Ow53sLWj&iabq&6L)MfBy`#n(Txce^`O%(qHN;ho zAzt98v?tN<%WBkPv3(-fL?iMiHjBI7`z9%)4@&xR!zT=HzT%UX>16}1%Y?Gs>fsB1 zR!lX^n*b;H~tD+QnOBrp#G%jbG7AU+HP#3&j&?p-z7=DU}3{w@I zUws=NBh*DN;FYI(lGOwT8FSeRTRKbCrN)|mWk%yDj2tn69FR~uQZQ+B@<)U6&AAT8 zPKDZoy$7jVOmGJz%ny;r3_U;%LfwA>Djp5GH|IK%j)Gwv2EgW;4!eLL)M=+z`P=z8 zmmnnrgv5Z5&XFY;I3mm?wNdTm0$Zs<4d4$!DS=V|*C$}^7K|clz^NupFYs3$rutiqvmq>PmQ9#LbUV8C-e9R@6bVvY)nOMJWGU{2o;k$X$ zD@+eRqxyX6I~vwATa= zSdr*b@0kWlAgZw(D=b?2#>(4Zu-|ryc4+gEc;b7iIH z8^}ZT^$#3%$CO^@EMtut=I2Ph=aKglMH3I8}+F4H!l7Fx3sjG4I1L>@ByQU;OfIJSjFR@Y@Cntx~`j4HY+B z#A{FW&ckGmVpAKFO5s?ZQ8sjX)GcUG3}!P%(U8 zd&XGNmR$}um=;$AW202eBOQ)OW9>!;8*PZUFlSz(3VB>0ZBfdzzKKcO9KOBMw}9sV zG5PKm^gwf?^n%SO3M`;N9K@(m# z^$+TbtYT6O8eAr^Y$=Diu^_1lyUS(k0&QQ1-)9fWQ$@d&l%y##Z?%aQpM5?+5zM#y zEP`ycNWBud=obmuVhe`tpeWpBbGhsRpDiqRuqQhti=dDv9rGmzdD7vtNOpmjv+T)U zIb`?LHPsv)X$XhYR%?B(GVEkY;yGvUQ}UHFO|vON10H5@`{;*aF?fan*j(fXW*f$EU(* z65edlr7vN*EbR>jCD)FMqdZCVRwJNkF_XQPBzx$p)qai=SI&75qEC60%{+LB(sYAu z%+V>kjQK~A{z|&N7Fy_l`Qu)v^IljI9oLp|cFD9*!}XE*dSpv^LhbN z)`X0R>nFgG1v|fA^Z(5!2ptP+-Lc$S?nLf1u-Zx!x)f17jNT~q&exj*8I#U>WKjy| zK=toHH&0~q06Y;y<@MZ%q>PAl%q4u$`L*)=bqifRtJ`)BcMR4ytXkdcXt=5|s@CNP zXV$9G#&4wTy=#tZs2}VczPNRDuXEx0c}ng1YaNpuoyRVn8V;ekIzw`ezE)mPLx}?P z*5DnY8EbRX<4|iruE+Vx~1Wk73$Ef%sdV>5c`Nj&f@&|Dt zP&x(HHyEi6H4jBY)CLR8KCmF!(~gKITo?9494Uw7K=dl1JVH@KPQAYJ)wEr*Pjb0k zuKG4x$krZpk+_+7a>)z)@R-;NzHcb5Jl<|~eV&`*OgOg0T| zWOssNA)6gLB4SV!gHA_C5Q1VP>^*vNRUtlplM(!->Phb+3 z{AFI3SmxI`DCd0=*Gu|DAISJk<|J9*b7YVi3VfnIko6}!!E+aN$Pn{K}+W zHRD&}s4brdkQF{(EDafOGWimRPu!;!$7^q#FXm}~exI)463IV9CgZ5JS3Co(8Kcp8 za~;QnXaZDozJM}O?X7dPw|K6^flUG!4$PUd5TS)rN?(O==Q-NGpTj!+bI9ZzpX&uBUJEdFI-R4F)9-2)DT!DBjs`gtS7gielM^8ttAT%LBlQK#j&58>+v6-_+0Zz?3o!(RGKH z=c90Iwl$1;2XpQ)Mlz*KC?;)F%WA<_{I7TFq5*+#c^ejoFR6s z5=MRu_46|_G3|ir8k$i4c!bl1j>9HFdP;qd$Z5;g~LNUB|{FwM1!9`=F)+Fuj8WGt1z10fxf=JvA4Hz zJuZUR#JoY%&?db3_Pfy?b{E2nr*+JAqAt`vw*zrzY!ENW(PVBw*LT?pddO_9FsXE@ zpDW2c$y7niz*8wxwzULZVr74pF>3k zBu%;-eZgLjZ)$~!wzUl=r&bzoYlXP>pm(&R@Ez!SdgWxmz5M8N4~>u8K+g@{9g*3) z*>}*C>eoX=dl6j^*R+$#5r@9;z+rm1SK<-S3`pfnlXW*RUp=}J7IhK;eso?cz(Vyf znUo)f3HAcbaPABOnB7$5{IEj)!agKlNZMO>05k&VL2Uhb26I&J*u4I@%tmiWteCaY zcKZ_t zrbkvDYC!V|4T6r=9)V!*AO3LobyV;+dQrjdG(@D%zrE!Py%|x}{`<9?(YO922!A5~ z+8YNSLieMf-LCz&T;tZFI;Z?ycMWIYHQ&f1u8~^{{_GJ0U(8aUD=xsN7Xj3lcfxX# zQ7J-wCP`=|D+oEstqH*&Ot+&>U|9g$JD4TJVXz0Bf)eTzBDp@?O)YLj>h>(nEYB%% z3IcdUjndJ3O2z^L*Xa6ma+0E6YIh^#wx7G0x763FXvv9okH@~sTel942wu67M-I0G zDT+^UTPzmQZxeVNm1V3576~OHyvt@GDe4{}T+n`;-Dh`c7g;6?IA=k-Jz+OmvC(;ogn4(Htk|SBY!xj?kONrc5lXpS z$jbAU&SoUZ7)y$5X?F15dnByv+T|3I&MWuW!d^I`{y_FzsYJ^BrMt-7>ZbmEseSaQ z{@WE4{Y(QxM&QIen9HDwb8``Y{aqMapC~o*MbMYGXjJ5fp4HB@?LuFhch2NpFGB6 z(fuEQH^Q=-NE^;gq`rq=)SNU!e?ABz*%7;aLQbvbtS-jX!+eRa@_xv z?e96{cF`ib6cn(_qw}GfTwOIIhTN!*pO5#evH`^MZDX^6Z8RHK$pPlu3&$qN2lFX> zJH`5~rwDL_mSCX$0F4Q=R&F%bY__7yk<0dEQzqSx+f)ap3umd|P$T$j4Lv;#rL(B~ z0quFJY@X_PGOt~1IL-lc)e((Oom8^D6m_RcA2XQ+wx_xeKV_(96o<>o85WAowu|r9 zHLhmr`(lsJi8CoOLs|vqz5wZ^@Ox6dK^~Bxjcp#RcxENZ*YQH~QFmS3rTx=%*N`ub_jnoy^~GEMtS?>0gr-=O&oh!`c}}6~DsBlUEF88Sl5t2gyBl zSzFFWX}t{%_p z)i|bOfVtjzm|@1{jXqE;b52=({E+_%KbO!bA<~{LI!e7EJ4~_;2nw8@j0>>~72RBL zr<@CVlEZxZ@arv85SsGMvlN%phX10Seg65I%c(IC5#T?Uic_ba&CfY}Hk#6ci!D?7 zT}ml!bMkg=!|K(yXdjd0JW2IB7CF3MMVr!T=b;~twPXx4sUTdsjkb1{1162<>_-&#Rc|AW%O{s_v8zNwp#~x)FasXpbg}yBCil0}VeH zr&LgoF@>20Fw^n?iLfzcn-lvHj-bt8gInU@h&Cf9sbOR(N=SY}CL>BbP?V*|Bw#CP z(W6VTt4xdJH&u=r-)pB5#`29{U%r5 zlkCTT;v$6loK?ZFr5?jF9$lx&1FD;<-hHW27qxJ1NBlTx&*Mj_r1B`5GY^!_gTi67 z14<%2;BZ}c3n?8h-Rp2(d;91#yX#tXtux>vW7$P$t?4fEis>$=(^Wc7L~g&h&nC{j zNaQ^}@d{a(i>x&9CPkQgp@=Q5j;|W8*aPxA6zm zw+K{QX^+eAf-@4}9W+VnfyTRwHr`%nXlO?tZQZe{dn;}G0jYy&z{529sE5{qZvPQ4 zGc!r)84qKehQ{Nx^F#PHny*Tp*H`kqi8kzmcGj?1zSr)&_KtDVwqiB}Za_{SsWxbI zj|Yxk>>#y+x6rG97^j(!5(&XC?IURy37GYVIm|BrU%(Uj1@KW74N6Lgrg(6I^o$;- z)nnTSCXj@80i77r6-wc~xM+G|O+$a7kgt+7j*`cIgRD&;^EiqdZAu{O4C+qP}n$;P&A+qUzD8|UAz&i7ZHi__KBS2J_bRfF!Qryuov z`E>}rGj=Sz(Rr zUQk;TvFnJ)NtXoYexhQ+#VVl}#Ju`plEIC#fFFX`6C$;w6kSVp4JfHa7AZ>;J^={TEM6sWO96lK8Soe4S zHlveYw)jFlwtX^;RxxC!$A6k2I(gNP75bu57Wo{Dr}Ox#wH?J|>w92$O*A?8(5m&c z_$X*_zMiI1)MW1IKbXMFEgziQ|E(hEYfbaF%BKyB1-%x?NSphcMJ#$`o)IA~mPt&R^%wQ!3G6f!EwocH%_PxFyn)U+<#be>5Xb6(oI*8?;6;E5%kXJE}ckmaC z?HyiK?XXWr4}@5lx&~NH$~SkcSLVNoZ}Xy4*#}N0e+>B}M>FqU9T%OBb}*{}6ontC zPNeF1hPm@lVq&@Rz5J$imAB8PzTQ20C?S7uccz?6r%EW}V=O`!sNWW#*A+b@?d!5A z@333y%<~d3W6xMQ%V_U4r#`esF|EZi+p(8+r>9D^Qsz%z<+ZD_nmw&$V%`)t2~k^a z_KIX*_&EKlbiIA+Hd>dioyu1UiEu&s2oaMpE!I zM$6-~0a`yMOHq3s70~`DN3it_EO{uc0mmu%wr`|<-~3gObvYI4HRW_FiGw%k$4J2rm9%0exm2k-dK9O8N72$D`YQ#^SO`bHmK|px4`ntMnF8 zL33cbIeLG?14bk8K~GKiSi}*mJxG7n?qM%Du0s8ZV}*!H^PY7`-57mLjibbK3vn__ zbT?OloumHcr^>UFkvPCqysC}E-6M50Rehllc{HXQ^iX=8cM+$7oV2T=RO@c77jb?X z?6YBv>0Ld1PI4UxZ=2Gv$sA3ryHVnH2$@sB-b1WCl(k_ zUd^p^GYMAV3iMJt0h=RHRm$E%NkoZnfMBtK^?2aW$DPlKThFN~mOaMP-QM`$WjnUM zTGXlU#Cf^%XjsD~^uTw*8#DWr>b{Wk7R>)7m0az0=eRbmPBV_t>I&g;Jx4=~`;VE= zdi!s=UWcUhDlH&}HJ*kq3^I=UF)C0lga;yqPa&}{wfPKAH=Nk2oC--v;DR~x&)`eh zB?+n!R_(tpAZU;jYq`kPVj=NoADMan{@;?xo>m7FQeFZ_6~LDL>mi<2%=~O2T%<~z zZ>=|mV>V@EV9TO;7EIk4!e@tpomH<$Q zV^m5NsHb|5F=1|&-CbwR1RVB`3qX#mr^_jxdeRLR_p{kaRt%9|!;Xo zEM|XV1j)rk{P-chnuXvCR+^RfMAz_GGHVy*R7j)C*>G>78FDIDihKnjtSOl)Qr*-; zqXOPyWF{Er&6|#Y*F9!LM7^xY@`-(*Y>L0-P_{bdG^Atwt1wLTY>U34bXlUYW8JrF z$%Zmq_lQ<26uP^dC!oppb(!*@a5h4DD+qjGI+cp6k-EnBh}GqCh-and&Qlni$u$z?;S%#8#OAQju#T*Io}9W5;|Pw*Lnche63(v$2w5U_16IjU=16=&wf z+6;7qs~qQcOKc}za`bSQ^9aqmsO(2z)UMMzt~)4mhDU=1T{SM?j6DgT?(VKF(nQ4a zSq-RdqZV45{xfM}J{mCE8YlUiRfkjftmX_4*zXG3Z6t_}_=Af5&Jo(CfJ%#DB+lB`@}MXDVtUoHaX;iX(jEr8ofq0ynS(hIRZ=oE^>3} z`#80Q1&k?@FCOh3zWMYoCdbp+`Cb-#gD;4xrB1t}YfnR#Me7#-zib}O{&nP6`$w=4 zJN;yK?w#p$8cj|oQfk2DNpIc4s`zsmiVpK!QnqH1BaQ71tD}@dn-%vHm#pktte3}} zo49gbM(j5#@-?4Fgi|d9&1-u3d3*)F`gI7PAE)Y{x;~(1XIYaPzwu~r_nt~C4iU}^ z-^YtYq1b+3ll2I3Oep3~Bk-k{K#(ZH;np#~aF|Bp`H4?&_)H%{>{XksrD(Dv<;~=1 zcbbpJM)x3(bX`om$-=Vi7DJS2p3U+Mm_vu)^TOO|Q9d)~Gqf?}_H9El{8%-|YevkO z5i40?&czR((c7M>Z?lNTz1Fk6X-{S6&;IdElUT%=oplt!WVl2rLoABFn$W}lXsQwW+41d!!q0fPH@se6oH{$N%JAq!*IE7bg86z7h zO*W%32U2fsqA3m*eltXpxO3kqZHDWQJ7*KX$O)5$I zjV9`9BBp(%xt6=K$!Ig71(dto z_)&Q>Rkyjb_|)$vVQ#jLwDsLDlRR=v=M=L1om?CVFPwZ}oT6dmW?4}74q~}x*ZH@a z-1`Qh5jA@bACwo0CZ5Gx8!+ZAVyx8^=QaX_iS1!?LZZ4t;OmHmDQm+5!!>Zd+w+I@ zha>&frgG3+`UEzVSU1UU#sVTouKUi^y>zldrZDg#xSCi+E$ntw@Jh0+_ISdAk`1Oj z!lc~QPJhHnGISTtsn(@K`0BHhKjh4%rs}a41iu_Lov5XCcaV`k-BLogk|sIn;#pA~ zM3W_J5G~s$F)Ay0C$Dh`+E2&DPA72NFy1YXJUny)!=+*Bwux}9mk4X0ejNJ&dXw-t zfmgVKDXiwl|*ec-!PUZKQJ9T$w0hb_7KgijcT&0RgznS|IJWWW`e)9Vv%u z-O>$@z_32?7n#`FM9Z=67Zo*yvt*-u_)oRO&j{JqT*9!5{3>ITzm)d2n1 z;&kh)s1XvsIV+sTsEs13M3ODphvKw!qkgjnogMNU8o0_FU2G!<;rArIyG)PS zrQd^a5Rad8E@?jF@uLKa>a|U)2HHkY16|>%9PFHS;#8_o2Bt?J9Z|H!h;3uhxUC%l zu2=tOu~&YkG;;HkAFE@Vq@P(|!)0pNUD4Ork()QgrNH=`CjL1AQO8H}@~cCif(>J8BM|PC!!@zPko^1Ff7^XbWeWNocbNK3lea zvsSg;@0JO-wqW~|ljm0E^Vgark9o(hZG_vYZMjYY zA4S#4<-U4n0HZ&1tkjM5PvdO!do;DW-B3!Hs+LHAyz^9piHeo;o=J{?b&E zkeH?C75(dp$j@(TEmiipq^ITrZNI(oZ8=w+m%G)?bbgehPs-MoNN@EY?5E;wFNOM+ z%;^1WXDUT5WR6g{oJ#Km@t0+F{Ln-)b&#A(-Sz!g-<_qz>%GJ{pD)LrEZ%0iRBQ>nUx?xxz2wY#!a&XXZiTY({wR|7}R>d+{+Wdaz0rfABZ|TqcKR$P+kBKF|EXLkf zS*lg5&35^LB~z~X$>Oh)CT3Q|Dwk4rP(DV>g=DO~U|AuD9%KVztO$+Xf>;?6WUFGa zFBGNEE}P#@SBPbF!xm=)2K=rS{!L6d4cf;sfP`L-^f`{MCh4n-S$?EdWzAyv{Wq;n^#gN*7%Lt%K6HG2s$ zx`KaFmSK;HhB5p+VJ6}KEq*%L9jNWP4Gq|94Y+Sq5oVSVmy(Jlxml)(A+D5wDEVaD zaraJY5Y4!iatPvFI;ZU)g{RYU2_fa9QvW=Fi z2C>D|AicU1fx~Ppy44gAYnrV#68~7_33-v9zrQBs>%(?&0g4;KnGTRMN2);UtBou| z{WHpR_OECmuyNm>j`ep;eO2H|c`%J(hd6P7z=U2q zBvP~sf9`EdfE5r@~GuMtmxaMSY3)a`=oiDbU83(XXh%FTA<>oscTSQIV% z>a`d%C!$zxt@DW7^z2?jqZ7F>R=S3gfX|<_wA_bhwWhE0iL!Fpy#Ymy0V4LG2BKF3 zJUCQY{Gg^pti`MWM+)4_LG?GL4sg^4MT`>3URCy!%;k}=nl33=7ulT(GZ8> zl1wgwVee~d^a7$K?2PCIUl;iw#9VtVi%hA|8V2nOASpp%6_NDfzr2WJWqf{pXLFAF z>Mx%!7|cs9dUghlbkR~GdAt(b(Nt4}0sDwwFt^r!Tiwa<5ae$bxM)UlH-n$T`Xrh>G@87|=yFi}kwrHWp56 zCT2KVRFRs!6}!Vfm2NWV3XLXzd|Eem6KV$)^8I@IW3~?35(p{!LJuV}!C@hkm|#hS zdVpR7N71A2dZnSdXhd!P#Yf1y(|7yw2SUxEl)?J&o$h3@iPUXqP^ZH(jNreChvP4? z)p;`)zsGhh*1oAVY}Hb-yWdLW<<^&3Kv6rjuW#cRHQzt?4>jfrJFbwm1k&-BHm(P4 zFicxuc?n!9$ht%?a)g7ULyXmZd@u?ok-a4kH%-E)OK z(zEj=Snqo6Q;#WIW%xL&{CW_{Yj)rhUHI^gzR+5dYx%ke=~E54+aEU2hWfF%1VcZv z1c)B~7dLQUZv`)@#=red+LTE34byS)q64)-eGmKI?(VVW$mxG?0u2{($A`)*zXe;U z9?>8a)lns#cty|Ef?xBaB%(c`Yme9NcyYbop7`{<#Gy4?-?*hu#eMG(q$u>Xe@3{0 zbWZG}2Fz_}VGWr0u6?bZ*TR?oWYJmZ8_ePhs!&z;AVq+)alu8n+A~J3S=3e3@J3$;R(@~$NnYw zL8iLD8E%leadztTIZJ#+@MDu*tcEYe7{&|j2)`KoS@p$linH6*Senul%|$K;lU%^o zI}?(Ok(?DM&wR__bIt={Gj$p%r;`2GwH8pVSMxR*QS03b^J!_d-?4dVb&F~(H{Y~wG6ux{6}hWvaV zM_Cfk_!H=;91e(Wj*=Vx<`#$(bR04)KqO%UzAIM0YdUaP_ER{lfpwemA+zdIBU|__ z(Xu10gn6q*^vsQ{jamQj18F%Hqv)sGr=y-nsNTn$cso-xXQxeJL2T6Uy?`+g35Fl87%8Q->fvy4mxh>bPL+ ze&eF~1++u0LwjI;wk?s$Q=~?@w$rwIS!zRj{MEkfyj-jy(kJB$LdOfc)mIh6nGNKlwi#RmOV= zDNN-Jl$pNR)RME4-0@*UI%o!e2A6R?GN{ZZl2N1R>*yk@72kgDwobF-eW-?#(bnPD z=;bzF^l3Mfxt3K}AFa#s_E@|&vw({87c_rG_TQ&SoNAObFLGUEJ~| z&0TvWYi{t9<5MQz@lUe`l-i{98(=y#t}AR@%2%Xk1*~kxNQEKHaG;+#M--=Ut*nLL zVdhje011w)(BU!J#QY`}orM{1jvg{)-Vd+TQ8aU@zovLM9!^m+Ie&%hgV;zbdCeb{ z0MfLkP0}Nyvkf2qczY>D=+ zt9gWWk#0f+Rml)UWunk~S1bu^udLIBlFRDKEcI*d-QvBP_p(YlGKtbL1lGgGZMjSr zuOgCz#LjB-N-SAP_k8(|5z1pQ9eio;2W)0eFHiPY5qNnUL-P)DdN(`Qzs`w|L!B3T z{=u8tO+6f%(KKuh@QCc>H0Pz18zyxW6Sw)E8KPwbzdqE)s?nS9+GhEsK0pu6VDHn~ z17^Jt!?U<~vZea`83hhu!+lfVGbVT>=HO7X_~7s0PFYqu`?z3qP*g@@&|@T=fEzQ4 z+$ZFJ*j0VU(w}>(D(@bAL>|COhVFW!Llt}`RnUgileO)5Rc{pco-6MvkJ;NP_Y<2z z?|MI=qr#1{ImUz>gY%t2rd`Gymct$6ROvEgR+=v_67|nc|IN7PO5`^tE6jB^6Ui-~UK91*wF} zs6xYN1nO%hUSCS3A@nNK^M@Y92LAC%ZzH3j4l z6uzTjb|vAYUkjDfMoOMTf|Btmc84e~6l>pbg;BrtSt##F_9fT&8V)l!g4E&{r=PMel+v{YL{FiIBbx zQIYI}PYifaD6ah5AhVE7Y{Ydn=Y0Gh|`a7Ygt+r1$Nz zs|pb1RtsMfE?!jd^`H2gD;|tOO+Gzw3Eg(!1KX)I-E(foHh#t(sY@P>fl-5g{PBRZ ziTe$dlft9$=DvZ>$cM&i^a>7qt7H;obDsL*g(!!fZp4`*`=Qz#6k-_{^B{*{{FpDo zdc?P5)b;-)-V6|b;{AaHPJ8KcHTC zj>d23Pkzx#j&AAL{pqzzy#c3z+|i_Wr2)E9XI(jxeK!OTjxL8YnJwK~IP;-XGduyk za$2U=%n&o^Fap*tjzUkh!N9MK05O2&VYze}z6kxJgeY;84je5O2^4ipx3bc%-?HGrq9Ne z_XhxAD(&}3rSHSG^CqPlZBpKr$6tOftS6|TYI+xTPW>eC0aTbt#DlR1zGQj;5br6D z%^h2w2ZE#;+nvalm~G_HeIp)Rhv@I`JUL41&naGzcS67*HY(O}w92>bwR!o22Yx2f z7laJGi`01SZ-Hc65;{bZC{T_N1q|?Pb@ZPiD*wW#2Z*x2wO!q_+J$*;#NZ4QEILXF zVkmc;X@6iuanU%4(*($bKN*Weou*25I`2ALwAUo?i`0Jv>p&!X7Ot*4mzLKCRlGS7 zcXh#jkVEp!Hx)dFr%x9~AW3Bs zvIs|zHx&|dQ_mW-u@NQCq7~Qq3;rHK;IW=SuuSI7=|QuuDK~ziO{=S0!Mf@bb*|eD ziSqg{n6n0A*}uRE@s-C=hPeo!h}{GdM$$BIE4GZf2k}g|S!N!UWJj@cKHUAC+FvHrwZIjkn4Ai z-_F3YxzP-G8`BW9{5ATZpZ@ZlBX}D7$3?-vN-h$p0)dVM7kgwl5EFhxd9x_u^=xxV zk3b>ppOk31%rceF7Q*dnL4wOCECqZMTDQU(-tEJ+pI@Lpj!?A0U_H|a+IJa{FfWE< zp1wfaDEwHgUS3CMmL1e)btfHXcBu}RgqV|*j*q}q*OLWFi1uc71Ij5bdKnng+pDnD zpZe@xJ4ATSj|sGN*VN5GR%3RNV!1b1Z-fQ5L>n*?Oq0N0!(HqJ9#Ro8su=wO>aeUf z|4N4Aj~>T{?H^#)Y^8GrCn6*>D5=ViNpcY!;i)4Iso{Zim{58r?mv5X+GKLw96$-Z z)42kQ);Eic>{%5@psKcd3o)KhTL8sGD%Xwy1yYN@vQ4o?eoblrGkn_i^<|$V-WpX` zwCSL$tMOs$!Gb4|LMDUop$nbzVhye* zb{e&#d;>&@PFG_vB2X5(< z`Oe&_q&F!ST1k0hmSOo?9K11=>UA%i9=sDHPLwm;Ws~1s`6t=B9e&wv+-BA;>&UF2 zv678iRr6r*jtw_Ib`_?=P2k2eTpgp6ta?u+jeK1NUC3m zp;IWQSQ@rFF+)D%>0^6A9quM#IV|msy2Db3=gVdHJBG+8l_u4r=jJi>pyGKQ!do&UiWTP`<_ReP)N z(5c|M!l8-++X7HzEE?vZHGJi{a*Eo$z+MORoy#8BA-699T`r6#KRwq7K5S4R;8suw zS8GH7ayb0NDEkGtKQ&xeVCP;|uC>lquEca{X1216)uN3=6Vvs@ zkd?w(@+jY*0J7* z#_|(#J=c^;M|2OVJ(&YUXgv#$Ivi6Q#%Sz>BNu0H>nDi#O(M^rZw_ z6$SY_F{D0|(N2*|c{QG#FkLYlW5l^F>2eK-J`{IZEW@O7ZpnWY(GXo3?9Ph=+1z#) z-noXbT4Q2N!@V9-^=)BPjy2>XI+0Wy5md$=BA$A&1ZA*Z_sPD??HeLgk7Q18wjlkD z-WMXKGFwDCb};(+w%4R%?k0q){|Z6FC7^)xVxLBl;O+DO`5uY&uOm z^58|SA%9vW%`0yfOIxc=Jy~(e#gtpynOa;;nA#)e@Hd}{S;-K%P5fn@f%irK&CdT@ z3z(NzzG$@(t%n#2s0nVKdl&sW)=04}U-npnQslld&1gf9MfC-eQ_TL}y7BUmp7+1i={T3>K~%7NFpDly~Uuki>(+&^0Vjs}2@_>ZUD5Y!GP&VvYb-ZsS=d$v-pF?NUhnNYnhRTy25*rBEkR#{-@sXnqt>!Gj9Anc? zULy9iLyj4%0yKfK1M=ncz>ho5Y|TW~kwinwnnR|J-u7{So-z&sr?YKyIR-v|3A*~! zzr+q0$6@;z*Ss*{zvjg}F^KG@E^dma$ScyZ64x)0EpJa0KtFZvpLV9zcsP%+tm!zh zqtp4F$yES)q`{N>m5hHe4XeDsU9&8v*(nV&G;ZmR=8oqM-JHHSaRmC9sl?U1pGLi_ zh0&)r3^*x$A`5w!Jxwy{s67=h-_4V=FCUOU%il8cbk5%sk9HgL;t!CpA~3xNzg4Te zey(YR))OGJ<`y77`f54Sfl2MU{B>AKM%5|z`T-1UvI(%TFgU=>6UQh0x~0MoETE)% zA-jNsNrrv)!v9M)hAcKCNz$O0Za# zbWkW{C;gJNH=cPSXQOe zjf`3Yu*O5nSODWAmgy*5f`yDX9DD)r4YRWR*%kq4=~Svos=rE_zlfTz3qtf6!Ah;q zlcG!9OLax?rOUy|zrZY?tY4Xx^8@Hr6F_qY3#Qr{js)i(b&q$~gV$OV-=PCMYVEth z8QLN5n$qjHVb7pW!v7{I52IXV^3*hG85_kAEggQU6^MN7tV??gjes5UE+`6&y_8?9-N~pdGP3d>ANsW@9)9UB^qmlAco#YgtSylHzwKMZs8?_8*+E55#c;Oo)~> zfRank3%8X>>}K7D4MS0|Q!Zo;V08kL+!DDJFC@|bU)Y~uY9gx1a@)7!r@#{sH$;nQ z0f|5$LfhPzRnJT(9*5VF>K~my0`F+<2#%ohrG#t8{kpCtGUM@k4)OJnA?e% z74dx0bvPqSgDJE0Tmm{O;CQ$QDdqu#_*=n1SY` zPgz;Z;@vOAn;yelK_Q7=QWT2&y_KC-qnXs7W*?xEb*48J1q6M$}j#Vb_Vw) zW*R4*+siaBP$y9D&?zh-XX()O?_X4qu)K>+++iTEejOEX7j&s5@Bd-OE} zUe^y?y0TVj&zXy+JStybU~wx>TU_{%7??Azv-OF{; zzRISin{Uj7wcfusIAd|7crctuXF?G<1^-A_ubn=24ZYJb$9*;@-`crZ#Gf33OT^!g z&|xJ7Y~G5gwB5|G*?47?K_{fPwSd6JUm@ zpAdW?4H1R$r^;Q4u67p> z|B5S++7HBy$4u>_fGIyPk^^!mi-r<>M2BenlP!p!Pt#B$2-RGWycE&&yaB)PhH}%C zDl>YGiWEo760(>3lUJQD{ocnfi;-BukXDbP z`+%u`!DM+htMp*67zy>cFe_>=#`zA zi4%rRV3vV{p(g<6U+wE*(O#c-%7(`>L-E%^G|hmHP9?!qn&NuMkmc4qkWDRpCV((s zf`9*!ADH-$9CY9o$l6dNU(P=UskOfX69q@@@|(183MAa8S_slj+oC8Rl16=*7EOoS zx*;sYSwojIuG89pEMZucFEm2KX=yNCnJ8-r!xb#N>#?!Lkpx(ba0(*WUJVqs$ln<4 zWRVbYmQ%jy7?lLri-ECFuwSADAWR~|jZ@ZqdRYsK3acXF*Uks@saPmK$HCQchf$Ys z&Vld`!A2cya`M;I7zo}_jlon82 zFsbsQ~1c`ZZt!uOyhmeOl1pUx10+yVQJU5{7t;<5f87L`&|^kXJvH!{26vfR#9?vf?7uhAl>1Flg>Eja*I&h_S0WV= zh)zFJUm4Bj6Cx>A24!yE;w#}wP5uXh>v#dI_?K(qo}LkB7h0JH0JXq^!a^WlIqZp? zxym$3aPLOUzjm$4aP-z}83Lkk^fubB6NQVbi#!KufcKh8T+MEo2$HS;| zVZh*!K`N}dI-rt?_( zv~e?=mj`&^xeRaO#vy=8LFyapdLW{^%=suzheqVT>e# zL$Sxk552fprN*D)M<6oVUoKrr}l$oJUeAKNP=ZY#O2B#lJs`cR=X^jib2V@8XK z#1q3CwhgPOUQ3bimjWH^;0BX^z$D4`4IM;VJ||H9gdJNdj#J}Hv>Sn+W|?E`xVz#` zCz5{1Y;%1(SiUqeci0E(*&IIb+zf0k@! z{AW()VzY5gEj8&%oQA}p$28}y&+LwP+^j)4dp-d^k?#xQBs_ZVUnv$dXCKd+e?4~R z@AKu7pyEDCj8RAb^fv^D#|pkhl5DIifL6*|c~YrD#)BB57$Ri^ixQX@)|$m2@~hbTson)68n zu;HSa5k&k(u6IO&P2Ec}pRPdueeZ=c7gE|T__TJ*m`1e13P`vYYg<1LE#fO1zb5s;K zbwWqp2p}8_;6Fd0k33h?fo`zB+miCjC=SxiWy9xzayki2{w?|+IRu6Q<_Asy!2pQ? z`35xsbpzc8!vm88YX)ZmHvlh(z=6nuxP}aYe1Kwy>V|rP=7o-fUWMs}g@fgUHG}nn zEr%V1-GzOHLxEF*vw;hPD}w8V+lBjvXNNa}&x7xTKZgHAAVLsAs70heEI`6Tib94% zc0k@nkw9rinMdVB9YkY5i$HroH$g8zzr|q3XvBoW)Wh7xV!?{RI>a`?F2bR~k-%BT z^}^l9Bg3=9+rdoF(DZyB_I_cjUz25 z-6g{yQzPpqry?()kfI2qIHr`NjG>&T3ZR;$=B19J-lnmld7<^8t)~N{6QOgW%cAS2 zdu7OASY`xaOk#Xt;$})?YGm4E=4Q@gUSy$SiD3b-vap)4ZnBxM?f>Hc6~&Ih9>4*? zp~o@K@x;l`g~#>HZNgp8Bf)dd%gGzTyU9n#7st2GZ^VBn5GOD!@G2-Km?n7oTjh7B z5Rp*5(7Q0F@Sq5eNQ}sXD1)eh=%nbYShYBVxSRN@1dT+5B%Y+1WWD64l#bM{G>|l# zw2yS7^sEetjG&B{%(5)EY=NALJcxXWe53rh{I2}10+a%V0*iuyLXtwg!nDGvB9Wq& zVuWI|;)@cel9^J9(u=Z$a+vbGikZs3s-Eh+8ikscT9n$bI)!?Q28Bkwrjlm07K>Jn zHj1{N_M|S3ZkQgL-mrd(0f>Q=L5{(vp_bu;QGzj&ah!3f37koU$)~B9>9tvg*{s>Q zIj{MXg_uQ_#jYiZrJv=gm5NoPHMez)^^*;OO@z&|EuL+d?Sq|*-K~9=1Bt`9BZ*_B z6NyuvGoEvd3yO=2%cX0Y>#3WB+p)WW`>}_M$E~M<=c$*9mzy_`w}1Q z@2H=e-?cxlzm@-X07igXKu{oEpi|&-5POhCP+CxL&}uMNut{)1@M;KuNKq(BXh9f4 zm_gWUxKemjczXm^gkVHSL{=n0D`IMoDEKM;tF;52v$9Nf=<4+IcVHwfszv%xf8R&Iz1DOCR*vIM2F+#viI+z6QJ z3%SZpL&fT^uFGDjTsBQ4=~&G&r~^Sm+bl&Yw4h^i=k)mTD#Fph`S*oz7N!zL#+G( z_cP-G#G7_|B+n;I+x-3IApfbJdV8!mjNmC|Wviv|NLYm-;f?Be8uuFZv!q^a3|#Ao_HVsCap#%0^f*t@Z@<8K!3 zrWWmx_`cS6?)x*)6;O|r)~|FP2=pXG_#})ZgcJrPVh99b2o+`sCT0kiHsGWIOlyd4 z15{-QZv%xpFj^071Cu>)S`Tgmtv#?>4{rmzHNa_u$kPutOoRX}Aq2CS5J)F87*~&a z4cFCQTaSB<;N72Bk9iIM(cfE7c#R0zALxLD2N&L7=zxWXAl{$ofQAP@*5BZOhlfbn zAL)RS16S5xkr2GpAH<7R0L3oz8+wwc0Axua6x*Rcw1o-QSs|F)qaNY35Lnh?;KBhS z2ikmK!vP@&_H5wI0aynLb6~^)S_dY5;KTu32U>k##Q|Oic5UF<0dyORV_?Psb{nQ` z;Kl)R8`^zf#{qF0_V2*gKLi{KabO4l#S0TZa0CG3g_a*!0>JUY&J8>QK)RtA2c`fp z-7s|nR{)4^X#0UJ0K&!(-z$<27C#7KX#Bv~0V+W970m~SA2dI7Zs6ocYKmYYO@(=AB*gGHu$iHHK;(mkvg#H|mfQjhDNIOu!7yx-UAbv1M5W^XR6>|mz zbA}9Y1{HILO*wGY_NTVPaP+UVLvReoIv8(*ag5A3IB$cr4c9nWZ$q?=+&JL1jo~|h z7-NlrQ80&EP8(oQI*R}E$EdD@`Zm1#7@vduKevqfI_PgB{v87a2>$cVs4zf*7Y=cZ z6d>`>Nu$O94PJ!!F;sxaKVOY115~CDEG-NPU^PT=%j!c+(KH4us}JG0&kwb7M!2dC z@%ePZAJ_XSS^+M+pmW1b02^M&xsgYJPd5~M4-nySIKa>cjBsQO;OGOAKU@Z|^nu79 zIRkk50P7E@15ACu^+(nKu0Ei9!)*XtAIQCtzZe4^b15e&d<&E?wXAw=*3W`9bTorb z@1-_n#1Df`!7YvI_oaNLA1{_@*OkYsmdNxbUiSpvx9FT!Y7gFc?slV<5X+RMeU4wU z=k`ke%J12$dokZ;&+d)tM>1F>W)bbgC}9#fB&HF~#4KUsIDJ_B#W!MFMc%?t4p-)WIW>BX;EXf$@}G=*Iwcco_)0a4U5Xe@L)0Z`^vTuc zlW8an`xi=a3(y+I6;p+iD2(D5SJt;Vx{-AUjxGi&!F2b>44a1LMTy^joB`S*(_XB4 zE7}3`7OA@SCd5LiF1IUZ5%lW|$N02c0VN?Pt&=8hT4!wCC)}7R}smQ(O9*M)Cf zb;%28B{nKJRT77(2kCO2Ca(sO_0nlFeR@(16W8=nS*dlKBmBa{J~X$=(D^KdsVs)c z|53+`e<}r`g+{WJc3!cdX&zgpL_w!K`bLeK|37L;N@WZ7C$^v&IfY&854_VRQQ3dZ zD3Ljw)BiV0hBt^O{6p+cEMjsLxQmK3xd!cG7OPM*IE9*|Y}O%WvGdhja;p&&ILw;P zIoBrn)JDwtQ6DOUWl8+04;3zR-8aX!W9BA4G*`-E&l8d3bokMYlbH`$Dv%(PRSkMK zC+ilG?Vo)#vZm=4o_aBK`xx|b5tiAH6&!ceB<-sx@bO8jwjRWyRcu%4fxCdyXu^?r1JOt31WTCfvIE)?5BdgBMldjdyYXH_O*=`AC%^(A~9H!z5A zd^90uWJroSw4%R#Lyhm~Pp^e~;wM0JiguvpxU-E%?-=92*-|vqi{Ktg z3fYFh22H}MZ&yTH_)>5FUjSSNqxqF$=&-$Y&*jo3mdvVZmM7j2azFwqVNylyb2p zT)lcqRJ2HaeW1x6C99|5amXzpKg9S?oc|>FPm=$n=#+DIF9Q__c+@v`r_Xx$GH8eZ zX+$;9?JIDh<)G{#YZpA1fzonO(~GE2nK#hYGopq?+R$c(I+@X;yt4TAavJh}vMH2w zxc5~(C+`+%(BBkB$$>KG!#duclaU?mWDptd7+2Q~ESQZ&x~5};3*lnniYVK;DS1IV zr9nB8nX5SiKBp#){t!HR|B#CkgtL3z>6dpUBwPZvEA>fpyh9TTz6nRw?+ zd@<*sE*++pCsRRoM%5di5i{1Hrd2p|+Y(irrai7&J| z+s2dHg!Py+r6Qu7$COpNg2Xn`^^pSA&dYv@pgKwnH(3NiD@>R%)CU*!`?Lu=-51rN;K}E%Yt?a<7}G2{HnEnNLAVhP0RGWRTE2H^I~;kP}LwS@w~u5Qe(} zXBaD_&Zjt0e*WdyBu&pQl*Ouy+EdYL{Dx45LoIHwi&#S8f@SMf(Qzd{cTe{mPn ztPGnwP%c}hy0&R=T!#j?ERMkuQ*d(5Av3QvC0u{GMUi%>kuxrXPA zbYrRTj`+-3QMbmU-NV>|aeO^JIdq9!ur9H}AJZWUtX5Oj-St)`+q!bnR)iY1b=3l@ z-kjGyts=CI+Bz{l=cPK@^0p*hN@y`>Q5%PnzbQZ!=w zrL>{TJj5?6qg$k_mx~2u%&V#XB3V{xZ5ro^Y*=@l>fsxqo})0GcN=ttue0Zd{b9|X z5jDF?tzfi+$73I=-Q-VdAQ2ys%;IqS2J|U|1iMuVYp-N9I_M zN5X@e*G1D>|It?RM9UtgzfHcURmJkSDe57ms;TJ>s0n4Y`19lYm?rJs`B^y`(xa=P-{UEN4Q}0IZ|SjtyhL;T}_iHHq52f1mxsJmCg>Tl1EsvisFbelV<@`me) p4$xJyF=E42n8;DR<1V($o$6u=xUekU^gNZ8TeRr^Z8~lr005PLCW`<7 diff --git a/dist/font/iconfont.woff2 b/dist/font/iconfont.woff2 index 938dc4d9b9fd4832546088eb0fe1df77e7582387..0a5ceb7c562083a416111c12f36cf99c0e93c19e 100644 GIT binary patch literal 40400 zcmV)8K*qm!Pew8T0RR910G-eP3jhEB0f@u^0G)pT0RR9100000000000000000000 z0000SLIzd3Z3nd=Te3fK$7o}>7sVjTZ37_6 zujVnoPL+t<4!@R!e6OkqHVz<1H zNJp#P(8J{ZVZv`V5<>UK=k0!=W7cE6GjryN+it_CeC)1#l?$gASVh}LczUQf>xJ8W z)}znzldf3(%V+sowqsP0E7m*QaV+-4lP>9yEd91Gnzwydnu+EKbePBj8kRhyI&4A8@4)^rF~v` znJ2PdFK3CI#N{6TFaDPMzpzz+-M2q5yMQEZIu@D)apIdJmF&0H{z{Wh=8QQKDnWkpp*gw z1r!WKMJ3#f1QhL45bU!!^g=zo+hb$H<2kj)g;qfV00bEWZO24TPAEnt0JAB>haNdU zoU`g06`=}~b9=PUKFC){p8n4*gO)wD^@tf8wVC;0i4%7kXyIMcTv0_T5xct)==tC8 z_jC5#io$Vq;MXQM3}Gb@`ISN)g{Y5##uFOaHO6*$0+-mmq{9k2w8>e*8aG z^?w{7CI8<6WJ)b#UZ&D^qfxL#kf6!L>ZUuEyY+5maciRTGL^QwWmpt3rS`GQVp+o8+26}+6lya%L-xwEutU%BrqacK%gGu)Rqj8s~i9BOsW5Ug&0~*;jH#t#4*;H^eQSoe+Thv1hrP z+Cv7rpu=$B_baFPj*5Vk?fi>M#o4+3xv7|iTirc$+O-600ia{6wkX>XoPX2xZ>xZK zAus=b$6VP(`BUm#*_BHl7Zo?n_@>d$jAnV#Nbn`0T?+yGMuH8ne9sKp_wI}YN3eU| zfgg9j6F9OsMZqo`BEdOVF1j3w#4 z!RK-akS?I)B&1SH+4|b%EQ7}^W7Z5~9rp}l zhA|Ki_mdaz77d2K(>BnxrSheMBfS$3R!n|TC+E$6*Dj5Rwn z_qAHjJ6}>lLR16#W_s+kdD>&pW+r2@jDVBEf|aGWYSnqX~3a&kEweQxlTfWUajdaaE5FNNsbryyeW$ zCNyjAnNwUxSzEQ1*SI$PosVC3MyFCItsm6U^VLJrp5nV#;OdR(I+f?kqu7sx9e~^s zU)CN^??7X^W5_$!y)>u001bVG>f4ID?>X5T|BrQt(4+xCj14E9a@rYZos*55FloxP z8M7)?sW#(w=(-$~#C)flCX3#>=DF*Z-L}U*D?a*UQLQ>+67_c3tzCys4H~`jz=YGz zIq$4VQ>MN4Rq@StKRoimV;}wY$6xfC{6%Gm@+Q@!=-B4ZvE+o>E}gR z?T_aVK{1>lDOOfgO*c%-emtEZjN5LS`(atP{Wz~%#L0b$XlTvsg5iVdjCe_jZXt@X zL8&-NNt~i&PE%^mP#VrsTAZV_ktywrQ#zQSbTUclVv5quG^K|bN-wiO>0=Hk{mcVp zfCZoo@(?IPyrB#`^N6}>k)Ag7)4|zvX&99T(a1;-H`2#DkOAI<=(rgJA3%n<6%!vp zEZoZow=>55Oz;V0iq9Z3d;v1Yxh!x#OI*kb7h8u*t;gl8aU~mE%@z-`!^7Bkls&HH zfa^KpOOO+ukKP@B=6iKZ1hr6DSxzgF^5NC=|;I!>{r1TjBV<2>ekb{wxZA#mCj1ab!=ie*y*}?l4CX)Fc5SSgFxdP>=XurPGbn@42FUxINVtb z1D(Tg(0PmiO=2Wy3Zp>N7!8`i7|;cb1<5cjImUMp6S{H!w_5KDT5r9H;7o?v;uVMR}| zvS(P;B38GAH9hCyma(=Ktm_5V_Yxa=g^j(&rruz4Z?UC!*xK*d)_ZL419tQgJNtxP zeTJY_?CuZjX$^b(f_;6({{F;){=&ij#-aYf;lANW-*L1bIM%;7-cOw97f$vcPW3-d zr@$Gc3NnZwLx?hrBqPW&ilQT^dIU{J(e)^X9>bI|EE&g^2^^Wkl_@-##+MlanI)7t zBAF+a1rk{#l_fG+CYKcoS*4UUDp{wN4I0^`l`T5irk5QIvXfDEG0ARb*~21xS!F+) z9AKA&9CC<@9Of!VxXDrOa*T%@=P4(6$w}UFijSP;D`)u0S^jcPfSea77X-;g!E#B6 zTox)7b!PH$xYF6ON`tWD|f`nUGZ{Hg4~Bhc>qcB5R&B)q{w4PmA8;4 zPas{MLWVqpOnDAj@&dBuCFIB}$d%WSCvPBM-a&!9heG)PMS5JZe1sA`p;X6|=}F}} zp+Y`ErF@1e`2tS)3f1xrYUDfA$`7cMpHMHqG{_%~@>i4m(=7kBC_<|uwJA!wD(O&V zovNZsRdp*`kE-caj6TKcSDXPEFsOJ#N-(TMBT6!=WMfJ(uIeU~YEo&YRL`_B%_z&P z8ktjL^J;2A%`B<8Wwo%P`Bt^inp#>{D;v7rrdr!l8{6t+N2Bd(j6IFDuW=4k=uop9 z=_bdT?L>2&YPmD5aIPX3TH{h{U1^pL)QT_W0IbKicP45Bk$X{&fhur>Wz6K_9mDg8`g(5Dej%VGw{2L_ie8 zzz7%xW27|rb;60~kd^_><-z$~V7}Jcd%AqjLL~{cG&i$6ripv4t-aMMVtw^x{}?C# z(<(MYi&%N?+qlMbA}nGBd9Acm9tt(0_tmv=C|;ZRL?e#8)p2n4OSJY@UctNw1mfib z0!`U?IwDj$KTsD2NsqDjLR>T^z>t`@4cOn*nPPxRp>mp8ip4eJc|fR`7DtrAk2gf+!lwC1cmn=eJCuq3WWdALCf+C>@( zI}xUsNpT|0&xk)$q)aV-IX59x~Tm28kpw>aBsD%wxEhJh$OUUGK3KXrN0MKTQ;eEokSs0b>W32;*JZ#I+XsfGn81;xo zaw#GgN)@Sywq2}85CSr^W~ZZ~O3J!D+_l1yS0tQQ6-Ad?*cj$GsZ_qT^-?wImQ5ZO zlMkuBncFSk?2q#(fe8rt4zCKc0$Pv0ThjTkp`d&ZAaHa-CX~8Zd=G2 zD|Xct1HPN5z6ZqHQ(*sp{coL<(2Kj!J|RXK85HUOQO@Rk8NtR3g9-5QQ%vZg!v?Un z2ybu6PAlXEM3KIBU9SYxK8#JMwDdZog(JrL8pO@>(zL`yaS+kF6w6;j$lIMRLyk?@$*4CXzb zM-GxaBwMY8j(wKEX$!3ZU|9sb0`UFY%U8^52Q?C~(umX2@50dqzz{xCe*UwVW03jQE<5@NJwI|u#*ZbAf?Q+u{G2&sMd8%UqI8b@dj8> z3;Y4|ND zuZ}$+!^V0+)m#veAn4{Dlw+V6Wye ziWk$w%us#LgGX^yW1AAZAT;)8DC$Ck`lY)%4@?P}b)2~%#A^qtrTYEFW2{=r=MO*7 zotwJ)kUf5%+9O0N<<8OI!_%y~E>j^Ep*h{jvfJC{K<{X;J?-+Nx|*T8bvZVKy7L#* zCh;J42^JjjgY90Mv>#tuLAeDH9ZZ$s0}y8^pNO9_DvjT|GjY2U)|BSE(3 z<3Qv8be9s6^Ul<+lh0gb~yl;f?aZi{=6Lsb3Be4xv`;0%GJf3|CA9 z;S&O?n7;seyX`L!ZZo=u?Xlij$iiPoO9lacH<#EeBSDY%Q6c+W3cu3V-y&ZkeK6+Up+_-bCSs#F^Z$PjwZyz*EVyG`RU;S(XMv0Q02n1ZOV zNUYOV6mgJ|7?Z{X*Od5N{Fqbk&m`a0>HZ^(IccD~b{7GHorXZGg!0Lk zid^455GiDJjK-kr+|BY>c(Ct!2$dqPM4AMoBt|ZvfSF}&KA$NGl_luP1zEbUq3*ti z=qo#LY13)G2Zb&IN;Q^pqSEws-RN^2#>@_|65db19s0#r3KZIi?_R-c7A9-zdqys|E%@Yd7k8@r|`)`ju$V!I%U89jhz?n zv&1kr&5$McJW%);tr0`*C|LxZ)J!9g(1fDEop&YSQlu}JCqohHD27TQJbmU38O@S%oLo;;`f|!7v=_Vf2^ZH5&bqW zgFzSWmGGbAfuL=GK?(fVm=0Tmpl^f!n{OM`IZCKLb_4Qdg&=C$VtE!Bn5tnBF@OP8 z@eFliB+&y3(seg>M){VeT6ffP3QnaQFiUT4C|J*hMZzd|^KK6nWByT1J(pBeNKBvy!UBB=w6%}gyF=izfLr z!oen$ON!(WRHf5l9!t_0e;_Cgff^Qb2zrf;@x4>%gHuT%MOCbN6wU!-<2dC26b^@P zFnOOO0P?(jFd&3-V2t?a|N7e1=YsgcgRL+Bco_Nz%mxatG9VicpI-gaMoPoR`3->`rrW34p5A(VVG zNVk-I2nqj51{WhM##4m5r;vewFvSbBI#v`IUQcRAu+9@AND++mGJ>|;wZ457BI!Ni zPOGolkA82ntPFH`(;#+7Yb_dQTJKz|@A_k-ConPDuo~*Ho*a~yL4<=ZW zPa%(FC?;mf8p0pw01&HH-n890XXlI=R+LE9VyL+^S8xmU#uTJM+aI`c{A-GHYZEES zf|?VlHF#xl8QwI5y2~gekC8Dkhn$qb_rn*6v|~r6gH3*hfrf?}*t8R2Y)(zimP=biY^^np zv=h21-m%t$^ZHC?*>lfFE3Z!DRH?-U+)9 z)ugJf@_nIdgH_wZDH@e(7S$iUPlIuWXfhbF#9(lQq;iJJg}8`Jk#cPw$C95d+T$^& zDq&m)xT~MRMVkw{H2%5C@bglt9M-ENq#X`T?yv&@4J*_!)bc2V87K$JEQB>YtRgT~ z6G%wC)s-Z;)ggh-QO|`CbXRmH_Fn%S1V73FR8XV2;cvnD(=3c{Vh~>?sR5&SFQRGF z{`d(TKzD>gxdgABp#<+iPnySg#P9g%FuF$5d>@pjwr9filaL`kp5IBKJgq5l@Cnpw z;Vjy*`lKSSl3^T4Fvu%mr@0m-gKk(#&Cmv&(wLK+Mdu|*v-kfkD2RN*mhXJL+l*|l+iJAc8gY_3Vvw+bi`TcKoU!pI* zdSIbNw{}kLUD&h!Igwihr@#9Vk2#2Y%NcrT!sA4?@mPrWA|`YfXJkgbQly+oZCc{v z3+po=A6h~HhUmA;(nzZ@{?Jjei!G4L9XE{E2N4d`k=CmJ^Sn!irARFjyWNi)5BKJ9 zVCL8Vh~3$o)lQ|H#)4v@Q67Mp@ckV$FTM`>`Pc|65Ke))p{p}!5!ZDq2o{bbn&_t6 z(Rabb6yv#uu|ca9`v(MKmkPtw`L_E}St==5WN~`{EEL2~C$J2aHq4Trp&+;@&Zb@U zS-~}BwiVr`Qc{iWOc=Y1X?U?ayhz^Rom+l-uz<#z=^FR`uAw{aRdh`f10}~~e5eWm zUnDN`n^0b&4%Q7&@naYgo0UKQ#bNUvi#FL$mDub%*X)>hS zdIGzy-2B-58?;tr`x-!Khz^CMIRM!%jVOoxcOZK(`dT z4*5yPWJ60Tk#=h2`f^y_a{|1061{vHzI5tLWo-?VCY9$VVD<3pCSU%-^<;yltbhle zjFo0qq5tEV=s)@YXVvF<^V&o8Ena(K{qzqS<1ylKseNCuLZc5s^T6}-S{ww9G#3iN z)1dY=Ev?e(Czo}*JMiC%bpdgV6}o^O>O+t(GnaVJ96;i9_#ZIGS@k`)aMfM%^C8ue z1m<@GEV4K*XzZ0CWdeqj7?W!W_;Th)GU=yPS(ufFNgyG5cNN?nEYs;73J4Zx|P2@;Pyn-dJ<@eLE|A&l9A*3uf0 zdYvw6Tp#6S?d|HLB(-554yE}MRGN}XiMz#R?fru&@;%5kStO;c zri#YQ{LIxSNdOpU``fSFcJcu3{RUIs;3aOS=4kd|mK^5ZSm>lY_T+J9KQ50GL;dwm zeSZcY9-lvbnWpUyQ!~mtmqfpybxz(12d;zOkfr_&E0D;MOnCg&1`Ow5Np6|LeNlApO+u(P|;Mo&btcsF4W%e zEU7-?u1Fafp9Y^rUzv%uKT00RZAOmDDcuq8BHC#br+^AcDF?MEa`X`{jD9R0U7}Xz z)br)YnA^CrkMZG@YqMhNK&&e+TwaQ2%R`?J#MBMX@p*H;Y!#xc051g#V)~@-pLmzU zaMG~AvP#~j9xnu*@?eJHVm9Nt<8ZEG;;)+P{-tnT=VS+xLv+6y%<}+*Ct2V}Kj!J* zfn2Fv`lVZoZZjqas2P=Quk_!G)yjnC+Ak${3!9oXY&kD z@X`+?VQDOiMka|hvseIi{5b;bS&0l06vA!pAaISxFdHzVRMo~KyU8z9ISfaI-sO_( za`&V_b|Yq&tQg=sGubGfFFyc4O%FqJ)BmYtZPzZ#WB4zif1i6Ts)vMiY zi4g9+|DHp!hr3%af&SNwCg4#A_F9Hz^_fw%pM$F6A%^i z6wl$EJaaM@Y0sz#x9JW_3=c=n3r9L=Z>S9#gBb1`azS+O1Yiwur+`bNejgW-oI;u0#Jh z9ZF(cgq1q1)!!P}Qub$hkkFk-OW8mBAQjg6w`|(-A06EG2Q0E$sKQp)1YdK(+%b|U z4#+v(xzc<-c>Y;zIlt)GMq=T=Dm+`i2Dtm`9J5&89+tlKq@|2*QzyoE5qRvUu^b9( zg%nT~1vjpKW-^)sP@s8Wh}ShTDUM1rHTdemD_;pH;G96&i7>#gnPFTb)tpko|0n?v zWmj>4lB1-QlRBas${~Fq=46{d$~2UEZU)NvS@Z`NCx&YX0k^V}4Y>xMiNIz{XJ!$r$xUZMbL+5PF6f$^TIyW?{}j_Wm@WNw>kq5bfQT^CsRXVW)Yng zoD;a9m@0=5krAhotCuxjQnn))Rdafrh)b;zgop)py9>BZR)o@(o(;@l`#&+6~l&-LH?i&NE={ zZ)P<>xmLP@s9V7UfGma*19*e%Dk81QdvG5GL@lTD66(KS+fP!y^?oX>Wa3aZFU|=;SVKE z?7xG9?VsxLJ+NZD?jRz#TA4klI}XPWU6DMj23O>-c2eAg+4tq-=c+Dowu6nVA8XM= z;YPgDt--rg_U}hoQwl#leHadgNM~GoHI%*j#@cbMq;Kremi=4)n^mITUrRtTJ{Sx@ z2JgSm+~GZfK^_6NzssMiJYNW!0H8kJ_=AmAW7@>G7866-Oe$(ubL)&vC?!G~Dp~!i zk^Elc@zGM1vopUGYhfrL3CbMpWPTL;w{kF6Tk|X| zXz{jMiRSqvyqugD(mFqt!?hIM16BHg)y-YPKF==XE0h8SCR@t{!*v}J*`0w@^wwu` zb&5Q{N>~tQrlZ~&Pea!@*=#qGU@u#c32}?_SJXz1RIp6=vp}r8!ZTlkp>63YZGbBN=N$9 zFy>@I!GeXT#UyWH^vu}0*GBDSovBO3B0*LF5fV@n5_A%Y`(f3{V2Q@{)s3T4Vh>f% z`lz`*SOir!+e$GwrcGE^q9cEbIs^|UnqMWC>`$~*nsN@6PVt^3E}J!kM~eM>GQ#vD zQLU|$nGlC%;OBf7sE%+^bZY2a0|O zJ_)t56WYwrS=Ag=3vchd_N?Ki9kDV~mlbiy0NTQO z^)rwP^P?cBpoy77$=d8ty;Hj9iYPRP!LK@s4`rsN1h zqLPK}_0oYp4o^w>c_VHjx>P(kTOlaH#7jl3QU50o!Hqw^67^kyAIsMkzv-D8%>OjF9NQJ;5jxj=>+|Bmd)` z{CVsn25LlCa=~YDpm`9(Q$EiHT_&y<3_*K9*F-@H#pJZs*T)mD=0Qf}ZoK={O1Fmf zoVE(7Iphc=+Q3^b5Wye;$^ws(oUm7+02oorq-3RG8iHZ7{zDiGjM38A5S)ov!{-ES z=#Chp_J`*YreXaDZZ!n6TxYPbpe=wf9HIUfoM!8uJCPrq%U>1+9=P+lN1EFf7Z zgP-Qj@Klb8OYlohBQMG^bz`+a^PLzyRA=SdAo372U_R)1uW4kW_A8)RiqTPeW@Q zmn|_YU&Lu~&aAeeX{{RO6{%nNwA3_xy)osdm}n!FB0}fAew>SPHrOWg!Fd@^9wyg9 zCPX!73zIKpW~b0fp25iI>{k2I7+)*~hl2-$UzL^g;r6-c+rRRzt4;j*MhWfnvp;{W zSAM3zhUCO-HgaG0*#Lr%ebke1epa(HKstr+6se5$?8Cex;ygA&FXZp3S%BeL-RVH; zB3WYC2l~pdx{)85NszF2JHp{x!BSsT&fanixb}i~axyPx_tQB%PM-gaDWXZ)4m&!n zE9PP_E)~;3=Jkth^t?S(&;qhb+801*wr?bb*LTX;>2hl7mwI`|h0ZVYB|y!2%=y%R z$n+>9yRYn;t4F9}tDv3T0Lz7Fg#nR7%(@bbmqS~+egVI)3T0}*dbbukZQ_FT)^2*D z6*htfw1K{P{3c6U&J$HvEaYpEx+&b`xzC}lTaXHisSq~rbUZ&~1(-!Bu53u81q2%HNcRbIH6i9XQO`OMjiKLJdxX26t0OkBa zzgwNWefKA?PfakU1TdQWc^6s|5V2dvipK{=GCDclkAE-6yCss<#W_LP=pkY%zHr2= zHGG^X5Bpd+*@C{+)h;?3#42n)0_4w!LY@L)=+sllO zKTx2GzOP_)*N+;Nie9hQXcI^bXiZaLnkjX-f>fw^7HQNDs49Eia^h1kV?n}D1MRX? zT4(1cvlgWYNSHui--DAlrA)B=nFyi)yS)lnHF@zmfEDXDo}=dV%8^T(E$D5oFbp)F|g-qBgtCQ`jYX z%n=VYpnUl7SywkK^rVtrfl38ov6rQY``!>D3{ZE5`1-BC!?r2r%0VVxz;)uFxC_hRnIlvN`HM2QuH^IS3 z7}P2}8w(?)kySg$kS@~kEXV38C&tY58m~=nMilZH4i3(LOLT>P<%&u3TdOwlWH8%O z4E_2@d|J{0A#&rvK*btBr_Dm7#{DO8b_{^jb^NhGRvw5|FdfcCg+_J>MGPMd_u4#I$ZL>3n9{ z6u!4C8sU+Z%XK=5izv`#X4n*bkyICxo1G#(C?rF;uJ6NbSrt#-)okl)9NLG@JFAAm zHVYY^!N>-Y2-39y&%+pofK(wt@To+Ijdy%hvO{i~V@I&M)M2-to zc2uULp5LvW2M}~ZNkb>BZ%06ct;6U@{puJAgoxrcVK!I23NSu)H&F4>b%*;hjTlHv3VO;FXWq}o<&;}waqx2L^%N0m@bGrKdzQyyO+5N6|Kf|VyV{kp;r$s1bjX=CiTrwy z^@n@{(?VJvS@HwY=5Yqdx4^J6pe=Z!NnD{=du&a0-PAum2M&n({f@%PKE zDGIXx1pg|qU$(E2zPrd3H^Z}Y(v%USB5@d+Fs|0(3&xX<=*Xre(>|!y0hm#ku`YZr~yXSPQuGyvm z6mvsTaEEaxNq_yX!)$aSL679ZjvD*RbY*t0K%wApY5{>9n5~xa`^DgKZbDIDPB1f{ z@w9fGk((IX29lx;!kgEq7|7_0wwrSwMwo42Nt8G=m1IoZzdjf!tbCm{UJt=*PZ?w< zv)m;@HUgZ?lfc5b>x%tc$O*T+u`-hL3k7q&z7It3*t<9_xm=KDrrod{h}R9u*px>=8XuZA(zwBJ|7erjBTOO3BewlX6I%OuekZ_wh5%(Yva9RbGL$BK zGo&^>%!bav+e?S`CZObZ`jHyD#}=-^5XH}*8Q;gB_{8-p3*Os%SQ?sW`n*f3N+~u= zciF(2CE;UmxmB#?-^=0gbh~M@D`iP6JUzA1`?OV^Ik>{jEyVm!dZ5BIkAo>xp z=}9W^tYJo|%?`}ZdDF%RzoA=J2~Nf!qx87S62Gkz1^XzyMk;Qig^Wr7y+YxuiA?*8 z$kwAPC`BJB(azu8eZOeV)zS_B>V`2ig!H7(4o=YfDl3@nLL9{a8*g2xDwUFoFe^!8 zBAphoTIO<-2b|EaR(+Ug2-k=?ZQcV7UyY-YUBCXofui@KwMEng+&eGQA#@4n5UgEz zAue1Z?KB7+=GiW4WfEqAsMOcoTm>@CI_uy5na938~f9dLcs4P*Vf*DI= z;Sorg?!uZlyGj($AA=o0LIQ(c&t-5 zUDeJSS&gqzY=Wsv+YR)SI#V4vk7Wzskf{{Y0gYtsBPX%C}+f%>&ma+ z8h-;x5Vm!ufz7Z#cVgNjLd&Dk5U+0m#z^|nm#4GN+iREUFT1Yogm5Bb{pMUn zDqj$mov3qc%ix!ao!sOttxatH{V zAJ}f?s2AYo!6^m<&u~kqHOsixYIZecn;CPm2-rc49QrycEUwfLPuHvdqaxpN5@u7J z$_|BR(AQX|ct&i#u|!Tt$vce76X-ri`c8OTVs~bv83RJFt108uN*w1B2CpW@4kM>j zB1W(CCLo*IFob((B*DG^dPko)s$4H%lnoU3yMcil+IQlr#1r2@>@?fIfwI!C-K$;@ z8|U-wbK%p}YuljDU5$ErJ~qwd9vS7<*#N--NjU=BOWsK|rJRBLdILyX9)P%hwPH$< z7K@Y&I}i%8@^IM|El6gYi)evJbSD6?%(DK3U3-)Mikbm3 zld$t{Q&70p64Lw+JgAvM5FJfB&!NtGnMX4mLq3Bx>{J%rd$1Rjn(Bep&=kb}MhGEF z2|7@zt0QQRw#Gm~4{AW?O8JE@OT8yd$`E1&T-g){(LKtci$ukwEraPeJ#JhoWgK5s zH=l}|o7Zs(xe7j9BE`FjyjcNDmwn1tiGHDU8nkn^a%%4y_<#g!@Q%?C0xoQoj8*eG z{FsATlUwuo5_2?wtlj+Y$qm?3pr+d25g}}3l`Vb8Bp${T$z&Sva*uD{p zVM;)#E+XJiI@;zQ;NY2N=D@;9-0hgDFn05T%S_ z$T&iQsfj{AJo_en9 zti{gCO)v&m6`oT`0Jt_{?`E`4UVTcM&RKV&1BNU_`R-L%YJDi^M`L*2+o4P(q(k)u$AD( z03&FhXj{nrJ-R&0kKHW}EdxAK;|bOa(j5;O zh@w==DuG8T+~HA*!2k))kl?;We2s3zRcFJI^=K(?aiK92gtr*}kXz#_Th*Dug4CSX z!G@6q1uN()9Al-mu@PD064D5q$nYU42X1MO#%Gs~PG468(i~8w4*2p2bUk1LNjlAa zfzfmZj3QFj*)nFhDc-j*w3H!NTbfvUgH4-poCDUH{D=+Gwu?vja|g@4o7MX=WOp&_ z?T|-}jcctx3{6x_B6_$sb%b(3VJbQ#_g$#<425cnp}W7Iy@_{bPbI_(%JJv#w4WbX z?(Fz3MtU@}J%stRB9Ej$*J41bp~5z=MY>x^KMz*IW4!=)k z8YHxe$TKLX6?s7I1g%HIC@}+spx!6i0NVdrmVqvs~)i$1?{;s*BHQLa*mVT$iVy%3A{k+qG|K?_p5PTv0$Fpzc0bynZI>`A6{T(Z$ zP$F@KdE8y;B>@hM%^ie|g;+7No1>eI9cYgp!wh?jbMd{5y#jyEI-%P^&}#rga^VA+R7TqW=#%5N8;*9;TZD4*XzB19){@qFt=(CvI zC~4bQ-`U}g=W6c}Z0sMqvPJ^FA67=+Wu&$>Rj=ONoz+SwFy~n0`SS0_-$A~5r>DnS z8eQ_#kZu<6TXnc>&HPPPjfgrr11%6-Ltc*-d}Do+`hR(4i@e3mor^Isi=VM+A$E7ofkgj0x!O0W*I}=lL{&C4XZ@%R5d`wL3PWI!NFq%6vKLmp=M956( zsbR?kh~l@(23ki0C1>F31mGoL7IrDC`Lqg&_VahMV!9gFt95GSr+J>PGVg# zM@RgdzSu)g9P5;3gWl#;qbu=r!}ql%kd`FD={|ZL`o0|+C^$1pzkVsr03?)C^eEQ> z)RQMDkOKn(8~+dMrA$#pJ(Wq7h{bGme>H$7)5rwi6bbT!eWHw^uuau91tvkFVAvtb zHb50Z`*`cP`I6O?eHr%3k=Y^Hp~Y>x54Je}tsIl(G4S}^c)RgMj<4e$=T|R{ReXvU zN4I#PRC>=vMb|v;Nl#r-m%0R21Xb9pMpAXc^do$&0rS{q+ltey3A;ZV%{?twm((IG zmTl}uNQrjC`DTAvl17kJ9OR+J`CYq{LR-K7AK`SKYddKEFV?x`sk7stm)m5@^nAEupObyJi;Gxn77_&$0!1JW2BZghhM>KP!PuAzqa5dlIibzUP)G<%mK-H3UbU)k70mAG33$l42B#fNAuC1D{vCzk_0mtxg1q)?_6HC z!`w6B*(4r|HAew@z;d%NWtUJ`1gIP-l?&xbWrW)m%94jq-SFn}hb(_m@gH^HkU>Dq&-#5~*FrhvuYel9ip{x@;9A!F3Fl zI=i(U1%?IhF#z+vz)-L-|7Y~IU~pxBV1PYx8+7Zv7*Pb3LzLM@06htk2PYI7YBwxY zy$H&m+vIIG!5P{t2Z|g1>Eryq#krM=4|T`Gc=u3zxQ{PpJV&?dST^U*z3lil6DyOp z`0RUkvN^}PbaTel{J1=SDi~j%Oh^wKi6tL2Z9xt z4+VA^Cr@@!yA;l_EBJu<%9|m&foKlY@qyI}^jO-*0l&@i?YU!w+k|81_9U?m$Syd2 zx-$i?zQ^d^ZVA?qga%$}6--xZsqeLe#cyEx%xMV~xRQ|j@%)AJCr=^^SRRK^&z_+U z5hRo`T`kB_ViJx)R-ZUg4H7vZu<;RKY;13Ts}89K!HuMw4XV7Ec1&bo)SG&Y{$3*k z(IvB;es{S`5>Rhh z4$FfblcOYJ`4zcXGEXmxFobgV^@-$@F2Pq^hF}QL6)?av@xyBlA;4)1Aplv?^F#p4 zM`$EH4xIzbVE}A4!Sje?-X?K&ATqgvr^%zVdYT8AY|!qxdBMlaWZW=@72T1Mlmyx{ znbAv<*~zQ1k@BqG-fuwdf_V>@zhVD{RC$G>kC{V@`Z1 zE1D5w`ateN*6|vVd|;FKloe-c7YQno6Eqg?*&1NB!L&zb|3`1`Nz)i+G%KT{xf3(n z_cvjT;YqXDs}8uj4_F_}_@~yV_Wb=DJ~-^A?{*9?0sDBRyPX;g96ow+$GMH^9UxI` z8#jwF{oA6}2;khShw8iX9aMIx*yr!aw^!k$q~ZW>2YxL=xHb6>`S#0oKIS)bk&kF+ z50ZmCRYPA`pw!CawD?$v@4YzgU5k4CYr-UL}^_vOjml--06bvv&*q+d-dBo zg(D-TtDWcS>c&7In5#_%Rhj zX_Qe5B*Om-P{GQOf~1M+ibCqil_aAdp%P8!a1pVw2$5VsVABnQ^NhGyu^3Us60?$$ zSaqx_vRE7&SBGed7n!Tzk_V)(dc<`SG8&+iiR*lu$W3)7aV1inIKO8pHg4|n6@Hc9 zS0NZmT!vfOd;G*CgEmU{k(#Cz9$tYMJ!>TuMf!5XXM^q|ar#z3s$>YL-G@{uM$8u9 z-rmuG(f99<1Rgomqtuuzg8HFjHk>gEwkc37``+FXt&$IxQq8i1;@a8NGxAG#rD3JK zk~}PqU+Ct&%1r(j*rNckK*1uz8y8TwL|`qHDX4Q*sSuM68WVj8WP-32_EM>? zLc9#|03{T?%_$(`lSKFFTm?d8;)EbYAB#r~OhaYQb-S;2Kho^-zZXimj$COW0YX_K z>P}o*A&u?CCRji;d+<`oP2b0(uHCL3I4YX19P_^0yZ<2{eVcPqb$!#-N3X9=a^BYc zklJnu?s`|Va@T@YD^3S*EfcYH$9=|iSv1qupq{nI(#LWSi+*w@N@<$yO8wvVO$q*v zj^y6fzaF`57?VSONJpS!GaCkdj_UY2>-&TV?=gk@O@gl(-}TX}^<#_}X}$fT-CF1Q(gDagc{emmm=MS9*A}feYVOv~DN92Qb;Rvt^J?nbB0g(kmI#d; zens|(CF36QEwdk5mYyWFlq!W(1+wzB0yKev*5bt`5E@an1((Q=^Jp ztr-q}Ns)*jNu1$;w>2Q_PKjpo7^)0i+TUM_E<=qqYnE8*(K)A9($`m_rV-n)X(MVQ zdi!>?dYYRWdSihQtKqBPc85e2kw_&`Ssgs65<_?0fEA+?X z>nK(bJ?2nvSV8RnUA>1+3*@Ka;EJ3!C)C9K`XWXLbZN%9r`R~CwrnV$eq`#GSpj^? zRvRIuyKHuQ_%e(yOj%n1HzdfiWM={I|5Q)xsV|OmN(U{~Z8{Q8EI0wlA(=>?-Xh5g zecu)hL<$DP_{hOT6>JIxYaDu6i1r3-zP0LRhu}^2czaZHNI+YPuu%nBA&54T=EytX zxkTU1=spEZ7(iJ96z5mOSUhA29ylUgmGq;Emc+YG{}8_ zY^Ip~RBrY!YF3t2QJRNOEHp4sh!-KHK8qGG0{{PnoG@7M_DIR#gTn zVjD&IuoEyMA%`B_n^*3%2ilAT^h!hofza3$7zD-&Deavk-L96zm-e%Bd&&L$B()U| zoOj4y6SCSa<84OaS9o43#EXzkfPiAatO|lJ^%R(54tdI9IV9-XtK{z934UF|ce%UOKXS$<40P(+QH@$)x(eUv=DuiF zJ&j?E-N4%01vpjsAP~@9QDAp#0AUIEqsj!4S=25!2TX=>W1%wIOaQp5_fe@4**FCl z8OcSov>-(0%=_dbbC3{_xu}`bYLL;DZh)SmOsV0f7GS8Ie}C%BmuasPk1QWqL=7uo zKurZ89#mOWHT$>-y|WpN_fMFO5x}rgjcDinPX0A@e`bZGPg*#(?Rq2)uq zv>JFI6Hv-176dFsR+ucG6_yr+1){~$nQ1Y~^@fh!7p$EkfH%j^pKX>F@zqT0n@)cz-A7p;mc$0~YIL95->sa(xO`kh=rXOCVbGTK zsn)vMPyf|6H@SMy*zEC#Xrzhy&uN5eXtgo;I8xmzBwv^2X8Z!0d|ib;u1(d=zAXkU z(fucmH~Y8>KlC(LT2uC|!#QK-c`RMC?)6VA#Tw>ubt~rTXH08_tlpbu zx|VKaIf0-p)T7+p$a_n^C9phg872B_QalB}W5k{X!m*c>3|lHn=0&2{IWW78n7=)- zWHJvv{#I+XtBQr5Y#eOj29 z&)u>VZ5UB3s>wggf{}T18%4m+I|6)=^@f{D&bfuJhP$1Un1=TPyOSG~p3CK*Ek5h& zu6FKIJ*2s)c?i;6)zw)&b!63i>49G~Ct)_i7VwDl&?65m9*#&B<`1J+t;LpTG)os#_RVeOEq6MGSqajDI z7$v87`=*5!UF&f1R{gLg92GSVa#5D{aRBTtsqLa9LdwVWZyB5lIAwr5 zu9X;ggsyiN2R6G9G2(!Z0q9?7l*=Y9(#K6ye6%Y{u%vlk+r*O-@vgs3fP zEU69q$n=6O2&7U3K$Md77^ReJ0YmAx5Tz7-N*q=i68l_h2@CWyaC}^boG;JN2iPU8 z&sc!&ROO>3XufKfs-Kk}r4&&Zlp?`1K$a};XXB2 zBJd>=mHEEP#sQipaIm?2b5nz+BP zJ24!X_NkPU$%^b0HaVa2@R7bxWZT}s;FhYIIhU&G$?0@;lRk{+JpzC8-uzDKo}39} zu(VECq1V$|12RRHyG0y$v1!ws`<_QVq*^HAu&Rq>bmYlJUUd9oMuqwLeJf#Zjv4{B z^`d#zG(e*uK#LKOI}Uo^o1zn+PLLTPqu`FY7>yX&;n?b8kWT<3Iy49!l5%N^6*(EV zBGTSZmZ4>3{{Z2B%IuHtWmF|)y6$@JeX0>e<>H%~(ys~86%eSjxW7*o>r~_s|Jbe^ zmkZ^h+%&z^7+ytg<-p2%KIh%LP&IkYm>TSVWB8>aV}V@7mkut*rbymy+HWb=8aFO4 zon~s9ZvWY03Tw}rrp(hz*DtTvVE&`}y$V1(@6jT-9y}SpN)*JC7Y;2GYt_gvtl%23 z;_*{m)OuL7>hhs<>QvcS1NMcFce7efj#_VDax!q^JyW->c)70yF{AYBqtY0Kh~DgT zmWU@2&|8yrD{l|(LGA#TtIRh$|BG25;glT<>`=Dimr}oP(qBq5>WCkC8-@ek)J&x5 zHZGiKM(#jd-fdnSXpy#pRd&Uzs_ld--R|q``Mc;N3FX7%pD$gRcq2gBm;XM9J1sqFb)6sn`yz8pPf35BnUd-BltmD& zNWZN_CM&7+Hkq8FNBJF7diz!h8 z2Z=ei!0^o)-9wiVb*Ro;vz;h0^5T$ARVvKXSy3AQ^yws8l|Fv5jDP$r4HX>u`l`FC zbUM?`RHLZ3zffcCvMf;r^Wr^=a6f%B!W zCu22kVTsrPss1GD-8=Dv!+iQ*E#P_=KX3WERKl=wtoh+xIQvZ;J5+N(j$?G z)fsd`t2&qOJJ->OU8segbz-y&>W=(k?nfWnf_RAGdF{(pQhqvPg*oPwEL>YPQtDNw zt|@8VbuhmkUcGJUun*%P`^=CNw#6cF2tmP{StSnUD6z>x_YnNyPQz12DJb@3zk)(l z(vhlu6=A8J)i&sIM=a_Aqi$c3H!15TJ|jnoxjvVuTl};gtK`3hh&QVY)4^C4)9|^u z*NxM;zMFU^eG(H@O+9A~w(mY$6@;D2gntpj-M~#LFP$wI&bX;I#&-)Jc8ieSD*{wi zOuhD-tGn*_YiZdSS|9InR%H@F>lO_>9an~<2%y9i4pbRt@ReuUKJbZk*v5f*b; zy@2!2aPE^UC*dr*UDT#AO2!8#<=_ytjYgX}}Bw%O`Nv=>ss9m|6l$;hJ3n-PpuMbY!Cpz>z zJfX~Dn})Uzy2u}WJT)?Pi?J^u;$GAxVuXorpVFc_zj9MFAV|fI#N+bg00wp+SDOUC zTibXyu^|yG9M?|N{#|!|z02=Lpij$pT@U64qAFl_RCw$~BNxD}*Yf zSGVkmt1oFMVKzpJ4AwWz?y$aEdAUFL49XV@a~u4*6DS{OuFY&tzY1x)ty~Ee@-oL7 z%sN-i`!xH|UZ+>=k~cgd1quQR(YG54(yMYA|0J#EMz|g@KY}w3Quaqh{gXlr3?!y( z*}OTOv$6Pw;#>I9z++K-(c6s|MCC`lNg;07Kuk$2*D5TGxy}A04E0}PE)@v~qx8|9 z15@-2`qY7*Njl&tHm%K%N*Xe?GRKC|`L#`_!itvZj1-UT0$#OWK(fFtB|sY4GQ4!FBNOi$at^5O<-nJ+;F@NMc)Ooq({g0klfItsoB%fF0PAw ze|n8!M4u+yV$pqbh7N{vt1*!|Ko_k9S6Qh;Z*~}3vd7sg#$hu$t1)M1)mRWm^zf!G zLM)xFHmuS6nCn>|{STR5#c_2x?Yjkc z+m{`?3A@#2$5|5K{w2OM?;XVNbtcLIP(iWf z1*YW%_2Lymq(zvHC8`C1=#ZsyJ7f;cn z06dBYHS;`}0;%5>kNnCCj}ByWC)4t^>euy<#T)cPDN>F%)HA#)FJ1v5El@hP8OCc- zlqrb!PKb=hHHHBk3;^>8(NYX}oHubO_z75t>@OD}GaTb6v%S5XShMR~HF4<572geN*5-9?IMdnCKzH#RB&;wB7csG8fu!ZDmM?lYDd@g z%BwjijUE%rra?3|mOBoaK`@znN#}3Fzw)o&x!pyz)9qAM?bh!S-Non(f)7zS42w~7 z)Veeu$fs}u+?4zxv+iRZb45Ol`)K&k1N8Tqu>%sPlKz1I!y+EPilJw{9N3)4kEsjI zO|)IHHr-)#JUT!7(@1mUpIStuV2f^MBxcVzosTFiK=6s67^Su4^EXWqZhFCDVH&qL zJ0a$w;(4$M=4lH=gw3%cY+;^--u9oTN4ifvRF5(U+F%u-j7jI8a5*yKD3W+&a6w!g z;4&v}n4ei3mts^$^TKoM!y|w*SPfX$uG=n6vr^fs>b^7i6|4U^k{%Xj>45*U6Jnm% z8eN12v&wu>#`ZqLYP5{H&{R@dUC86dp_fKVtqXnJaK9Q(s|$5?ZSFLm|C1{%B(NVDi6!igTc}nY) zC61s#^m7RF>xEJTK^D$nbfx`<2A6vnmvAfRF!%oCw!VxdVB#DMT*4ooo%Exb*5gdf z_58XA{-7UXFn2T&aNCkP-w7n-Tt$(q}nI7AbZfO!03WVj$?3GhQBA~1^^ z;zFVqwGw@V$$WnFry&q{v<Z)r?zNnCr}fJ)lQPVS4*eqC;+RM2oJ@~* zq>Uk-Sy`U(mRT-kPG1HNrfItQT%W?P$Ch6WU|%89fHcP>-YCIn+Ry*Z8^BU`C|k6& zvJ`1y^ft}B%}9~YVER?TP}yRSTTl7okl(*QTY!XOP5IEEa zE=VIUKywZA9xwzmL{hw*7QnC!*e0c@Q>Ngf88Ej0nlRtw~>v6=12Ffa@(Nkuj{vy7SlYWr(oCpuk$| zP_kBlYqc-kk0!A;@@8_4c7K3Oo3wxGr@vemjkJz6w;>tF|AX4dtiXIhkJZT>5R52B zIw%glhoy)m$&(|<>y}93^$5=5lsMJIQA(wO z%HD*{abwNi#B)d~48T(Wn^Yv$b-%Af zt;=z7<(!W|!PgE1BYF>C&%krd5lxiFi1`Q#r8J^`02(pVK?K2X*Hd;e6)FFHAo!U1 znQ7GzedaJCxw0~uL`(nyrXEKg>}r|C<7HX8LPQ8UrmW1chY^rK03ir+Tm%%20yghP z2t`#%A`u-xB1h5ZsVFE)0D(0G5K#BFXmR2u_5JMwoK_|+!^Q*;M5Lr3L zZ2FY{!E{l(yuJBbUsuojZ+7tE`gH07v6bWuztowZKZJmRZ4-)9sy(FetZSk#BE(-o zu-v!pB&E1*+qufzZHBwW=IcpJR6#*KI8Dj@G6IYMvhtWnI;vDvg11KFsMS@aQv^wk zb5=d+lv^k2)-6;AbBe#!$w3YR0NMZao|ej`?8@I?UjF;<vqJLaespdgs>h2{SfN3ljj#eKRh$Gi!I6$6M!H&8)m#uT1qE4MoRgtK%;I69d zq^|@5S|oU7_l_9CFrK^s_IdxhhDRHu^-VSF@*XwnPyPU(2XU-Ui2y-t)3!e@@ zdXxd7tBjqFpNMcgcC6Z{T691(88+G5oin{wZ z^&^PHt@ZKh-ddj*mQ=js)t6gEBn}5*A|oO(Kq0Cae{K#BK{{7A%FE3y$U^R_MWzxN zjT-5Q)=h|A8YJRxa9?K@5?J0pb4H@qX%}sy&yT_TIi5HknGsD#KYWa@%vwO%e(%Wf zYP!CE>PkGB`S}?gUL6^8f_krd!7|0gf`ZYo(WTjt*@FDQ6uo!tb zSj(h`4-slH;-O)VfQ#3|mKpRm^i0cI^+b*BUw%Lk9iKredOBIAwxEVtluD$F7;XP$ zlTVAu8G`r>;P;np(bXalf&w21Ap0`N#h@)ZUeLehOpPxe5x#lzO#>1EtL_DRAMA0a zNN9^LlWE?gr{_`L&))Mz%22INCHhv+mrSfst6 z*Ca6V0gy^5mRU-GBKCaZsi-@a6v~nLki?YH5DFyNG)gJ$cral}p~I8m9|N~La3Qua z)W03> z#G58AIH=3t*cfk;Xu1#)$yCsM9RCc6`+?K(a)fl}XBl9i;4Ji1s+l^5wiG*xEjd!5 zu6uH1-425znuofyJzXQ+x6{M-zU3;=@@iW}qSxVIHpmrm5Y4H))zj#3UaUhk_cFb;C|c;vJq*qz;~ zX{U-0wDJxlXnH)vx&rz0rFq&Xin>83M54$)=&0Yb9sybiaQ!`a%3t|LC)< zHe4L8Eo-kKpn!@b-sQ8=kBiTUmSX_%XNs+h3VouCTf?1~0=t z$K+xbH9ui9l23Z=t`MdEvsNv$ZPBpxMWZwcarvF)=JXcBV&c z410%iF*^owCR>jMinHu0VL=p^%%pW4Vv0NKGs~Saq~8m5OT0%XD%RE%V;qLfz9kKY z=3~I{0(SL**Lps8K3`Y-bE(?;+|5#7plDC5CgkK4fWhkp48ZYAb+{fn-0#_sSat>8bk+0y|^l`$B0J7eUn%Bfg_8d|-3zkjQjGLqD=|9C7_C2Nbb zv%y{*o{Goq%gGjNlT}-_Sg0O*LQeL+**BG~hLSFBa+VuiASQh^Ep?t_G@?e3L@+V!~Edg3AlN2}{+6 zGs?7I>=10SpGS&=x^C={Uugs~0n~)>HQ+8&BG(BXXVPU>fg-wmz;eOUjey=K9c2iT zS%E|`W|as8CAH2H2q}J)>lo_82NcM$2|>!VbNgrtr$uD?%5(JL6M!905)`DI4C=?m zwp4S<=7P);W%JyE!p-K&C7A`ADdv((w|ckJ0fHX%sR-mo5hu8)QKm_cMcbadfJ1-D z5svGGXL6iQ2;ZpD%`sLsubd92UZWA}Uq#_ArAp9}8W7=xh5#)p< z6&`hXMui~3p_fEXxbATb`H344{#V^0l@2-=9&m|(qat%NUL42a6j?7!eW*wfV48X- ztytTWos%yxi;+DCkj3Z7>A*QLIVor?gG^3J1}l9J)Yk#_2k6_mTLw4JRkaUn;(E%W zkU%DAWbyg_C1*k3*1*aIuSzP40g=}M@|9&&k6O>;`5t61>f!C952EMl^TiO6U5Zv+ zISfTVeF@L4gdCc^c<>T1_B1ac%z%wsK*~03=#p^nTUt8Dnio|tv>9sj+hu4O$N})T zlt|jgsu1W&RYVmorlb37wO$oFXbWfv&a1YoGWfGz&9(2RP+MVqzH|C60r37XjWi5&tHhF36%TL z?(v%}b2NEjnmIn9MMUQfmC%FJw>c<&D6d$veSO>T-gmiazI1bLu(`J{BaM648^0}D zziC0V*S;Iu@8VUP6Q>IKZ5&`2$*J{n>Bn|&!&2KcVkT7M{Gg2h(3yzQXrp2$`9tZ} zo+*U@IQkIy4gLK)sme&F4_u;Gd74q0qgo;IR`o8)xs0aBFS4z0lIe?O@{D zx2Tx69*&ND8xt7=av=eBpOc}Rn~{;L3+$0FNmtRt*a3mTFydgOmL{ympdF+OL39X& z)-nsN5L>RTnInhgKtYFE5(9k&XPLIh&5TJf47IB+k%+;mu*-!OB^e%OHz|5-8__5R z5YEb7g-`8Tf&+rrDjbL8@Q7$1Bzj?PMLFJ&Lj}tqfD@CNr|~4^AdWa~vBr7Mj~jS0 z1vQH!%_`5LNH|SLSs5YRaLmWMlgdKZr*S08K}q8O#3aK0d-o0y)4nzENe2k`?*CGn zK8T+<_u-)30Q}U&`=>3igPsE{n34y+9$;Znl#| zpP_|ag?RA-@q1;Gfm%sW{=^^oD+PAWm)D&`Zw%mWLfVQ&`)0oJ)*B?S z_%Rl-Iu7BujW$gq+n-W`^n!kdLzc9lWB*TgG><~qjSk^)I?YkS26Ufz*y@Qy*x9}xJK zWM-wf*}S!JOW7Z>VYhc29j3>5@3vdXi^f?JaBp!0%jR*?hPB%{$z6LIEH(KvJAPed zIc0%KSVv^7Brj-V;wiypXZaKRR2vN%zYR|C&z7GfXs;ySWf80h>f0SwbnxfO&sw-l z41Q}cXxRGeJF)Go`QsND>mM&(KIzx#fBb6Y8UEiF#-{qX{wH9IZ=wtLnpuWr`qai8 zYPNpSaolF&=AK=7h<&K5S5f%QJg9FpZPtE$0rf51gaI{BS`N$$(B7D^3bL3(EE|`B(ff z`tog&n%u|9)9?2I{Z>Bu|1=xZoBydm=*wC1CQjaUxtQ{T?+(l-Q-3U(Z>}-ozFn7p zz&+X?4d^oAPf;9i>E|Pe`BEr+$%Gs)zTTsfdi?5d-(DEKf7)5AQLC>W?~Pu3`)w7^ z#6x&kR>mMWvSQ#jJQ*jYC))Jgo+9~E_S-wY%w-=!(0MT zvCGHk(q-#*#bG>@;)zpoYiWvVYFM3?Nx%FSMoYfmzFizh2w*9N0@@q34rQIu!QDQ4;Qehn{9s^rFBq`{${&b zH7IzS$%M8jCuRs8^!*E>1G)Cytim{$ykn8BY_6PU@u`hwL4CJv0+njm5@)EYX~i0* z?EL9F?DBWpaCK5~YU)ocH23JJ*b!?BobM06vt0UlZ z8su+Yvgdpp86b^RcCz1XA0{JCA-YL zD%bW}zsJ^WSD~b^zTO-(TD(}Pv-oe{I%)MgcarSB&Wu)*TgR0yEnJ(uI?-oJQ@6w3 zL7n_s9o*$0qGX=0Bcrx8Ld(nN=;x){36s(FChXso7!0LG{x%^<@yFt7YQArCMKo?- zR!Nh9A}DFxv=0}ppsJayaR+7d-3E2%(T}VV`|~TiouRIE9HWKH0`D=g7dK^@2`?AE zpKbt$V#72x_6hmtMZ`Ph>PH5TG_7}ti$BRvux#^FI#1vywq1`Nt=nN8M9?kQHZn<& zlCrm6qW)49;3G9h)uz-&F>I+vs0EP%?A49g&`{sGkRoMcQt>iQicnr-XF!By(+<0fE`qv0fi6Tx%>W^R9)A^pqOKFtU6pjv$P1WJ zfkGyc(;xw0P<|#2CSww;94p!5xfQdDd5T@a{)uboFOOv)z1IY{#RPrV_#gWMABum0 z{o24u-nWlZRPXmw_b)Dvt1l`pDypv&vUo=uezmTmA|T@_ms)**}Hl*_sLU_4df;&7pv zI-LdiC&#@Y>~ZG+cfX@rA$A*_SR?CrwjsmTk)|;*Bd>N;RhkGX^9vqJ{16EV2(|hp zZ1f;DZuH-+8xw%-S12TY#XfKSX1lzbgi=b$q5cw5DgH*G&1R4s5t{EQ`M+i_t(9@+ zIkFv5Q8&AlU2MH(886r?qwT^|Z08Nsjm?lQX)Q^?e9kk<)fTlD)ld@Ip%Ue~nW0*n z=ctS$ZL))PTBTEmN}%UT8J8VPv`Q`v72B+$N)AUhmw?MOl}ZNpfE#d$nhrJuDvOQ%Ywu&bJ@*lC?->a#i&>~qcMSaK=3(qhf6 z5{efF%fTOREq$+6$>gEBGDdS9OO(YkgEv@q>PV!i4m%JHRK`#%7|$Naz@#34$%JP# zrYk9>mdOKTOd%Q=O69c144jGm%!C({DHXie*#7g2H0n%`1|IY&ffi7uW8IMpch;KJ zEg{9{9v&EHA7TY<*MpQ&CP{K~pprx?%d5D7+HM2tQ|rY!8BAR)m1YL^6fM_N6tTTj zhNf`iwcN%Z5!}Pbl$>%lX|p?W&EDj*75d{@3RmDhr;GGqOqvotItTN}ZG>Hx>Yv0N zncYh2_3S)NpU?Z+wJe>x31IDE{r{hCX>nZk@_twJ)bU z>|fjsQGfA0!0ci1 zX2h?6bADl&j}OA9)Ti){n9L2a@dW`0p0zp`*im3kmS>ZhB=t3#c{XvfWH8LCMcM>I z#~F>&@Z8ny}t(l_x*4BS8!hNU&vDDSKiOVRKeL`ksVy^ucwdlmT}}L zF9UzQ>R^lP@8!U$RK8o^0Ohs1u|3oJ%#RKufp)e)o$8FhgaqY1p8iIHjvr@U3Y5_` z5CMU@wOz=f;rA|=ugS~F`wNY$&GzEU$v9HS{mWgb9@OJ`HFos7^~&=e(uyICOxQu_ zA466ktB#CUsZ}ATq{K=B>5(gqt7oq5nYv5!!i?rFwC0kg8HcKw+uok53G5KW_og^Z zm(;#>+2b~PNPLq0yLyaWcQ=z7iYMbk)F@}vVsKZ;t6dwWH)d>q_c{=FX{_@|=i$z0 z7OAr{qaC^({Z@azd}@(0NBpbv`bEZ>AsF@RMdJ%r=fZM4xeZ>y)sQ&|2dd)0V8p1j z=%;`afV(fj*EEN>rt77Ib=iNXTAtqLhIA`GU2ON3(Yu*BwpRyX=lYlK>>gWX6laxv zk8gNrm?uOxVON(~k3u7F=Bx(*{TJkW2@s?aGV$`fpI8d?S(q;>_E+Q55=;`qxCHLT zP@$B58Y!%KID!}~2hgt*#>xME|{_5dg>jwyY=Uy-8!)of49gve>2j5a~@miO0sJePr zs|HBcxnLLI+YqR45=0L1vE`|ZD)IdO^w&!*R1b2GtG!}{&`E?FH!{jzMjPl4aBPA)zU?7h$QCYTK$4qINZOkvEIP z3}W4#J;U`aHoE19X6matrW=J@cU5|s?b=$ut7;f5XU?vxvuY}gYIjiJOq|UyD?I`7 z@=G&u!qzyD_qvR?kimrGrRWvBl~=`^p$6Q7Iio((hOzB6kPP}-x4 z=4%*DWjkFBx z&brqxB3U1!u4W#604DXO)`wgnAu9_teVl#QB7w=F%JpjJ|G7!86BQZ)5AQgV{%&2E zeb{3W$#Ik+cITVkDKUb_E7MeHmd3`EVuuL5y@a@=jAp~i(>F}zCMU`};;LDqt?}E$ znTSx*BcC|`mTs7l1-9G`iiZ3@Mc&J6Sd%u=#GCBMMU!^(m4# zz!f>v*F}Z7p98FZ;o?`XsqO&#dHt`*SmtyIqHFkqf4Jzb<#u5d2{0pckieiZ2!p@j z8F~!-Z+Ff6HvkzOqA$}@hBN&8?NuwY=f#PNO6t~?mexyHdxmv=PMxburm)1y;|;yihInhNU1k+>u{H}&h-aQ4Pi%&qG6Ve?vwRRv z2H_29hH_Jyw18EdmL)endc$nT6_w1Bez&Wq`q+{e)3W>xYazde;{Lwd4ip?TY@F9% z*#(qyq?n^R;mR)EE~$66Fm>xU1iT9bsmaK87Xy=11Ca>b@ETzh;DhR9Di0Z;l#m8C zpaN2a0dD_{Bp|9wup7|{nay#UX8i7y3th?eRU=+At64Pxv$3W$0b#Ml2bL9e!$O{u z!|9>z&|TV!``~}D*?4dna+yWU-{QL1*cUI_+hgOvF%sV}YE4zzg_UEvr0`f5W{&7< z$S2KVRN2y!xWjSA-8n5Hz!JXJEY#`QuN@oq5D$V8#aEjDP?|7`!FJa!4+H3B8nh6ifgR zm)`o`v9k7l0PMoqO4Va#W6IUh0Vn)a9gCgT(s`L7-;`4$lKGZ@x)-Xev*I>+u;Uq5 z!+gTMZvdWms2}~RecW1FxF1MJ03!V+1Sx(nkjD)EQ#Wu$RO%6^1idXc*Sd&Tk1DJ$ zqAWOagU6}8Cw8r!*40GFZ-24TA$%E?Vv8apWFnHf>gu{Mk~*<9fDO}Oq0wNEhFj^o z3_42O+85kBaUXD=3-ywYT?Rus*r>$+Yxj@)E&xDsDvo`^CXolebDIWbm=_Edo_yxi zg-`*Cp4d2XadcT+Jv6o~x>y_+mrkA|3)U#XVi(e5%Q`mLF!C|lU%n=X$wJ?s^g8~` z8A28aBTD1@dchoBQcqZiWU?-5S4Z6XN%i%oHKqwu<}@-j0u;xH1j-jlFou{7MO?zE zgzh2$3>bz;a}^cOwZgR`ry@1OHCK1;T&$?@flj%_%jZ;ZbhM>q#RLI>fAV~D^J*Lz z6UMLab4v@mVJ;K;2Wi zz{fC(OkHR8Z#&57h+B7K^rtS3h$9a529DOEV@5K7Ro5Aex6T-$l({Zz;!e4}*?S#pJQvJwv_#YJAeC6zUexj+? zdvCkn%Hh`Y_x$mbTlNi>DU$kUW>qsXSq4+<1O~_{r40=BQ#vGLtl#;UCD5x*&$8I6 z6&9wo)gtSQMT1afduT|jWf9v@YLwrJrzIwBnzTl|$4X&*~d)mj}&v#lk+L~_{a6(&1O={no>Y>q} z(N=2b%6KqwIZ0?!I!73o$Vn1%rg$MEEFa|f0bm`U;@%4sGMR~H&~yx~fA< z+;uM$4)9)%L|dUF!Hbp`Z>pYMIk`*+=E@6OwjCrUoAuG3*;T3qv`T;Sw@zL8TRzZX zIH$X$GgQ}rEZBr?Y6?tD*(U!I=VQm-pupE~(h1*h!-=w2Cg>#fT_zeWQUQ1d1TTZF zHm?2eDg>~98ET;BoybM(#Cfg%M!Wi}V)Y$dFWSw~Dj!>?!nNh1b`iZ4A9Vlz)VTDn zxn8v2^Y2n7nM2X~DA!Tha(M)&vvrfliI55-6oL&z)6n)-$E)G!@`dmSef@aLEG+Uu zy$%^#on;b(@)JYAVkDv{M>SF@GG#{u0hv}?2iUek#$;(VwBlSCV5Q%`J9NW-q677O z@YDY7+dJSJ{$m+|9yD6A5o2J`NtF8kHjgc4|V^(QXfIW z4^j!Ls6HZ(*K4bERaNyWNF_LwuKI5tAsF`WPLrgkgJ^-|)QLr-#e4T9f@oq%x@7zm zVC1j~WP;SqNm3H#gcdX7>&NjZ`RmsVmi7rXVbTuHe$W!6_IUC_e;W!^3f21JP@m2M z1P^0s^{FLaR=dGN0E1$D7nR!+mfKk2?@a1t+cE0v&lE40FT zCwsGj7J5#NZ^<8H(_lTe-a{H2J7Sp)sZFarRGU+S9-2eDz-gN5QCI-Yu!$dJ50mZ( z#<0PI4+8l#4&bKc9($9~*(8Xl`BD`lHU;<*wfPb7kt1rhCmd?#oA|CE&?sU&A1wV_ z)1Yq9;6F`&H*G~VhowDa&<-}r^#kYMR z+EWG~`Ck_VLGMnuEa5zxc>zxo<`ua54`?8e>iC{>9*8CI1Qk=0GbflB6rdyW$qiN)7#7F`K15~ zuLwkLE<$9)guvz-2A<@G)7i+nzy8^^W!I7qSB-sFNk>=dKEVJ7b8o63l9G}#HA_n( zIwMJ#p_Ng(OM%-Yhh#wFgeSqp;C0}ON(M>Z%_96BBqjcSCYUz+k3z- z)o+`iYxt_m0=~9}-lqKnlZ*`d)bxe%cW`9;j!}9hW3&<$!~R3&%qF=XK1$C3Y(T@1 zEKu_(8XBHtlrlyyU+y>9t-89S^isxT!ePlF>^asxJDWH;t*8^%}5jFb8n&i{?dg^TqQr+4ztl`$SJ1H6}Wu?QH1~sVDx{ zG)*Yp^~C+o{Jk$8@Uyok_IDg5WPRVpqv1d>mdH8&ML6lFw?Ed_t|NLPI2bhORWnza z&So8XF{bJvRxP)+wM}L<9fw0VV|6`!zU*|}T>e^a3@qCIl}zyuB&1kxj9!<458w`{ z3=A#PPp5pR0=OtesGX{`}^-W%I)1MyLU(SudaW< zazWPH2FQfZ^n!XdPY0A}H|?lvBg;cAUf!(s@8;NHHzOsKKr!qb}M?1$vgP4~0`sF*MlwVpfG^r@1Tu!uX!bI-R9 z+Y0$lk|mBl^0^*+9l(~cR9jn5Wl=k)F08x`moF4NdEx%8jXOkR$_s01finU?G%VYZ zjio^}aj1_@g(^gN3CnUI|L$r5;wBL@87SKDPm;`P!}bWj7;9I68<5d^diFg9<|$+g zWVYp;0GmrOXHVKwyPRF;!Y|Yv-bJ+^KPzw9U?mzKW^@p&y@ zI3!=-G;~7c_e7 zvF8QEr#m7`bQKG4f;TJjz|utmOxZPvkE~ zk$>2rMr=%N1ZDGta5&mOoszDE!-OX-Kgj$?ANhxH*HZ{f0AMuj{W z5EmbPHji_rd{HhW_8Gt!u56 z{Sr38Au&%~@{ICK>&_?_Ba6yp*)}=ro?AqQi@7l;ab!o~^XJ`@gk{W}+A?8;w?Oh? z{Amo76o;E`7y{XulZd7R%Qdz^_O6F?V`zegta#8sf&*N@19+jJG_%x#gIii+E_7K; z0-I23qQ~{&>X|UZ5Sun3!b%BDLZ*bJpYF=Xacg&d6MT>;b#)&i6P)KYBsMs;4FCm4 zUSl*;b>#<_%R_W;q!dXIiOAg6<~*dEXgmWKUbyvPKRQTbJ{1S=Mx<>&%`jl|^1F}F z_jwNiJoh+O599C_IDpR`J@6ckd$)mI{;9muWBAzZde=r2H$x-Gyt8c^&XTw*V2w?j z*wA`5?`-Ra2_l~eh(4rM_1UKzH$Ly&wc6c1sz0KskI19+_iv1!TVvDhNgu$R4VP;( zzj5R0@XpU;ga~FkIzI2}c>bN)+xx434Ge?-k}px%69iVfwl;6iRvwQMl!~oQ@=Apg z?LZF6v+4!I+Q!BYVHcNO3*F;7!uF1L$;2KfyCa}{Nyst)hxYI+-p#F^)+rWi8F*U{ zYTa*|NbHu7e;#1BoTc$8>6v;_NX zjt<+1^zCMt;yvb^AwNeolDmX=fp3-aq({Hf!gWsCUTrfM|3DJm*kOC9r~G7qf9;FL5jdoBE0{k~_6ZtOXwqO7JHxbf0BVG3S4g}+tFyr*WB zYhtJ1&dF#b$QgGcE-#E`xf?JV50?ZSTXpYR9y@6~fpXJKK4|hp>dnukGmi6)Dfx|Y z@UmrLfvoQ@l-((d`N=0+u905+cr>RRS(9PYQ7ab6kH`xZE9ScgbGOTc)cfz8+dD3w zXhRvx1t3BT1Y)@$-f!G53Ue}5py#`~yxO>=|304mKO~xR250#^Y?J%t+Buu^2iVuV zHi&%9)C1C8S?ZMD{Ry2^RlF$b+lsqCw?&Kp{|nMDGta-TU=mk+N*?|dMOA6$MTWze zMNT2PP?ZTKm^+%v$d4U8pC(0#fwBh5TNs?S?0{4Tl%Rpyq1e1D`RDqP0rgs}g%(oM z=2QN{B8J+|(*;!;WHTvLM)_%B7xk9%nuTy+K%i0Gyi|c}le3gsUMtslh7vS5vVf1q z^I-f5PX!EZP1MjxYKDrF{9U;pRVd&MARg?l0g%A#q8v8RUA^~%e{B0=Lso1vvL zp{A7b)v7So7I%%JW3H=leG{ME5ec;~T-0wv)39-)RoiutBIZxo0ygIlEPe49;Pu7y zrdZtP0L${Gk#tt4SSra1MCDX`tb7ba8>O=uxGz^qY2k*lO|HWx!GyrExOjbm%;d#8 z)1x$+Q7Q0?Q3_TtjI{jougvNP-k!@xLLjZ0r;-)ZkE9l5*0N{1T~>pPiKUL*(MEb< zeXG=2BXW&=Gr+X0U@eszG*vV535VKI0)eB%vx%x_$jC z`IN7hMaBK3SO#*9eJTmqi27@iep6yEHL?s@3G#c6%42HNA7i&*sm-1aUMr~vgsJ!h=7t>ObPSRMOkY<^ zvlf!r*fXi;2y|I98xJ7V8$qpedoU!`T&r9l>7RZ?Hx{-Q&PVF$tC!?S;(Mso!w??9 zJalAOgX|*n*upPcF3dAi0rE;~PUPAy$s_a{74D_=cJ&^u%4dP4895Lr$t>XswyJ{I z7DnPJ5b`_)j^Uh_pw!jGrDAR5FWPZPqeW`u8;##~MIrQVy(lQoqYpbID9sB>^2_Z2 z4rHP=UH#=Zq~f79Z|2gpyV}1dL#_526XaO0G%R}(cUvJx`?|!^P4cMS8s5tUH1CRc zQ)yHSj$A1rmCxESrO$IifOaT2Bdt9+KF_MSphIMbR?ZzX0NCcOOK(D?Q;F8_Za4D%~x8!ve=d*lGGHyV|r2L+nTGZTg z&n-dI%7&23a^afbNl~Tjlv;Y2>PM_cL1`2h<^bq7PQc1s^8k5X>g=~vE3P~aeQPMcyMxJkdia}1mz(vYSx2zSBwe$+QEH;2o2 zD?H?jm#R0Sby|LIe&&G}iW+s77XX1oi5@+L+sB=YD3xe9g-HRV>pTl=1`~~b7#%De z180b|*R?f`LF^dDUtjz;E;onELB^Z4zj&$ovZHlcD$LJJsLD7>a^2+xk|fac)+KuM zl&W#(B1(8Q!zoOvA)K!BV?I&KO#NB^_Z!0>-%t-b_qjoDp-jaTwIheFywK704d@I* zgP~57Ks9z-j+##YvjwMOoEN+gVPSPwd%Ifv5o3`tRahjKP+mG|Q`S9h({}N*L zNt{H({Q7sWr)S!3T8joGa}nuLfpl4Gja_V-Fn|2loYu$y$xevG=eO6N)AwHlY)r!L zS4z`C;0nTnD3O*YBisF_tXrS}3C&|z^Q-^>0001ph=`>FYo3gdp?ieJAn%KeEFpo* zxbd!uj1~=}N?5-6;Zc&%gCbXm?d|^RpvH~xM$$$eBN9#HEDSP+6{cVCG_7h6(l?J$ z4|y4>C(4fC=WpPQ9VDZr3&|C))^JS{76vOjbP{Ej{>k@2ddz^QujK}k-DVpd+KAU5 z@RyC0+^{b%^#&y4ZCf|HS~Bb}VLwK-{ZxXtSrg(Ma%xcCmIf-|B^@J6@N3fBYdyeR ztPN<4Yw8*uXhzG|s)kAzl79=#MUFJ&YI>U++tXK5KXW{j4q#D0E@T+sN` z_-x8m`4xCT5cnridPy#XNv+xqu#f^693is*4FEx42owfKm_+%`cfRwT@8j>(5{2G% zW>&~<@Isghs&#+?DSrST2m(W(FgT(sHQSkWZ=eQlkOtjjrz29aBq9zP!fc~IegZp7 z(u3q|gG!ioWZ~3~U2su52}dt+=O_+FQeh8CJxRf)O#_k{@pgHc4!xD0w72Y2SNv$V zHneWisa57Rv|Aolkp`B~L)NTSQWz4t;W_}rf^FOphM*#sg_XG5^-c{kb%)ON1#4)p zf=t|+(!VJ`(R>BLvf%VNDcX~p`ugE!ek>OZyG#0K z3yX!vDbYSkJ@93`K~`8XgBA&%q#u%MX(MFaJ9kQ@{%v&8s9^KDn}qcHSzao2WR(EF zYW_7`aqFCw&JI>}URm>;Wr$p!$7EN+CWf?@q#j%IwuOX#l@qM`3_*W7A)OIanLi3G zT}wTdHwGh_Z{Z#2XSIzerweWySrK6ZY*_OdyUAO{IYGP&-q@$mc>HJN!e^sj&U#o` zn}%0I+2x==E*BeL3 zrh59#UM}m0s7J;fH&7XL9b%l06}j@gyQu4F{k44i6O>9OyN(HQ3YtW%g?tiv@#QZENJi9NLOk?pWz!Ct0w^ zIId?u!W!k_VHyFkMI4p0$4AqZ+CY`m0|u41?bMNalRX(M&)Fhl8#g*SIng*6#3L3T z?*M+oP@cot{6|qok}#Oo@Qp&)objB522md%rC*WkZVkm-!XF|q3A)%E9IHdy}K{7>>=SaofPwv z>v(REtc|wS8S)H*%jt?8pIhXS+}dVbK1$jXqoX%@*_7Tg{JpUiEv9R>Gt?btPc9gp zF|4`9B_OPcC7#nhw4mksQfXgC{mu7X^f%k`6)h*OyHy&l^>Tb}d=H4Ih|(ln7T!Hb zk+Xg~MPkE^jt*~=t(tyQ;V%_dXLKeuUY;)M_$4y!#qNj96n@VJ;%)n<0edE= zc#PQ9v64WteLrPI=}$-`%V0QG5te11U>JFKo*WR3tkvyIqR~V|662*2i0y(xnB1eP zE|@4044K}eCCXjqj+==G$@*Vg001=f*}T1euIZ}JRyvS!YjkmHFX-+<6>9N_j=mkv z)f0DGwwTw1^b(sme<)?k`G#DTpiy`{w;ZkqfUSbnjI!vIX7#fR-1|Axz>RTj+D7Dg zcnPy$(hyI&&d`^8XT0ge*{pZ2L8C9QF=AbvIA#!98YAZPgP)vFN*!fxUvXZ-*#5`vsCZqBeOhXSvzVsc~)I_9nLxqvJhW>ZlTCMlt6U3z~E0 Q@J4Js_!3Z3nb|ThKpoCc60tSvB1WsA#qN z=&6fF#GpIqDpeR|tdN~=g4+Q}3*D2l|Ns9#JE@GJZK!EMP=V>b{oD5|dPEk-B~}k{ zhExY_^PN&+XUR7isYV7CKD4+ha?;{8#Mcxj!q`8gd}uKgMjg{dzydC4-+dLlBny)OT9I1 z)}^29+>pyVfJ-3$`cm$A%8dThWqBV>eZ5{&by@8`=}d7@WQTRYoBS>Ie`zah%9t-> zv19jC`h==hExT&wZuwsKeu}_@LZcAwbqI%$;IN<+MkCB26xiZO2EPC+p4JoWU@^NjP(1wa7=zyRiC(e19K z1{xp$VKwBBJiN8H2PH1R z*%caacHK`z5tf$vNsQ0v>U@S!3P6@r;Buzu6B<@bCaCi&{8_BoH_!)&ZWc2m*#cr3)-0$ znKid=PfThjEvfE3@EONK#%)c%1=1b}F-F_o;^*j16nNAtp+XXqP|VM?uLR8Rb^ho1 zhXFL=N{k{B=w<#c>yT1WZRgy%bJ4l>)tptws1+(C>-uP){UL8IF#o@~tp2y`WafX# zPAwqZh~6D-*=bLAVX9_3)IHVgi*%K)h9uQMRfBZh<-;YgfKxTKx<~Rtw?-4!85Svv zXjtG&xIvJ_;>oQ;JRkWheH$bzVWAaZI{>sEsJcm=7O&1)pb(V+1x-|TnZ3lTe7`Kc zohJZ(fl+H({ZXb9RYC=%0(V!W@n!d^40zL7C;$wu>%F7Xhd3Nt1sDRp<&^%SBRHfB zsi-Kp{Og~aiV>{5`_^meY|t5S*;aMaU}_$4!2kcI+S?)!lr|)>`u{tpqTG;59~YHN z9~TwheeVtaOM{&mfLvfOqyP}R2LMTZ03^k@X9k4yXNI5*@+V>=^`nB5zE zl&$aA+uO5@|9^lY3L&A8G(noOKu8WLS~-A>9Z;0-k+LF-l#-AVBbSs?t~Efka-fs~ z$|=%S(dC|Ut+uVStw>fNbR=BohQ!tFz zptfbDiC8*BEeoH2Oay{DX>#*Nw)OuJ7l}tqN;Vj!R7xxU+O6;NC(d-)-)!k-2N97F ztON-mSTBc;GFQPnyx~gX4eyy1E7Ve;bkJ^0{)johKTOPPHBk>N*Z>6ug}%$SnJwlQ zC}3{$pBdtkh*XX{qX0~UP3sl@H{o$04jK^lDgagRoRbFPCJQu&xdjGLU_`hg7K3UV zH87wXn;CdRzxVZSF5&uu}nkC$9&SLdLQE|D!u9oi!V_?AUYQ;FeNl%2lXTRb5kCH}+&@ z-ni!4$9k)C3YZ4Eqd(I19Qs2QOc%NI-KN_BK&VwHp} zx6+kk*)F%^@%qv%FUqQJ+O8kQX*Ncq)d3&`BPfOwB&B}`XofYK%oeN7?r^#|g2(Fv z06|~~6b45iQD_VnhbIt8zpLvTn?7W*Ib0rJAQXuuQkh(#RH-#uo!($HnJqTE!(XxN zbS9h27m6jv_51*ZxLm2$>WyZr{Qv+Vn2w+rP9%{jR0fl^fo$&V9*MX-zCb7vtJ|*M z=+O)&&0=%7xOwsB;lr0-x7QyG7t2);#YvVIW%YmgJT&d`@z-j1MyvH^`~C~Y;)!G` zoyitz^+vPR?sR+o!EicT?Cl?)92}mWonKrY!(t9Ib1s%GFr%1EAcm2mBq2^G!kNT4 zn*`^w!1*k3AuHU<8l~BwEL)Ukhl=b`nFFeFM0HN6Ns8KJs7sEq6nG*f#qv}XYf|G{ zn)F+sSeK4sb$W`m8PJ&#Q!-&%W_0C@r*c7eu6QOl+|3<5dEj22crGuzkT+h+2le@) zAwM+ckEWp}2{cO*Es{d3q|qiB+?OmKNDdDrk9H}bLyCBXl+Y(-^h*W3QpKRuFeG&h zh=5@cF(ML1MaFBSfgnx1L0Wi=wDAt<;62jCxb*M=>0<&J;3G1`CuD@r$QWOc3BDpz z3QK1AhRpFDS>Ok<#7|^}U&tE2kq!PJTl__K_=oKAAL(bb%6`@e1=dLy8>EL#(#IAV zV4E1&AuH^X1NO)n`{aTHa>XIJ;fUOEOlxpLo;W2hoRK%q$p;t2!zDquB41pSA8v?` zTk^*p1>l|n@jyX%q+mQz2%aevFBFDX3db8o;GH7zK~eZ50lp|2-xPx%ip4L*0VE+H z5&@=7Kqww4B>NT?MlwIQQ+;d%H3+U4j2JBl_pa3B_fCwBy42~cH z$B=>($iOM&;0y}Rq2vN80;mb0A%d0|IuhtfVIYH%943k|Q-Xyutf;`6Dr~61mOAWc zz@8=?Xu**-oan%rE?nrrl|I}Uz?~sH7{QYZ7;VVm5sT^`sWPwbQz3YIr^$p^dTi#_tg-YD1?75k&%Ky)08fkQEI zI2Mk?#?d%978l3k;Y56#%pa%nv|I&a0x&KVOb88=!oZZUFfBDao;n^&15bp*lWF2e zc$g6ZW<`WKkzihASP%skMTI5NU|Donkru3xHmsEntdlORN)OgcA2!GUHi`k8#DvW< zge@|HtulsfV!?K?VTVj$r#P@nrm$OPut(;wR~E2emT*8;a8TB8ST=A(ws2H-a7?S< zxK_gn*~3XWz$rPxX*t0eapA0-;hbFHyjEkC#;KHQZ*+*1JDS0Fq91;Im5FgyZXkFP&txO1yWEYQrm*Gwj#Z4sMU7Vt_pRMpkXi? zRgK2gplP*eUL9IgkCru{byBoRhPE}LT}`;E9k{ujSXwi#t_AIDMaSCEsa?pe9X;y6 zq;_L+dvI-?xUMeDNRIh+V?ldyL;G-J`*B-6SY0pH)Q8d(D61bEJAh3c#2p>NogK#J z2C$_;+|?26>L|(^!tRD~Z^v+7$8moru&0yQ+X(h`3KflFe`9!{(>Tx>9Bdqqc9z0* zlIMU6@;rRD7y4``;`))3zy&!4T&uhYT#!oOf<%A|@)9tCY=&MQ25UyvuUO)3aML3YpcDE;Nk>&b!e)qN)hl^-;Mc3Ktj2?D zfGjlGlfeE&JkJ2kfU3;6#E|%nE*1St&v1}ytjDri{`#>7U!RCS;dw`bc{3Aw8T6X; zSy>V{rJ_kw=uNE%>atqN1xL@m*xHCmonG1#+Wk%Qb6WrMaxy5QqjR1q!*7{lN2kn0F zfbt|esGpRO(j{|e0f%h@D=Z>$)nXzE`$LSJDNCXJ*WE?vsVjv+}7CvpjFB{LOX$tiXx4cU#|pa zACsh3T7GlEh$oEoO-QnKZd%Nec!Cr>hqwyG4?8v}iI<^8AY!u7OAC0AV#EN3WnB^L!*~WoCV}xC$!cgmgDAKOdOaa$ zJmKMnfz%j$ItSaS+2BYjNrs5Jjzx7p9hj#3y)1|ynH;87dL%UYZ&`Hk!Ulic>&(XB zbq>Z}I&N*jb&;#F`WV}#aD9NnQi-NjcQHK%&Q0>ouf zGEa(P#1znv=$q*)pl7Z7VqjB>X&1Z`bKYV+%6pWln_+W`*bi6%3!fGsi_==p=e5;w ztA*AGu*?Ep0fheD`5R^>z$OYf(TLOB@50F$rsl3{nKWkOl&1m3$P_9r2%_!Zl?5D2L~ zQONn_&l|O+{9#xez^j*tW~>iTlso-|1}~o9il^?4Qr#XsCwVWY^h=*=x<^QW8NpdQ z84q2oWy8}UQevQ0MoFiy#OnwABOoyMAs#&4@Ghl z%WQK9FLW?c7WK;SI=yyOS3KUzYS|kn;&Fd>lI2*D`ppn`!?%Ecz+a%s-# zs-i?iLI=G-kMIkA5g|-GR7NZ?L6~r1@tJ19RPInwDS0>O+DGc^+ZE>qp{fU=>62;d zm8LcHlj5*79K9&`3kNIx^v$mQv_Xm|j@VdC6~FnDeHgHHYkaYk+BFS$r*}%@l z{0OQJKNNOQmv@%!@ZL(%)`$yOXpl@i=7QX^odbguKDQ~E0Gf`%;5|Xpe;;>`{H2gC z3|7TZhpAV2D@+k#0u>;9j1mux7GSGz9MZJwXb@wBGdlvR;O?a-$3zH5$si&!081?X zb!?8(p>>4YY!lzwg<0B>GMgM2he;G8CVs*~Gq$3usnN5T6>&(Fp4=XNoFc2E1G1*T z;w+{$sv>a>KlfaQSg`y+r&T5#;oq8F!)v20D8odM(;Nmc3!C~=(fXymr)@nOAGPtc4Tr4hH~<@Mo_WmHZUe8+EpzrF!gjqOI*wZ&b6D!LU-Q?u{~biDrCMM_P+X zLS7cnQ_x+3Nbp|5v66RGoy97zRnESU zPf6r7j#ihPpE+)FrU=+yCa=RuuvZy&B5ruf8-{y15FBzGp)waq*a9O7-144YUamBaBj@un?S^ zhir(^I$*(W47}Bj_&$xjewBCCG3hbkh?Pb8rO~AU=SjWraB>(PX~Myqs#F%$ayL$_ zl848^liHWd(cX@sY`R37w5zI?;+NahzPiB*X+kA^{kYU!C<@Z)w|BzvZ)!iMZ>er+ z7rFV!cjKuyw>;%Z?7lKzLqT;nMYrtPAJaUz&km%w!lE%iD*DA$k^UcLTDE+klDB$5 z$Vh!&CflvSWjQM}YqKbQ_3)x_xww~Oi{iG;RC`-dBBYp^|3IL!_X#qtK@tKyc_wJK zh5q(~9RHyoPp0^v|1j-eYhYFY|GQZTuExOB2LHcpe_ZwemW}G7acPKwvnZ)yOURg* zL}pIfMK)%X14iRgR)a>Crp%yxIio;ZKWc^$Js<~G3$e_0CIFT#f&Xp0PsqQ-RZ#aWys+$N1AbRZI}eVi%+g(J`{wMQ;d;m~x)Xha1UT|s4Z|>Z$`}Z%rGC%qxSuTZO-6MgaOLak4k@@F0{vL!s_U)T@ zbsr8tD^tl|qxO%2bnaxf@b zab%B!L=f6ATrv$A2naQ=(YBe$F?_YGozX5!h)Ikf*UgythrI4boY;4`99hg>akrhS ztb)I?Z8?Ko)=q`n*c4D$Ex9rho5RTpkTp@uY2+cXZ zgF8SKSYdyrt1i%-vdT;7Eo4}{ED`iFn$(;RarU!LjQv7!W4RR)ES>N?b(|%}uyUW2 zNRI?^?shyh{ptGb76ZNSA1PG-m__d~$M~$d|6o`*VZ2Mlm0&?a+Js+nnZ_x33^59_ zk24>T<3;_HoroVk+R($pB~tm0lp$?7 zS5Tpmn9QwC9~Xg&OP+3MZf*u(VL%Dw)Kc_^{u%#kO3pyVfC~pd_*;sMC-| z{vvni5p7x@I+{{`x3Oj%PEw}l2kAU*eRg)m)cOnAa?cFpZ5CA5uN_v40+21{VcDw&kMl#Yw!ctEr3Pk5$g*Eu<0A#w~#dLqz*e zRWR_8Ok1QLnq2o3Cx~SRiN}osGFQwsRE3y8kp-KuForolRZhn~?{~7WwZz{3E(}-B z38s%sS>uKKJ#e1bi0?ldb1>c1BAp#A_ zAo(HAP(g*x5`JB}dW3rL?=XfRL>ay!_&6dj>E`%B;zWNm3~X|^tQjMG3{o~8vXI~Y zgZI$GIMd@8KeZh+S8gCfdR{n8qM~mo@ze=REgH6ioaXyx6)`Vj4n|Em>{ZQy=<4Wl zPg81|PF*W1@S)i2=v0ZmSXw~AqpUmyDmBqC@kD{QSdUmTOVZ>r*W-6|U%gk|H|vfk zoQ%iZ9-P1I=H=E%(;P;s5-`zxCqOM4GW z4Q{`r=U|hi5ZXu9ch}+5K#}B?LvZJ(?xy>%jp{8+`aNCnx9S`~ zIpdga6DsTo`5ra7?VANaAp-s?^N2RwV3gHg7d`Lipl^ZcJphZmz-3lgKd1y?K!h>- z#dDlZNu*knQpNWY4pZTojq=v~K#7+NYW1Xh$p$iB{8DEV58jG4T|}U?5FDeT+TPrL zeZkhRVqa$o7`HbDyraSpR)U3h5Pcl50MF)bvFV=Mg1EsVZb*$?DSUbw1jfA5e9${v!{XQN>Q>vWrgC7@B8RIwZ_Mws zLHxeg2otSt_NU@hoVSOj1=SB`7So@5@c{K7k=65oe{H*dKT0l(rq7&>GdBjsru^KQ zXasAvoslz!lEJtOj;tGhWQefU!Va)DvCt|sLJMr;C1TmlX}Ivm8`#rj)$h0_U}BI) zv?na!4@=mU%9$)Qsw|lT+-i>!|22htMAk?;Moe4vYqCK&i3V1BH!_z<83+9n13p)K zc|01f2rw!ndd%rP%XV?5ZEVi8-NU;-JdJzRC}yj=TUe&|S)bfm7s)AaI)WOCR+O2Yg`f*_WxznMX?~fWldPO@DHOOe~~>t zeRS_fsu-!^QHy5|4I4mnWN1niO32C^=Cgyod0sN1DW4sQ7%SkNnlq?e)a+ZM-u7*&i#`_|+#WyWriA*6Yo4;W z0YV6fCX7_fUFS)=*_h=usMECdY>HQdH0zxn>_Etk)sr-ttBJ)h&$Us<;Ux+@i$sLZ zdVbpJ3v_A|y%d!JR9aZzn=aS7Y!EYl3^GLX*VAe~Qy`craQjt>=!p1=e?3i9-$m$D z7(CCkz6RH0tp5%$P{iN2H=8@u=ITywZ0bE(DRn{|Aaj2q%qpt6eBfujE914lKXO$y z$Gb55ziQbk?1K-&hw^>#)-1RP&;0Y6|AvBh?7c$wg)m{mpfey@Jk4v7ATFa!MpK~dvy;$^IX603_qlb;dT*c$~ zLCn=vKDn*8r>Gq)#L}gAzaNB#v;rQnVe_8-WJqw800gJ&m*#MLplySlI|U~ctujtG zvjjiTTHIzwBb?BBIG{YS8s<(rYNYkxcPPl3Xx&<t+5w5ev8;a`?aC)P0O5wypB7r2cEj3{klLbmpwQS6AhETmUbT1V$J+t#j< zDG>tvfG44axky$eSzq?NJN)W}3~NUaCjA1a#$_Q#Hns|9Thga-ZOx|;D=4wc_Tv&} zuCUEz-xD?90+Z#dO`dz2`mgfXvPinykFWOfm#AXn!Bgg^u$ZW#lfM#3Cf}Y~E!1vA zvm!>!b=FmiQH_Lgb*>6_wF=+)Nrof(Z3lzb<4--dPB#;wxRDi9C34CfOhw$ppsv_b ztT?kmw_{Mh7?;pW1siJoPDG6+4kPwIT!l41j0J1=IR2h}J7U`_B_Shb_AWkPi5Q-I z?-RFrPj76(1ZGV;t3bAQN8(dqw>)&!>l^cPvDXk0LTot=K?~NMI(&NB z_;0Qe9n|<4>KD%BUUW0}uAhQ}e}|kU<2EuVucptwU7O5Z9;R$5!KOCpHnwWmz@3du z$v}jua3CU0WI*Z!96xS8sT_B4^Epj;sOltVGCgdv$1k_h${IxT1|W6Pcm^+%OxsxM zJ7Y|^P1kX3MBK+NAML{Ia7W4vjewtsa!2@t`i-hb=$S6EhQOI#gdE+AfmFmnY2=0nF9-0Xw8ymnSPOEcQo2w4v15<`$q)29^c>QCI-Sp&0!#u=5m^WMh|b2 zrnL9?Lz4;x1qO*FZC9L4wlF1>X~I*bX7r1aUKmkQYTf9Yl}uFl17Dvt!mclNRm{oVMF{xH<5 zXxJFSLj9eARV8l}j2Ci={H2iSCQzC7J+dJ>{}pB3_Yvirg?_x%*1-#kGP@Xsqz36~ zBT?3ghvv3T@a}s$7~+R=qi%< zL;}JQG|wqvx`zZbY7xFB#|^)@)e=is5n)S#qA=$INg1Fe@u+m_vuV{UMm6 z!ekinGM-7f$Ot79R$h)adRbt0dA!Pop+q67a^}x@zq9bJwe*^c@tLq4zJ+_ z^*4cbSGDoIQOgbIorp{CB3+1%XU>(~p+A^*scyd$CoEC$uXg)a9(ZfXLt9R!Tw%mB zQ7rIrWfB`CqL+#%rR5YWEk0~Imr(DLm-a@@nyeH!4cw`f_#9OFyYkuA|6lZj9YttY z4*IqiL6LY(rBk7PP$?R<<>3i}2@GT(xlWEn?zFELalBX!P7HXO*pLq_GFhC`CUL~$ zJb+VKm7}B5rg=i6U$l6elyp+>fQgig2HInhh^^BlF2J$Kqx<##)_<$N-YR|LZ+o4V zK@@G>JdUqAGpKPIxW8*_zd(en`gZwegwRh}wnF;{eLsorAMiR^h2RvE&wlsSQDkq|oFfP~PVW^&Q%CM?HX%StGo}aF^jw zOv1lBe1#v<#^Eb@H7W2%4LBudh!=SmSu;R&Jo!&nC%;SRCw^ef4} zUKS%S0{00*$8wkSbe2J%3X9!9&-jX9Zt-4HE}XMk;~dD95x*&gDCOPllB2$=fk zl{O|{eVQS(T0i^A&(=0!UJOkOp`A$va!Ld*t4cK^Y=vme0m+-NiwIP09qf3eqF6)_ zkMEJSI+5B+m+^`BQbWFwUk5ILn?sM#TZ7A(MPr6Cr#6euy>ht74-xglMJ;OPw0yOu z6PlqceSMSY^1wbj8sGvYLyk%2Ji(joft23qiNw}iMwi6Mql<(IV`jFPp7SVdsh!0( z5(?J58R&>zmOY0rxufEF!W)fg;W;WqacYKeUiS0a>_@D*g7(zDeBmIs!@PR=v+Kvd z2D07HRXZ)EB|grgY@%i|&Gn!wJ0Tyob8QLfj7$eA;jrgqPJxx$;LjiO6pe?nr`=3Rn?4qu*XCYGXIl{li`s;j zfFIezF`e>|k@E-1{FTw5KH}`$dpSFLCLWDx|A@6Gs@RyWL(>$ITz(+nvbq9 zg0}Tfsmp4Nx(tj`Z9OpsS)$V1Y{4M+OGJ3}ZVnPJQEAkWfx_p0_?$Ck$j#1o>j7^duw}-BYgkW%{k*Sb2zp0 zPCi#J=JNKdAGzbiQZ$xLCwRt*r%61MO0sPHHBK34j1cOGqXiI6d+wXAZ}`z+?{$k3 zmRp>qHVyTEndg+4BApTkeUv-RdFFTJZN|LAIg4dujIbCcC;mhq<|M0!Y<<{_p8l^|Z* zpD2!q$BS;X;38|_YFru%Gulchb_!W9oU%Z-^0LX!O|loY=y)8T105_%uAoI&GwE)ek^e3~@zFY+Ko&~L|Z0IvgK?W2qevj_?x-N8?lE?|4iom`Cmn*WWz0fd! z6XLn;U<+rcG)4g zjcL|6`|1=(eOCyN0cj(%z5MpXV9M^#yq;1N4Z|6yV2pjm-5!Xb+hGK_;^jHA>0XY} z-p&TnB*HEB<-(+vN)RYiF-p5OSX5i1{T&hBs0nI4oE%F5=_*Eu+M0vS?WzPxLC_Zr zsBay}VMl35NXq=>rIc`h+^@2CRdoy}7CiwOT<@#K!J)RiAk2aMXi0=_s5F!O(G`%` z$ajT>sA`N#UV&rxV_!b(r_hI%A#&<1h;>*6c?j#_;(PQ2)9a$DScDZpTAg{n1;!td zX;e4v^CaUSNDOG`ddDOawKhLYWgAf}C3Je$PY7AXhB^`Zpsy2YBjmz{s%+qFX7X|WmO=_`~MDRdvV+Daz= z=e`c|XmN0nP83l}qS{ms^*}4~{blw;`&M|#Je)44_`R~m{3uMT5MhU@h0Tc`guPpR z7R0k?v0A9_x{)72p_U7FjKjy311I-Z(*8v6yzpsp`hd+*B78{rjf-`|nYpv;g#x4{ zm3#;0?ctnBm02*3K)(5w8V}7o7TM|EiXOVVTo`$4F-0p3O@iypcUK%cOiC5ry}jqm zgT000(Xf_WWSz-QxF^yRWl}pSsWveX;-nbXfH@H@gWZjxL#=2ja9MmkDx0XLc!QGC zs3bHT6%&?sCH+N{g$9sd2q#9uQ|?!IWNmsf{QHN9PST_bh34?a4ks?n0!p<1F4?kh|z_A^53~6Z%5uk|bOLsT7`O7wgYN>Es|Or4e5c?C<{cqq{r) zHJR6nEsQz^jP_yS$+-mt0N-e;SbSd%gi7N8@8Vc|nj$s6MI)(JI!1db^>eC?kh6V` zmqu%TG_emG?wP;E?6yfh>1lc?gws)~U}&QmXCLLr6YrwK2`9o|TqI1X0gP(kac!oQ zQhjKI7NZnxNLF&eNUA*Oh>fd9d0{P|KQ?E~!RgDMz_D;Jw#IIdgxxZI`mua~Gyw_g z6F#A9C&}+)_}vBLs}PNin~|0Dgm3&*L_T|R)dL~VY?Nr|@X|ch!jnNEqW7G%45x7S zIxTd+YLm!>y^dwGAiCG`TQ(D{W{QSl0R^0iC6a$$A^N*1&_j*B)0T6L8LKK6gOtrE z8S;eguv;*-?TcdsRn%{#khPn#XV$uiSEP7`q!8p3O{$WMI-hE_Fo``5=7{n$k17wo zd{t{;`BfDfW*v%Fl$`MI=lKBuvb)SAF+kOZ zTawGb28C4M_5kiH)OHk_IT?r$vWt^- z8R(Ss8XF_-9Nh z3zbb-t#&(GBn*;FDlSWbq0PUCI~rIilfs6H5@KT{<}di26vGm0{>5(p!UJzDc4*6qSwT)TNKH}0?;|#r5&!}q^AG-! zKs^8>0n}L)VU^VPhSraEn?9`Z(Ym(@JEtdw$LH;kUEZ^MY=yY3GvMxmd|B&ayn!q9 zNekmvpqf2`BBrsGW_Fc=ToW?=E z)GLo(qeWarfI(-$CoLP<6(Da9*$j0eO;_rW0n14f6r)h6)yolWArlSnhWFaz(w!yq zzhmNEcVqt3wuc{XzFu$Kdw<`iTaAVTTloIC@^Lu!4n@ZuUilJT#An@pETN=n|cowR$Tz6<8I>(h3?Am7rbZX9dU>_v8x@Vn zu;(Q9RKB+ygqyD|V?&|v+FC0$sz<0@ECh4GRlMLu8jVWzv+5bVQFf}yf79SXMK>76 zROzg?xj0R8#9a{eWb}?0Azu)Pdp?XyS6M*2xy*o`s zQ@5HW`#C1op8MaUW#_0*cC<>nEYk&4OKSc@8)$6b-8$HaP3B`T{z$KV(ahQUEdQaN z^(pe0#;B1#a?@NI@ar&UeV8>3!N*YF-T;*N$pA7TsIy4x3e6(KE5rN5$K14=S@hA~ z=k=k9rgOcnaVq70>fUdu^Bjfy;Ia1Dp#LcK>*;78B&MjgjL9N7r&jGNx1rQ$D&zwr zU+r2aS}fnpQ*#OXfVzwM!HlwL!;o&bj{cQW1}3WTXi9vED&qZ#3IoJB0{(78GeJi~ zAzmt~=hj9(bdsbyc&$c!EhOixydG)Yf*N)@q4CkNjgbUEA9}ba9zbC=Hq!z*(7PR9 zxMK0*PR0nkWsk?XA_Y%38&8F`IuTlj7w2lr#va6{q@BI|3+h)ue!6(|+GuZrPmKE* zF~h33#%D)lB*%ug3R(CiYO$WJ!^|3sTR0H?u+R)7k9pPvBh+SB>sE$pJ%`&&G1aQ6 z#v!Fl>k1aX>U|zJQE?%vzKl+?SW3_*WL!cdHV|#Tf{?)x`dIN!=kW5Ao!nH(as6?Q zv!#%M4B0*n{+>0kQn<-}?3gNS74moARI0^JZh|wFZh`X>Ft2!!mAEimC1#|$za0NM2D1urb%#dp{G1w z@9x;Af1jZ=Q)-N^tNF7o3n^IHbH8;%6b76o)P5Ol&4l8#vga{Ws>(qazf@4>Kl#c7 zf@8r!`sHu$+#KxBo?Xslx55Ab)y*EHM%pH=lZ-~XAzAzBCeY0f=MV(~8cCG79;oe{ z5C;mq?$FcvG+VZo;c1WLzP!6Q1Cz8X(8!{liUIZ!;LJ0cC=k<+aAp=y-FK@n7z`t5 zTlsU|c0boCFt~qq=DJN#-^M`Ga->J5c6WF3IH8=4%WN&aUpM{^5+`hRbIR>|UfV(0 z!HH+kBx1*+)$gxd0>(uAp$}e7dNrujYtzL={(z-JrtR^?hby^X5ZL)#B z-43veMuRzfq>ijIk<;X-jY#oTOz`5gu`We~PC9>W2Z(5VFM zmM?4XD@$P79PK)xUJ{#hV>tsdwyI?8^ax5ePl2e94~OYCYL}0y>rc}oZeEDQ1cc;z zM4E_)7BU?4I-%AHX)nQ;XB75U>_Rh@ z=B2$A4K%VWTA@?9)MT*$A`GH(6fQ5s@SrK>bw1Vbz}62CgjKQ?QbEUfI1@0_As(sit~$Ih#MkX&RyI_(JS?tz`kUXWfQ!7{iAGwQ~b?S6QYy9i$8-mJoT zlrJ#H5!iLn|D7a+6L|`%{Vm>nH0_qjPLk^S_O>FFfkFm@C+rG$We$T95(t+ygQ!Dm zaYU$>YG0(VW)UuNAdvO6hR`Jg3)>*$P}dxfD(*rE5s3c^)t*?yJuI^Ai&zSE3bG%W z5|qW93a>XJ#hxu|dA=Eyh9DVY^%d^Dtu(>9eslKZ>>kA9Q!LEybvRI92NvwQF?~kV}~2SI?M`gX{~- z*wp@cu=W+)sqjnD$s6V-fo-XHq25;CF)AIUyD2AUVhq4LH9}H zfstF?SZs#Mrw?+wwguym*&jc%DP554#29*N!O|9l5eoDdS1)Oi=~H3KF>tq z;|!KE=I>)4v;q08TM(R!=Z{)P50BV(t_?DRPC2WE8ge*(B%tOx7HPy9g5ZjBky7A^ z9c%CxrT7GsXMq&=*Z`p_Sf4|S0vYPl?Q6Axu6p=P8_3a?@o3TL%Y04UA)r7&(8giu z`d~M0(rErd5&v`yO9^Zuj7hw|Ap5IRH0{!s^Ks?Hxa#^yo7i6Nqm(*tOl71^#1;6{ zVD%d>^EvGlG`e&@^_30peQ@enn-e=@I5;|bXx-}<_7Sri7Y*4*GB?b9?fiX>o52x4 z9wHzBL+r&yvAWMh_(7tDsWBbkKAKF3(N@xiluj~zC#eKO>En)$Ndob(at%xRZTbaS z4DE$6z>`_wD@G$s6qEuW(Xo}~8MF~)Yua67i?M|Z)2|@H2|6zSgqAvPNCkEsY;NDh zRtU$J)Ze^!to^nbkUE=w>Oe8ez!U?~Vr5Gq{i#<{0@i1>XB)U`maoj1+ zgXy1GBn@2ru~t)6oZmwx4u!R$#K1QWC?TZERyP<}8|&J=4V$XymkQ;pgZsE0A|ailR)0^ri!qO^g(IKcyshlp`wOG~m}uAM zb9D;W+cl#aSZtg~bRB&oUi8)UYrN?HjTH-mg`DjR2?+~-Dqsc=uRg3;;xA4ud%D7% z$K_L~i0*Lk)-IIz2ZvB~_Ho&)V7Bb>Y(hf)cJAW@KbG5b-iCv2RK!&I<2xKA(n7qn=#X+Qq_!_Xcm zQ;|ya0Xcdz0l;BIAS4Au?V8A*M39rv)4V;QKa&2(i-J}Lmp1$-~BdNEcG|?^7 z0k_4i&OquD4j<@AAzkU(`@B`S2TnKu4q$%y1#O+_*2;b{=(s^b2Gf z8IWmA6J`NTjv;b}Oe&qJb)S(oG%|o&%)f=<{z7voa(!)Gkwq9BE^&!-3f6#dd_R4! z06I=B(B4@+HZOwzB$e%MItauker6bds*v*H?qV z4fc;RWa%@E77ZUYgV6|dCH&TE^(nsdwe+c}bhq1l$1~PH2o-Hl++D|gJ*T5*XQN%O z`#PR-e-g0=It0C$htv=nF_c6j9fpOt2n`Xe2C2=_ND*Wj*@A~EAoZu>g}(Ss!{S_S z4VZJWyrw!5ZLYKv`x$>n`!$ve?S#148C2n-?kZy*nPx~M%j!-gk7O_>(GBUqLIOoV zPawc4o%`AULk()$mlU-cY8tf)wtD0Oq=d?UQrIL6iA}jdcKBuDKu+ZO{Gd3J{C}D( zci8RL4b-=PV;T^c-uF_ibAd@#v^)>XRo~6je6v;<5Z6*e*t+jt0$)54) z5=f6*v6;$lJA;uCb#^5&5Pwq7G+QMjs}n2L+1VyV-!%(0zZaQ+rAl3)P#2;K*+ME$ zqL6GkN+q^d&@Arinzm}6-Lt!Bj>e>s5fY7r5LJaliv=mdfg5@MXha@SQmS&rZA2<^ zBd4k$@0hQQKywH(erP$22ybbbRhE@J=!Evg%1~hzTAnqSlG&`G90o7hXYD8OFi@~d z54fP>Ne#+?N~PjTAA~S8WScs|Wg<-ONCE5dTtLLIk>CV2Tk1w|LYz-LI7F0THv4T@ z1n*y3!V%8>k-1cs2sKXyX9FiRERH&qRdFGnTiMchn+lOa)=9*O0~T?R5P-x!T2>Jj zDCa#hbc3b#q2WRjoy@QoGds{6zevluL$jEHk zqE@bEp`NYYWK^mZR=O?{K;XVLf%DhL!Z`lCLDpV;T{W-pAQE7mu>yBu zMOIm0+XkwYK#i-WE}(7*+t;Y5AQq?_s|cb96|z3ZoPrfGgw+VTCLk##(U>%%3it7q zs^Ha6v_Tp9ohOx@593ber&rnq+OIxkPW`3=&gd;rb$kwr1S*H3#I6FY0x?oQQFvW* zh?re3IhfJ2mS7TX4z6-Nu#$&Bt+y?+7YQbLMUtZZ1Ms8y2HnT= zcz5sTC3jfZS#%`l-M^d1JKk-OKdKqX7q~OQ2l(f>vbxME0@}Dp?bQM=jfWW|e+d4N z+`{;!>x?LM!9N}IF70<8L2$5|T5rwE7imqtx)om5|xS< z7U0Low{O!{HIv^2p^?#H^54EvnQ^b3QG{>u6Dv8`HkcMAQse)W2w$vk_(4qmw_gE- zt|RnOlZXdJQG7M-#TdlrW5D+(L3QkkzMFMBEA5w2_ndX|5}0YXo{>6_8SH_U**l9J z)09~a%99<-t1IV}cjD4dWoUHTL3Qvgr_;5GxgTdcq{X`#MrDi<2XBd z&5R|t{&Dts4I6Tj!T#L?xyh`LeP;HpWt!grSbfXXXv1jg@>-%}sFTfZ3{|b13oJ@*bMWnKIwQ=MIPl{C=R1gdi7Q>J|H&~L?L3LobXcq(Vu(2^&De;Qf z7jFqhU?%_(cmO*YZnij|;91OZKZ_(M5Svyd&=JtveXN5mLiBoWUG(?07&S>Sjql1% zO$D7focK$c)v0TVu}E%jn|Gjj(Yl8(4B2-vgSFFjN131#*u-u-jCaOfdvvv6O?TbCWI9j?)3V2_}DhucnLmv_GWQD$XU z7f9ikj9MjN|1Q#;4dC5xgc`dGUDUU!I~Q&%bXMo3XAl8#8)+qD#1&*4^7zF%pYW@- z#9y+#2hBqtuiDP%Dcz4+6Lfy8aXb3rV8-!Fu=fEHB@DrRtl}6}tkk4hV#AP_4M8dv z0+1yo1VfO>sSpBDA^sU2m=JSGfQmQSAAv_R-|0hJ{bR%Z+}fK~v1gi3w)nS zOGC3V4({4H{=Z1fxXM!UYLo)`C^BHYei**GU}lo?NUd>ahm>)D;IXqcaYyUY`^A` zbuF`)Qbh0Br(MXgJ8Pm}H$GmkSEv1^$hV|&K=6?`Q)iXD22xz7iP0Y!g&Orwu}UwZ z*nVu(33ll|W5E3c$Hq*~n_>+O-HdL*SWSd$jEp>@w`>2(GUAcBtM$rD$%(5R7DRW1 zs3#_-%au8}?kK^;%Kqz2LCIZr6D?Eshi?SV(Km|rwn)o_y3%`0@0H(H(0pWG z-!f#2j)3L^NP}+1X$$D>9S$CT^X6#iQJBYRa!kouhmJe&M(BiLz?eGs_Lk|Eec>wC zsd%IKP7aOi!ZJa5RJovRBY`L^_VoL}N&6Q#W5C#fhWR%rfW%}PS>q6Yv`l1Gl`0rN z*fV(aHHqIAN;maE78 z?)C1Q=ZUwtr`9&MTsv`NZL0g0z4P=|i`w+MZh4wW~teo3oM zmtG)nmThvG(#Ut?irIPuLoGq$63#TNAL#b*E=tU&fRYz?N7LkSY0^GD$!fFKy?Xf- znV5mDq)oM6vA)%kbH}GCP|wk!${Vs}(!9_%Z{9ZZWQDClE@r3ob{yL$-KK+wHDXAd0cEh2*Fg`9gto$Y+hJR!B+4u^`o#=jSo#Wp0AQv<0jk}@ z^zlbRo4kjwtZQ<;uFzs200JRHCTs)utpI3T`%$BmD%y`GH_+`MR>Gm)sG`K5-MxoS z7Zj-N<4f$$URRg&-$z~>+^v)3mF^Irm*hc(%%hWDIaR>F;zKheuc(;b>c0&0i`T5x zfF~N{+OC3u=>5b{>SH8La?1i&t%0nn?18?Frz>0M22MfiuNQ8_g#aZkNho@yy*}pR zaGkcwlxwocG2}v+ zf$9Nxpya_2-r3ck33Oe(ysrARxnQ+mT{G$B)y)99GZ;8!AYgZ^T1>v%897?bK!9uj z4sJ96VT^o>jdkcTEQWKWF-U9&ar z(^j+)HGrX^0#sWYN>u(jr~sXhhCmgdYJR(Mc6XLBZh}6cNt~F2k#*sNiH{#AeNR5J zePk2YwSWm#6M%YHV^h=WzeXHwtuWS?D2x-pw$q5|6#PN^Z{oq!GS!GWcYIG0LH#9G zw0+)oUMQXdJXDJ46?7Xn8jYqpalKdBx==Q#MYjGNo1U&)qJnK;-vXtTAM*Y$N4R80N%WP;7An{^_Ag??|@-BqS~6VC@}zP9$p43^Ye@7cp}d=G}f z67O@nu@f~C(Ha-+-C}?r&nbv&l^OHNO82XNeXB#e^kdV7A ztESk@B_oEtf!>pU^{g$f9W=Lk{5BqKq4i@Dr4drYqd?ajqyZ#mHwy_ zP_rjbE?Ue2u+Ukn+o?6A)k%M_0Kj7Nz6G_t7DIB*0r`Z?vWCoM-fhXwP#p%jjOx$o(GS*(zk~(ram-5C1|AZRK00qRKP1~&&j)q#lytA? zzoNa;Q@)1)*?p9FCNWN$pqCpfU4Ldw<)yI1tc-gb-Rlsr%OGPt=D+Sp>o;Znnj*tJI_uBoi@YjN`2QNybIUj0Ys(3d z_lr!vs@IFGc<;2P6FP64Tjtsf?ENL%^~1JsTwFiM$JzSF0C2jj*+fr))J_=PHXaKe zGe)1#O-V}K#;wIpg_^EmKNF(TycNd2JlmiP&RXMF?*&|P6-M*YOq_{rQJn1>Wkw91 zZ=HHXfG=&d$t#4&G}Q~eL-83ALoTU`e^UA0X<-ECevP91@(U%Zc57*wzX-*w_N*cz zLUU1jQFG8=X&7!prk0}ss+?-bE~j4)9>}_lDyJLKbDJ{JglD>o1Ynd+6cV!$A(Cwb z2#dP!2>>V85aMJwp+>hxpq(MT998UCZk!ckNvpfWQNN-_m z%rT=C3J9Q3)PwJ<_mJgM}kL%V z+?-8N{XF%4r`v1ays~(jqhq=CN1G+A>2)kQrx$NrS*^|aqVcT;K-=%q_pO_Ozi2 za(lkRj?gK%4gO~-Bq|xVInAK@&f#6?ZQx3c^#=EU@pDw7nro30#!>o0;T9JB_R~Ur z-xx9&{9E04ra|-E$yW3>)Ri69rJ**N%LFwKl7{AXsM_;^{;q$Lz6ZC$g$`G%VB)*k zvk|C{<*u)r)cOaT`voD(@^^Hq#_Fk&XXIp{p1NMq(P`#%qqbF)?!+%8rNs516NwMf zI2cHspk@jqH&qC!lhmw^_6kv!RJJKnh%S1eVteCl02Lqqe=C*S`Y;>hZ~yf(^9*nx4&4sS+@g;YH8?3!4oiGU0zEZE=Vp|l+@9xz&N}=IGjhz zc%qi`1h`-RbShE%Hi1G27Hdys+`F56cu>gtJnHB)LFL~o&g`=!R zy5|lNvd}tuarqDUr&|X3oNs-n?L|hKj&{-L!d~5hb#b|q-4^IdS0d&iyJ1g>A2s(DDLWs_SzSOeD1FjNzy@uikgTes z^zpW(Oj1F?4f8C1zCQ7wWhm4y1EV~_9wdCH8>Q|zDb+JB32MtBs9|Ll@KUoxxwo1caRps zB9tVR5D44U7r6h3<{zyqP@^Wthl`T_`4Ag;e$U2x6tA+R;4qL@>LplIb5Wbs^U|AT ztTSA^T$=2o)15bX$YV2~{ZSCu4`;C+@(s@Ed)&;Dtk!$@tS(H5FI>GXK!ekPkB8Oz zBy)=nCJ1(|&CafMZ8u=R9D!he`>mIp338&px>G|4X7JhKpeW1&xVKPl{TF|toZx)P zek+jhu5}!Y?uvv5LoiRW@J5821+X>-;vEBL6rDODbMJ~EtsXx;VOn82t@>XUJb2Ai zrK97;;k*csrnjyEcDntxn#ivVGLp1Z|Rhf5K4MVrEYO?!X56P;>e&y&SHs( zJj@#I*+0R`W=-txxxfNE)%um$VcE_c-JIDuJiD@{BkaV$w*yee1#0uyp6XIuw5x|8S4#KM*t6{a<~T%;=t^x zrd1AmR~g=6T|gbf!M~sj4U<&jz#?&OsJmE@S4PAlvY?#G|I{_ptg8=$9)qoJqQ7;Jc8pQ_(G&Rk* zcPx}`a>8%;xF|s!;kWp;fRh4wJC6sAuxcIQG9e~+@Fy_Q5WyTU^3mYqi0K?Hohd8> z*5w%qwJk~N?uS@cy|kQMy-mjB>_Wk1{eMh87v8vgr<>tqAlJ~?Yt*gGZUZMqH+UPD z&-EBK|E(sShsXp`M4Uh_aT?w=aF&rt;ycp^A7H)7NjxBPE9(#b85Q&RWdbYr#eoeQ zg$WIj1u2fp_LkesPQ(}H{W;Xy{I@OzE!t#|6N}$9$`YcAi%>!eD8=Y*djC~NLY$nl znVTf;&N~r1{~CI@9)4nM0upQ;D#13Z^U&M*_J3lG^#XCGqKI4NPAWzcD%nxPuSDt2zxj6`6MGyEVMFpMT#EUwofF zdrPz((;c%V5)_Djj^Y1%j*TIx;wijubPn0M=01K+v|aG{`@izrKaC`~=j;pCM9-hS z5XiK=jdQU!4BUGFnIPpkDQs=_kS35Ry782Ez!X{QDM3<7a)y2M>YdM@Mv*G}^T*h2 z#A98nV$?AaHne+{^m(I_5>K4Sr_3`bA z?Yv(LXFXsM6h&m+6`Zu&nl($aT5HP7dzkO!nIssT!mA22!dnf>B!Xxej&9H;mCBfn z(gqoWW6&rNAenWfvkFKenWGW)+zTWzl_8!50-z)S@~J3*Ia>(s zbbQ1D5Jkqs;1@!YBIBRxrue6&35DG_4lEanygO1*+pEwi%-`PX8UeB3dj6`@MirP# z1^#50QHeom!lNu+j`wTo+6bTAT%Tmy+%*+;Uji$J(Q*!>`@!Q3S`Rc&HOlgvmI|C%ND&KMp-Xb#iQ*LtsSW5 z$zL#QIaT=0F{imtFr*@Q9Mn7LL7+>`WVE5c{maax6GKFsF}*PxBE8(Kg7#093bXRA zqXf@`x(7W8R4L6+&<;RiRzgE3qvmxbI&?CbHw92POL3@bxhq4?Xmqof)-Rf5QCA=m zoe1?VP)z|`YKhcf_rWsFZr44kXCh=e>E=KfT>e}Q&vb@#Fxo@bLl_KpNNYbdWTk^t z!LK*cC7_1%|KF1Rtpcrd^0$4~Fe3jf_S^ zBB^lqghm4?KI?JPXA|l(+!4xdL1#)^wqP~$w=6v>HrzPH#_AZT0q4Btf9wDTA+Yqg zL@})5%?N%s8^wJ1fE^0NEPOFL!1T3PwW zAJX6J7K4#9N^*(UJ}gtL;on8cmypzJ-$3?@x-JM-MsQJ}KQR9S@y2nRZEKiWvw21? zk?YG}KsORQq~VlQxy|6TIGLxoF`0^z`X&d^ab-fhde82D+X& z8S8TVxN9IOJ`S-Lp?2OsI(E7-yOsuxJ|=}lSzS<9)+`q+ESw4LRQS}))9|M|`mHxC zTp1vSh0*9yU^6t|Wh>PAd6ZI$nqR6DSmQh2Hig@Qn`&FB9j|lz90)}5$=TGBCl@L- z=QQyP3YlU7uiksbg(s!7Y*BJH2>k3=a;*eJpus2d(B?8|rQVYGWKr+BGj#z%RP=@o zr3V!9TKq8B{ZLt&^#@7&`deB2=m~jL@I8C_LUc|Gb{$T-8loP?B!)32`j`9zD1y2L zm}q0#A(BsW`k3>DzSF?aTR<(R+Xg8Ex)epE6LCC8#qu;EWGQ_ZLjxB*!}Rj5hYUx> z4(jg+22fj8*2g#mREI!y@aB5G-#O+>2YP2ubC%f|(`^=Q0(%}fr)LlJS}f6j*L%D( z7IE-oUue7x@W;6Xq4IJHRg)d6ZE^DuYsM{Xw3 z>8!1#lLjf&&M%a#<2|pZCiBBcI%eawzA|dJ>Xo_cZOieoUxc}R)z~)_v+w+r4W_rh zm__=`e|>V`8$vM$;=Y!b-_1UKQ>xyWy^-Ne+4Y100IS~V8A!NZc80h8_Q~u!Jt5q?CvfO(zGrVjao{mx zE22U~lQw6*!Ev6x%h-??CBud`cswN$J{y-|MN9_|}TS1;eYx0#Ao^KB0TUMTpR)Z?GM z`21?2UwMG8O>TJk@iCaqoB4h@4dC+u@Z+O^Gh`-%_aSjGI&}*|Bg%+0L}pFmkP0($ zavC)_h4LIBA%jhDjYl|F^~x-lmV=W8AsBqyA=2x|e{zPry1LP$lAr(EZ*$ zdMR9EE(OSg>vb+?-jTZ22A{XHx^fe8%C8*0RARKRX7@25naFf>BW?z27XwlwHzq_a zFDJh-@+mIXn&B8T|Kmmw(gMBH1N5uLjrcE_gj-uE67L{}vs#J}U zvI@M|ZL=FF+PYMA0b_7VouKU11*x=kH@uId|KtZpe{MLW4gfwn_?7_2B-U0^IiAOB zs!;@ts6-U3_xdpHOt+@Fr(NWfqI>qEOV81=fO|?>YS39Wjh31Qmir!RtpeP)(ARUf zjc=XnN^iN8)$|21nMT%*<2CXbF@?Ua0H6~y0>4VVtUp-?D2kA2tMto;R`X(td;27Q zHvmgKvC6>9v)C9VhWC%6l_4Qx*goauGo~|D61k9@WrPQ^mw<)tSq0!>as`dSpw|)H zDF_6FWmC_lO^pr?QbW|`5+H&30dbz4GMPwhpHhYbY+8DMzu?DA!C98 z8fY*b=b4M4&OkPPQ2`W-c$m4;{U!>a=3#v% zSv@N?HA|hGx&F7`;$t6CB0@qUD34;}Po7Z4>Bj4R$hTZ4PSq`+vFezS%m0e`>u1c* zlP7)sNe2_^50V0Wf%D~Z^))9EaqbsyTgF%fukpziFYCoLm4;j>K;b>km7AF7fG#2j zbUs+95(?~X52*dD-1kOcBrK?ccTS4}HcIBY3*$*MXKJk%0{Ee)(lOIS z>a^N4=CMG~TcL&$haC6!lQT?ljhQ@|T3G7Ur>2tk-M_z|67^?FO5IPs|KLCD=`2BDMPS7(@wh8R+3n7RnK{DNnT**c>({Brle3XRtaR%`TKtZu#P_HB$MC5Q3Wp@RH0*Pg4CCKuebx$Ce$COta6uXb}F zid(e{6xmv(s58s9z&m#FF$DqHIk~Z6X1|+x#%_oE_c!cXHp|@0Yk4{=mHk(UZ(jbJ<)>e*-u6L?88|~ECb1m?C0V!+v*R8T`vnJN&GxCf|P7pUxHuN-YMD4*`yN215zb^rlZ1){p5L%_I zi)qG#xq&L+n37Ds9d&_Bo*|R7H+Va<$>gyn=0&E`63fJ%OxlY~*FtbY;DiE*u6_@~ z<3X_BX^dgRM|t5ma+XRCz8#i(>@bj0N%f$NyfU&1z**gU>v`pBM3O*a6%Rt7|9g5H zP)3L;(!$$#1CesL$lcM|G{*M@`_;Nh($^cvTjHbbTEJ3@e@K$Jr5}$V&I_^l1qX61 z1$K|h8c831{rcSO%@cXOcD=rGyfJ(J_16z14hbT`$~3Cr=&srO8XVoUk(F~4bj=t% zO@UR=@Y2GT>p|q7vP9LnNr@I;_{78qAz7dk)su7^a1FYX2z6EI_!veo2Nq~X`3L#F zet=j*99X}{MWjtW|r`V+J8X|d0E+HjrBrmYT}aJvPo!?E8ms- zj`1%b%k}nT`Xd(`hH*@WNn4VMhPFeZNjg@`CQHp)Ez{=D4yFxb&z69}HUD%B)~1$b zWc(no4;ATMJA~&d{FE-Cdzmmh08a_~<~#u8lw_8d(j#gQ_#fdNA{rxAeyD^<2E{Y* zf6(lhQkW8ynkw)VXNok>&K%-9Bg(nk5b@&@bizvhx(y{A$_pf-RYn|-Ut<{Z7E!S8 z?^(1-SU$5LHIrs%#&FWYOob^o(%q;wt~-hb)k+4B1hk}&|hLnbo1Z5LHA zZIf@^rVB_k620srFIy!kpw3OMao`_|MQxyO`gBdZSG&k(<#>i^SMY}h6$<$f@@CU+ z_UF)_qfTijB)Uv1rn=5Op}v57yf43?J^{Z?wqTMip*KSu3yW-;Rk`{PCfT2EY zX+deXt7D5#XM0hWfAl-XTWf0J?b3aRj&$v6%!gTVDqwV~xUpE)WaV4EGHv57N2{h{ zS#e{dHE6bZzFdUKU%$$kjoY{LK_c?(c1>vC)o#ORb!T(X0i9^l!r<;4XO}70RC%QZ z?%kS2hlM^34eLP1mX^-3&dXE|({POz++VS5Hg-_IE(lrvNIa|o+_SYRp13EstVKi@ zl{K&5LyX7%{!G%e?_wOjIbiNS`kqVtomg=vTTAx@UYD2)-r)D%qa_z7zd)pZmfF7r z$Pi3{48(^FlS~Yvn;rP(M037FGsMLbv0VKQ-X*JmuZT%QlnAuF4_S!=(m`(cw9ZUP z`*8{NTCMhx@gq(88g=OhO^M}Njp?83gRzidtar6yLV_AP?aswxZTmldC(vcsTrKmfa?aNlMCTo5Z zXhw@;Li-NA6(s~N6J~M=ED6N=Dzd}`eH$2`G=ODdmTj8lOxheHTBK3}r)Eh8cub(h zPKyy40U^kC`E162z&{}@68Zaux8r8g|s)9*IW^z2?HN18hgJz3BL?kb zEfW%kUT&+Y*6K1A7Cn{)qSmcLsVQ*X+7N2(TK`?Tb{%m11Vtn-J8xXQ!D-_yayh;1 zP=6VID*AB<#eb7$jyZ z7IirSP_BD+rRIX}f+j|$JXEIEFf~x`@C=iEv_pBYLAQM3P#N?Ln|;N#Ot18es|yj?4)Vmt>2E?*5Ej2wjCSJ|Gql_?0Ks{t@TuYQt@8*y<(z# zg787-17TACsn)bUo$yTO8G%+#%d}K?JB8B4!|4!?v`4;Mx9q~9hBRvVu4QV{sl!hg zb^0g~YalKp4U;|44o341tcX<5UBu_WQ`(c&^i(Uf12p_aEb#Q|N$n{(hw%P}iIhgq z-~l81&hM_>fIZ4Q=wAlSVaiALhVHh#9@BD3&&}UAa7WD(4tnT$93;>y%w$8fz(g{$ zilGVO0Z%>81Aw=7=@8AExzw!uXcuA3L)T-BfT}R7029PfPhHPZBE|v|vl7aij5@R{ z(V>&c^Z|cK#NuTHqG`mXJ~0I&ZrU7M;DsZbxvPZrP5BeBx7H8kI4P{ZG!`IUi%AkM z0(gD>a>yO>?FDGQKn&;+UtjA%o1D7O?-egaqWTn!rhE2MKLHegqGSw;9s4LqE3o7) z5X=VGEi_0+c0dTIqIL@eYj%!l&pSh2D$S`bPhY)CdVv0su`ci_O&|?Zi_%o>SDRQ{v^M4 zpH_6^o$=j@*%u{mcqPt6XcA!JzY#1lqkwCvI!|lL9{Up?J<|vh#zC~iz&zQTH2dJ}4^*vw zL6y}>HYCRKO{k8t`ddBD;h|Lr85!VCX9S|rUiHGxvg}s{AvP3wZB>G-NLN;XO{rXu zTs9>;;AHaT+t}WxYj*w((f;m@!~%cH*7b<>2E2KmX)ri#x(g^D23vi5fjUZka`S%U zcP%RgL*HgaSX}LV-&&8Mu+#c}zwzd6>QSxd--4~?FOQ>s3ET^dEByUY{^kC~ccnCb zghK!bMhWb-_`rz{^KyM!thi%$X64hu%T>Z6Ze;$k?tO;iH9Selk~#!kQV+36I zwVgTkXTEotiS+VBS~O>eu3M+J%O}W8)b;($ha!D=1!PpDW$(0M_rW)THJ=VIXX9t` z@I#L4D@15SYS)7+-IyNC<5|rfbnn$?J=A3rCXKv}+&_Y@Lf0G}t;2EHc=->qGFvDsQifhsZGZ8)Nq$Um)-4;7f)=`XDFZL zH!iVnj9aDBE*YJ(HW)`pv<}!r0>^oX2)Zg^1dX|_@W+BvfL8!Hz%qfir^n@WtMdNI zusyxU6YW`fy42}+cJBtx$Zma0OR$7~Ti&eWA&rK|U(e!ouBULpqbTfwvk3 ztp6ZiAwv-9yE4p;O+dNWBtGitrr0HLD3J%yAYGe^ci|}_8 zs1IWWfqw@XW)y3Mc_r0fwL|Hrz|Cvf6))n@j5kI zNZLTo4k3O}Ot|Z)=i7kTlF^B93^k)?*$*+=8m446kCbdm!`)qjjcpDFm4~JpYq}gX%=_VM$Q}L4}S=r#vyC zoG?J{?IkCr#xx&xJ^@kcw|H@WG1sh89L;}EnTm;|KJrfrN_c4E)!d1>aRVc&b3yR< zmjI{?H)=b5E6@rB+L|g93eO~{e^ljbO8Qi(JivmkHZDK*a>r4iP0mZ!GEA><&3vFNKp5<(dVulG!@l6u$sg)K(C_FF`?h zQIr+2G8G7m+;ZF<7DWqVgwZ1K@B-2iuRth0<&MIa)>K{gQtyl;Q)O3t!bTD>ZCJ4arww#a$eoW4`s9zp3PMS2 z47??+yP=^QFKdwgdxy@+sK|KF!ele6$+)Y`vvcltap*14XKr5B)nq)NPl!wTS-)>I zL;z?%$PdeYgLR?+JPlfgWqTMLF3x>+>`s^fRZn7)v^2gVsgF*qh%c2UC1ufOXrdKb zbi5>4i4|61H%G*r;vGJ6xmryJTygx78wDO9&O>*O$G#-aSkBrOjXr0-Dus|iCCRz zoe$f$FH}|eLu29c^&eA*huhkgFbDwrQD$3PKhQu*NMGCgwl?n0nWUtdqD~lspBh3i zH1W4L6MsJo8YZ73fayfC+!In>cQs4(p|IFM3o zIMmhxrt97k2gg#!_U3=@0Ls35+D6*<7&gK(4aN+Bzeya8vC8h-_D06X+`gA!G;w)I z8gr;ObhzQ>{WYs@Pwg&?+1(R*Qt)xfh0DWOSmUjxJ!R1qfaXE<)sP{ydT&bodrM}- zdLtvmC}CvY;jJLKVfXOh`AfBgq4w5+{v(FnM+VN1-H6>`_F(^(y^r48M^1=<-www| z<_MScjY)b=EB=q%vz2_|K%{=?x`GZ$ZoPE(IX~V~@3*@%aQR64`TIen3tPIu5?$7) ztJ_DZ%;xBx!~@7#4v`rdlQp_P8_>?bE`eSxR<6xv-KZ$t%{I9oZFY*)w?ax~n zXRl}LhE_#wRTp219DG)0`YhTn*C&thPL!A^ddJA~$@PnVW?J@s%RhzzlnDO_N`T>X zP5?OOca!fZ(wp=T3JjPuh_@Fy1)tOtGg3P@XLvhl=x;>7Ot?JVcqvtEZ9GpL*qE0p zR*nf`Hm(39FH^}trG%$6f;Q-ZHN{I3bKevIw;eR=mkluRGEd(B!uDzcu<)qqeG%{q z&W8D{*a)cx^?LOtrQ_eq+9HF|4P5_0zm*Z+P@apAQMmpllDHhj0lN4jO5(6LRQ0FP zzJ9C~@Q9`V!`!6S9!3QP#s0tX6?!*)9YjIh+!X&h4V?%4mSS;sxLEMK?fFkrpYHqu zjtgh`xg*yJGKXs__2zV!>jK^KAHuCOSNmEB^x5uNYqHoHD?k};!L_sm7M5I#|DEgg zV}()_YP)WQ;sZEY@zMg9s?}tn-KG$Mr$F=~*yP~R|IR`I=NFO2ntmyK)OMop>aWae z|5bf>4L3@5@N_FjR;lwH`Ish(uj;MAKYunazHV)l?DP4joWlsw%swh`Ou5)6hS%1< zE)XT-4JUN61H{zU^V1?}5?RPxbc~Tv?wq*=L8R{?6T7n#0Vq?>{ z#gNgN^$mdQC>C9gu8BiI#sNX`?c2ZkBi_9Qb$n3qetoP96cA(}3556HaI!U>v9X*X zqx6`s#1xhTCzP1|{z&w)RCxJ`d?=K#EdFd0FGf>JN+Obz^iwg*Sn5kEcTG|)B{`IR zR7sy?iDB;=O`;k|>;U(`q{?6B7S@M(@BrIKP*9?@^LIYoM_3VXyf+ zMhpgn_GZemvOv5@Hg6}(yRq@s35YU$Ak=&I+cy$>=0SD})&^V}SSHa(Cb>tO=vPvtL3cUPa=+4K z{~(P#9OyN<504;-7~J9&vsb42>Tb7YU0(f$g#3=3TS_*>=d&LOvdlbE3HiD1IKAg? zSKQZnr0^d})PpZa!3jL5f}YWF80C_wWa#gC_3E-a59s1%G=;Xp5iS!p*6ZXh6=;{RzrC@nuPuiS!VZ6F`KM(wrZp;ap3OYij2HzQ zA-n80pPh(eBu%b>c z2p+#Lu-UBx>*xTTNy!`KH<-a3Os#XlJpt!H!Fns86zJao1d;Q8xZ=RY4vT{yFD$4E zbU~RYSpu_Gb454)A--F&8{u*3YS76$->5=roQUtnAFc}O`AZ;pkQ3cdGl3A{78VHF z2ARtcs8Zqc3RltF(;tzj2C7lW1^K8-ueGb`?Pd3TFaVWr462|2HK~{d!Q(pyKD3>u z^Uw{Szcg)XTJ+~@a_?dF4X_UgCOFvpPX-D#H8n@4yezfZsp4$i?D8##ZjmL)fy~#B zdfDkR)iuM_*H^}%>o>L)-O1UR=KE2~pc$CbzwLUSqc# z8ji8b*%uBR5F%pgMCZIb%7sZ)gY-80!j&t->=@9a1Sy0RbHjivN;XiB?4EtWxtKX2Lz$lSGU0u6QR$7DVkyZkpJ*;dM{aADln>k^zaXk#F3EcWwz5!<~6zJSH9xjP3a#ZL{xdUZ|*m+7@^ zYv`aMkv6aHZ6&4UYHce|yuHp>*6F4%Ch~FdpV}l>Fvi}Cnax@^1#eZ!fltVS*l^)O zfaaf&uWVT41Z}-Wz>CGPFEj!ZsQHM3bO1E7zv_R*4^sRRKVXe0s7PDkzO@T)X*W`= z5#FdvlBa^pN0i57$?9UNKCx0lSq!rwu6C(Efbj3Jfo%FOsj;strUtzFJt~1rPX6~- z&rKJvu(!gXH)8im?pHzy0T^;FHxzQpng<2$f>HtlxKHk!1E)1Q?P4F!-Qb&kDDkv* zz11H`DEG|j0&gFLK)1Xy4?vfRb1Vsen;x_aP_0uYnHb>$M65L1O3VKJZ#xo0U$ z2tdAhIQe*;NVpIx3Hg$$bj&dx(U*vqB&84!{vmt zr<@tx?jAGI7aNW=F`P%wiq;IajrYGkXMF7D=U`pSH5B5p7NGb76rpZbKsnJ%LD!x* zUV{Oc;BbhpIdP%}Z6D77$JK$=&>#N+5$eA`Uf^gWRv(cTYl$=xO++XDVR^J@wD9+VB^ZS`|)Q*lqcI_%M4U= zzlCp5Z3K(U!TT&(nchiDea14iUj`~Y$OATQt5zKrs(BuQKolv*`252)MWU_4QIc5^ zD}nqCld1wKbtW+2H}bJhNixB1IkW`B6I;N>_$9}31SZ?InFu(s;{p1`-?mL)63ZD6 zF-<~r7j2)}J+oajT0T^}Mcq%Y*A39oVnw$c=j<2Kg_EOk^tf9`EnG?dDWqk6UjUjA zY-D6+Otw~+>wlZJu+qs6(VfUiFHT3r1)$O`gM<^hA=%NlD>^$mj)PEH7`P3`b#*d` z>PJ)2{HT!Z)T!Lu$)iF(UnX~dUlIeY$mR4dQ z8m)nq6B&`sUJn*K+KD*X`HARX#`05HxWIgiL$}#qs3m-#3Z=Tbrdo-=52OdwXb?~c z*le{2DFD*I*{HVfR3YV_q=xq00W;*_Wv3 z@g@L3Tu3)kfJL4+QNU0w?>)j3l7LwvZzD!M<|8mktv>Ih#oV}68!%hR&z;WH=kqo` zj1yGvK5$jnUHbr*Ob|!OoPOu8X5U#X|~=K?7dCe+2^6-nH}+87c)`(B8Tc?I{_}CPo); zo^MI}XwPO4;T@>V?N=EE9A3On7J6X(Iy`^|yD?OU5Xv%+OLQ{RFa2R`3ncJ0~^gF8QmAqtr8>U!VQ_3Yv61s zQh{C5=IY(PSs-|@zMEOw#5V&vXfp_e#3h44z5nwBsp4zaG|lb3vLj~iBA1Pya8oZ7 zlAjqdT_^fz(HZuPoFfwikw;$AfSuF$qz1T5FA0u!Gx8d-Ai=47=2vjTx;+>H1 z9_!(;v@UaBmh~w`Ew8*jb+3+4sIwP#xLg{*yRx-pNXZ5bi3Agg{e~ zJL+QqK-=mJ!ZY%&{5Qr2_m?|A2dTSY0@ke?e^K{o1UQX3Hu`e|)quNGYpg>~5{NVX z{gKmIz9;-1YnlvlVjaf+ATuc6PAp&V=L6e#ed%NNV`)!k8&r5blDqu0xsy9AGI71;~Qa zPOZ@T(&@1|TGlE97;S~6ogUEU+tbdr=titp-ED6q^U2 z95x8hO@xw@}*dSDa3*Z z)D=m`TZ=$)XSm_j$1f?-3Y5qauU*{-di|YUsY#Kw${s5h;*XRrXUbMG-l=LyC4ke_ zU2nwadfPE(4Im!*CV(@wTuM?+;jj$vs9&_yYJsz<1XgHlt1vgcb^30vOG_IklAWvV9iO`{+JvGsq7c@M^jf2UUs z6LBj*h9Jy;bYbd+__Buf7s6R{OAeNB1T4KYC!Y~;Kff?8UV{ipN0*EyzBVrXygMDK2O zzUuXq>MhxDfIB|oAlft_#O9LUYF9hUj_>|Bl2XpDUiH`)cwn&KO0{{%td2svlTk@6 zN5gKrc_BwNOOO%+tM0i#aa!TiEADJ38wEpWJ7xdb4p0*%RT=T>Nv;sslBri@L@6o6 z(n=L!WK>tQ+E5`Dc)iR0>!IEef90RqquhCM#jCw>`ZP;Y_k%F5$Y zTJ84TAUouaSffg?^%#BkbjC5+EuJ#N^bNb=X^+$^;vZ91fCq%(&i}TKOhRl-U?t&G1ln8Pp zg4hZMXwic_HpPc@?<`7gjfr(?Z}igJP2}_+`{DX1hXIgp79n|LqFX=|*e&j!Lc85k z#|_|y$kTwSxQJ!!V2xP$;4LikzM2i}busPB;zhMZ_54IN%|?*-$hi?jQc)?4TcnYZ^$0Y0p+ zr&7HBM!*7qpQGQQRLGZ;v@dTSzyJhzL;f!|M(?gfek4EBZ~3~k9~~M*_^~Tre*I&B z1pa?4!R>kZ|DOl*gs9+O%B&bRg#SGX@u2?S-2dzKZf}WMA8|Rb&zn1#0hi4qFo3J(X>jJqz0ZIZ zmk5EvY63V_e`_wV=uxx4Jos)lSo9cgi>I19Sof)U1QuhOr@>umIh+B9e^D6zEC>n? z^aR6Flo7z;`c|*NI?fi6ikRn-X{OX zha{Lt-hVk`os>wdmb64VFVf(D>Ij;sQ0jEKiM)Zz!gzTl>``)q&PZn{(g})UgBV4j zF+`De>E8yzC{EHWFP6%cYOUUAw%VP)Z1P-xFdU61)7gBnTwPxMZ%v=My}N&Se0qL) zeS81-{QCa+{rg{Uw!6K3l>c#|lvQetmbNb4I(qc#b3H!@qc};kyeO->X*&QBCX{g@ zRX=EB$7x>HZ9mTIe%=oNAs9h1oFFNhVL4t9C0S85-7qcNaXmi>qc};kyeO->X}f+H zr+Hbo{W!1t_5OUYehY+P1jTTIq-ciactMn8Mb&h}wCr#2f6?=UFp85j%Zsv7t<@XN zR=d;f^#{Yzcru;M7fb!=p8{0LlVF&?`(7>9wB5875hQaN=~07p*=o@))+?F6{u@pc z@(9UXx>@@C@%nT6{Zqvx?tY~-Z3fxKRZvt?tE{4GJy&XemjMv5m{8d$00000000m| z2w{pbsjLm5Bf^&!Co;151g^AtpGQUuhEc_jZayw0@jWPT4b8W|)j`c%g)@>i@EBmo zA>hx!$ph2RJDN7N2dP(Q)I(nORT5=;R?ptRV|I{?l`bS#Y+GB^aJ9LSWBKlmGAg&^ ztB{_?Kz)iENcPEDbZ7%!`_Sd%j%KojEz>u>pxJq&%Oj^}$0EHMg!Gx+~_s;-` zSWKuOC4>-?&c3X0&YjeSd?Cp`0_vCn0muU>rIe<+7fh)2+@5jwp8*CMWY{`K>wkNs zW+{b(#1KlqFZcrrMUoyQXB$-fl%dIzVsKHZ7ZZQ>r)gSixdM6m7k0217_j34ziiYDo_Jvhyb7j?6`PC_%GbK>E{2=^S?Om^L>s@o_1fC z%fgM8OqwY{HyTXM16OU5Xi4`kMnD0#bV#WcQje%7@iSCU&4d?W152Jg@ciZF8^q5c zVU3>W@vK-G9S^W}S+FHPy<4V#m@zIJVdbS2ec8UNk#xGzU&ETboM%u)PJ7m; z`~;Itl7120vT;IB8`Dn2_Z#wqt$uj8d4duh^2{Z!nkQtrH8*V%??`&vR8AYf>-BT5)atfl zi<2HUZpw*IzwZ^5PzTl}^v|Dv4tLn5VPh$zo0f7{OG@4nxH=nWTl}_w7cH&q+lY38 zq<$6>to~>L|6oEqqp&K!*0OW0vM;X^86YzK+wKe*sJrCSK$$+_^YrJpKT#W+9?yOC*qK<7tmwGX zHY2<|d4>3OB|mWCCQrZc^V+WH^PFCu106`6?MC!f!J^&X-fqB(24|LFl$~4zlc}+M z&N^UR5E(q>!eYK3>dyF!F$O3A1Z5n27CIFVmg~RD4dO3{iqB8n3nf8j8;Wc4DulK2 z!G;$XtcJVMYWEyW9*isojo~3QAUS#{71xXql^3tFR4rmnA$26$BUAo$W3fu$`V+^X z;?)Z{SaV2xP3q+#*-$$rKxy#%s7fRs?%Kczu8~=|4HgW+Xw@6M*OiT*XOizMsq0ni zBrn#8(Ec)GKp^qUug3-wjkNdDNoegs(Rc;JVkN1;U->oQ4@p{H66`^aTBoLQ%{&uS-l#JRU^{K6=iU3 zss?)SUgEGNTDZ}B)Q);?|L{@1^4Oe<6?|ch!QiJpf@;a(VX^|PWiZ#N)3xbTjSwsU zu?3Uu*))NAlLH#U+o@H}Sxj_Pi1{#-hGP=GI!8}6jrAyHS5!ScIMOkc_XHIdpU*lWR)yT^8pB#anL z2~906H`7nSBd-^$Gh==iFN^FTz7S{}z`Tv)h-7WB-7=#0V6d9L^3#2*TvI!xO}fWr zYhsrzl9|J$w~TymWCd4#oK>>oPU?eU`eEwg4pIIAt93GW^x2N=)$fD@ z7yVkgIU*x^klrbglzd6t)nMXG z@lQY=jHQ;GiZ4nrXX?X>_`tO&OLmb$e{~qBS$~}Ip@vkRtK<_^94pU7%~`eO-5nFy zgPKNy+x5y9kSklw++ksD(WWQTq-wf63!5Z$GLcA%AkMccoiNeSaXVS4={FYfQecyW z&Lr%|(*?C@GF!aFF;SVo?-?P^b~h31h@9dvU_ZoS0?F|;s+y{woJf}5Y`i7}Y<1o+ z^8R~rKrqr)7c&V)6B$X2m)1n?LJetrkNdh}qJ=kP%N_?WmzjHRCJrQGi+?cijc@qh4R!mOBk#1^|f#94sr8t}RPDhM-nT-LP z^u$X8pfd)<`h%Y{pTQ7Su3yPy1a}48&FqiYEEpLR(fEqQedR?!s7}i~dd0ZOebX8B z!om>vlq**kcAl$N_AMIZaisw7TmZRUGNUzC0>nF~sOnXGyxd0B*)NbZ0gcIXHOtj@ IT8(Pv6V^$bi2wiq From f8448f7756fcc5fc3ca383dc5755bea428baadf2 Mon Sep 17 00:00:00 2001 From: dailer Date: Wed, 17 Jul 2019 10:10:22 +0800 Subject: [PATCH 4/4] build --- dist/2.0/fineui.css | 23 +++++++++----- dist/2.0/fineui.ie.js | 42 ++++++++++++++++++-------- dist/2.0/fineui.ie.min.js | 28 ++++++++--------- dist/2.0/fineui.js | 42 ++++++++++++++++++-------- dist/2.0/fineui.min.js | 22 +++++++------- dist/base.css | 14 ++++----- dist/base.js | 36 +++++++++++++++------- dist/bundle.css | 23 +++++++++----- dist/bundle.ie.js | 42 ++++++++++++++++++-------- dist/bundle.ie.min.js | 28 ++++++++--------- dist/bundle.js | 42 ++++++++++++++++++-------- dist/bundle.min.js | 22 +++++++------- dist/core.js | 6 ++-- dist/fineui.css | 23 +++++++++----- dist/fineui.ie.js | 42 ++++++++++++++++++-------- dist/fineui.ie.min.js | 28 ++++++++--------- dist/fineui.js | 42 ++++++++++++++++++-------- dist/fineui.min.js | 22 +++++++------- dist/fineui_without_jquery_polyfill.js | 19 +++++++----- dist/resource.css | 9 +++++- dist/utils.min.js | 2 +- 21 files changed, 350 insertions(+), 207 deletions(-) diff --git a/dist/2.0/fineui.css b/dist/2.0/fineui.css index 767265bcf..af537597c 100644 --- a/dist/2.0/fineui.css +++ b/dist/2.0/fineui.css @@ -2389,6 +2389,13 @@ textarea { .trans-color-disabled-background.hack { background: url('images/1x/background/trans_disable.png') no-repeat center center; } +.wave-loading { + background: url('images/2x/icon/wave_loading.gif') no-repeat center center; + background-size: contain; +} +.wave-loading.hack { + background: url('images/1x/icon/wave_loading.gif') no-repeat center center; +} .bi-color-picker-editor .color-picker-editor-display { -webkit-border-radius: 2px; -moz-border-radius: 2px; @@ -2812,13 +2819,6 @@ textarea { transform: scaleY(1); } } -.bi-loading-widget.hack { - background: url('images/1x/icon/wave_loading.gif') no-repeat center center; -} -.bi-loading-widget.hack .animate-rect { - background-color: rgba(54, 133, 242, 0); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2); -} .bi-segment-button { color: #3685f2; } @@ -4647,7 +4647,7 @@ body { -o-user-select: none; user-select: none; color: #3d4d66; - font: normal 12px "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Heiti, "黑体", sans-serif; + font: normal 12px "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Heiti, "黑体", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-decoration: none; @@ -4910,6 +4910,13 @@ textarea::-webkit-scrollbar-thumb:hover { .trans-color-disabled-background.hack { background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/background/trans_disable.png') no-repeat center center; } +.wave-loading { + background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/2x/icon/wave_loading.gif') no-repeat center center; + background-size: contain; +} +.wave-loading.hack { + background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/icon/wave_loading.gif') no-repeat center center; +} @font-face { font-family: "fineui"; src: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/font/iconfont.eot'); diff --git a/dist/2.0/fineui.ie.js b/dist/2.0/fineui.ie.js index 18cdebe1a..d86c09ca7 100644 --- a/dist/2.0/fineui.ie.js +++ b/dist/2.0/fineui.ie.js @@ -21674,8 +21674,10 @@ BI.prepares.push(function () { }; var addResizeListener = function (element, fn) { - if (attachEvent) element.attachEvent("onresize", fn); - else { + if (attachEvent) { + element.attachEvent("onresize", fn); + fn(); + } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; createStyles(); @@ -38075,14 +38077,15 @@ BI.Pane = BI.inherit(BI.Widget, { loading: function () { var self = this, o = this.options; + var isIE = BI.isIE(); var loadingAnimation = BI.createWidget({ type: "bi.horizontal", - cls: "bi-loading-widget" + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""), + cls: "bi-loading-widget" + (isIE ? " wave-loading hack" : ""), height: 30, width: 30, hgap: 5, vgap: 2.5, - items: [{ + items: isIE ? [] : [{ type: "bi.layout", cls: "animate-rect rect1", height: 25, @@ -47873,9 +47876,13 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/** handler.attach_array.push(attachO); } } catch (e) { - if (isFunction(handler.onerror)) {handler.onerror(rpe, event || _global.event);} + if (isFunction(handler.onerror)) { + handler.onerror(rpe, event || _global.event); + } + } + if (isFunction(handler.onload)) { + handler.onload(rpe, {responseText: responseText}); } - if (isFunction(handler.onload)) {handler.onload(rpe, {responseText: responseText});} }, target = ["AjaxUpload", (new Date).getTime(), String(Math.random()).substring(2)].join("_"); try { // IE < 8 does not accept enctype attribute ... @@ -48086,7 +48093,14 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/** self.fireEvent(BI.File.EVENT_ERROR); return; } - self.fireEvent(BI.File.EVENT_UPLOADED); + var error = BI.some(_wrap.attach_array, function (index, attach) { + if (attach.errorCode) { + BI.Msg.toast(attach.errorMsg, {level: "error"}); + self.fireEvent(BI.File.EVENT_ERROR, attach); + return true; + } + }); + !error && self.fireEvent(BI.File.EVENT_UPLOADED); // enable again the submit button/element }, 1000); }; @@ -48292,10 +48306,10 @@ BI.Input = BI.inherit(BI.Single, { // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓) var originalEvent = e.originalEvent; if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { - keyCode = null; inputEventValid = true; self._keydown_ = true; _keydown(keyCode); + keyCode = null; } }) .click(function (e) { @@ -48400,18 +48414,20 @@ BI.Input = BI.inherit(BI.Single, { } this.fireEvent(BI.Input.EVENT_KEY_DOWN); - if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) { + // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 + var lastValue = this._lastValue; + if(BI.trim(this.getValue()) !== BI.trim(this._lastValue || "")){ + this._valueChange(); + } + if (BI.isEndWithBlank(this.getValue())) { this._pause = true; this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this); this.fireEvent(BI.Input.EVENT_PAUSE); this._defaultState(); } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && - BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { + BI.trim(this.getValue()) === "" && (lastValue !== null && BI.trim(lastValue) !== "")) { this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); this.fireEvent(BI.Input.EVENT_STOP); - this._valueChange(); - } else { - this._valueChange(); } }, diff --git a/dist/2.0/fineui.ie.min.js b/dist/2.0/fineui.ie.min.js index a351605f5..c32f70bec 100644 --- a/dist/2.0/fineui.ie.min.js +++ b/dist/2.0/fineui.ie.min.js @@ -1,31 +1,31 @@ -/*! fineui 2019-07-12 17:17:35 */ +/*! fineui 2019-07-17 10:06:48 */ function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),function(){function a(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function b(a,b,c,d){for(var e=-1,f=null==a?0:a.length;++e-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0:return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){ var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["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"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||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(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJCZGJMZMGXMPRYXKJNYMSGMZJYMKMFXMLDTGFBHCJHKYLPFMDXLQJJSMTQGZSJLQDLDGJYCALCMZCSDJLLNXDJFFFFJCZFMZFFPFKHKGDPSXKTACJDHHZDDCRRCFQYJKQCCWJDXHWJLYLLZGCFCQDSMLZPBJJPLSBCJGGDCKKDEZSQCCKJGCGKDJTJDLZYCXKLQSCGJCLTFPCQCZGWPJDQYZJJBYJHSJDZWGFSJGZKQCCZLLPSPKJGQJHZZLJPLGJGJJTHJJYJZCZMLZLYQBGJWMLJKXZDZNJQSYZMLJLLJKYWXMKJLHSKJGBMCLYYMKXJQLBMLLKMDXXKWYXYSLMLPSJQQJQXYXFJTJDXMXXLLCXQBSYJBGWYMBGGBCYXPJYGPEPFGDJGBHBNSQJYZJKJKHXQFGQZKFHYGKHDKLLSDJQXPQYKYBNQSXQNSZSWHBSXWHXWBZZXDMNSJBSBKBBZKLYLXGWXDRWYQZMYWSJQLCJXXJXKJEQXSCYETLZHLYYYSDZPAQYZCMTLSHTZCFYZYXYLJSDCJQAGYSLCQLYYYSHMRQQKLDXZSCSSSYDYCJYSFSJBFRSSZQSBXXPXJYSDRCKGJLGDKZJZBDKTCSYQPYHSTCLDJDHMXMCGXYZHJDDTMHLTXZXYLYMOHYJCLTYFBQQXPFBDFHHTKSQHZYYWCNXXCRWHOWGYJLEGWDQCWGFJYCSNTMYTOLBYGWQWESJPWNMLRYDZSZTXYQPZGCWXHNGPYXSHMYQJXZTDPPBFYHZHTJYFDZWKGKZBLDNTSXHQEEGZZYLZMMZYJZGXZXKHKSTXNXXWYLYAPSTHXDWHZYMPXAGKYDXBHNHXKDPJNMYHYLPMGOCSLNZHKXXLPZZLBMLSFBHHGYGYYGGBHSCYAQTYWLXTZQCEZYDQDQMMHTKLLSZHLSJZWFYHQSWSCWLQAZYNYTLSXTHAZNKZZSZZLAXXZWWCTGQQTDDYZTCCHYQZFLXPSLZYGPZSZNGLNDQTBDLXGTCTAJDKYWNSYZLJHHZZCWNYYZYWMHYCHHYXHJKZWSXHZYXLYSKQYSPSLYZWMYPPKBYGLKZHTYXAXQSYSHXASMCHKDSCRSWJPWXSGZJLWWSCHSJHSQNHCSEGNDAQTBAALZZMSSTDQJCJKTSCJAXPLGGXHHGXXZCXPDMMHLDGTYBYSJMXHMRCPXXJZCKZXSHMLQXXTTHXWZFKHCCZDYTCJYXQHLXDHYPJQXYLSYYDZOZJNYXQEZYSQYAYXWYPDGXDDXSPPYZNDLTWRHXYDXZZJHTCXMCZLHPYYYYMHZLLHNXMYLLLMDCPPXHMXDKYCYRDLTXJCHHZZXZLCCLYLNZSHZJZZLNNRLWHYQSNJHXYNTTTKYJPYCHHYEGKCTTWLGQRLGGTGTYGYHPYHYLQYQGCWYQKPYYYTTTTLHYHLLTYTTSPLKYZXGZWGPYDSSZZDQXSKCQNMJJZZBXYQMJRTFFBTKHZKBXLJJKDXJTLBWFZPPTKQTZTGPDGNTPJYFALQMKGXBDCLZFHZCLLLLADPMXDJHLCCLGYHDZFGYDDGCYYFGYDXKSSEBDHYKDKDKHNAXXYBPBYYHXZQGAFFQYJXDMLJCSQZLLPCHBSXGJYNDYBYQSPZWJLZKSDDTACTBXZDYZYPJZQSJNKKTKNJDJGYYPGTLFYQKASDNTCYHBLWDZHBBYDWJRYGKZYHEYYFJMSDTYFZJJHGCXPLXHLDWXXJKYTCYKSSSMTWCTTQZLPBSZDZWZXGZAGYKTYWXLHLSPBCLLOQMMZSSLCMBJCSZZKYDCZJGQQDSMCYTZQQLWZQZXSSFPTTFQMDDZDSHDTDWFHTDYZJYQJQKYPBDJYYXTLJHDRQXXXHAYDHRJLKLYTWHLLRLLRCXYLBWSRSZZSYMKZZHHKYHXKSMDSYDYCJPBZBSQLFCXXXNXKXWYWSDZYQOGGQMMYHCDZTTFJYYBGSTTTYBYKJDHKYXBELHTYPJQNFXFDYKZHQKZBYJTZBXHFDXKDASWTAWAJLDYJSFHBLDNNTNQJTJNCHXFJSRFWHZFMDRYJYJWZPDJKZYJYMPCYZNYNXFBYTFYFWYGDBNZZZDNYTXZEMMQBSQEHXFZMBMFLZZSRXYMJGSXWZJSPRYDJSJGXHJJGLJJYNZZJXHGXKYMLPYYYCXYTWQZSWHWLYRJLPXSLSXMFSWWKLCTNXNYNPSJSZHDZEPTXMYYWXYYSYWLXJQZQXZDCLEEELMCPJPCLWBXSQHFWWTFFJTNQJHJQDXHWLBYZNFJLALKYYJLDXHHYCSTYYWNRJYXYWTRMDRQHWQCMFJDYZMHMYYXJWMYZQZXTLMRSPWWCHAQBXYGZYPXYYRRCLMPYMGKSJSZYSRMYJSNXTPLNBAPPYPYLXYYZKYNLDZYJZCZNNLMZHHARQMPGWQTZMXXMLLHGDZXYHXKYXYCJMFFYYHJFSBSSQLXXNDYCANNMTCJCYPRRNYTYQNYYMBMSXNDLYLYSLJRLXYSXQMLLYZLZJJJKYZZCSFBZXXMSTBJGNXYZHLXNMCWSCYZYFZLXBRNNNYLBNRTGZQYSATSWRYHYJZMZDHZGZDWYBSSCSKXSYHYTXXGCQGXZZSHYXJSCRHMKKBXCZJYJYMKQHZJFNBHMQHYSNJNZYBKNQMCLGQHWLZNZSWXKHLJHYYBQLBFCDSXDLDSPFZPSKJYZWZXZDDXJSMMEGJSCSSMGCLXXKYYYLNYPWWWGYDKZJGGGZGGSYCKNJWNJPCXBJJTQTJWDSSPJXZXNZXUMELPXFSXTLLXCLJXJJLJZXCTPSWXLYDHLYQRWHSYCSQYYBYAYWJJJQFWQCQQCJQGXALDBZZYJGKGXPLTZYFXJLTPADKYQHPMATLCPDCKBMTXYBHKLENXDLEEGQDYMSAWHZMLJTWYGXLYQZLJEEYYBQQFFNLYXRDSCTGJGXYYNKLLYQKCCTLHJLQMKKZGCYYGLLLJDZGYDHZWXPYSJBZKDZGYZZHYWYFQYTYZSZYEZZLYMHJJHTSMQWYZLKYYWZCSRKQYTLTDXWCTYJKLWSQZWBDCQYNCJSRSZJLKCDCDTLZZZACQQZZDDXYPLXZBQJYLZLLLQDDZQJYJYJZYXNYYYNYJXKXDAZWYRDLJYYYRJLXLLDYXJCYWYWNQCCLDDNYYYNYCKCZHXXCCLGZQJGKWPPCQQJYSBZZXYJSQPXJPZBSBDSFNSFPZXHDWZTDWPPTFLZZBZDMYYPQJRSDZSQZSQXBDGCPZSWDWCSQZGMDHZXMWWFYBPDGPHTMJTHZSMMBGZMBZJCFZWFZBBZMQCFMBDMCJXLGPNJBBXGYHYYJGPTZGZMQBQTCGYXJXLWZKYDPDYMGCFTPFXYZTZXDZXTGKMTYBBCLBJASKYTSSQYYMSZXFJEWLXLLSZBQJJJAKLYLXLYCCTSXMCWFKKKBSXLLLLJYXTYLTJYYTDPJHNHNNKBYQNFQYYZBYYESSESSGDYHFHWTCJBSDZZTFDMXHCNJZYMQWSRYJDZJQPDQBBSTJGGFBKJBXTGQHNGWJXJGDLLTHZHHYYYYYYSXWTYYYCCBDBPYPZYCCZYJPZYWCBDLFWZCWJDXXHYHLHWZZXJTCZLCDPXUJCZZZLYXJJTXPHFXWPYWXZPTDZZBDZCYHJHMLXBQXSBYLRDTGJRRCTTTHYTCZWMXFYTWWZCWJWXJYWCSKYBZSCCTZQNHXNWXXKHKFHTSWOCCJYBCMPZZYKBNNZPBZHHZDLSYDDYTYFJPXYNGFXBYQXCBHXCPSXTYZDMKYSNXSXLHKMZXLYHDHKWHXXSSKQYHHCJYXGLHZXCSNHEKDTGZXQYPKDHEXTYKCNYMYYYPKQYYYKXZLTHJQTBYQHXBMYHSQCKWWYLLHCYYLNNEQXQWMCFBDCCMLJGGXDQKTLXKGNQCDGZJWYJJLYHHQTTTNWCHMXCXWHWSZJYDJCCDBQCDGDNYXZTHCQRXCBHZTQCBXWGQWYYBXHMBYMYQTYEXMQKYAQYRGYZSLFYKKQHYSSQYSHJGJCNXKZYCXSBXYXHYYLSTYCXQTHYSMGSCPMMGCCCCCMTZTASMGQZJHKLOSQYLSWTMXSYQKDZLJQQYPLSYCZTCQQPBBQJZCLPKHQZYYXXDTDDTSJCXFFLLCHQXMJLWCJCXTSPYCXNDTJSHJWXDQQJSKXYAMYLSJHMLALYKXCYYDMNMDQMXMCZNNCYBZKKYFLMCHCMLHXRCJJHSYLNMTJZGZGYWJXSRXCWJGJQHQZDQJDCJJZKJKGDZQGJJYJYLXZXXCDQHHHEYTMHLFSBDJSYYSHFYSTCZQLPBDRFRZTZYKYWHSZYQKWDQZRKMSYNBCRXQBJYFAZPZZEDZCJYWBCJWHYJBQSZYWRYSZPTDKZPFPBNZTKLQYHBBZPNPPTYZZYBQNYDCPJMMCYCQMCYFZZDCMNLFPBPLNGQJTBTTNJZPZBBZNJKLJQYLNBZQHKSJZNGGQSZZKYXSHPZSNBCGZKDDZQANZHJKDRTLZLSWJLJZLYWTJNDJZJHXYAYNCBGTZCSSQMNJPJYTYSWXZFKWJQTKHTZPLBHSNJZSYZBWZZZZLSYLSBJHDWWQPSLMMFBJDWAQYZTCJTBNNWZXQXCDSLQGDSDPDZHJTQQPSWLYYJZLGYXYZLCTCBJTKTYCZJTQKBSJLGMGZDMCSGPYNJZYQYYKNXRPWSZXMTNCSZZYXYBYHYZAXYWQCJTLLCKJJTJHGDXDXYQYZZBYWDLWQCGLZGJGQRQZCZSSBCRPCSKYDZNXJSQGXSSJMYDNSTZTPBDLTKZWXQWQTZEXNQCZGWEZKSSBYBRTSSSLCCGBPSZQSZLCCGLLLZXHZQTHCZMQGYZQZNMCOCSZJMMZSQPJYGQLJYJPPLDXRGZYXCCSXHSHGTZNLZWZKJCXTCFCJXLBMQBCZZWPQDNHXLJCTHYZLGYLNLSZZPCXDSCQQHJQKSXZPBAJYEMSMJTZDXLCJYRYYNWJBNGZZTMJXLTBSLYRZPYLSSCNXPHLLHYLLQQZQLXYMRSYCXZLMMCZLTZSDWTJJLLNZGGQXPFSKYGYGHBFZPDKMWGHCXMSGDXJMCJZDYCABXJDLNBCDQYGSKYDQTXDJJYXMSZQAZDZFSLQXYJSJZYLBTXXWXQQZBJZUFBBLYLWDSLJHXJYZJWTDJCZFQZQZZDZSXZZQLZCDZFJHYSPYMPQZMLPPLFFXJJNZZYLSJEYQZFPFZKSYWJJJHRDJZZXTXXGLGHYDXCSKYSWMMZCWYBAZBJKSHFHJCXMHFQHYXXYZFTSJYZFXYXPZLCHMZMBXHZZSXYFYMNCWDABAZLXKTCSHHXKXJJZJSTHYGXSXYYHHHJWXKZXSSBZZWHHHCWTZZZPJXSNXQQJGZYZYWLLCWXZFXXYXYHXMKYYSWSQMNLNAYCYSPMJKHWCQHYLAJJMZXHMMCNZHBHXCLXTJPLTXYJHDYYLTTXFSZHYXXSJBJYAYRSMXYPLCKDUYHLXRLNLLSTYZYYQYGYHHSCCSMZCTZQXKYQFPYYRPFFLKQUNTSZLLZMWWTCQQYZWTLLMLMPWMBZSSTZRBPDDTLQJJBXZCSRZQQYGWCSXFWZLXCCRSZDZMCYGGDZQSGTJSWLJMYMMZYHFBJDGYXCCPSHXNZCSBSJYJGJMPPWAFFYFNXHYZXZYLREMZGZCYZSSZDLLJCSQFNXZKPTXZGXJJGFMYYYSNBTYLBNLHPFZDCYFBMGQRRSSSZXYSGTZRNYDZZCDGPJAFJFZKNZBLCZSZPSGCYCJSZLMLRSZBZZLDLSLLYSXSQZQLYXZLSKKBRXBRBZCYCXZZZEEYFGKLZLYYHGZSGZLFJHGTGWKRAAJYZKZQTSSHJJXDCYZUYJLZYRZDQQHGJZXSSZBYKJPBFRTJXLLFQWJHYLQTYMBLPZDXTZYGBDHZZRBGXHWNJTJXLKSCFSMWLSDQYSJTXKZSCFWJLBXFTZLLJZLLQBLSQMQQCGCZFPBPHZCZJLPYYGGDTGWDCFCZQYYYQYSSCLXZSKLZZZGFFCQNWGLHQYZJJCZLQZZYJPJZZBPDCCMHJGXDQDGDLZQMFGPSYTSDYFWWDJZJYSXYYCZCYHZWPBYKXRYLYBHKJKSFXTZJMMCKHLLTNYYMSYXYZPYJQYCSYCWMTJJKQYRHLLQXPSGTLYYCLJSCPXJYZFNMLRGJJTYZBXYZMSJYJHHFZQMSYXRSZCWTLRTQZSSTKXGQKGSPTGCZNJSJCQCXHMXGGZTQYDJKZDLBZSXJLHYQGGGTHQSZPYHJHHGYYGKGGCWJZZYLCZLXQSFTGZSLLLMLJSKCTBLLZZSZMMNYTPZSXQHJCJYQXYZXZQZCPSHKZZYSXCDFGMWQRLLQXRFZTLYSTCTMJCXJJXHJNXTNRZTZFQYHQGLLGCXSZSJDJLJCYDSJTLNYXHSZXCGJZYQPYLFHDJSBPCCZHJJJQZJQDYBSSLLCMYTTMQTBHJQNNYGKYRQYQMZGCJKPDCGMYZHQLLSLLCLMHOLZGDYYFZSLJCQZLYLZQJESHNYLLJXGJXLYSYYYXNBZLJSSZCQQCJYLLZLTJYLLZLLBNYLGQCHXYYXOXCXQKYJXXXYKLXSXXYQXCYKQXQCSGYXXYQXYGYTQOHXHXPYXXXULCYEYCHZZCBWQBBWJQZSCSZSSLZYLKDESJZWMYMCYTSDSXXSCJPQQSQYLYYZYCMDJDZYWCBTJSYDJKCYDDJLBDJJSODZYSYXQQYXDHHGQQYQHDYXWGMMMAJDYBBBPPBCMUUPLJZSMTXERXJMHQNUTPJDCBSSMSSSTKJTSSMMTRCPLZSZMLQDSDMJMQPNQDXCFYNBFSDQXYXHYAYKQYDDLQYYYSSZBYDSLNTFQTZQPZMCHDHCZCWFDXTMYQSPHQYYXSRGJCWTJTZZQMGWJJTJHTQJBBHWZPXXHYQFXXQYWYYHYSCDYDHHQMNMTMWCPBSZPPZZGLMZFOLLCFWHMMSJZTTDHZZYFFYTZZGZYSKYJXQYJZQBHMBZZLYGHGFMSHPZFZSNCLPBQSNJXZSLXXFPMTYJYGBXLLDLXPZJYZJYHHZCYWHJYLSJEXFSZZYWXKZJLUYDTMLYMQJPWXYHXSKTQJEZRPXXZHHMHWQPWQLYJJQJJZSZCPHJLCHHNXJLQWZJHBMZYXBDHHYPZLHLHLGFWLCHYYTLHJXCJMSCPXSTKPNHQXSRTYXXTESYJCTLSSLSTDLLLWWYHDHRJZSFGXTSYCZYNYHTDHWJSLHTZDQDJZXXQHGYLTZPHCSQFCLNJTCLZPFSTPDYNYLGMJLLYCQHYSSHCHYLHQYQTMZYPBYWRFQYKQSYSLZDQJMPXYYSSRHZJNYWTQDFZBWWTWWRXCWHGYHXMKMYYYQMSMZHNGCEPMLQQMTCWCTMMPXJPJJHFXYYZSXZHTYBMSTSYJTTQQQYYLHYNPYQZLCYZHZWSMYLKFJXLWGXYPJYTYSYXYMZCKTTWLKSMZSYLMPWLZWXWQZSSAQSYXYRHSSNTSRAPXCPWCMGDXHXZDZYFJHGZTTSBJHGYZSZYSMYCLLLXBTYXHBBZJKSSDMALXHYCFYGMQYPJYCQXJLLLJGSLZGQLYCJCCZOTYXMTMTTLLWTGPXYMZMKLPSZZZXHKQYSXCTYJZYHXSHYXZKXLZWPSQPYHJWPJPWXQQYLXSDHMRSLZZYZWTTCYXYSZZSHBSCCSTPLWSSCJCHNLCGCHSSPHYLHFHHXJSXYLLNYLSZDHZXYLSXLWZYKCLDYAXZCMDDYSPJTQJZLNWQPSSSWCTSTSZLBLNXSMNYYMJQBQHRZWTYYDCHQLXKPZWBGQYBKFCMZWPZLLYYLSZYDWHXPSBCMLJBSCGBHXLQHYRLJXYSWXWXZSLDFHLSLYNJLZYFLYJYCDRJLFSYZFSLLCQYQFGJYHYXZLYLMSTDJCYHBZLLNWLXXYGYYHSMGDHXXHHLZZJZXCZZZCYQZFNGWPYLCPKPYYPMCLQKDGXZGGWQBDXZZKZFBXXLZXJTPJPTTBYTSZZDWSLCHZHSLTYXHQLHYXXXYYZYSWTXZKHLXZXZPYHGCHKCFSYHUTJRLXFJXPTZTWHPLYXFCRHXSHXKYXXYHZQDXQWULHYHMJTBFLKHTXCWHJFWJCFPQRYQXCYYYQYGRPYWSGSUNGWCHKZDXYFLXXHJJBYZWTSXXNCYJJYMSWZJQRMHXZWFQSYLZJZGBHYNSLBGTTCSYBYXXWXYHXYYXNSQYXMQYWRGYQLXBBZLJSYLPSYTJZYHYZAWLRORJMKSCZJXXXYXCHDYXRYXXJDTSQFXLYLTSFFYXLMTYJMJUYYYXLTZCSXQZQHZXLYYXZHDNBRXXXJCTYHLBRLMBRLLAXKYLLLJLYXXLYCRYLCJTGJCMTLZLLCYZZPZPCYAWHJJFYBDYYZSMPCKZDQYQPBPCJPDCYZMDPBCYYDYCNNPLMTMLRMFMMGWYZBSJGYGSMZQQQZTXMKQWGXLLPJGZBQCDJJJFPKJKCXBLJMSWMDTQJXLDLPPBXCWRCQFBFQJCZAHZGMYKPHYYHZYKNDKZMBPJYXPXYHLFPNYYGXJDBKXNXHJMZJXSTRSTLDXSKZYSYBZXJLXYSLBZYSLHXJPFXPQNBYLLJQKYGZMCYZZYMCCSLCLHZFWFWYXZMWSXTYNXJHPYYMCYSPMHYSMYDYSHQYZCHMJJMZCAAGCFJBBHPLYZYLXXSDJGXDHKXXTXXNBHRMLYJSLTXMRHNLXQJXYZLLYSWQGDLBJHDCGJYQYCMHWFMJYBMBYJYJWYMDPWHXQLDYGPDFXXBCGJSPCKRSSYZJMSLBZZJFLJJJLGXZGYXYXLSZQYXBEXYXHGCXBPLDYHWETTWWCJMBTXCHXYQXLLXFLYXLLJLSSFWDPZSMYJCLMWYTCZPCHQEKCQBWLCQYDPLQPPQZQFJQDJHYMMCXTXDRMJWRHXCJZYLQXDYYNHYYHRSLSRSYWWZJYMTLTLLGTQCJZYABTCKZCJYCCQLJZQXALMZYHYWLWDXZXQDLLQSHGPJFJLJHJABCQZDJGTKHSSTCYJLPSWZLXZXRWGLDLZRLZXTGSLLLLZLYXXWGDZYGBDPHZPBRLWSXQBPFDWOFMWHLYPCBJCCLDMBZPBZZLCYQXLDOMZBLZWPDWYYGDSTTHCSQSCCRSSSYSLFYBFNTYJSZDFNDPDHDZZMBBLSLCMYFFGTJJQWFTMTPJWFNLBZCMMJTGBDZLQLPYFHYYMJYLSDCHDZJWJCCTLJCLDTLJJCPDDSQDSSZYBNDBJLGGJZXSXNLYCYBJXQYCBYLZCFZPPGKCXZDZFZTJJFJSJXZBNZYJQTTYJYHTYCZHYMDJXTTMPXSPLZCDWSLSHXYPZGTFMLCJTYCBPMGDKWYCYZCDSZZYHFLYCTYGWHKJYYLSJCXGYWJCBLLCSNDDBTZBSCLYZCZZSSQDLLMQYYHFSLQLLXFTYHABXGWNYWYYPLLSDLDLLBJCYXJZMLHLJDXYYQYTDLLLBUGBFDFBBQJZZMDPJHGCLGMJJPGAEHHBWCQXAXHHHZCHXYPHJAXHLPHJPGPZJQCQZGJJZZUZDMQYYBZZPHYHYBWHAZYJHYKFGDPFQSDLZMLJXKXGALXZDAGLMDGXMWZQYXXDXXPFDMMSSYMPFMDMMKXKSYZYSHDZKXSYSMMZZZMSYDNZZCZXFPLSTMZDNMXCKJMZTYYMZMZZMSXHHDCZJEMXXKLJSTLWLSQLYJZLLZJSSDPPMHNLZJCZYHMXXHGZCJMDHXTKGRMXFWMCGMWKDTKSXQMMMFZZYDKMSCLCMPCGMHSPXQPZDSSLCXKYXTWLWJYAHZJGZQMCSNXYYMMPMLKJXMHLMLQMXCTKZMJQYSZJSYSZHSYJZJCDAJZYBSDQJZGWZQQXFKDMSDJLFWEHKZQKJPEYPZYSZCDWYJFFMZZYLTTDZZEFMZLBNPPLPLPEPSZALLTYLKCKQZKGENQLWAGYXYDPXLHSXQQWQCQXQCLHYXXMLYCCWLYMQYSKGCHLCJNSZKPYZKCQZQLJPDMDZHLASXLBYDWQLWDNBQCRYDDZTJYBKBWSZDXDTNPJDTCTQDFXQQMGNXECLTTBKPWSLCTYQLPWYZZKLPYGZCQQPLLKCCYLPQMZCZQCLJSLQZDJXLDDHPZQDLJJXZQDXYZQKZLJCYQDYJPPYPQYKJYRMPCBYMCXKLLZLLFQPYLLLMBSGLCYSSLRSYSQTMXYXZQZFDZUYSYZTFFMZZSMZQHZSSCCMLYXWTPZGXZJGZGSJSGKDDHTQGGZLLBJDZLCBCHYXYZHZFYWXYZYMSDBZZYJGTSMTFXQYXQSTDGSLNXDLRYZZLRYYLXQHTXSRTZNGZXBNQQZFMYKMZJBZYMKBPNLYZPBLMCNQYZZZSJZHJCTZKHYZZJRDYZHNPXGLFZTLKGJTCTSSYLLGZRZBBQZZKLPKLCZYSSUYXBJFPNJZZXCDWXZYJXZZDJJKGGRSRJKMSMZJLSJYWQSKYHQJSXPJZZZLSNSHRNYPZTWCHKLPSRZLZXYJQXQKYSJYCZTLQZYBBYBWZPQDWWYZCYTJCJXCKCWDKKZXSGKDZXWWYYJQYYTCYTDLLXWKCZKKLCCLZCQQDZLQLCSFQCHQHSFSMQZZLNBJJZBSJHTSZDYSJQJPDLZCDCWJKJZZLPYCGMZWDJJBSJQZSYZYHHXJPBJYDSSXDZNCGLQMBTSFSBPDZDLZNFGFJGFSMPXJQLMBLGQCYYXBQKDJJQYRFKZTJDHCZKLBSDZCFJTPLLJGXHYXZCSSZZXSTJYGKGCKGYOQXJPLZPBPGTGYJZGHZQZZLBJLSQFZGKQQJZGYCZBZQTLDXRJXBSXXPZXHYZYCLWDXJJHXMFDZPFZHQHQMQGKSLYHTYCGFRZGNQXCLPDLBZCSCZQLLJBLHBZCYPZZPPDYMZZSGYHCKCPZJGSLJLNSCDSLDLXBMSTLDDFJMKDJDHZLZXLSZQPQPGJLLYBDSZGQLBZLSLKYYHZTTNTJYQTZZPSZQZTLLJTYYLLQLLQYZQLBDZLSLYYZYMDFSZSNHLXZNCZQZPBWSKRFBSYZMTHBLGJPMCZZLSTLXSHTCSYZLZBLFEQHLXFLCJLYLJQCBZLZJHHSSTBRMHXZHJZCLXFNBGXGTQJCZTMSFZKJMSSNXLJKBHSJXNTNLZDNTLMSJXGZJYJCZXYJYJWRWWQNZTNFJSZPZSHZJFYRDJSFSZJZBJFZQZZHZLXFYSBZQLZSGYFTZDCSZXZJBQMSZKJRHYJZCKMJKHCHGTXKXQGLXPXFXTRTYLXJXHDTSJXHJZJXZWZLCQSBTXWXGXTXXHXFTSDKFJHZYJFJXRZSDLLLTQSQQZQWZXSYQTWGWBZCGZLLYZBCLMQQTZHZXZXLJFRMYZFLXYSQXXJKXRMQDZDMMYYBSQBHGZMWFWXGMXLZPYYTGZYCCDXYZXYWGSYJYZNBHPZJSQSYXSXRTFYZGRHZTXSZZTHCBFCLSYXZLZQMZLMPLMXZJXSFLBYZMYQHXJSXRXSQZZZSSLYFRCZJRCRXHHZXQYDYHXSJJHZCXZBTYNSYSXJBQLPXZQPYMLXZKYXLXCJLCYSXXZZLXDLLLJJYHZXGYJWKJRWYHCPSGNRZLFZWFZZNSXGXFLZSXZZZBFCSYJDBRJKRDHHGXJLJJTGXJXXSTJTJXLYXQFCSGSWMSBCTLQZZWLZZKXJMLTMJYHSDDBXGZHDLBMYJFRZFSGCLYJBPMLYSMSXLSZJQQHJZFXGFQFQBPXZGYYQXGZTCQWYLTLGWSGWHRLFSFGZJMGMGBGTJFSYZZGZYZAFLSSPMLPFLCWBJZCLJJMZLPJJLYMQDMYYYFBGYGYZMLYZDXQYXRQQQHSYYYQXYLJTYXFSFSLLGNQCYHYCWFHCCCFXPYLYPLLZYXXXXXKQHHXSHJZCFZSCZJXCPZWHHHHHAPYLQALPQAFYHXDYLUKMZQGGGDDESRNNZLTZGCHYPPYSQJJHCLLJTOLNJPZLJLHYMHEYDYDSQYCDDHGZUNDZCLZYZLLZNTNYZGSLHSLPJJBDGWXPCDUTJCKLKCLWKLLCASSTKZZDNQNTTLYYZSSYSSZZRYLJQKCQDHHCRXRZYDGRGCWCGZQFFFPPJFZYNAKRGYWYQPQXXFKJTSZZXSWZDDFBBXTBGTZKZNPZZPZXZPJSZBMQHKCYXYLDKLJNYPKYGHGDZJXXEAHPNZKZTZCMXCXMMJXNKSZQNMNLWBWWXJKYHCPSTMCSQTZJYXTPCTPDTNNPGLLLZSJLSPBLPLQHDTNJNLYYRSZFFJFQWDPHZDWMRZCCLODAXNSSNYZRESTYJWJYJDBCFXNMWTTBYLWSTSZGYBLJPXGLBOCLHPCBJLTMXZLJYLZXCLTPNCLCKXTPZJSWCYXSFYSZDKNTLBYJCYJLLSTGQCBXRYZXBXKLYLHZLQZLNZCXWJZLJZJNCJHXMNZZGJZZXTZJXYCYYCXXJYYXJJXSSSJSTSSTTPPGQTCSXWZDCSYFPTFBFHFBBLZJCLZZDBXGCXLQPXKFZFLSYLTUWBMQJHSZBMDDBCYSCCLDXYCDDQLYJJWMQLLCSGLJJSYFPYYCCYLTJANTJJPWYCMMGQYYSXDXQMZHSZXPFTWWZQSWQRFKJLZJQQYFBRXJHHFWJJZYQAZMYFRHCYYBYQWLPEXCCZSTYRLTTDMQLYKMBBGMYYJPRKZNPBSXYXBHYZDJDNGHPMFSGMWFZMFQMMBCMZZCJJLCNUXYQLMLRYGQZCYXZLWJGCJCGGMCJNFYZZJHYCPRRCMTZQZXHFQGTJXCCJEAQCRJYHPLQLSZDJRBCQHQDYRHYLYXJSYMHZYDWLDFRYHBPYDTSSCNWBXGLPZMLZZTQSSCPJMXXYCSJYTYCGHYCJWYRXXLFEMWJNMKLLSWTXHYYYNCMMCWJDQDJZGLLJWJRKHPZGGFLCCSCZMCBLTBHBQJXQDSPDJZZGHGLFQYWBZYZJLTSTDHQHCTCBCHFLQMPWDSHYYTQWCNZZJTLBYMBPDYYYXSQKXWYYFLXXNCWCXYPMAELYKKJMZZZBRXYYQJFLJPFHHHYTZZXSGQQMHSPGDZQWBWPJHZJDYSCQWZKTXXSQLZYYMYSDZGRXCKKUJLWPYSYSCSYZLRMLQSYLJXBCXTLWDQZPCYCYKPPPNSXFYZJJRCEMHSZMSXLXGLRWGCSTLRSXBZGBZGZTCPLUJLSLYLYMTXMTZPALZXPXJTJWTCYYZLBLXBZLQMYLXPGHDSLSSDMXMBDZZSXWHAMLCZCPJMCNHJYSNSYGCHSKQMZZQDLLKABLWJXSFMOCDXJRRLYQZKJMYBYQLYHETFJZFRFKSRYXFJTWDSXXSYSQJYSLYXWJHSNLXYYXHBHAWHHJZXWMYLJCSSLKYDZTXBZSYFDXGXZJKHSXXYBSSXDPYNZWRPTQZCZENYGCXQFJYKJBZMLJCMQQXUOXSLYXXLYLLJDZBTYMHPFSTTQQWLHOKYBLZZALZXQLHZWRRQHLSTMYPYXJJXMQSJFNBXYXYJXXYQYLTHYLQYFMLKLJTMLLHSZWKZHLJMLHLJKLJSTLQXYLMBHHLNLZXQJHXCFXXLHYHJJGBYZZKBXSCQDJQDSUJZYYHZHHMGSXCSYMXFEBCQWWRBPYYJQTYZCYQYQQZYHMWFFHGZFRJFCDPXNTQYZPDYKHJLFRZXPPXZDBBGZQSTLGDGYLCQMLCHHMFYWLZYXKJLYPQHSYWMQQGQZMLZJNSQXJQSYJYCBEHSXFSZPXZWFLLBCYYJDYTDTHWZSFJMQQYJLMQXXLLDTTKHHYBFPWTYYSQQWNQWLGWDEBZWCMYGCULKJXTMXMYJSXHYBRWFYMWFRXYQMXYSZTZZTFYKMLDHQDXWYYNLCRYJBLPSXCXYWLSPRRJWXHQYPHTYDNXHHMMYWYTZCSQMTSSCCDALWZTCPQPYJLLQZYJSWXMZZMMYLMXCLMXCZMXMZSQTZPPQQBLPGXQZHFLJJHYTJSRXWZXSCCDLXTYJDCQJXSLQYCLZXLZZXMXQRJMHRHZJBHMFLJLMLCLQNLDXZLLLPYPSYJYSXCQQDCMQJZZXHNPNXZMEKMXHYKYQLXSXTXJYYHWDCWDZHQYYBGYBCYSCFGPSJNZDYZZJZXRZRQJJYMCANYRJTLDPPYZBSTJKXXZYPFDWFGZZRPYMTNGXZQBYXNBUFNQKRJQZMJEGRZGYCLKXZDSKKNSXKCLJSPJYYZLQQJYBZSSQLLLKJXTBKTYLCCDDBLSPPFYLGYDTZJYQGGKQTTFZXBDKTYYHYBBFYTYYBCLPDYTGDHRYRNJSPTCSNYJQHKLLLZSLYDXXWBCJQSPXBPJZJCJDZFFXXBRMLAZHCSNDLBJDSZBLPRZTSWSBXBCLLXXLZDJZSJPYLYXXYFTFFFBHJJXGBYXJPMMMPSSJZJMTLYZJXSWXTYLEDQPJMYGQZJGDJLQJWJQLLSJGJGYGMSCLJJXDTYGJQJQJCJZCJGDZZSXQGSJGGCXHQXSNQLZZBXHSGZXCXYLJXYXYYDFQQJHJFXDHCTXJYRXYSQTJXYEFYYSSYYJXNCYZXFXMSYSZXYYSCHSHXZZZGZZZGFJDLTYLNPZGYJYZYYQZPBXQBDZTZCZYXXYHHSQXSHDHGQHJHGYWSZTMZMLHYXGEBTYLZKQWYTJZRCLEKYSTDBCYKQQSAYXCJXWWGSBHJYZYDHCSJKQCXSWXFLTYNYZPZCCZJQTZWJQDZZZQZLJJXLSBHPYXXPSXSHHEZTXFPTLQYZZXHYTXNCFZYYHXGNXMYWXTZSJPTHHGYMXMXQZXTSBCZYJYXXTYYZYPCQLMMSZMJZZLLZXGXZAAJZYXJMZXWDXZSXZDZXLEYJJZQBHZWZZZQTZPSXZTDSXJJJZNYAZPHXYYSRNQDTHZHYYKYJHDZXZLSWCLYBZYECWCYCRYLCXNHZYDZYDYJDFRJJHTRSQTXYXJRJHOJYNXELXSFSFJZGHPZSXZSZDZCQZBYYKLSGSJHCZSHDGQGXYZGXCHXZJWYQWGYHKSSEQZZNDZFKWYSSTCLZSTSYMCDHJXXYWEYXCZAYDMPXMDSXYBSQMJMZJMTZQLPJYQZCGQHXJHHLXXHLHDLDJQCLDWBSXFZZYYSCHTYTYYBHECXHYKGJPXHHYZJFXHWHBDZFYZBCAPNPGNYDMSXHMMMMAMYNBYJTMPXYYMCTHJBZYFCGTYHWPHFTWZZEZSBZEGPFMTSKFTYCMHFLLHGPZJXZJGZJYXZSBBQSCZZLZCCSTPGXMJSFTCCZJZDJXCYBZLFCJSYZFGSZLYBCWZZBYZDZYPSWYJZXZBDSYUXLZZBZFYGCZXBZHZFTPBGZGEJBSTGKDMFHYZZJHZLLZZGJQZLSFDJSSCBZGPDLFZFZSZYZYZSYGCXSNXXCHCZXTZZLJFZGQSQYXZJQDCCZTQCDXZJYQJQCHXZTDLGSCXZSYQJQTZWLQDQZTQCHQQJZYEZZZPBWKDJFCJPZTYPQYQTTYNLMBDKTJZPQZQZZFPZSBNJLGYJDXJDZZKZGQKXDLPZJTCJDQBXDJQJSTCKNXBXZMSLYJCQMTJQWWCJQNJNLLLHJCWQTBZQYDZCZPZZDZYDDCYZZZCCJTTJFZDPRRTZTJDCQTQZDTJNPLZBCLLCTZSXKJZQZPZLBZRBTJDCXFCZDBCCJJLTQQPLDCGZDBBZJCQDCJWYNLLZYZCCDWLLXWZLXRXNTQQCZXKQLSGDFQTDDGLRLAJJTKUYMKQLLTZYTDYYCZGJWYXDXFRSKSTQTENQMRKQZHHQKDLDAZFKYPBGGPZREBZZYKZZSPEGJXGYKQZZZSLYSYYYZWFQZYLZZLZHWCHKYPQGNPGBLPLRRJYXCCSYYHSFZFYBZYYTGZXYLXCZWXXZJZBLFFLGSKHYJZEYJHLPLLLLCZGXDRZELRHGKLZZYHZLYQSZZJZQLJZFLNBHGWLCZCFJYSPYXZLZLXGCCPZBLLCYBBBBUBBCBPCRNNZCZYRBFSRLDCGQYYQXYGMQZWTZYTYJXYFWTEHZZJYWLCCNTZYJJZDEDPZDZTSYQJHDYMBJNYJZLXTSSTPHNDJXXBYXQTZQDDTJTDYYTGWSCSZQFLSHLGLBCZPHDLYZJYCKWTYTYLBNYTSDSYCCTYSZYYEBHEXHQDTWNYGYCLXTSZYSTQMYGZAZCCSZZDSLZCLZRQXYYELJSBYMXSXZTEMBBLLYYLLYTDQYSHYMRQWKFKBFXNXSBYCHXBWJYHTQBPBSBWDZYLKGZSKYHXQZJXHXJXGNLJKZLYYCDXLFYFGHLJGJYBXQLYBXQPQGZTZPLNCYPXDJYQYDYMRBESJYYHKXXSTMXRCZZYWXYQYBMCLLYZHQYZWQXDBXBZWZMSLPDMYSKFMZKLZCYQYCZLQXFZZYDQZPZYGYJYZMZXDZFYFYTTQTZHGSPCZMLCCYTZXJCYTJMKSLPZHYSNZLLYTPZCTZZCKTXDHXXTQCYFKSMQCCYYAZHTJPCYLZLYJBJXTPNYLJYYNRXSYLMMNXJSMYBCSYSYLZYLXJJQYLDZLPQBFZZBLFNDXQKCZFYWHGQMRDSXYCYTXNQQJZYYPFZXDYZFPRXEJDGYQBXRCNFYYQPGHYJDYZXGRHTKYLNWDZNTSMPKLBTHBPYSZBZTJZSZZJTYYXZPHSSZZBZCZPTQFZMYFLYPYBBJQXZMXXDJMTSYSKKBJZXHJCKLPSMKYJZCXTMLJYXRZZQSLXXQPYZXMKYXXXJCLJPRMYYGADYSKQLSNDHYZKQXZYZTCGHZTLMLWZYBWSYCTBHJHJFCWZTXWYTKZLXQSHLYJZJXTMPLPYCGLTBZZTLZJCYJGDTCLKLPLLQPJMZPAPXYZLKKTKDZCZZBNZDYDYQZJYJGMCTXLTGXSZLMLHBGLKFWNWZHDXUHLFMKYSLGXDTWWFRJEJZTZHYDXYKSHWFZCQSHKTMQQHTZHYMJDJSKHXZJZBZZXYMPAGQMSTPXLSKLZYNWRTSQLSZBPSPSGZWYHTLKSSSWHZZLYYTNXJGMJSZSUFWNLSOZTXGXLSAMMLBWLDSZYLAKQCQCTMYCFJBSLXCLZZCLXXKSBZQCLHJPSQPLSXXCKSLNHPSFQQYTXYJZLQLDXZQJZDYYDJNZPTUZDSKJFSLJHYLZSQZLBTXYDGTQFDBYAZXDZHZJNHHQBYKNXJJQCZMLLJZKSPLDYCLBBLXKLELXJLBQYCXJXGCNLCQPLZLZYJTZLJGYZDZPLTQCSXFDMNYCXGBTJDCZNBGBQYQJWGKFHTNPYQZQGBKPBBYZMTJDYTBLSQMPSXTBNPDXKLEMYYCJYNZCTLDYKZZXDDXHQSHDGMZSJYCCTAYRZLPYLTLKXSLZCGGEXCLFXLKJRTLQJAQZNCMBYDKKCXGLCZJZXJHPTDJJMZQYKQSECQZDSHHADMLZFMMZBGNTJNNLGBYJBRBTMLBYJDZXLCJLPLDLPCQDHLXZLYCBLCXZZJADJLNZMMSSSMYBHBSQKBHRSXXJMXSDZNZPXLGBRHWGGFCXGMSKLLTSJYYCQLTSKYWYYHYWXBXQYWPYWYKQLSQPTNTKHQCWDQKTWPXXHCPTHTWUMSSYHBWCRWXHJMKMZNGWTMLKFGHKJYLSYYCXWHYECLQHKQHTTQKHFZLDXQWYZYYDESBPKYRZPJFYYZJCEQDZZDLATZBBFJLLCXDLMJSSXEGYGSJQXCWBXSSZPDYZCXDNYXPPZYDLYJCZPLTXLSXYZYRXCYYYDYLWWNZSAHJSYQYHGYWWAXTJZDAXYSRLTDPSSYYFNEJDXYZHLXLLLZQZSJNYQYQQXYJGHZGZCYJCHZLYCDSHWSHJZYJXCLLNXZJJYYXNFXMWFPYLCYLLABWDDHWDXJMCXZTZPMLQZHSFHZYNZTLLDYWLSLXHYMMYLMBWWKYXYADTXYLLDJPYBPWUXJMWMLLSAFDLLYFLBHHHBQQLTZJCQJLDJTFFKMMMBYTHYGDCQRDDWRQJXNBYSNWZDBYYTBJHPYBYTTJXAAHGQDQTMYSTQXKBTZPKJLZRBEQQSSMJJBDJOTGTBXPGBKTLHQXJJJCTHXQDWJLWRFWQGWSHCKRYSWGFTGYGBXSDWDWRFHWYTJJXXXJYZYSLPYYYPAYXHYDQKXSHXYXGSKQHYWFDDDPPLCJLQQEEWXKSYYKDYPLTJTHKJLTCYYHHJTTPLTZZCDLTHQKZXQYSTEEYWYYZYXXYYSTTJKLLPZMCYHQGXYHSRMBXPLLNQYDQHXSXXWGDQBSHYLLPJJJTHYJKYPPTHYYKTYEZYENMDSHLCRPQFDGFXZPSFTLJXXJBSWYYSKSFLXLPPLBBBLBSFXFYZBSJSSYLPBBFFFFSSCJDSTZSXZRYYSYFFSYZYZBJTBCTSBSDHRTJJBYTCXYJEYLXCBNEBJDSYXYKGSJZBXBYTFZWGENYHHTHZHHXFWGCSTBGXKLSXYWMTMBYXJSTZSCDYQRCYTWXZFHMYMCXLZNSDJTTTXRYCFYJSBSDYERXJLJXBBDEYNJGHXGCKGSCYMBLXJMSZNSKGXFBNBPTHFJAAFXYXFPXMYPQDTZCXZZPXRSYWZDLYBBKTYQPQJPZYPZJZNJPZJLZZFYSBTTSLMPTZRTDXQSJEHBZYLZDHLJSQMLHTXTJECXSLZZSPKTLZKQQYFSYGYWPCPQFHQHYTQXZKRSGTTSQCZLPTXCDYYZXSQZSLXLZMYCPCQBZYXHBSXLZDLTCDXTYLZJYYZPZYZLTXJSJXHLPMYTXCQRBLZSSFJZZTNJYTXMYJHLHPPLCYXQJQQKZZSCPZKSWALQSBLCCZJSXGWWWYGYKTJBBZTDKHXHKGTGPBKQYSLPXPJCKBMLLXDZSTBKLGGQKQLSBKKTFXRMDKBFTPZFRTBBRFERQGXYJPZSSTLBZTPSZQZSJDHLJQLZBPMSMMSXLQQNHKNBLRDDNXXDHDDJCYYGYLXGZLXSYGMQQGKHBPMXYXLYTQWLWGCPBMQXCYZYDRJBHTDJYHQSHTMJSBYPLWHLZFFNYPMHXXHPLTBQPFBJWQDBYGPNZTPFZJGSDDTQSHZEAWZZYLLTYYBWJKXXGHLFKXDJTMSZSQYNZGGSWQSPHTLSSKMCLZXYSZQZXNCJDQGZDLFNYKLJCJLLZLMZZNHYDSSHTHZZLZZBBHQZWWYCRZHLYQQJBEYFXXXWHSRXWQHWPSLMSSKZTTYGYQQWRSLALHMJTQJSMXQBJJZJXZYZKXBYQXBJXSHZTSFJLXMXZXFGHKZSZGGYLCLSARJYHSLLLMZXELGLXYDJYTLFBHBPNLYZFBBHPTGJKWETZHKJJXZXXGLLJLSTGSHJJYQLQZFKCGNNDJSSZFDBCTWWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ 19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=0,f=a.length;e14){var i=g.substring(0,1);for(b=0;b0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(c=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return BI.contains(this.array,a)},indexOf:function(a){return BI.contains(this.array,a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){BI.remove(this.array,a)},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(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;c0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},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(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);null!=b&&b.setRight(c||null),null!=c&&c.setLeft(b||null),this.children.splice(a,1)},removeAllChilds:function(){this.children=[]},addChild:function(a,b){var c=null;c=BI.isUndefined(b)?this.children.length-1:b-1,a.setParent(this),c>=0&&(this.getChild(c)&&this.getChild(c).setRight(a),a.setLeft(this.getChild(c))),BI.isUndefined(b)?this.children.push(a):this.children.splice(b,0,a)},equals:function(a){return this===a||this.id===a.id},clear:function(){this.parent=null,this.left=null,this.right=null,this.children=[]}},BI.extend(BI.Tree,{transformToArrayFormat:function(a,b){if(!a)return[];var c=[];if(BI.isArray(a))for(var d=0,e=a.length;d=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},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(){}}),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(a){this.element.append(a)},_mountChildren:function(){var a=this,b=BI.Widget._renderEngine.createFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.appendFragment(b)},_getChildName:function(a){return a+""},_addElement:function(a,b,c){var d,e=this;return this.hasWidget(this._getChildName(a))?d=this.getWidgetByName(this._getChildName(a)):(d=BI.createWidget(b,c),d.on(BI.Events.DESTROY,function(){BI.each(e._children,function(a,b){b===d&&(BI.remove(e._children,b),e.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),d)),d},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a,b){var c=this,d=this.options,e=BI.Widget._renderEngine.createFragment(),f=[];BI.each(a,function(a,g){var h=c._addElement(d.items.length,g,b);c._children[c._getChildName(d.items.length)]=h,d.items.push(g),f.push(h),e.appendChild(h.element[0])}),this._isMounted&&(this._getWrapper().append(e),BI.each(f,function(a,b){b._mount()}))},prependItems:function(a,b){var c=this;a=a||[];for(var d=BI.Widget._renderEngine.createFragment(),e=[],f=a.length-1;f>=0;f--){this._addItemAt(0,a[f]);var g=this._addElement(0,a[f],b);c._children[c._getChildName(0)]=g,this.options.items.unshift(a[f]),e.push(g),d.appendChild(g.element[0])}this._isMounted&&(this._getWrapper().prepend(d),BI.each(e,function(a,b){b._mount()}))},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=k._getOptions(a),b=k._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=k._getOptions(a),d=null==c.key?k._getChildName(b):c.key;return t[d]=k._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=a[b];if(BI.isNotNull(d)){var e=k._getOptions(d),f=null==e.key?k._getChildName(b):e.key;delete k._children[k._getChildName(f)],t[f]._destroy()}}}function g(a,b,c,d){a=k._getOptions(a),b=b&&k._getOptions(b);var e=BI.isKey(a.key)?a.key:k._getChildName(d);if(b&&t[b.key]){var f,g=BI.isKey(b.key)?b.key:k._getChildName(d);f=c?t[g].element.next():t[g].element,f.length>0?f.before(t[e].element):k._getWrapper().append(t[e].element)}else k._getWrapper().append(t[e].element)}function h(a,b,d,e){var f,g;for(f=d;f<=e;++f)a[f]&&c(a[f],b)&&(g=a[f]);return g}var i,j,k=this,l=0,m=0,n=a.length-1,o=a[0],p=a[n],q=b.length-1,r=b[0],s=b[q],t={};for(BI.each(a,function(a,b){b=k._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(t[c]=k._children[k._getChildName(a)])});l<=n&&m<=q;)if(BI.isNull(o))o=a[++l];else if(BI.isNull(p))p=a[--n];else if(c(o,r,l,m))j=this.patchItem(o,r,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],o=a[++l],r=b[++m];else if(c(p,s,n,q))j=this.patchItem(p,s,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],p=a[--n],s=b[--q];else if(c(o,s))j=this.patchItem(o,s,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],g(o,p,!0),o=a[++l],s=b[--q];else if(c(p,r))j=this.patchItem(p,r,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],g(p,o),p=a[--n],r=b[++m];else{var u=h(a,r,l,n);if(BI.isNull(u)){var v=d(r);g(v,o),r=b[++m]}else BI.each(a,function(b,d){d&&c(d,r)&&(j=k.patchItem(u,r,b)||j,t[null==u.key?k._getChildName(b):u.key]=k._children[k._getChildName(b)],a[b]=void 0,g(u,o))}),r=b[++m]}return l>n?(i=BI.isNull(b[q+1])?null:b[q+1],e(i,b,m,q)):m>q&&f(a,l,n),this._children={},BI.each(b,function(a,b){var c=k._getOptions(b),d=null==c.key?k._getChildName(a):c.key;t[d]._mount(),k._children[k._getChildName(a)]=t[d]}),j},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},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(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a,b,c={},d={},e={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(a&&a(b,d),e[b])for(var f=e[b].length-1;f>=0;f--)e[b][f](d);if(c[b])for(var g,f=c[b].length-1;f>=0;f--)if(g=c[b][f](d))return g;return d},config:function(c,d){a=c,b=d},configWidget:function(a,b){e[a]||(e[a]=[]),e[a].push(b)},registerWidget:function(a,b){c[a]||(c[a]=[]),c[a].length>0&&console.log("组件已经注册过了!"),c[a].push(b)},relieveWidget:function(a){delete c[a]},getObject:function(a,c){if(b&&b(a,c),d[a])for(var e,f=0,g=d[a].length;f0&&console.log("对象已经注册过了!"),d[a].push(b)},relieveObject:function(a){delete d[a]}})}(),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(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},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(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){function c(a,b){var c=a<0?(a*=-1,"-"):"",h="",i=a>0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;iBI.Widget._renderEngine.createElement("body").outerWidth()&&(l-=k.element.outerWidth()+15);var n=BI.Widget._renderEngine.createElement("body").outerHeight();return m+k.element.outerHeight()>n||j+k.element.outerHeight()>n?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.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"}}),_.extend(BI,{pushArray:function(a,b){for(var c=0;ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",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(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),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(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){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(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},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 a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.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 a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p 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%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?b.attachEvent("onresize",c):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",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(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),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(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){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(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},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 a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.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 a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p 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%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?(b.attachEvent("onresize",c),c()):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g0&&b-1 in a)))}function d(a){var b=xa[a]={};return ia.each(a.match(ka)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(ia.acceptData(a)){var f,g,h=ia.expando,i="string"==typeof c,j=a.nodeType,k=j?ia.cache:a,l=j?a[h]:a[h]&&h;if(l&&k[l]&&(e||k[l].data)||!i||d!==b)return l||(j?a[h]=l=_.pop()||ia.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=ia.noop)),"object"!=typeof c&&"function"!=typeof c||(e?k[l]=ia.extend(k[l],c):k[l].data=ia.extend(k[l].data,c)),f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[ia.camelCase(c)]=d),i?(g=f[c],null==g&&(g=f[ia.camelCase(c)])):g=f,g}}function f(a,b,c){if(ia.acceptData(a)){var d,e,f,g=a.nodeType,i=g?ia.cache:a,j=g?a[ia.expando]:ia.expando;if(i[j]){if(b&&(f=c?i[j]:i[j].data)){ia.isArray(b)?b=b.concat(ia.map(b,ia.camelCase)):b in f?b=[b]:(b=ia.camelCase(b),b=b in f?[b]:b.split(" "));for(d=0,e=b.length;d=0===c})}function m(a){var b=Ua.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function n(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function o(a){var b=a.getAttributeNode("type");return a.type=(b&&b.specified)+"/"+a.type,a}function p(a){var b=eb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function q(a,b){for(var c,d=0;null!=(c=a[d]);d++)ia._data(c,"globalEval",!b||ia._data(b[d],"globalEval"))}function r(a,b){if(1===b.nodeType&&ia.hasData(a)){var c,d,e,f=ia._data(a),g=ia._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jb[0].contentWindow||jb[0].contentDocument).document,b.write(""),b.close(),c=C(a,b),jb.detach()),ub[a]=c),c}function C(a,b){var c=ia(b.createElement(a)).appendTo(b.body),d=ia.css(c[0],"display");return c.remove(),d}function D(a,b,c,d){var e;if(ia.isArray(b))ia.each(b,function(b,e){c||Ab.test(a)?d(a,e):D(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==ia.type(b))d(a,b);else for(e in b)D(a+"["+e+"]",b[e],c,d)}function E(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(ka)||[];if(ia.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function F(a,b,c,d){function e(h){var i;return f[h]=!0,ia.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function G(a,c){var d,e,f=ia.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&ia.extend(!0,a,d),a}function H(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(h in k)h in d&&(c[k[h]]=d[h]);for(;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}if(g)return g!==j[0]&&j.unshift(g),d[g]}function I(a,b){var c,d,e,f,g={},h=0,i=a.dataTypes.slice(),j=i[0];if(a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i[1])for(e in a.converters)g[e.toLowerCase()]=a.converters[e];for(;d=i[++h];)if("*"!==d){if("*"!==j&&j!==d){if(e=g[j+" "+d]||g["* "+d],!e)for(c in g)if(f=c.split(" "),f[1]===d&&(e=g[j+" "+f[0]]||g["* "+f[0]])){e===!0?e=g[c]:g[c]!==!0&&(d=f[0],i.splice(h--,0,d));break}if(e!==!0)if(e&&a["throws"])b=e(b);else try{b=e(b)}catch(k){return{state:"parsererror",error:e?k:"No conversion from "+j+" to "+d}}}j=d}return{state:"success",data:b}}function J(){try{return new a.XMLHttpRequest}catch(b){}}function K(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function L(){return setTimeout(function(){$b=b}),$b=ia.now()}function M(a,b){ia.each(b,function(b,c){for(var d=(ec[b]||[]).concat(ec["*"]),e=0,f=d.length;e)[^>]*|#([\w-]*))$/,na=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,oa=/^[\],:{}\s]*$/,pa=/(?:^|:|,)(?:\s*\[)+/g,qa=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,ra=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,sa=/^-ms-/,ta=/-([\da-z])/gi,ua=function(a,b){return b.toUpperCase()},va=function(a){(W.addEventListener||"load"===a.type||"complete"===W.readyState)&&(wa(),ia.ready())},wa=function(){W.addEventListener?(W.removeEventListener("DOMContentLoaded",va,!1),a.removeEventListener("load",va,!1)):(W.detachEvent("onreadystatechange",va),a.detachEvent("onload",va))};ia.fn=ia.prototype={jquery:aa,constructor:ia,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ma.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof ia?c[0]:c,ia.merge(this,ia.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:W,!0)),na.test(e[1])&&ia.isPlainObject(c))for(e in c)ia.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=W.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=W,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):ia.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),ia.makeArray(a,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return da.call(this)},get:function(a){return null==a?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a){var b=ia.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return ia.each(this,a,b)},ready:function(a){return ia.ready.promise().done(a),this},slice:function(){return this.pushStack(da.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0||(T.resolveWith(W,[ia]),ia.fn.trigger&&ia(W).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===ia.type(a)},isArray:Array.isArray||function(a){return"array"===ia.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?$[fa.call(a)]||"object":typeof a},isPlainObject:function(a){if(!a||"object"!==ia.type(a)||a.nodeType||ia.isWindow(a))return!1;try{if(a.constructor&&!ga.call(a,"constructor")&&!ga.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||ga.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||W;var d=na.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=ia.buildFragment([a],b,e),e&&ia(e).remove(),ia.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=ia.trim(b),b&&oa.test(b.replace(qa,"@").replace(ra,"]").replace(pa,"")))?new Function("return "+b)():void ia.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||ia.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&ia.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(sa,"ms-").replace(ta,ua)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;f-1;)j.splice(d,1),c&&(d<=g&&g--,d<=h&&h--)}),this},has:function(a){return a?ia.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!j||f&&!k||(c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},ia.extend({Deferred:function(a){var b=[["resolve","done",ia.Callbacks("once memory"),"resolved"],["reject","fail",ia.Callbacks("once memory"),"rejected"],["notify","progress",ia.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return ia.Deferred(function(c){ia.each(b,function(b,f){var g=f[0],h=ia.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&ia.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?ia.extend(a,d):d}},e={};return d.pipe=d.then,ia.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=da.call(arguments),g=f.length,h=1!==g||a&&ia.isFunction(a.promise)?g:0,i=1===h?a:ia.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?da.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e
a",c=l.getElementsByTagName("*"),d=l.getElementsByTagName("a")[0],!c||!d||!c.length)return{};f=W.createElement("select"),h=f.appendChild(W.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b={getSetAttribute:"t"!==l.className,leadingWhitespace:3===l.firstChild.nodeType,tbody:!l.getElementsByTagName("tbody").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:!!e.value,optSelected:h.selected,enctype:!!W.createElement("form").enctype,html5Clone:"<:nav>"!==W.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===W.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=W.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=W.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;return l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip,ia(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=W.getElementsByTagName("body")[0];g&&(c=W.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="
t
",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.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%;",b.boxSizing=4===l.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==g.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(W.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==V&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="
",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}();var ya=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,za=/([A-Z])/g;ia.extend({cache:{},expando:"jQuery"+(aa+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?ia.cache[a[ia.expando]]:a[ia.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&ia.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),ia.fn.extend({data:function(a,c){var d,e,f=this[0],h=0,i=null;if(a===b){if(this.length&&(i=ia.data(f),1===f.nodeType&&!ia._data(f,"parsedAttrs"))){for(d=f.attributes;h1,null,!0)},removeData:function(a){return this.each(function(){ia.removeData(this,a)})}}),ia.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=ia._data(a,b),c&&(!d||ia.isArray(c)?d=ia._data(a,b,ia.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=ia.queue(a,b),d=c.length,e=c.shift(),f=ia._queueHooks(a,b),g=function(){ia.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),f.cur=e,e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return ia._data(a,c)||ia._data(a,c,{empty:ia.Callbacks("once memory").add(function(){ia._removeData(a,b+"queue"),ia._removeData(a,c)})})}}),ia.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){ia.removeAttr(this,a)})},prop:function(a,b){return ia.access(this,ia.prop,a,b,arguments.length>1)},removeProp:function(a){return a=ia.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(ia.isFunction(a))return this.each(function(b){ia(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(ka)||[];g=0;)d=d.replace(" "+e+" "," ");c.className=a?ia.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return ia.isFunction(a)?this.each(function(c){ia(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=ia(this),h=b,i=a.match(ka)||[];e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else c!==V&&"boolean"!==c||(this.className&&ia._data(this,"__className__",this.className),this.className=this.className||a===!1?"":ia._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=ia.isFunction(a),this.each(function(c){var f,g=ia(this);1===this.nodeType&&(f=e?a.call(this,c,g.val()):a,null==f?f="":"number"==typeof f?f+="":ia.isArray(f)&&(f=ia.map(f,function(a){return null==a?"":a+""})),d=ia.valHooks[this.type]||ia.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=ia.valHooks[f.type]||ia.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Da,""):null==c?"":c)}}}),ia.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i=0}),c.length||(a.selectedIndex=-1),c}}},attr:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return typeof a.getAttribute===V?ia.prop(a,c,d):(f=1!==h||!ia.isXMLDoc(a),f&&(c=c.toLowerCase(),e=ia.attrHooks[c]||(Ga.test(c)?Ba:Aa)),d===b?e&&f&&"get"in e&&null!==(g=e.get(a,c))?g:(typeof a.getAttribute!==V&&(g=a.getAttribute(c)),null==g?b:g):null!==d?e&&f&&"set"in e&&(g=e.set(a,d,c))!==b?g:(a.setAttribute(c,d+""),d):void ia.removeAttr(a,c))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ka);if(f&&1===a.nodeType)for(;c=f[e++];)d=ia.propFix[c]||c,Ga.test(c)?!Ia&&Ha.test(c)?a[ia.camelCase("default-"+c)]=a[d]=!1:a[d]=!1:ia.attr(a,c,""),a.removeAttribute(Ia?c:d)},attrHooks:{type:{set:function(a,b){if(!ia.support.radioValue&&"radio"===b&&ia.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},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(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!ia.isXMLDoc(a),g&&(c=ia.propFix[c]||c,f=ia.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):Ea.test(a.nodeName)||Fa.test(a.nodeName)&&a.href?0:b}}}}),Ba={get:function(a,c){var d=ia.prop(a,c),e="boolean"==typeof d&&a.getAttribute(c),f="boolean"==typeof d?Ja&&Ia?null!=e:Ha.test(c)?a[ia.camelCase("default-"+c)]:!!e:a.getAttributeNode(c);return f&&f.value!==!1?c.toLowerCase():b},set:function(a,b,c){return b===!1?ia.removeAttr(a,c):Ja&&Ia||!Ha.test(c)?a.setAttribute(!Ia&&ia.propFix[c]||c,c):a[ia.camelCase("default-"+c)]=a[c]=!0,c}},Ja&&Ia||(ia.attrHooks.value={get:function(a,c){var d=a.getAttributeNode(c);return ia.nodeName(a,"input")?a.defaultValue:d&&d.specified?d.value:b},set:function(a,b,c){return ia.nodeName(a,"input")?void(a.defaultValue=b):Aa&&Aa.set(a,b,c)}}),Ia||(Aa=ia.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&("id"===c||"name"===c||"coords"===c?""!==d.value:d.specified)?d.value:b},set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},ia.attrHooks.contenteditable={get:Aa.get,set:function(a,b,c){Aa.set(a,""!==b&&b,c)}},ia.each(["width","height"],function(a,b){ia.attrHooks[b]=ia.extend(ia.attrHooks[b],{set:function(a,c){if(""===c)return a.setAttribute(b,"auto"),c}})})),ia.support.hrefNormalized||(ia.each(["href","src","width","height"],function(a,c){ia.attrHooks[c]=ia.extend(ia.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null==d?b:d}})}),ia.each(["href","src"],function(a,b){ia.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}})),ia.support.style||(ia.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),ia.support.optSelected||(ia.propHooks.selected=ia.extend(ia.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),ia.support.enctype||(ia.propFix.enctype="encoding"),ia.support.checkOn||ia.each(["radio","checkbox"],function(){ia.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),ia.each(["radio","checkbox"],function(){ia.valHooks[this]=ia.extend(ia.valHooks[this],{set:function(a,b){if(ia.isArray(b))return a.checked=ia.inArray(ia(a).val(),b)>=0}})});var Ka=/^(?:input|select|textarea)$/i,La=/^key/,Ma=/^(?:mouse|contextmenu)|click/,Na=/^(?:focusinfocus|focusoutblur)$/,Oa=/^([^.]*)(?:\.(.+)|)$/;ia.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=ia._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=ia.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof ia===V||a&&ia.event.triggered===a.type?b:ia.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(ka)||[""],i=c.length;i--;)g=Oa.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),k=ia.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=ia.event.special[o]||{},m=ia.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&ia.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),ia.event.global[o]=!0;a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ia.hasData(a)&&ia._data(a);if(q&&(k=q.events)){for(b=(b||"").match(ka)||[""],j=b.length;j--;)if(h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=ia.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||ia.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)ia.event.remove(a,n+b[j],c,d,!0);ia.isEmptyObject(k)&&(delete q.handle,ia._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||W],o=ga.call(c,"type")?c.type:c,p=ga.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||W,3!==e.nodeType&&8!==e.nodeType&&!Na.test(o+ia.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[ia.expando]?c:new ia.Event(o,"object"==typeof c&&c),c.isTrigger=!0,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:ia.makeArray(d,[c]),k=ia.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!ia.isWindow(e)){for(j=k.delegateType||o,Na.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||W)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(ia._data(i,"events")||{})[c.type]&&ia._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&ia.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(e.ownerDocument,d)===!1)&&("click"!==o||!ia.nodeName(e,"a"))&&ia.acceptData(e)&&h&&e[o]&&!ia.isWindow(e)){l=e[h],l&&(e[h]=null),ia.event.triggered=o;try{e[o]()}catch(q){}ia.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=ia.event.fix(a);var c,d,e,f,g,h=[],i=da.call(arguments),j=(ia._data(this,"events")||{})[a.type]||[],k=ia.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=ia.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(e.namespace)){a.handleObj=e,a.data=e.data;var l=(ia.event.special[e.origType]||{}).handle||e.handler;l.apply&&(d=l.apply(f.elem,i)),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation())}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;g=0:ia.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return iy.cacheLength&&delete a[b.shift()],a[c]=d}}function e(a){return a[N]=!0,a}function f(a){var b=F.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}}function g(a,b,c,d){var e,f,g,h,i,j,k,n,o,p;if((b?b.ownerDocument||b:O)!==F&&E(b),b=b||F,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(!H&&!d){if(e=pa.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&L(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return Z.apply(c,$.call(b.getElementsByTagName(a),0)),c;if((g=e[3])&&P.getByClassName&&b.getElementsByClassName)return Z.apply(c,$.call(b.getElementsByClassName(g),0)),c}if(P.qsa&&!I.test(a)){if(k=!0,n=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=l(a),(k=b.getAttribute("id"))?n=k.replace(sa,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=na.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return Z.apply(c,$.call(o.querySelectorAll(p),0)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return u(a.replace(ga,"$1"),b,c,d)}function h(a,b){var c=b&&a,d=c&&(~b.sourceIndex||W)-(~a.sourceIndex||W);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(a,b){var c,d,e,f,h,i,j,k=T[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=y.preFilter;h;){c&&!(d=ha.exec(h))||(d&&(h=h.slice(d[0].length)||h),i.push(e=[])),c=!1,(d=ja.exec(h))&&(c=d.shift(),e.push({value:c,type:d[0].replace(ga," ")}),h=h.slice(c.length));for(f in y.filter)!(d=ma[f].exec(h))||j[f]&&!(d=j[f](d))||(c=d.shift(),e.push({value:c,type:f,matches:d}),h=h.slice(c.length));if(!c)break}return b?h.length:h?g.error(a):T(a,i).slice(0)}function m(a){for(var b=0,c=a.length,d="";b1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h-1&&(e[j]=!(g[j]=l))}}else s=p(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):Z.apply(g,s)})}function r(a){for(var b,c,d,e=a.length,f=y.relative[a[0].type],g=f||y.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return _.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];h1&&o(k),h>1&&m(a.slice(0,h-1)).replace(ga,"$1"),c,h0,f=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],q=0,r="0",s=e&&[],t=null!=k,u=D,v=e||f&&y.find.TAG("*",k&&h.parentNode||h),w=Q+=null==u?1:Math.random()||.1;for(t&&(D=h!==F&&h,x=c);null!=(l=v[r]);r++){if(f&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(Q=w,x=++c)}d&&((l=!n&&l)&&q--,e&&s.push(l))}if(q+=r,d&&r!==q){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(q>0)for(;r--;)s[r]||o[r]||(o[r]=Y.call(j));o=p(o)}Z.apply(j,o),t&&!e&&o.length>0&&q+b.length>1&&g.uniqueSort(j)}return t&&(Q=w,D=u),s};return d?e(h):h}function t(a,b,c){for(var d=0,e=b.length;d2&&"ID"===(g=f[0]).type&&9===b.nodeType&&!H&&y.relative[f[1].type]){if(b=y.find.ID(g.matches[0].replace(ua,va),b)[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=ma.needsContext.test(a)?0:f.length;e--&&(g=f[e],!y.relative[h=g.type]);)if((i=y.find[h])&&(d=i(g.matches[0].replace(ua,va),na.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return Z.apply(c,$.call(d,0)),c;break}}return B(a,j)(d,b,H,c,na.test(a)),c}function v(){}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P={},Q=0,R=0,S=d(),T=d(),U=d(),V=typeof b,W=1<<31,X=[],Y=X.pop,Z=X.push,$=X.slice,_=X.indexOf||function(a){for(var b=0,c=this.length;b+~])"+aa+"*"),ka=new RegExp(fa),la=new RegExp("^"+ca+"$"),ma={ID:new RegExp("^#("+ba+")"),CLASS:new RegExp("^\\.("+ba+")"),NAME:new RegExp("^\\[name=['\"]?("+ba+")['\"]?\\]"),TAG:new RegExp("^("+ba.replace("w","w*")+")"),ATTR:new RegExp("^"+ea),PSEUDO:new RegExp("^"+fa),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+aa+"*(even|odd|(([+-]|)(\\d*)n|)"+aa+"*(?:([+-]|)"+aa+"*(\\d+)|))"+aa+"*\\)|)","i"),needsContext:new RegExp("^"+aa+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+aa+"*((?:-\\d)?\\d*)"+aa+"*\\)|)(?=[^-]|$)","i")},na=/[\x20\t\r\n\f]*[+~]/,oa=/^[^{]+\{\s*\[native code/,pa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,qa=/^(?:input|select|textarea|button)$/i,ra=/^h\d$/i,sa=/'|\\/g,ta=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,ua=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,va=function(a,b){var c="0x"+b-65536;return c!==c?b:c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320)};try{$.call(O.documentElement.childNodes,0)[0].nodeType}catch(wa){$=function(a){for(var b,c=[];b=this[a++];)c.push(b);return c}}A=g.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},E=g.setDocument=function(a){var d=a?a.ownerDocument||a:O;return d!==F&&9===d.nodeType&&d.documentElement?(F=d,G=d.documentElement,H=A(d),P.tagNameNoComments=f(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),P.attributes=f(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),P.getByClassName=f(function(a){return a.innerHTML="",!(!a.getElementsByClassName||!a.getElementsByClassName("e").length)&&(a.lastChild.className="e",2===a.getElementsByClassName("e").length)}),P.getByName=f(function(a){a.id=N+0,a.innerHTML="
",G.insertBefore(a,G.firstChild);var b=d.getElementsByName&&d.getElementsByName(N).length===2+d.getElementsByName(N+0).length;return P.getIdNotName=!d.getElementById(N),G.removeChild(a),b}),y.attrHandle=f(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==V&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},P.getIdNotName?(y.find.ID=function(a,b){if(typeof b.getElementById!==V&&!H){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){return a.getAttribute("id")===b}}):(y.find.ID=function(a,c){if(typeof c.getElementById!==V&&!H){var d=c.getElementById(a);return d?d.id===a||typeof d.getAttributeNode!==V&&d.getAttributeNode("id").value===a?[d]:b:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){var c=typeof a.getAttributeNode!==V&&a.getAttributeNode("id");return c&&c.value===b}}),y.find.TAG=P.tagNameNoComments?function(a,b){if(typeof b.getElementsByTagName!==V)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},y.find.NAME=P.getByName&&function(a,b){if(typeof b.getElementsByName!==V)return b.getElementsByName(name)},y.find.CLASS=P.getByClassName&&function(a,b){if(typeof b.getElementsByClassName!==V&&!H)return b.getElementsByClassName(a)},J=[],I=[":focus"],(P.qsa=c(d.querySelectorAll))&&(f(function(a){a.innerHTML="",a.querySelectorAll("[selected]").length||I.push("\\["+aa+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||I.push(":checked")}),f(function(a){a.innerHTML="",a.querySelectorAll("[i^='']").length&&I.push("[*^$]="+aa+"*(?:\"\"|'')"),a.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),I.push(",.*:")})),(P.matchesSelector=c(K=G.matchesSelector||G.mozMatchesSelector||G.webkitMatchesSelector||G.oMatchesSelector||G.msMatchesSelector))&&f(function(a){P.disconnectedMatch=K.call(a,"div"),K.call(a,"[s!='']:x"),J.push("!=",fa)}),I=new RegExp(I.join("|")),J=new RegExp(J.join("|")),L=c(G.contains)||G.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},M=G.compareDocumentPosition?function(a,b){var c;return a===b?(C=!0,0):(c=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b))?1&c||a.parentNode&&11===a.parentNode.nodeType?a===d||L(O,a)?-1:b===d||L(O,b)?1:0:4&c?-1:1:a.compareDocumentPosition?-1:1}:function(a,b){var c,e=0,f=a.parentNode,g=b.parentNode,i=[a],j=[b];if(a===b)return C=!0,0;if(!f||!g)return a===d?-1:b===d?1:f?-1:g?1:0;if(f===g)return h(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},C=!1,[0,0].sort(M),P.detectDuplicates=C,F):F},g.matches=function(a,b){return g(a,null,null,b)},g.matchesSelector=function(a,b){if((a.ownerDocument||a)!==F&&E(a),b=b.replace(ta,"='$1']"),P.matchesSelector&&!H&&(!J||!J.test(b))&&!I.test(b))try{var c=K.call(a,b);if(c||P.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(d){}return g(b,F,null,[a]).length>0},g.contains=function(a,b){return(a.ownerDocument||a)!==F&&E(a),L(a,b)},g.attr=function(a,b){var c;return(a.ownerDocument||a)!==F&&E(a),H||(b=b.toLowerCase()),(c=y.attrHandle[b])?c(a):H||P.attributes?a.getAttribute(b):((c=a.getAttributeNode(b))||a.getAttribute(b))&&a[b]===!0?b:c&&c.specified?c.value:null},g.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},g.uniqueSort=function(a){var b,c=[],d=1,e=0;if(C=!P.detectDuplicates,a.sort(M),C){for(;b=a[d];d++)b===a[d-1]&&(e=c.push(d));for(;e--;)a.splice(c[e],1)}return a},z=g.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=z(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=z(b);return c},y=g.selectors={cacheLength:50,createPseudo:e,match:ma,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ua,va),a[3]=(a[4]||a[5]||"").replace(ua,va),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||g.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&g.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return ma.CHILD.test(a[0])?null:(a[4]?a[2]=a[4]:c&&ka.test(c)&&(b=l(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(ua,va).toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=S[a+" "];return b||(b=new RegExp("(^|"+aa+")"+a+"("+aa+"|$)"))&&S(a,function(a){return b.test(a.className||typeof a.getAttribute!==V&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=g.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===Q&&j[1],m=j[0]===Q&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[Q,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===Q)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[Q,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,d=y.pseudos[a]||y.setFilters[a.toLowerCase()]||g.error("unsupported pseudo: "+a);return d[N]?d(b):d.length>1?(c=[a,a,"",b],y.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var e,f=d(a,b),g=f.length;g--;)e=_.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:e(function(a){var b=[],c=[],d=B(a.replace(ga,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return g(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||z(b)).indexOf(a)>-1}}),lang:e(function(a){return la.test(a||"")||g.error("unsupported lang: "+a),a=a.replace(ua,va).toLowerCase(),function(b){var c;do if(c=H?b.getAttribute("xml:lang")||b.getAttribute("lang"):b.lang)return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===G},focus:function(a){return a===F.activeElement&&(!F.hasFocus||F.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!y.pseudos.empty(a)},header:function(a){return ra.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[c<0?c+b:c]}),even:k(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=c<0?c+b:c;++d1?ia.unique(c):c),c.selector=(this.selector?this.selector+" ":"")+a,c},has:function(a){var b,c=ia(a,this),d=c.length;return this.filter(function(){for(b=0;b=0:ia.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sa.test(a)||"string"!=typeof a?ia(a,b||this.context):0;d-1:ia.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}return this.pushStack(f.length>1?ia.unique(f):f)},index:function(a){return a?"string"==typeof a?ia.inArray(this[0],ia(a)):ia.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?ia(a,b):ia.makeArray(a&&a.nodeType?[a]:a),d=ia.merge(this.get(),c);return this.pushStack(ia.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),ia.fn.andSelf=ia.fn.addBack,ia.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return ia.dir(a,"parentNode")},parentsUntil:function(a,b,c){return ia.dir(a,"parentNode",c)},next:function(a){return k(a,"nextSibling")},prev:function(a){return k(a,"previousSibling")},nextAll:function(a){return ia.dir(a,"nextSibling")},prevAll:function(a){return ia.dir(a,"previousSibling")},nextUntil:function(a,b,c){return ia.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return ia.dir(a,"previousSibling",c)},siblings:function(a){return ia.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return ia.sibling(a.firstChild)},contents:function(a){return ia.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:ia.merge([],a.childNodes)}},function(a,b){ia.fn[a]=function(c,d){var e=ia.map(this,b,c);return Pa.test(a)||(d=c),d&&"string"==typeof d&&(e=ia.filter(d,e)),e=this.length>1&&!Ta[a]?ia.unique(e):e,this.length>1&&Qa.test(a)&&(e=e.reverse()),this.pushStack(e)}}),ia.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?ia.find.matchesSelector(b[0],a)?[b[0]]:[]:ia.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!ia(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ua="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Va=/ jQuery\d+="(?:null|\d+)"/g,Wa=new RegExp("<(?:"+Ua+")[\\s/>]","i"),Xa=/^\s+/,Ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Za=/<([\w:]+)/,$a=/\s*$/g,gb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:ia.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},hb=m(W),ib=hb.appendChild(W.createElement("div"));gb.optgroup=gb.option,gb.tbody=gb.tfoot=gb.colgroup=gb.caption=gb.thead,gb.th=gb.td,ia.fn.extend({text:function(a){return ia.access(this,function(a){return a===b?ia.text(this):this.empty().append((this[0]&&this[0].ownerDocument||W).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(ia.isFunction(a))return this.each(function(b){ia(this).wrapAll(a.call(this,b))});if(this[0]){var b=ia(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return ia.isFunction(a)?this.each(function(b){ia(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ia(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ia.isFunction(a);return this.each(function(c){ia(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){ia.nodeName(this,"body")||ia(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||ia.filter(a,[c]).length>0)&&(b||1!==c.nodeType||ia.cleanData(t(c)),c.parentNode&&(b&&ia.contains(c.ownerDocument,c)&&q(t(c,"script")),c.parentNode.removeChild(c)));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&ia.cleanData(t(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&ia.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return ia.clone(this,a,b)})},html:function(a){return ia.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Va,""):b;if("string"==typeof a&&!ab.test(a)&&(ia.support.htmlSerialize||!Wa.test(a))&&(ia.support.leadingWhitespace||!Xa.test(a))&&!gb[(Za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ya,"<$1>");try{for(;d")?f=a.cloneNode(!0):(ib.innerHTML=a.outerHTML,ib.removeChild(f=ib.firstChild)),!(ia.support.noCloneEvent&&ia.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ia.isXMLDoc(a)))for(d=t(f),h=t(a),g=0;null!=(e=h[g]);++g)d[g]&&s(e,d[g]);if(b)if(c)for(h=h||t(a),d=d||t(f),g=0;null!=(e=h[g]);g++)r(e,d[g]);else r(a,f);return d=t(f,"script"),d.length>0&&q(d,!i&&t(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,n=m(b),o=[],p=0;p")+k[2],e=k[0];e--;)h=h.lastChild;if(!ia.support.leadingWhitespace&&Xa.test(f)&&o.push(b.createTextNode(Xa.exec(f)[0])),!ia.support.tbody)for(f="table"!==i||$a.test(f)?""!==k[1]||$a.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)ia.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(ia.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=n.lastChild}else o.push(b.createTextNode(f));for(h&&n.removeChild(h),ia.support.appendChecked||ia.grep(t(o,"input"),u),p=0;f=o[p++];)if((!d||ia.inArray(f,d)===-1)&&(g=ia.contains(f.ownerDocument,f),h=t(n.appendChild(f),"script"),g&&q(h),c))for(e=0;f=h[e++];)db.test(f.type||"")&&c.push(f);return h=null,n},cleanData:function(a,b){for(var c,d,e,f,g=0,h=ia.expando,i=ia.cache,j=ia.support.deleteExpando,k=ia.event.special;null!=(c=a[g]);g++)if((b||ia.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?ia.event.remove(c,d):ia.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==V?c.removeAttribute(h):c[h]=null,_.push(e))}}});var jb,kb,lb,mb=/alpha\([^)]*\)/i,nb=/opacity\s*=\s*([^)]*)/,ob=/^(top|right|bottom|left)$/,pb=/^(none|table(?!-c[ea]).+)/,qb=/^margin/,rb=new RegExp("^("+ja+")(.*)$","i"),sb=new RegExp("^("+ja+")(?!px)[a-z%]+$","i"),tb=new RegExp("^([+-])=("+ja+")","i"),ub={BODY:"block"},vb={position:"absolute",visibility:"hidden",display:"block"},wb={letterSpacing:0,fontWeight:400},xb=["Top","Right","Bottom","Left"],yb=["Webkit","O","Moz","ms"];ia.fn.extend({css:function(a,c){return ia.access(this,function(a,c,d){var e,f,g={},h=0;if(ia.isArray(c)){for(f=kb(a),e=c.length;h1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(a){var b="boolean"==typeof a;return this.each(function(){(b?a:w(this))?ia(this).show():ia(this).hide()})}}),ia.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ia.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=ia.camelCase(c),j=a.style;if(c=ia.cssProps[i]||(ia.cssProps[i]=v(j,i)),h=ia.cssHooks[c]||ia.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tb.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(ia.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||ia.cssNumber[i]||(d+="px"),ia.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=ia.camelCase(c);return c=ia.cssProps[i]||(ia.cssProps[i]=v(a.style,i)),h=ia.cssHooks[c]||ia.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lb(a,c,e)),"normal"===g&&c in wb&&(g=wb[c]),""===d||d?(f=parseFloat(g),d===!0||ia.isNumeric(f)?f||0:g):g},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),a.getComputedStyle?(kb=function(b){return a.getComputedStyle(b,null)},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||ia.contains(a.ownerDocument,a)||(i=ia.style(a,c)),sb.test(i)&&qb.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):W.documentElement.currentStyle&&(kb=function(a){return a.currentStyle},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sb.test(i)&&!ob.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),ia.each(["height","width"],function(a,b){ia.cssHooks[b]={get:function(a,c,d){if(c)return 0===a.offsetWidth&&pb.test(ia.css(a,"display"))?ia.swap(a,vb,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&kb(a);return y(a,c,d?z(a,b,d,ia.support.boxSizing&&"border-box"===ia.css(a,"boxSizing",!1,e),e):0)}}}),ia.support.opacity||(ia.cssHooks.opacity={get:function(a,b){return nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=ia.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===ia.trim(f.replace(mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mb.test(f)?f.replace(mb,e):f+" "+e)}}),ia(function(){ia.support.reliableMarginRight||(ia.cssHooks.marginRight={get:function(a,b){if(b)return ia.swap(a,{display:"inline-block"},lb,[a,"marginRight"])}}),!ia.support.pixelPosition&&ia.fn.position&&ia.each(["top","left"],function(a,b){ia.cssHooks[b]={get:function(a,c){if(c)return c=lb(a,b),sb.test(c)?ia(a).position()[b]+"px":c}}})}),ia.expr&&ia.expr.filters&&(ia.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!ia.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||ia.css(a,"display"))},ia.expr.filters.visible=function(a){return!ia.expr.filters.hidden(a)}),ia.each({margin:"",padding:"",border:"Width"},function(a,b){ia.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+xb[d]+b]=f[d]||f[d-2]||f[0];return e}},qb.test(a)||(ia.cssHooks[a+b].set=y)});var zb=/%20/g,Ab=/\[\]$/,Bb=/\r?\n/g,Cb=/^(?:submit|button|image|reset|file)$/i,Db=/^(?:input|select|textarea|keygen)/i;ia.fn.extend({serialize:function(){return ia.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ia.prop(this,"elements");return a?ia.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ia(this).is(":disabled")&&Db.test(this.nodeName)&&!Cb.test(a)&&(this.checked||!bb.test(a))}).map(function(a,b){var c=ia(this).val();return null==c?null:ia.isArray(c)?ia.map(c,function(a){return{name:b.name,value:a.replace(Bb,"\r\n")}}):{name:b.name,value:c.replace(Bb,"\r\n")}}).get()}}),ia.param=function(a,c){var d,e=[],f=function(a,b){b=ia.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=ia.ajaxSettings&&ia.ajaxSettings.traditional),ia.isArray(a)||a.jquery&&!ia.isPlainObject(a))ia.each(a,function(){f(this.name,this.value)});else for(d in a)D(d,a[d],c,f);return e.join("&").replace(zb,"+")},ia.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(a,b){ia.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),ia.fn.hover=function(a,b){return this.mouseenter(a).mouseleave(b||a)};var Eb,Fb,Gb=ia.now(),Hb=/\?/,Ib=/#.*$/,Jb=/([?&])_=[^&]*/,Kb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mb=/^(?:GET|HEAD)$/,Nb=/^\/\//,Ob=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pb=ia.fn.load,Qb={},Rb={},Sb="*/".concat("*");try{Fb=X.href}catch(Tb){Fb=W.createElement("a"),Fb.href="",Fb=Fb.href}Eb=Ob.exec(Fb.toLowerCase())||[],ia.fn.load=function(a,c,d){if("string"!=typeof a&&Pb)return Pb.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),ia.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&ia.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?ia("
").append(ia.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},ia.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){ia.fn[b]=function(a){return this.on(b,a)}}),ia.each(["get","post"],function(a,c){ia[c]=function(a,d,e,f){return ia.isFunction(d)&&(f=f||e,e=d,d=b),ia.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),ia.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fb,type:"GET",isLocal:Lb.test(Eb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sb,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":a.String,"text html":!0,"text json":ia.parseJSON,"text xml":ia.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?G(G(a,ia.ajaxSettings),b):G(ia.ajaxSettings,a)},ajaxPrefilter:E(Qb),ajaxTransport:E(Rb),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,d&&(t=H(m,w,d)),a>=200&&a<300||304===a?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(ia.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(ia.etag[g]=v)),204===a?(f=!0,x="nocontent"):304===a?(f=!0,x="notmodified"):(f=I(m,t),x=f.state,l=f.data,s=f.error,f=!s)):(s=x,!a&&x||(x="error",a<0&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--ia.active||ia.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=ia.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?ia(n):ia.event,p=ia.Deferred(),q=ia.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kb.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(u<2)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fb)+"").replace(Ib,"").replace(Nb,Eb[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=ia.trim(m.dataType||"*").toLowerCase().match(ka)||[""],null==m.crossDomain&&(e=Ob.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Eb[1]&&e[2]===Eb[2]&&(e[3]||("http:"===e[1]?80:443))==(Eb[3]||("http:"===Eb[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=ia.param(m.data,m.traditional)),F(Qb,m,c,w),2===u)return w;j=m.global,j&&0===ia.active++&&ia.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mb.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hb.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jb.test(g)?g.replace(Jb,"$1_="+Gb++):g+(Hb.test(g)?"&":"?")+"_="+Gb++)),m.ifModified&&(ia.lastModified[g]&&w.setRequestHeader("If-Modified-Since",ia.lastModified[g]),ia.etag[g]&&w.setRequestHeader("If-None-Match",ia.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sb+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=F(Rb,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(u<2))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getScript:function(a,c){return ia.get(a,b,c,"script")},getJSON:function(a,b,c){return ia.get(a,b,c,"json")}}),ia.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return ia.globalEval(a),a}}}),ia.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),ia.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=W.head||ia("head")[0]||W.documentElement;return{send:function(b,e){c=W.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Ub=[],Vb=/(=)\?(?=&|$)|\?\?/;ia.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Ub.pop()||ia.expando+"_"+Gb++;return this[a]=!0,a}}),ia.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vb.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vb.test(c.data)&&"data");if(i||"jsonp"===c.dataTypes[0])return f=c.jsonpCallback=ia.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vb,"$1"+f):c.jsonp!==!1&&(c.url+=(Hb.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||ia.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Ub.push(f)),h&&ia.isFunction(g)&&g(h[0]),h=g=b}),"script"});var Wb,Xb,Yb=0,Zb=a.ActiveXObject&&function(){var a;for(a in Wb)Wb[a](b,!0)};ia.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&J()||K()}:J,Xb=ia.ajaxSettings.xhr(),ia.support.cors=!!Xb&&"withCredentials"in Xb,Xb=ia.support.ajax=!!Xb,Xb&&ia.ajaxTransport(function(c){if(!c.crossDomain||ia.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=ia.noop,Zb&&delete Wb[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yb,Zb&&(Wb||(Wb={},ia(a).unload(Zb)),Wb[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+ja+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[P],ec={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=bc.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||(ia.cssNumber[a]?"":"px"),"px"!==d&&h){h=ia.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,ia.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};ia.Animation=ia.extend(N,{tweener:function(a,b){ia.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),ia.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},ia.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===ia.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),ia.nodeName(a[0],"html")||(c=a.offset()),c.top+=ia.css(a[0],"borderTopWidth",!0),c.left+=ia.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-ia.css(d,"marginTop",!0),left:b.left-c.left-ia.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||W.documentElement;a&&!ia.nodeName(a,"html")&&"static"===ia.css(a,"position");)a=a.offsetParent;return a||W.documentElement})}}),ia.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);ia.fn[a]=function(e){return ia.access(this,function(a,e,f){var g=S(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:void(g?g.scrollTo(d?ia(g).scrollLeft():f,d?f:ia(g).scrollTop()):a[e]=f)},a,e,arguments.length,null)}}),ia.each({Height:"height",Width:"width"},function(a,c){ia.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){ia.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return ia.access(this,function(c,d,e){var f;return ia.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?ia.css(c,d,h):ia.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=ia,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ia})}(window),$.extend($.Event.prototype,{stopEvent:function(){this.stopPropagation(),this.preventDefault()}}),jQuery&&(!function(a){a.fn.insets||(a.fn.insets=function(){var a=this.padding(),b=this.border();return{top:a.top,bottom:a.bottom+b.bottom+b.top,left:a.left,right:a.right+b.right+b.left}}),a.fn.bounds||(a.fn.bounds=function(a){var b={hasIgnoredBounds:!0};return a?(isNaN(a.x)||(b.left=a.x),isNaN(a.y)||(b.top=a.y),null!=a.width&&(b.width=a.width-(this.outerWidth(!0)-this.width()),b.width=b.width>=0?b.width:a.width),null!=a.height&&(b.height=a.height-(this.outerHeight(!0)-this.height()),b.height=b.height>=0?b.height:a.height),this.css(b),this):(b=this.position(),{x:b.left,y:b.top,width:this.outerWidth(),height:this.outerHeight()})})}(jQuery),BI.extend(jQuery.fn,{destroy:function(){this.remove(),BI.isIE()===!0&&(this[0].outerHTML="")},__textKeywordMarked__:function(a,b,c){if(!BI.isKey(b)||(a+"").length>100)return this.html(BI.htmlEncode(a));b+="",b=BI.toUpperCase(b);var d=(a||"")+"";for(c=(c||BI.makeFirstPY(a))+"",null!=c&&(c=BI.toUpperCase(c)),this.empty();;){var e=BI.toUpperCase(d).indexOf(b),f=null;if(null!=c&&(f=c.indexOf(b),f>=0&&(f%=a.length)),e>=0)this.append(BI.htmlEncode(d.substr(0,e))),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(e,b.length)))),d=d.substr(e+b.length),null!=c&&(c=c.substr(e+b.length));else{if(!(null!=f&&f>=0&&Math.floor(f/a.length)===Math.floor((f+b.length-1)/a.length))){this.append(BI.htmlEncode(d));break}this.append(BI.htmlEncode(d.substr(0,f))),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(f,b.length)))),null!=c&&(c=c.substr(f+b.length)),d=d.substr(f+b.length)}}return this},getDomHeight:function(a){var b=$(this).clone();b.appendTo($(a||"body"));var c=b.height();return b.remove(),c},hasVerticalScroll:function(){return this.height()>0&&this[0].clientWidth0&&this[0].clientHeightb.left+c||a.pageYb.top+d)},__hasZIndexMask__:function(a){return a&&null!=this.zIndexMask[a]},__buildZIndexMask__:function(a,b){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var c=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:b});return c.element.css({"z-index":a}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(c),a&&(this.zIndexMask[a]=c),c.element},__releaseZIndexMask__:function(a){if(a&&this.zIndexMask[a])return BI.remove(this.indexMask,this.zIndexMask[a]),void this.zIndexMask[a].destroy();this.indexMask=this.indexMask||[];var b=this.indexMask.pop();b&&b.destroy()}})),_.extend(BI,{$import:function(){function a(a,c){var d=$("head script, body script");$.each(d,function(c,d){d.src.indexOf(a)!=-1&&(b[a]=!0)});var e=$("head link");$.each(e,function(d,e){e.href.indexOf(a)!=-1&&c&&(b[a]=!1,$(e).remove())})}var b={};return function(c,d,e){if(a(c,e),b[c]!==!0)if("css"===d){var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.href=c;var g=document.getElementsByTagName("head")[0];g.appendChild(f),b[c]=!0}else $.ajax({url:c,dataType:"script",async:!1,cache:!0,complete:function(a,d){"success"==d&&(b[c]=!0)}})}}()}),Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||!function(){function a(a,b){for(var c=-1;++c=0;)c+=h[b],h[b]=Math.floor(c/a),c=c%a*f}function c(){for(var a=g,b="";--a>=0;)if(""!==b||0===a||0!==h[a]){var c=String(h[a]);""===b?b=c:b+="0000000".slice(0,7-c.length)+c}return b}function d(a,b,c){return 0===b?c:b%2===1?d(a,b-1,c*a):d(a*a,b/2,c)}function e(a){for(var b=0;a>=4096;)b+=12,a/=4096;for(;a>=2;)b+=1,a/=2;return b}var f,g,h;f=1e7,g=6,h=[0,0,0,0,0,0],Number.prototype.toFixed=function(f){var g,h,i,j,k,l,m,n;if(g=Number(f),g=g!==g?0:Math.floor(g),g<0||g>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(h=Number(this),h!==h)return"NaN";if(h<=-1e21||h>1e21)return String(h);if(i="",h<0&&(i="-",h=-h),j="0",h>1e-21)if(k=e(h*d(2,69,1))-69,l=k<0?h*d(2,-k,1):h/d(2,k,1),l*=4503599627370496,k=52-k,k>0){for(a(0,l),m=g;m>=7;)a(1e7,0),m-=7;for(a(d(10,m,1),0),m=k-1;m>=23;)b(1<<23),m-=23;b(1<0?(n=j.length,j=n<=g?i+"0.0000000000000000000".slice(0,g-n+2)+j:i+j.slice(0,n-g)+"."+j.slice(n-g)):j=i+j,j}}(),_.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}),BI.version="2.0",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(a,b){var c=this.options,d=BI.AbsoluteCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0),right:c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0),top:c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0),bottom:c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0),margin:"auto"}),d},resize:function(){},populate:function(a){BI.AbsoluteCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_center_adapt",BI.AbsoluteCenterLayout),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(a,b){var c=this.options,d=BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0),right:c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0),margin:"auto"}),c.vgap+c.tgap+(b.vgap||0)+(b.tgap||0)!==0&&d.element.css("top",c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)),c.vgap+c.bgap+(b.vgap||0)+(b.bgap||0)!==0&&d.element.css("bottom",c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_horizontal_adapt",BI.AbsoluteHorizontalLayout),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(a,b){var c=this.options,d=BI.AbsoluteVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:b.lgap,right:b.rgap,top:c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0),bottom:c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0),margin:"auto"}),c.hgap+c.lgap+(b.hgap||0)+(b.lgap||0)!==0&&d.element.css("left",c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)),c.hgap+c.rgap+(b.hgap||0)+(b.rgap||0)!==0&&d.element.css("right",c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_vertical_adapt",BI.AbsoluteVerticalLayout),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 a=this.options,b=this;return BI.CenterAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:a.horizontalAlign,columnSize:a.columnSize,scrollx:a.scrollx,items:a.items,ref:function(a){b.layout=a},hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.center_adapt",BI.CenterAdaptLayout),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 a=this,b=this.options;return BI.HorizontalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,items:b.items,scrollx:b.scrollx,ref:function(b){a.layout=b},hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.horizontal_adapt",BI.HorizontalAdaptLayout),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 a=this.options;BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this,arguments);var b=[];return"left"in a.items&&b.push({type:"bi.left",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items.left,hgap:a.lhgap,lgap:a.llgap,rgap:a.lrgap}}]}),"right"in a.items&&b.push({type:"bi.right",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items.right,textAlign:"right",hgap:a.rhgap,lgap:a.rlgap,rgap:a.rrgap}}]}),b},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){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 a=this.options,b=this;return BI.LeftVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.left",ref:function(a){b.layout=a},items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items,lgap:a.lgap,hgap:a.hgap,rgap:a.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){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 a=this.options,b=this;return BI.RightVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.right",ref:function(a){b.layout=a},items:[{el:{type:"bi.vertical_adapt",height:"100%",textAlign:"right",items:a.items,lgap:a.lgap,hgap:a.hgap,rgap:a.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.right_vertical_adapt",BI.RightVerticalAdaptLayout),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 a=this.options;BI.TableAdaptLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("
").css({position:"relative",display:"table",height:a.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:a.horizontalAlign===BI.HorizontalAlign.Center?"100%":"auto","white-space":"nowrap"}),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.width(e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",width:e,items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]<=1?e:e+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative",display:"table-cell","vertical-align":d.verticalAlign,margin:"0",padding:"0",height:"100%"}),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},appendFragment:function(a){this.$table.append(a),this.element.append(this.$table)},resize:function(){},populate:function(a){BI.TableAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table_adapt",BI.TableAdaptLayout),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 a=this,b=this.options;return BI.VerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,items:b.items,scrollx:b.scrollx,ref:function(b){a.layout=b},hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.vertical_adapt",BI.VerticalAdaptLayout),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(a,b){var c=this.options,d=BI.HorizontalAutoLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",margin:"0px auto"}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":(0===a?c.vgap:0)+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_auto",BI.HorizontalAutoLayout),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 a=this,b=this.left.element.width(),c=this.left.element.height();this.left.element.width(b).height(c).css("float","none"),BI.remove(this._children,function(b,c){c===a.container&&delete a._children[b]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.left]})},_addElement:function(a,b){var c=this.options;return this.left=BI.createWidget({type:"bi.vertical",items:[b],hgap:c.hgap,vgap:c.vgap,tgap:c.tgap,bgap:c.bgap,lgap:c.lgap,rgap:c.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]}),this.left},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_float",BI.FloatHorizontalLayout),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(a,b,c){var d=this.options,e=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return e.element.css({position:"relative","vertical-align":"middle"}),e.element.addClass("inline-center-adapt-item"),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&e.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&e.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&e.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&e.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),e},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("不能添加元素")},stroke:function(a){var b=this;BI.each(a,function(c,d){d&&b._addElement(c,d,a.length)})},populate:function(a){BI.InlineCenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_center_adapt",BI.InlineCenterAdaptLayout),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 a=this.options;this.element.css({whiteSpace:"nowrap",textAlign:a.textAlign}),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","vertical-align":"middle"}),d.element.addClass("inline-vertical-adapt-item"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.InlineVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_vertical_adapt",BI.InlineVerticalAdaptLayout),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(a,b){var c=this.options,d=BI.FlexCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0","margin-left":(0===a?c.hgap:0)+"px","margin-right":c.hgap+"px","margin-top":c.vgap+"px","margin-bottom":c.vgap+"px"}),d},resize:function(){},populate:function(a){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_center_adapt",BI.FlexCenterLayout),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 a=this,b=this.options;return{type:"bi.flex_vertical",ref:function(b){a.wrapper=b},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:b.verticalAlign,rowSize:b.rowSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},resize:function(){},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_horizontal_adapt",BI.FlexHorizontalCenter),BI.shortcut("bi.flex_horizontal_center_adapt",BI.FlexHorizontalCenter),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 a=this.options;this.element.addClass("v-"+a.verticalAlign).addClass("h-"+a.horizontalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.columnSize[a]>0&&d.element.width(c.columnSize[a]),"fill"===c.columnSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-center-adapt-layout",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var a=this,b=this.options;return{type:"bi.flex_horizontal",ref:function(b){a.wrapper=b},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,hgap:b.hgap,items:b.items}},resize:function(){},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_vertical_adapt",BI.FlexVerticalCenter),BI.shortcut("bi.flex_vertical_center_adapt",BI.FlexVerticalCenter),BI.FlexVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-layout",horizontalAlign:BI.HorizontalAlign.Left,verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrolly:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalLayout.superclass.render.apply(this,arguments);var a=this.options;this.element.addClass("h-"+a.horizontalAlign).addClass("v-"+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=BI.FlexVerticalLayout.superclass._addElement.apply(this,arguments),d=this.options;return c.element.css({position:"relative","flex-shrink":"0"}),d.rowSize[a]>0&&c.element.height(d.rowSize[a]),"fill"===d.rowSize[a]&&c.element.css("flex","1"),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&c.element.css({"margin-top":(0===a?d.vgap:0)+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&c.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&c.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&c.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},resize:function(){},populate:function(a){BI.FlexVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical",BI.FlexVerticalLayout),BI.FlexWrapperCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-center-adapt-layout clearfix",scrollable:!0})},render:function(){BI.FlexWrapperCenterLayout.superclass.render.apply(this,arguments),this.$wrapper=BI.Widget._renderEngine.createElement("
").addClass("flex-scrollable-center-adapt-layout-wrapper"),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","margin-left":(0===a?c.hgap:0)+"px","margin-right":c.hgap+"px","margin-top":c.vgap+"px","margin-bottom":c.vgap+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_center_adapt",BI.FlexWrapperCenterLayout),BI.FlexWrapperHorizontalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-center-adapt-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 a=this,b=this.options;return{type:"bi.flex_scrollable_vertical",ref:function(b){a.wrapper=b},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:b.verticalAlign,rowSize:b.rowSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_scrollable_horizontal_adapt",BI.FlexWrapperHorizontalCenter),BI.shortcut("bi.flex_scrollable_horizontal_center_adapt",BI.FlexWrapperHorizontalCenter),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 a=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("
").addClass("flex-scrollable-horizontal-layout-wrapper v-"+a.verticalAlign).addClass("h-"+a.horizontalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.columnSize[a]>0&&d.element.width(c.columnSize[a]),"fill"===c.columnSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_horizontal",BI.FlexWrapperHorizontalLayout),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 a=this,b=this.options;return{type:"bi.flex_scrollable_horizontal",ref:function(b){a.wrapper=b},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,items:b.items}},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_scrollable_vertical_adapt",BI.FlexWrapperVerticalCenter),BI.shortcut("bi.flex_scrollable_vertical_center_adapt",BI.FlexWrapperVerticalCenter),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 a=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("
").addClass("flex-scrollable-vertical-layout-wrapper h-"+a.horizontalAlign).addClass("v-"+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.rowSize[a]>0&&d.element.height(c.rowSize[a]),"fill"===c.rowSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":(0===a?c.vgap:0)+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_vertical",BI.FlexWrapperVerticalLayout),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(a,b){var c=this.options,d=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),e=0,f=0,g=0,h=0; return BI.isNotNull(b.left)&&(d.element.css({left:b.left}),e+=b.left),BI.isNotNull(b.right)&&(d.element.css({right:b.right}),f+=b.right),BI.isNotNull(b.top)&&(d.element.css({top:b.top}),g+=b.top),BI.isNotNull(b.bottom)&&(d.element.css({bottom:b.bottom}),h+=b.bottom),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d.element.css({position:"absolute"}),d},resize:function(){this.stroke(this.options.items)},stroke:function(a){this.options.items=a||[];var b=this;BI.each(a,function(a,c){if(c){if(!BI.isWidget(c)&&!c.el)throw new Error("el must be exist");b._addElement(a,c)}})},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute",BI.AbsoluteLayout),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(a,b){var c=this.options,d=BI.AdaptiveLayout.superclass._addElement.apply(this,arguments);d.element.css({position:"relative"});var e=0,f=0,g=0,h=0;return BI.isNotNull(b.left)&&d.element.css({"margin-left":b.left}),BI.isNotNull(b.right)&&d.element.css({"margin-right":b.right}),BI.isNotNull(b.top)&&d.element.css({"margin-top":b.top}),BI.isNotNull(b.bottom)&&d.element.css({"margin-bottom":b.bottom}),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.adaptive",BI.AdaptiveLayout),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(a){throw new Error("cannot be added")},stroke:function(a){var b,c=0,d=0,e=0,f=0;if("north"in a&&(b=a.north,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"north")){var g=BI.createWidget(b);this.addWidget(this.getName()+"north",g)}this.getWidgetByName(this.getName()+"north").element.height(b.height).css({position:"absolute",top:b.top||0,left:b.left||0,right:b.right||0,bottom:"initial"})}c=(b.height||0)+(b.top||0)+(b.bottom||0)}if("south"in a&&(b=a.south,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"south")){var g=BI.createWidget(b);this.addWidget(this.getName()+"south",g)}this.getWidgetByName(this.getName()+"south").element.height(b.height).css({position:"absolute",bottom:b.bottom||0,left:b.left||0,right:b.right||0,top:"initial"})}d=(b.height||0)+(b.top||0)+(b.bottom||0)}if("west"in a&&(b=a.west,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"west")){var g=BI.createWidget(b);this.addWidget(this.getName()+"west",g)}this.getWidgetByName(this.getName()+"west").element.width(b.width).css({position:"absolute",left:b.left||0,top:c,bottom:d,right:"initial"})}e=(b.width||0)+(b.left||0)+(b.right||0)}if("east"in a&&(b=a.east,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"east")){var g=BI.createWidget(b);this.addWidget(this.getName()+"east",g)}this.getWidgetByName(this.getName()+"east").element.width(b.width).css({position:"absolute",right:b.right||0,top:c,bottom:d,left:"initial"})}f=(b.width||0)+(b.left||0)+(b.right||0)}if("center"in a&&(b=a.center,null!=b)){if(!this.hasWidget(this.getName()+"center")){var g=BI.createWidget(b);this.addWidget(this.getName()+"center",g)}this.getWidgetByName(this.getName()+"center").element.css({position:"absolute",top:c,bottom:d,left:e,right:f})}},update:function(a){},populate:function(a){BI.BorderLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.border",BI.BorderLayout),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(a){var b=this,c=this.options;this.showIndex=void 0,BI.each(a,function(a,d){if(d){if(b.hasWidget(d.cardName))var e=b.getWidgetByName(d.cardName);else{var e=BI.createWidget(d);e.on(BI.Events.DESTROY,function(){var a=BI.findIndex(c.items,function(a,b){return b.cardName==d.cardName});a>-1&&c.items.splice(a,1)}),b.addWidget(d.cardName,e)}e.element.css({position:"absolute",top:"0",right:"0",bottom:"0",left:"0"}),e.setVisible(!1)}})},update:function(){},empty:function(){BI.CardLayout.superclass.empty.apply(this,arguments),this.options.items=[]},populate:function(a){BI.CardLayout.superclass.populate.apply(this,arguments),this._mount(),this.options.defaultShowName&&this.showCardByName(this.options.defaultShowName)},isCardExisted:function(a){return BI.some(this.options.items,function(b,c){return c.cardName==a&&c.el})},getCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");return this._children[a]},_deleteCardByName:function(a){delete this._children[a];var b=BI.findIndex(this.options.items,function(b,c){return c.cardName==a});b>-1&&this.options.items.splice(b,1)},deleteCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");var b=this._children[a];this._deleteCardByName(a),b&&b._destroy()},addCardByName:function(a,b){if(this.isCardExisted(a))throw new Error("cardName is already exist");var c=BI.createWidget(b,this);return c.element.css({position:"relative",top:"0",left:"0",width:"100%",height:"100%"}).appendTo(this.element),c.invisible(),this.addWidget(a,c),this.options.items.push({el:b,cardName:a}),c},showCardByName:function(a,b,c){var d=this,e=this.isCardExisted(a);null!=this.showIndex&&(this.lastShowIndex=this.showIndex),this.showIndex=a;var f=!1;BI.each(this.options.items,function(g,h){var i=d._children[h.cardName];i&&(a!=h.cardName?!f&&!e&&BI.Action&&b instanceof BI.Action?(b.actionBack(i),f=!0):i.invisible():BI.Action&&b instanceof BI.Action?b.actionPerformed(void 0,i,c):(i.visible(),c&&c()))})},showLastCard:function(){var a=this;this.showIndex=this.lastShowIndex,BI.each(this.options.items,function(b,c){a._children[c.cardName].setVisible(a.showIndex==b)})},setDefaultShowName:function(a){return this.options.defaultShowName=a,this},getDefaultShowName:function(){return this.options.defaultShowName},getAllCardNames:function(){return BI.map(this.options.items,function(a,b){return b.cardName})},getShowingCard:function(){if(BI.isKey(this.showIndex))return this.getWidgetByName(this.showIndex)},deleteAllCard:function(){var a=this;BI.each(this.getAllCardNames(),function(b,c){a.deleteCardByName(c)})},hideAllCard:function(){var a=this;BI.each(this.options.items,function(b,c){a._children[c.cardName].invisible()})},isAllCardHide:function(){var a=this,b=!0;return BI.some(this.options.items,function(c,d){if(a._children[d.cardName].isVisible())return b=!1,!1}),b},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._deleteCardByName(b)}}),BI.shortcut("bi.card",BI.CardLayout),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(a,b){var c=this.options,d=BI.DefaultLayout.superclass._addElement.apply(this,arguments);return c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.DefaultLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.default",BI.DefaultLayout),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(a){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=BI.makeArray(f),i={},j={};BI.each(h,function(a){h[a]=BI.makeArray(g)}),BI.each(a,function(a,b){return BI.isArray(b)?void BI.each(b,function(c,d){i[a]=(i[a]||0)+b.width,j[c]=(j[c]||0)+b.height,h[a][c]=d}):(i[b.row]=(i[b.row]||0)+b.width,j[b.column]=(j[b.column]||0)+b.height,void(h[b.row][b.column]=b))});for(var k=0;k0){var p=this.getWidgetByName(this.getName()+k+"_"+(m-1));p.element.css({right:100-o+"%"})}m==e.columns-1&&n.element.css({right:"0%"}),d(n,k,m),l+=h[k][m].width}for(var m=0;m0){var p=this.getWidgetByName(this.getName()+(k-1)+"_"+m);p.element.css({bottom:100-r+"%"})}k==e.rows-1&&n.element.css({bottom:"0%"}),q+=h[k][m].height}},update:function(){},populate:function(a){BI.DivisionLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.division",BI.DivisionLayout),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(a,b){var c=this.options,d=BI.FloatLeftLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"left"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),BI.isNotNull(b.bottom)&&d.element.css({bottom:b.bottom}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){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(a,b){var c=this.options,d=BI.FloatRightLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"right"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),BI.isNotNull(b.bottom)&&d.element.css({bottom:b.bottom}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":(0===a?c.hgap:0)+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.FloatRightLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right",BI.FloatRightLayout),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(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}for(var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=100/g,i=100/f,j=[],k=0;k").attr({cellspacing:0,cellpadding:0}).css({position:"relative","white-space":"nowrap",height:a.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:a.horizontalAlign===BI.HorizontalAlign.Center||a.horizontalAlign===BI.HorizontalAlign.Stretch?"100%":"auto","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=BI.Widget._renderEngine.createElement("
"),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]<=1?e:e+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative","vertical-align":d.verticalAlign,margin:"0",padding:"0",border:"none"}),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},appendFragment:function(a){this.$tr.append(a),this.element.append(this.$table)},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){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(a,b){var c=this.options,d=BI.HorizontalCellLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"table-cell","vertical-align":"middle"}),c.hgap+c.lgap>0&&d.element.css({"margin-left":c.hgap+c.lgap+"px"}),c.hgap+c.rgap>0&&d.element.css({"margin-right":c.hgap+c.rgap+"px"}),c.vgap+c.tgap>0&&d.element.css({"margin-top":c.vgap+c.tgap+"px"}),c.vgap+c.bgap>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalCellLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_cell",BI.HorizontalCellLayout),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(a,b){var c=this.options,d=BI.InlineLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"inline-block","*display":"inline","*zoom":1}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.InlineLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline",BI.InlineLayout),BI.LatticeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LatticeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-lattice-layout clearfix"})},render:function(){BI.LatticeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.LatticeLayout.superclass._addElement.apply(this,arguments);if(c.columnSize&&c.columnSize[a])var e=c.columnSize[a]/BI.sum(c.columnSize)*100+"%";else var e=1/this.options.items.length*100+"%";return d.element.css({position:"relative","float":"left",width:e}),d},addItem:function(a){var b=BI.LatticeLayout.superclass.addItem.apply(this,arguments);return this.resize(),b},addItemAt:function(a){var b=BI.LatticeLayout.superclass.addItemAt.apply(this,arguments);return this.resize(),b},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.LatticeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.lattice",BI.LatticeLayout),BI.TableLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-layout",scrolly:!0,columnSize:[200,200,"fill"],rowSize:30,hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TableLayout.superclass.render.apply(this,arguments),this.rows=0,this.populate(this.options.items)},_addElement:function(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}var f,g,h=this.options,i=[],j=0,k=0;for(f=0;ff;g--){if(!BI.isNumber(h.columnSize[g]))throw new Error("item with fill can only be one");e(b[g],this.rows,g),i.push(BI.extend({top:0,bottom:0,right:h.columnSize[g]<=1?100*k+"%":k,width:h.columnSize[g]<=1?100*h.columnSize[g]+"%":h.columnSize[g]},b[g])),k+=h.columnSize[g]+(h.columnSize[g]<1?0:h.hgap)}f>=0&&f0&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":h.vgap}),l.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,l),l},resize:function(){},addItem:function(a){if(!BI.isArray(a))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},update:function(){},populate:function(a){BI.TableLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table",BI.TableLayout),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(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",top:(d.vgap||0)+(d.tgap||0)+c.vgap+c.tgap+"px",bottom:(d.bgap||0)+(d.vgap||0)+c.vgap+c.bgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].width+(a[e-1].lgap||0)+2*(a[e-1].hgap||0)+c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({left:100*d[e]+"%",width:100*f.width+"%"}):g.element.css({left:d[e]+(f.lgap||0)+(f.hgap||0)+c.hgap+c.lgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].width+(a[d+1].rgap||0)+2*(a[d+1].hgap||0)+c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({right:100*e[d]+"%",width:100*f.width+"%"}):g.element.css({right:e[d]+(f.rgap||0)+(f.hgap||0)+c.hgap+c.rgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0})},update:function(){var a;return BI.each(this._children,function(b,c){a=c.update()||a}),a},populate:function(a){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(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",left:(d.lgap||0)+(d.hgap||0)+c.hgap+c.lgap+"px",right:+(d.hgap||0)+(d.rgap||0)+c.hgap+c.rgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].height+(a[e-1].tgap||0)+2*(a[e-1].vgap||0)+c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({top:100*d[e]+"%",height:100*f.height+"%"}):g.element.css({top:d[e]+(f.vgap||0)+(f.tgap||0)+c.vgap+c.tgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].height+(a[d+1].bgap||0)+2*(a[d+1].vgap||0)+c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({bottom:100*e[d]+"%",height:100*f.height+"%"}):g.element.css({bottom:e[d]+(f.vgap||0)+(f.bgap||0)+c.vgap+c.bgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0})},update:function(){},populate:function(a){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout),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("
").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(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}for(var f=this.options,g=BI.createWidget({type:"bi.default",tagName:"tr"}),h=0;h=0;f--){for(var g=0;g=0;g--){for(var f=0;f0&&void 0!==arguments[0]?arguments[0]:"bi";return String(Math.random()+Math.random()).replace(N,a)}function g(){return"undefined"!=typeof navigator&&/(msie|trident)/i.test(navigator.userAgent.toLowerCase())}function h(){var a=0;if("undefined"==typeof navigator)return!1;var b=navigator.userAgent.toLowerCase(),c=b.match(/(?:msie\s([\w.]+))/),d=b.match(/(?:trident.*rv:([\w.]+))/);return a=c&&d&&c[1]&&d[1]?Math.max(1*c[1],1*d[1]):c&&c[1]?1*c[1]:d&&d[1]?1*d[1]:0}function i(a){return"[object Object]"===O.call(a)}function j(a){if(!P.test(a)){var b=a.split(".");return function(a){for(var c=0;c3&&void 0!==arguments[3]?arguments[3]:{},f=a;!f.$watch&&f.$vm&&(f=f.$vm),i(d)&&(e=d,d=d.handler),"string"==typeof d&&(d=f[d]),e=e||{},e.user=!0;var g=void 0;if(c.isFunction(b)||!(g=b.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g))||1===g.length&&!/\*/.test(b))return f.$watch(b,d,e),[];var h=[],j=g.slice(),k=!1,l=!1,m=function(b,c,f,h){k!==!0&&(j[b]=!0,q(j)&&(k=!0,d.call(a,c,f,h)),e&&e.sync?(k=!1,l=!1,j=g.slice()):l||(l=!0,Q(function(){k=!1,l=!1,j=g.slice()})))};return c.each(g,function(a,b){if(!c.has(Z,a)){if(/^[1-9a-zA-Z.]+(\*\*$|\*$)/.test(a)||"**"===a){var d=/\*\*$/.test(a);a=d?a.replace(".**",""):a.replace(".*","");var g=d?a:function(){var a={};return c.each(f.model,function(b,c){c in L||(a[c]=b)}),a};return void f.$watch(g,function(a,d,e){m(b,a,d,c.extend({index:b},e))},c.extend(e,{deep:d}))}if(/\*\*$|\*$/.test(a))throw new Error("not support");if(/\*/.test(a)){var h=a.split("."),i=function(){for(var a={root:f.model},b=(function(b,d){var e={};"*"===h[d]?c.each(a,function(a,b){c.each(a,function(a,c){b+c in L||(e[b+c]=a)})}):c.each(a,function(a,b){b+h[d]in L||(e[b+h[d]]=a[h[d]])}),a=e}),d=0,e=h.length;d3&&void 0!==arguments[3]?arguments[3]:{};i(d)&&(e=d,d=d.handler),"string"==typeof d&&(d=a[d]);var f=c.isFunction(b)?c.bind(b,a):c.bind(function(){return j("model."+b)(a)},a);return new da({get:f,listener:c.bind(d,a),last:f(),sync:e.sync,deep:e.deep,id:e.id})}function w(a,b){return function(){var c=a.apply(b,[].concat(Array.prototype.slice.call(arguments)));return b.$digest(),c}}function x(a,b){for(var c in b)a[c]=null==b[c]?d:w(b[c],a)}function y(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];c.each(b.reverse(),function(b){var d=o(b);for(var e in d)"function"==typeof d[e]&&(c.has(a,e)||(a[e]=w(d[e],a)))})}function z(a,b){function d(b){for(var c=a._parent;c;){if(c.childContext&&c.childContext.indexOf(b)>-1)return c.$watch(b,function(c,d,e){a._contextWatchers[b]&&(a.model[b]=c,a._contextWatchers[b].last=l(c),a.$digest())},{id:a._modelHashId+"-"+b}),{p:c,value:c.model[b]};c=c._parent}}var e=a._contextWatchers={};c.each(b,function(b){var f=d(b);f&&(a.model[b]=f.p?f.p.model[b]:void 0,e[b]=new da({id:f.p._modelHashId+"-"+b,get:function(){return a.model[b]},last:a.model[b],listener:c.bind(function(){f.p.model[b]=a.model[b],f.p.$digest()},f.p)}))})}function A(a,b,d,e){var f={id:b.id,cb:c.bind(b.listener,a,d,e,a)};b.sync===!0?a.syncListeners.push(f):a.asyncListeners.push(f)}function B(a){var b=!1;return c.each(a._stateWatchers,function(c,d){var e=c.get(),f=c.last;n(e,f)||(A(a,c,e,f),a.model[d]=e,b=!0,c.last=l(e))}),b}function C(a){var b=!1,d=[],e=[];return c.each(a._computedOrder,function(c){var f=a._computedWatchers[c];try{var g=f.get(),h=f.last;n(g,h)?e.push(c):(A(a,f,g,h),a.model[c]=g,b=!0,d.push(c),f.last=l(g))}catch(i){b=!0,d.push(c)}}),a._computedOrder=[].concat(e,d),b}function D(a){var b=!1;return c.each(a._contextWatchers,function(d,e){var f=d.get(),g=d.last;if(!n(f,g)){var h={id:d.id,cb:c.bind(d.listener,a,f,g,a)};a.contextListeners.push(h),a.model[e]=f,b=!0,d.last=l(f)}}),b}function E(a){for(var b=!0,c=!0,d=!0,e=ca;b&&e>0;e--)b=B(a);for(var f=ca;c&&f>0;f--)c=D(a);for(var g=ca;d&&g>0;g--)d=C(a)}function F(a){var b=[].concat(a.syncListeners||[]),d=[].concat(a.asyncListeners||[]),e=[].concat(a.contextListeners||[]);a.asyncListeners=[],a.syncListeners=[];var f=[].concat(a._watchers);c.each(f,function(e){if(e){var f=e.get(),g=e.last;if(!n(f,g)){var h={id:e.id,cb:c.bind(e.listener,a,f,g,a)};e.sync===!0?b.push(h):d.push(h),e.last=l(f)}}}),c.each(b,function(a){a.cb()}),Q(function(){c.each(e,function(a){a.cb()}),c.each(d,function(a){a.cb()})})}function G(){c.each(aa,function(a){a&&a.$digest&&a.$digest()})}function H(){return $}function I(){c.each(H(),function(a){a&&a.$digest&&a.$digest()})}function J(a){var b=m(fa,{state:function(){return a}}),c=new b({define:!0});return aa[c.getModelID()]=c,c.model}c="default"in c?c["default"]:c;var K=void 0,L={$accessors:K,$vbthis:K,$vbsetter:K,$vm:K},M=[];c.each(["slice","splice"],function(a){M[a]=Array.prototype[a]}),Array.prototype.splice=function(){this.__ref__=f();for(var a=arguments.length,b=Array(a),c=0;c=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),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 a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(BI.isIE()&&BI.getIEVersion()<10?" hack":""),height:30,width:30,hgap:5,vgap:2.5,items:[{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),b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:c}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=c,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 a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(a,b){b||(b={});var c=this.options,d=this.getTipType()||(this.isEnabled()?"success":"warning"),e="success"===d?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(e)&&(BI.Tooltips.show(a,this.getName(),e,d,this,b),c.action&&BI.Actions.runAction(c.action,"hover",c,this),BI.Actions.runGlobalAction("hover",c,this))},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover({belowMouse:a.belowMouse,container:a.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(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(c){b._e=c,BI.isNotNull(b.showTimeout)&&(clearTimeout(b.showTimeout),b.showTimeout=null),BI.isNull(b.hideTimeout)&&(b.hideTimeout=BI.delay(function(){BI.isNotNull(b.hideTimeout)&&b._hideTooltip()},500)),b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&(BI.isNotNull(b.hideTimeout)&&(clearTimeout(b.hideTimeout),b.hideTimeout=null),b._showToolTip(b._e||c,a))},500)}),this.element.on("mouseleave.title"+this.getName(),function(a){b._e=null,b._clearTimeOut(),b._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(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.Tooltips.remove(this.getName())}}),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var c=this._getShowText();BI.isKey(c)?this.setText(c):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.doRedMark(b.keyword),b.highLight&&this.doHighLight()},_getShowText:function(){var a=this.options;return BI.isFunction(a.text)?a.text():a.text},doRedMark:function(a){var b=this.options;b.keyword=a,this.text.element.__textKeywordMarked__(this._getShowText()||b.value,a,b.py)},unRedMark:function(){var a=this.options;a.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){return BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(a)?a:"",BI.isIE9Below()?void this.text.element.html(BI.htmlEncode(this._getShowText())):void(/\s/.test(a)?this.text.element[0].innerHTML=BI.htmlEncode(this._getShowText()):this.text.element[0].textContent=this._getShowText())}}),BI.shortcut("bi.text",BI.Text),BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-basic-button"+(a.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 a=this.options;a.selected===!0&&BI.nextTick(BI.bind(function(){this.setSelected(a.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),a.shadow&&this._createShadow(),a.level&&this.element.addClass("button-"+a.level)},_createShadow:function(){var a=this,b=this.options,c=function(){a.$mask||(a.$mask=BI.createWidget(BI.isObject(b.shadow)?b.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),a.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:a,items:[{el:a.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){a._hover||b.isShadowShowingOnSelected||(c(),a.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(d){a.element.__isMouseInBounds__(d)&&(!a.isEnabled()||a._hover||!b.isShadowShowingOnSelected&&a.isSelected()||(c(),a.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(b){a.element.__isMouseInBounds__(b)||a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())})},bindEvent:function(){function a(a){e.stopEvent&&a.stopEvent(),e.stopPropagation&&a.stopPropagation()}function b(b){if(a(b),!(!d.isEnabled()||d.isOnce()&&d.isSelected())){if(BI.isKey(e.bubble)||BI.isFunction(e.bubble)){if(BI.isNull(d.combo)){var f;BI.createWidget({type:"bi.absolute",element:d,items:[{el:{type:"bi.bubble_combo",trigger:"",ref:function(){d.combo=this},el:{type:"bi.layout",height:"100%"},popup:{type:"bi.text_bubble_bar_popup_view",text:c(),ref:function(){f=this},listeners:[{eventName:BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,action:function(a){d.combo.hideView(),a&&h.apply(d,arguments)}}]},listeners:[{eventName:BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,action:function(){f.populate(c())}}]},left:0,right:0,bottom:0,top:0}]})}return void(d.combo.isViewVisible()?d.combo.hideView():d.combo.showView())}h.apply(d,arguments)}}function c(){var a=d.options.bubble;return BI.isFunction(a)?a():a}var d=this,e=this.options,f=this.handle();if(f){f=f.element;var g=(e.trigger||"").split(",");BI.each(g,function(c,g){switch(g){case"mouseup":var h=!1;f.mousedown(function(){h=!0}),f.mouseup(function(c){h===!0&&b(c),h=!1,a(c)});break;case"mousedown":var h=!1,i=!1;f.mousedown(function(c){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){!BI.DOM.isExist(d)||f.__isMouseInBounds__(a)||h!==!0||i||d._trigger(),h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(d.isSelected()?i=!0:b(c),h=!0,a(c))}),f.mouseup(function(a){BI.DOM.isExist(d)&&h===!0&&i===!0&&b(a),h=!1,i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())});break;case"dblclick":f.dblclick(b);break;case"lclick":var j,h=!1;f.mousedown(function(b){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){j&&clearInterval(j),j=null,h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(!d.isEnabled()||d.isOnce()&&d.isSelected()||(j=setInterval(function(){d.isEnabled()&&d.doClick()},180),h=!0,a(b)))});break;default:(e.stopEvent||e.stopPropagation)&&f.mousedown(function(b){a(b)}),f.click(b)}});var h=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1})}},_trigger:function(a){var b=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())), +var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options;BI.isNumber(e.rowSize)&&(e.rowSize=BI.makeArray(e.items.length,1/e.items.length)),BI.isNumber(e.columnSize)&&(e.columnSize=BI.makeArray(e.items[0].length,1/e.items[0].length));for(var f=0;f=0;f--){for(var g=0;g=0;g--){for(var f=0;f0&&void 0!==arguments[0]?arguments[0]:"bi";return String(Math.random()+Math.random()).replace(N,a)}function g(){return"undefined"!=typeof navigator&&/(msie|trident)/i.test(navigator.userAgent.toLowerCase())}function h(){var a=0;if("undefined"==typeof navigator)return!1;var b=navigator.userAgent.toLowerCase(),c=b.match(/(?:msie\s([\w.]+))/),d=b.match(/(?:trident.*rv:([\w.]+))/);return a=c&&d&&c[1]&&d[1]?Math.max(1*c[1],1*d[1]):c&&c[1]?1*c[1]:d&&d[1]?1*d[1]:0}function i(a){return"[object Object]"===O.call(a)}function j(a){if(!P.test(a)){var b=a.split(".");return function(a){for(var c=0;c3&&void 0!==arguments[3]?arguments[3]:{},f=a;!f.$watch&&f.$vm&&(f=f.$vm),i(d)&&(e=d,d=d.handler),"string"==typeof d&&(d=f[d]),e=e||{},e.user=!0;var g=void 0;if(c.isFunction(b)||!(g=b.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g))||1===g.length&&!/\*/.test(b))return f.$watch(b,d,e),[];var h=[],j=g.slice(),k=!1,l=!1,m=function(b,c,f,h){k!==!0&&(j[b]=!0,q(j)&&(k=!0,d.call(a,c,f,h)),e&&e.sync?(k=!1,l=!1,j=g.slice()):l||(l=!0,Q(function(){k=!1,l=!1,j=g.slice()})))};return c.each(g,function(a,b){if(!c.has(Z,a)){if(/^[1-9a-zA-Z.]+(\*\*$|\*$)/.test(a)||"**"===a){var d=/\*\*$/.test(a);a=d?a.replace(".**",""):a.replace(".*","");var g=d?a:function(){var a={};return c.each(f.model,function(b,c){c in L||(a[c]=b)}),a};return void f.$watch(g,function(a,d,e){m(b,a,d,c.extend({index:b},e))},c.extend(e,{deep:d}))}if(/\*\*$|\*$/.test(a))throw new Error("not support");if(/\*/.test(a)){var h=a.split("."),i=function(){for(var a={root:f.model},b=(function(b,d){var e={};"*"===h[d]?c.each(a,function(a,b){c.each(a,function(a,c){b+c in L||(e[b+c]=a)})}):c.each(a,function(a,b){b+h[d]in L||(e[b+h[d]]=a[h[d]])}),a=e}),d=0,e=h.length;d3&&void 0!==arguments[3]?arguments[3]:{};i(d)&&(e=d,d=d.handler),"string"==typeof d&&(d=a[d]);var f=c.isFunction(b)?c.bind(b,a):c.bind(function(){return j("model."+b)(a)},a);return new da({get:f,listener:c.bind(d,a),last:f(),sync:e.sync,deep:e.deep,id:e.id})}function w(a,b){return function(){var c=a.apply(b,[].concat(Array.prototype.slice.call(arguments)));return b.$digest(),c}}function x(a,b){for(var c in b)a[c]=null==b[c]?d:w(b[c],a)}function y(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];c.each(b.reverse(),function(b){var d=o(b);for(var e in d)"function"==typeof d[e]&&(c.has(a,e)||(a[e]=w(d[e],a)))})}function z(a,b){function d(b){for(var c=a._parent;c;){if(c.childContext&&c.childContext.indexOf(b)>-1)return c.$watch(b,function(c,d,e){a._contextWatchers[b]&&(a.model[b]=c,a._contextWatchers[b].last=l(c),a.$digest())},{id:a._modelHashId+"-"+b}),{p:c,value:c.model[b]};c=c._parent}}var e=a._contextWatchers={};c.each(b,function(b){var f=d(b);f&&(a.model[b]=f.p?f.p.model[b]:void 0,e[b]=new da({id:f.p._modelHashId+"-"+b,get:function(){return a.model[b]},last:a.model[b],listener:c.bind(function(){f.p.model[b]=a.model[b],f.p.$digest()},f.p)}))})}function A(a,b,d,e){var f={id:b.id,cb:c.bind(b.listener,a,d,e,a)};b.sync===!0?a.syncListeners.push(f):a.asyncListeners.push(f)}function B(a){var b=!1;return c.each(a._stateWatchers,function(c,d){var e=c.get(),f=c.last;n(e,f)||(A(a,c,e,f),a.model[d]=e,b=!0,c.last=l(e))}),b}function C(a){var b=!1,d=[],e=[];return c.each(a._computedOrder,function(c){var f=a._computedWatchers[c];try{var g=f.get(),h=f.last;n(g,h)?e.push(c):(A(a,f,g,h),a.model[c]=g,b=!0,d.push(c),f.last=l(g))}catch(i){b=!0,d.push(c)}}),a._computedOrder=[].concat(e,d),b}function D(a){var b=!1;return c.each(a._contextWatchers,function(d,e){var f=d.get(),g=d.last;if(!n(f,g)){var h={id:d.id,cb:c.bind(d.listener,a,f,g,a)};a.contextListeners.push(h),a.model[e]=f,b=!0,d.last=l(f)}}),b}function E(a){for(var b=!0,c=!0,d=!0,e=ca;b&&e>0;e--)b=B(a);for(var f=ca;c&&f>0;f--)c=D(a);for(var g=ca;d&&g>0;g--)d=C(a)}function F(a){var b=[].concat(a.syncListeners||[]),d=[].concat(a.asyncListeners||[]),e=[].concat(a.contextListeners||[]);a.asyncListeners=[],a.syncListeners=[];var f=[].concat(a._watchers);c.each(f,function(e){if(e){var f=e.get(),g=e.last;if(!n(f,g)){var h={id:e.id,cb:c.bind(e.listener,a,f,g,a)};e.sync===!0?b.push(h):d.push(h),e.last=l(f)}}}),c.each(b,function(a){a.cb()}),Q(function(){c.each(e,function(a){a.cb()}),c.each(d,function(a){a.cb()})})}function G(){c.each(aa,function(a){a&&a.$digest&&a.$digest()})}function H(){return $}function I(){c.each(H(),function(a){a&&a.$digest&&a.$digest()})}function J(a){var b=m(fa,{state:function(){return a}}),c=new b({define:!0});return aa[c.getModelID()]=c,c.model}c="default"in c?c["default"]:c;var K=void 0,L={$accessors:K,$vbthis:K,$vbsetter:K,$vm:K},M=[];c.each(["slice","splice"],function(a){M[a]=Array.prototype[a]}),Array.prototype.splice=function(){this.__ref__=f();for(var a=arguments.length,b=Array(a),c=0;c=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),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 a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var a=this,b=this.options,c=BI.isIE(),d=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(c?" wave-loading hack":""),height:30,width:30,hgap:5,vgap:2.5,items:c?[]:[{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),b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:d}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=d,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 a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(a,b){b||(b={});var c=this.options,d=this.getTipType()||(this.isEnabled()?"success":"warning"),e="success"===d?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(e)&&(BI.Tooltips.show(a,this.getName(),e,d,this,b),c.action&&BI.Actions.runAction(c.action,"hover",c,this),BI.Actions.runGlobalAction("hover",c,this))},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover({belowMouse:a.belowMouse,container:a.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(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(c){b._e=c,BI.isNotNull(b.showTimeout)&&(clearTimeout(b.showTimeout),b.showTimeout=null),BI.isNull(b.hideTimeout)&&(b.hideTimeout=BI.delay(function(){BI.isNotNull(b.hideTimeout)&&b._hideTooltip()},500)),b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&(BI.isNotNull(b.hideTimeout)&&(clearTimeout(b.hideTimeout),b.hideTimeout=null),b._showToolTip(b._e||c,a))},500)}),this.element.on("mouseleave.title"+this.getName(),function(a){b._e=null,b._clearTimeOut(),b._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(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.Tooltips.remove(this.getName())}}),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var c=this._getShowText();BI.isKey(c)?this.setText(c):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.doRedMark(b.keyword),b.highLight&&this.doHighLight()},_getShowText:function(){var a=this.options;return BI.isFunction(a.text)?a.text():a.text},doRedMark:function(a){var b=this.options;b.keyword=a,this.text.element.__textKeywordMarked__(this._getShowText()||b.value,a,b.py)},unRedMark:function(){var a=this.options;a.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){return BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(a)?a:"",BI.isIE9Below()?void this.text.element.html(BI.htmlEncode(this._getShowText())):void(/\s/.test(a)?this.text.element[0].innerHTML=BI.htmlEncode(this._getShowText()):this.text.element[0].textContent=this._getShowText())}}),BI.shortcut("bi.text",BI.Text),BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-basic-button"+(a.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 a=this.options;a.selected===!0&&BI.nextTick(BI.bind(function(){this.setSelected(a.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),a.shadow&&this._createShadow(),a.level&&this.element.addClass("button-"+a.level)},_createShadow:function(){var a=this,b=this.options,c=function(){a.$mask||(a.$mask=BI.createWidget(BI.isObject(b.shadow)?b.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),a.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:a,items:[{el:a.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){a._hover||b.isShadowShowingOnSelected||(c(),a.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(d){a.element.__isMouseInBounds__(d)&&(!a.isEnabled()||a._hover||!b.isShadowShowingOnSelected&&a.isSelected()||(c(),a.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(b){a.element.__isMouseInBounds__(b)||a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())})},bindEvent:function(){function a(a){e.stopEvent&&a.stopEvent(),e.stopPropagation&&a.stopPropagation()}function b(b){if(a(b),!(!d.isEnabled()||d.isOnce()&&d.isSelected())){if(BI.isKey(e.bubble)||BI.isFunction(e.bubble)){if(BI.isNull(d.combo)){var f;BI.createWidget({type:"bi.absolute",element:d,items:[{el:{type:"bi.bubble_combo",trigger:"",ref:function(){d.combo=this},el:{type:"bi.layout",height:"100%"},popup:{type:"bi.text_bubble_bar_popup_view",text:c(),ref:function(){f=this},listeners:[{eventName:BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,action:function(a){d.combo.hideView(),a&&h.apply(d,arguments)}}]},listeners:[{eventName:BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,action:function(){f.populate(c())}}]},left:0,right:0,bottom:0,top:0}]})}return void(d.combo.isViewVisible()?d.combo.hideView():d.combo.showView())}h.apply(d,arguments)}}function c(){var a=d.options.bubble;return BI.isFunction(a)?a():a}var d=this,e=this.options,f=this.handle();if(f){f=f.element;var g=(e.trigger||"").split(",");BI.each(g,function(c,g){switch(g){case"mouseup":var h=!1;f.mousedown(function(){h=!0}),f.mouseup(function(c){h===!0&&b(c),h=!1,a(c)});break;case"mousedown":var h=!1,i=!1;f.mousedown(function(c){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){!BI.DOM.isExist(d)||f.__isMouseInBounds__(a)||h!==!0||i||d._trigger(),h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(d.isSelected()?i=!0:b(c),h=!0,a(c))}),f.mouseup(function(a){BI.DOM.isExist(d)&&h===!0&&i===!0&&b(a),h=!1,i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())});break;case"dblclick":f.dblclick(b);break;case"lclick":var j,h=!1;f.mousedown(function(b){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){j&&clearInterval(j),j=null,h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(!d.isEnabled()||d.isOnce()&&d.isSelected()||(j=setInterval(function(){d.isEnabled()&&d.doClick()},180),h=!0,a(b)))});break;default:(e.stopEvent||e.stopPropagation)&&f.mousedown(function(b){a(b)}),f.click(b)}});var h=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1})}},_trigger:function(a){var b=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())), this.isValid())){b.handler.call(this,this.getValue(),this,a);var c=this.getValue();this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,c,this,a),this.fireEvent(BI.BasicButton.EVENT_CHANGE,c,this),b.action&&BI.Actions.runAction(b.action,"click",b,this),BI.Actions.runGlobalAction("click",b,this)}},_doClick:function(a){this.isValid()&&this.beforeClick(a),this._trigger(a),this.isValid()&&this.doClick(a)},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(a){var b=this.options;b.selected=a,a?this.handle().element.addClass("active"):this.handle().element.removeClass("active"),b.shadow&&!b.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(a){this.options.text=a},getText:function(){return this.options.text},_setEnable:function(a){BI.BasicButton.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),a||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",BI.NodeButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.NodeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-node",open:!1})},_init:function(){BI.NodeButton.superclass._init.apply(this,arguments);var a=this;BI.nextTick(function(){a.setOpened(a.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(a){this.options.open=!!a},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))}}),BI.Tip=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Tip.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-tip",zIndex:BI.zIndex_tip})},_init:function(){BI.Tip.superclass._init.apply(this,arguments),this.element.css({zIndex:this.options.zIndex})}}),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 a=this.options,b={};BI.each(a.behaviors,function(a,c){b[a]=BI.BehaviorFactory.createBehavior(a,{rule:c})}),this.behaviors=b,this.populate(a.items),(BI.isKey(a.value)||BI.isNotEmptyArray(a.value))&&this.setValue(a.value)},_createBtns:function(a){this.options;return BI.createWidgets(BI.createItems(a,{type:"bi.text_button"}))},_btnsCreator:function(a){var b=this,c=Array.prototype.slice.call(arguments),d=this.options,e=this._createBtns(a);return c[0]=e,BI.each(this.behaviors,function(a,b){b.doBehavior.apply(b,c)}),BI.each(e,function(a,c){c.on(BI.Controller.EVENT_CHANGE,function(a,e,f){if(a===BI.Events.CLICK){switch(d.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:b.setValue(c.getValue());break;case BI.ButtonGroup.CHOOSE_TYPE_NONE:b.setValue([])}b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b.fireEvent(BI.ButtonGroup.EVENT_CHANGE,e,f)}else b.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),c.on(BI.Events.DESTROY,function(){BI.remove(b.buttons,c)})}),e},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:d})]})});return a},_packageSimpleItems:function(a){var b=this.options;return BI.map(b.items,function(b,c){return BI.stripEL(c)===c?a[b]:BI.extend({},c,{el:a[b]})})},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},_isSimpleLayout:function(){var a=this.options;return 1===a.layouts.length&&!BI.isArray(a.items[0])},doBehavior:function(){var a=Array.prototype.slice.call(arguments);a.unshift(this.buttons),BI.each(this.behaviors,function(b,c){c.doBehavior.apply(c,a)})},prependItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(b,this.buttons),this._isSimpleLayout()&&this.layouts&&this.layouts.prependItems?void this.layouts.prependItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.prependItems(this._packageLayout(a).items))},addItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(this.buttons,b),this._isSimpleLayout()&&this.layouts&&this.layouts.addItems?void this.layouts.addItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.addItems(this._packageLayout(a).items))},removeItemAt:function(a){BI.removeAt(this.buttons,a),this.layouts.removeItemAt(a)},removeItems:function(a){a=BI.isArray(a)?a:[a];var b=[];BI.each(this.buttons,function(c,d){BI.deepContains(a,d.getValue())&&b.push(c)}),BI.removeAt(this.buttons,b),this.layouts.removeItemAt(b)},populate:function(a){a=a||[],this.empty(),this.options.items=a,this.buttons=this._btnsCreator.apply(this,arguments),a=this._isSimpleLayout()?this._packageSimpleItems(this.buttons):this._packageItems(a,this._packageBtns(this.buttons)),this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1)})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue())}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},getAllButtons:function(){return this.buttons},getAllLeaves:function(){return this.buttons},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&c.isSelected()&&a.push(c)}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&!c.isSelected()&&a.push(c)}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.options.id===a)return b=d,!0}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=d,!0}),b},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),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(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!1):c.setSelected(!0)):void c.setNotSelectedValue(a)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setEnabledValue)?void c.setEnabledValue(a):void(BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1))})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!0):c.setSelected(!1)):void c.setValue(a)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getNotSelectedValue())):void(c.isEnabled()&&c.isSelected&&!c.isSelected()&&a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getValue())):void(c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue()))}),a},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getSelectedButtons())):void(c.isSelected&&c.isSelected()&&a.push(c))}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getNotSelectedButtons())):void(c.isSelected&&!c.isSelected()&&a.push(c))}),a},getAllLeaves:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getAllLeaves())):void(c.isEnabled()&&a.push(c))}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){var e=d.getValue();if(d.isEnabled()&&(e===a||BI.contains(e,a)))return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()){if(d.attr("id")===a)return b=d,!0;if(BI.isFunction(d.getNodeById)&&(b=d.getNodeById(a)))return!0}}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled())if(BI.isFunction(d.getNodeByValue)){if(b=d.getNodeByValue(a))return!0}else if(d.attr("value")===a)return b=d,!0}),b}}),BI.ButtonTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_tree",BI.ButtonTree),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 a=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(a.value)&&this.setSelectedValue(a.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:"
    "}),BI.createWidget({type:"bi.default",element:this.element,items:[this.tree]})},_selectTreeNode:function(a,b){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,b,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,b,this)},_configSetting:function(){function a(a,b,c){var d=c.checked,e=c.getCheckStatus();e.half===!0&&e.checked===!0&&(d=!1),l.nodes.checkNode(c,!d,!0,!0)}function b(a,b){var c=l._getParentValues(b);b.times=b.times||1;var d="id="+b.id+"×="+b.times++ +"&parentValues= "+_global.encodeURIComponent(BI.jsonEncode(c))+"&checkState="+_global.encodeURIComponent(BI.jsonEncode(b.getCheckStatus()));return"&"+d}function c(a,b){return b.isAjaxing?(BI.Msg.toast("Please Wait。","warning"),!1):(b.children||(b.times=1,f(b,"refresh")),!0)}function d(a,b,c,d){if(c.halfCheck=!1,d&&0!==d.length&&!/^[\s,\S]*<\/html>$/gi.test(d)&&!l._stop){var e=l.nodes,g=c.count||0;c.children.length>g?(c.count=c.children.length,BI.delay(function(){f(c)},n)):(e.updateNode(c),e.selectNode(c.children[0]))}}function e(a,b,c,d,e,f){l.nodes;BI.Msg.toast("Error!","warning")}function f(a,b){var c=l.nodes;"refresh"==b&&c.updateNode(a),c.reAsyncChildNodes(a,b,!0)}function g(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=l.nodes,e=d.getSelectedNodes();$.each(e,function(a,b){b.halfCheck=!1})}var f=b.getCheckStatus();f.half===!0&&f.checked===!0&&(b.checked=!1)}function h(a,b,c){l._selectTreeNode(b,c)}function i(a,b,c){c.halfCheck=!1}function j(a,b,c){}var k=this.options.paras,l=this,m={async:{enable:!0,url:b,autoParam:["id","name"],otherParam:BI.cjkEncodeDO(k)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:c,onAsyncSuccess:d,onAsyncError:e,beforeCheck:g,onCheck:h,onExpand:i,onCollapse:j,onClick:a}},n=100;return m},_getParentValues:function(a){if(!a.getParentNode())return[];var b=a.getParentNode(),c=this._getParentValues(b);return c=c.concat([this._getNodeValue(b)])},_getNodeValue:function(a){return null==a.value?BI.replaceAll(a.text.replace(/<[^>]+>/g,"")," "," "):a.value},_getHalfSelectedValues:function(a,b){var c=this,d=b.getCheckStatus();if(d.checked!==!1||d.half!==!1){if(BI.isNotEmptyArray(b.children)&&d.half===!0){var e=b.children;return void BI.each(e,function(b,d){c._getHalfSelectedValues(a,d)})}var f=b.parentValues||c._getParentValues(b),g=f.concat(this._getNodeValue(b));if(BI.isNotEmptyArray(b.children)||d.half===!1)return void this._buildTree(a,g);var h=BI.deepClone(this.options.paras.selectedValues),i=this._getTree(h,g);this._addTreeNode(a,f,this._getNodeValue(b),i)}},_getTree:function(a,b){var c=a;return BI.any(b,function(a,b){return null==c[b]||void(c=c[b])}),c},_addTreeNode:function(a,b,c,d){var e=a;BI.each(b,function(a,b){null==e[b]&&(e[b]={}),e=e[b]}),e[c]=d},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){null==c[b]&&(c[b]={}),c=c[b]})},_getSelectedValues:function(){function a(a){BI.each(a,function(a,d){var e=d.getCheckStatus();if(e.checked===!0||e.half===!0)if(e.half===!0)b._getHalfSelectedValues(c,d);else{var f=d.parentValues||b._getParentValues(d),g=f.concat([b._getNodeValue(d)]);b._buildTree(c,g)}})}var b=this,c={},d=this.nodes.getNodes();return a(d),c},_dealWidthNodes:function(a){var b=this.options,c=BI.Tree.arrayFormat(a);return BI.each(c,function(a,c){c.title=c.title||c.text||c.value,c.isParent=c.isParent||c.parent,BI.isKey(b.paras.keyword)?c.text=$("
    ").__textKeywordMarked__(c.text,b.paras.keyword,c.py).html():c.text=BI.htmlEncode(c.text+"")}),a},_loadMore:function(){var a=this,b=this.options;this.tip.setLoading();var c=BI.extend({},b.paras,{times:++this.times});b.itemsCreator(c,function(b){if(a._stop!==!0){var c=!!b.hasNext,d=b.items||[];c?a.tip.setLoaded():a.tip.setEnd(),d.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(d))}})},_initTree:function(a){var b=this,c=this.options;b.fireEvent(BI.Events.INIT),this.times=1;var d=this.tree;d.empty(),this.loading(),this.tip.setVisible(!1);var e=function(c){b._stop!==!0&&(b.nodes=$.fn.zTree.init(d.element,a,c))},f=BI.extend({},c.paras,{times:1});c.itemsCreator(f,function(a){if(b._stop!==!0){var c=!!a.hasNext,d=a.items||[];d.length>0&&e(b._dealWidthNodes(d)),b.setTipVisible(d.length<=0),b.loaded(),c?b.tip.setLoaded():b.tip.invisible(),1===f.times&&b.fireEvent(BI.Events.AFTERINIT)}})},initTree:function(a,b){var b=b||{async:{enable:!1},check:{enable:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=$.fn.zTree.init(this.tree.element,b,a)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._createTree(),this.start(),this._initTree(b)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){var a=this.nodes;return a.getCheckedNodes(!0).length>0},checkAll:function(a){function b(a){BI.each(a,function(a,c){c.halfCheck=!1,b(c.children)})}this.nodes&&(BI.each(this.nodes.getNodes(),function(a,c){c.halfCheck=!1,b(c.children)}),this.nodes.checkAllNodes(a))},expandAll:function(a){this.nodes&&this.nodes.expandAll(a)},setValue:function(a,b){this.checkAll(!1),this.updateValue(a,b),this.refresh()},setSelectedValue:function(a){this.options.paras.selectedValues=BI.deepClone(a||{})},updateValue:function(a,b){if(this.nodes){b||(b="value");var c=this.nodes;BI.each(a,function(a,d){var e=c.getNodesByParam(b,a,null);BI.each(e,function(a,b){BI.extend(b,{checked:!0},d),c.updateNode(b)})})}},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),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)},_configSetting:function(){function a(a,b,c){var d=$.fn.zTree.getZTreeObj(b),e=c.checked,f=c.getCheckStatus();f.half===!0&&f.checked===!0&&(e=!1),d.checkNode(c,!e,!0,!0)}function b(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=$.fn.zTree.getZTreeObj(a),e=d.getSelectedNodes();BI.each(e,function(a,b){b.halfCheck=!1})}var f=b.getCheckStatus();f.half===!0&&f.checked===!0&&(b.checked=!1)}function c(a,b){h._beforeExpandNode(a,b)}function d(a,b,c){h._selectTreeNode(b,c)}function e(a,b,c){c.halfCheck=!1}function f(a,b,c){c.halfCheck=!1}var g=this.options.paras,h=this,i={async:{enable:!1,otherParam:BI.cjkEncodeDO(g)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeCheck:b,onCheck:d,beforeExpand:c,onExpand:e,onCollapse:f,onClick:a}};return i},_selectTreeNode:function(a,b){var c=this,d=(this.options,BI.deepClone(b.parentValues||c._getParentValues(b))),e=this._getNodeValue(b);if(b.checked===!0);else{var f=b,g=this._getTree(this.options.paras.selectedValues,d);for(BI.isNotNull(g[e])&&delete g[e];null!=f&&BI.isEmpty(g);)d=d.slice(0,d.length-1),f=f.getParentNode(),null!=f&&(g=this._getTree(this.options.paras.selectedValues,d),e=this._getNodeValue(f),delete g[e])}BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b)),checkState:b.getCheckStatus()}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||setTimeout(function(){e.itemsCreator(g,h)},17)},_join:function(a,b){function c(a,b,f){BI.each(b,function(g,h){BI.isNull(f[g])?d._addTreeNode(e,a,g,h):BI.isEmpty(f[g])?d._addTreeNode(e,a,g,{}):c(a.concat([g]),b[g],f[g])})}var d=this,e={};return c([],a,b),c([],b,a),e},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.AsyncTree.superclass.hasChecked.apply(this,arguments)},_getJoinValue:function(){if(!this.nodes)return{};var a=this._getSelectedValues();return BI.isEmpty(a)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?a:this._join(a,this.options.paras.selectedValues)},getValue:function(){return this._getJoinValue()},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.async_tree",BI.AsyncTree),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 a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_selectTreeNode:function(a,b){var c=this,d=this.options,e=BI.deepClone(b.parentValues||c._getParentValues(b)),f=this._getNodeValue(b);if(b.checked===!0)this.options.paras.selectedValues=this._getJoinValue(),d.itemsCreator(BI.extend({},d.paras,{type:BI.TreeView.REQ_TYPE_ADJUST_DATA,curSelectedValue:f,parentValues:e}),function(a){c.options.paras.selectedValues=a,BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)});else{for(var g=this.options.paras.selectedValues,h=e.concat(f),i=0,j=h.length;i0?d._dealWidthNodes(g):[]),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},getValue:function(){return BI.deepClone(this.options.paras.selectedValues||{})},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.part_tree",BI.PartTree),BI.ListTreeView=BI.inherit(BI.TreeView,{_constants:{SPLIT:"<|>"},_defaultConfig:function(){return BI.extend(BI.ListTreeView.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ListTreeView.superclass._init.apply(this,arguments);var a=this.options;this.storeValue=a.value||{}},_configSetting:function(){function a(a,b,d){var e=$.fn.zTree.getZTreeObj(b),f=d.checked;c._checkValue(d,!f),e.checkNode(d,!f,!0,!0)}function b(a,b,d){c._selectTreeNode(b,d)}var c=(this.options.paras,this),d={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:b,onClick:a}};return d},_selectTreeNode:function(a,b){this._checkValue(b,b.checked),BI.ListTreeView.superclass._selectTreeNode.apply(this,arguments)},_transArrayToMap:function(a){var b=this,c={};return BI.each(a,function(a,d){var e=d.join(b._constants.SPLIT);c[e]=!0}),c},_transMapToArray:function(a){var b=this,c=[];return BI.each(a,function(a){var d=a.split(b._constants.SPLIT);c.push(d)}),c},_checkValue:function(a,b){var c=BI.concat(this._getParentValues(a),this._getNodeValue(a)).join(this._constants.SPLIT);b?this.storeValue[c]=!0:delete this.storeValue[c]},setSelectedValue:function(a){this.options.paras.selectedValues=a||[],this.storeValue=this._transArrayToMap(a)},getValue:function(){return this._transMapToArray(this.storeValue)}}),BI.shortcut("bi.list_tree_view",BI.ListTreeView),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(){function a(a,b){b.half=!1}function b(a,b,c){var d=$.fn.zTree.getZTreeObj(b),e=c.checked;f._checkValue(c,!e),d.checkNode(c,!e,!0,!0)}function c(a,b){f._beforeExpandNode(a,b)}function d(a,b,c){f._selectTreeNode(b,c)}var e=this.options.paras,f=this,g={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:d,beforeExpand:c,beforeCheck:a,onClick:b}};return g},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b))}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||setTimeout(function(){e.itemsCreator(g,h)},17)},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.ListAsyncTree.superclass.hasChecked.apply(this,arguments)},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.list_async_tree",BI.ListAsyncTree),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 a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_initTree:function(a,b){function c(b){d._stop!==!0&&(d.nodes=$.fn.zTree.init(f.element,a,b))}var d=this,e=this.options;this.times=1;var f=this.tree;f.empty(),d.tip.setVisible(!1),this.loading();var g=BI.extend({},e.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:this.times}),h=function(a){if(d._stop!==!0&&b==e.paras.keyword){var f=!!a.hasNext,g=a.items||[];e.paras.lastSearchValue=a.lastSearchValue,c(g.length>0?d._dealWidthNodes(g):[]),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.list_part_tree",BI.ListPartTree),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}),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 a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.CollectionView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&(this._calculateSizeAndPositionData(),this._populate())},mounted:function(){var a=this.options;0===a.scrollLeft&&0===a.scrollTop||(this.element.scrollTop(a.scrollTop),this.element.scrollLeft(a.scrollLeft))},_calculateSizeAndPositionData:function(){for(var a=this.options,b=[],c=new BI.SectionManager,d=0,e=0,f=0,g=a.items.length;f0&&h>0){if(f>=this.renderRange.minY&&h<=this.renderRange.maxY&&e>=this.renderRange.minX&&g<=this.renderRange.maxX)return;for(var i=this._cellRenderers(h-f,g-e,e,f),j=[],k={},l={},m={},n={},o=0,p=i.length;o=0?(q.width!==this.renderedCells[A]._width&&(this.renderedCells[A]._width=q.width,this.renderedCells[A].el.setWidth(q.width)),q.height!==this.renderedCells[A]._height&&(this.renderedCells[A]._height=q.height,this.renderedCells[A].el.setHeight(q.height)),this.renderedCells[A]._left!==q.x&&this.renderedCells[A].el.element.css("left",q.x+"px"), this.renderedCells[A]._top!==q.y&&this.renderedCells[A].el.element.css("top",q.y+"px"),j.push(z=this.renderedCells[A])):(z=BI.createWidget(BI.extend({type:"bi.label",width:q.width,height:q.height},b.items[q.index],{cls:(b.items[q.index].cls||"")+" container-cell"+(0===q.y?" first-row":"")+(0===q.x?" first-col":""),_left:q.x,_top:q.y})),j.push({el:z,left:q.x,top:q.y,_left:q.x,_top:q.y,_width:q.width,_height:q.height}));for(var B=0|s[q.y],C=0|s[q.y+q.height],D=B;D<=C;D++){var E=n[D];x(t,E),y(u,E),t[E]=Math.min(t[E],q.x),u[E]=Math.max(u[E],q.x+q.width)}for(var F=0|r[q.x],G=0|r[q.x+q.width],D=F;D<=G;D++){var H=m[D];x(v,H),y(w,H),v[H]=Math.min(v[H],q.y),w[H]=Math.max(w[H],q.y+q.height)}k[q.index]=[q.index,o],l[o]=z}var I={},J={},K=[];BI.each(k,function(b,c){a.renderedKeys[b]?I[b]=c:J[b]=c}),BI.each(this.renderedKeys,function(a,b){I[a]||J[a]||K.push(b[1])}),BI.each(K,function(b,c){a.renderedCells[c].el._destroy()});var L=[];BI.each(J,function(a,b){L.push(j[b[1]])}),this.container.addItems(L),this.container._children=l,this.container.attr("items",j),this.renderedCells=j,this.renderedKeys=k;var M=BI.min(t),N=BI.max(u),O=BI.max(v),P=BI.min(w);this.renderRange={minX:M,minY:O,maxX:N,maxY:P}}},_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(a){var b=this.options;if(this._reRange(),a&&a!==this.options.items&&(this.options.items=a,this._calculateSizeAndPositionData()),b.items.length>0){this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender();try{this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)}catch(c){}}},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"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(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.CollectionView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.collection_view",BI.CollectionView),BI.Combo=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Combo.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Combo.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,d))}),a.element.on("mouseenter."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.addClass(b.hoverClass)}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(b.logic,{items:[{el:this.combo}]})))),b.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(){function a(){b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&c.toggle===!0&&(b._hideView(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",b.combo),b.fireEvent(BI.Combo.EVENT_COLLAPSE)),b.popupView&&b.popupView.element.off("mouseenter."+b.getName()).off("mouseleave."+b.getName()),f=!1}var b=this,c=this.options,d=(this.options.trigger||"").split(","),e=function(a){c.stopEvent&&a.stopEvent(),c.stopPropagation&&a.stopPropagation()},f=!1;BI.each(d,function(d,g){switch(g){case"hover":b.element.on("mouseenter."+b.getName(),function(a){b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(b._popupView(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND))}),b.element.on("mouseleave."+b.getName(),function(c){b.popupView&&(b.popupView.element.on("mouseenter."+b.getName(),function(c){f=!0,b.popupView.element.on("mouseleave."+b.getName(),function(b){a()}),b.popupView.element.off("mouseenter."+b.getName())}),BI.defer(function(){f||a()},50))});break;case"click":var h=BI.debounce(function(a){b.combo.element.__isMouseInBounds__(a)&&b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(c.toggle?b._toggle():b._popupView(),b.isViewVisible()?(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND)):(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",b.combo),b.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});b.element.off(g+"."+b.getName()).on(g+"."+b.getName(),function(a){h(a),e(a)});break;case"click-hover":var h=BI.debounce(function(a){b.combo.element.__isMouseInBounds__(a)&&b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(b._popupView(),b.isViewVisible()&&(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});b.element.off("click."+b.getName()).on("click."+b.getName(),function(a){h(a),e(a)}),b.element.on("mouseleave."+b.getName(),function(c){b.popupView&&(b.popupView.element.on("mouseenter."+b.getName(),function(c){f=!0,b.popupView.element.on("mouseleave."+b.getName(),function(b){a()}),b.popupView.element.off("mouseenter."+b.getName())}),BI.defer(function(){f||a()},50))})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var a=this,b=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view",value:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a.combo.setValue(a.getValue()),a.fireEvent(BI.Combo.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){a.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(a){if(this.element.find(a.target).length>0||this.popupView&&this.popupView.element.find(a.target).length>0||"CodeMirror-cursor"===a.target.className||BI.Widget._renderEngine.createElement(a.target).closest(".CodeMirror-hints").length>0){var b=this.options.direction.split(",");return void((BI.contains(b,"innerLeft")||BI.contains(b,"innerRight"))&&(this.adjustWidth(),this.adjustHeight()))}var c=this.options.hideChecker.apply(this,[a]);c!==!1&&this._hideView()},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),this.options.destroyWhenHide===!0?(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(a){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(a),this.adjustHeight(a),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(a){var b=this.options;if(this.popupView&&b.isNeedAdjustWidth===!0){this.resetListWidth("");var c=this.popupView.element.outerWidth(),d=this.element.outerWidth()||b.width;c>d+80?d+=80:c>d&&(d=c),this.resetListWidth(d<100?100:d)}},adjustHeight:function(a){var b=this.options,c={};if(this.popupView){var d=this.popupView.isVisible();this.popupView.visible();var e=BI.isNotNull(a)?{element:{offset:function(){return{left:a.pageX,top:a.pageY}},bounds:function(){return{x:a.offsetX,y:a.offsetY,width:0,height:24}},outerWidth:function(){return 0},outerHeight:function(){return 24}}}:this.combo;switch(b.direction){case"bottom":case"bottom,right":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["bottom","top","right","left"],b.offsetStyle);break;case"top":case"top,right":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["top","bottom","right","left"],b.offsetStyle);break;case"left":case"left,bottom":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["left","right","bottom","top"],b.offsetStyle);break;case"right":case"right,bottom":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","bottom","top"],b.offsetStyle);break;case"top,left":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["top","bottom","left","right"],b.offsetStyle);break;case"bottom,left":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["bottom","top","left","right"],b.offsetStyle);break;case"left,top":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["left","right","top","bottom"],b.offsetStyle);break;case"right,top":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","top","bottom"],b.offsetStyle);break;case"right,innerRight":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","innerRight","innerLeft","bottom","top"],b.offsetStyle);break;case"right,innerLeft":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","innerLeft","innerRight","bottom","top"],b.offsetStyle);break;case"innerRight":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["innerRight","innerLeft","right","left","bottom","top"],b.offsetStyle);break;case"innerLeft":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["innerLeft","innerRight","left","right","bottom","top"],b.offsetStyle);break;case"top,custom":case"custom,top":c=BI.DOM.getTopAdaptPosition(e,this.popupView,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":c=BI.DOM.getBottomAdaptPosition(e,this.popupView,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight);break;case"left,custom":case"custom,left":c=BI.DOM.getLeftAdaptPosition(e,this.popupView,b.adjustXOffset||b.adjustLength),delete c.top,delete c.adaptHeight;break;case"custom,right":case"right,custom":c=BI.DOM.getRightAdaptPosition(e,this.popupView,b.adjustXOffset||b.adjustLength),delete c.top,delete c.adaptHeight}"adaptHeight"in c&&this.resetListHeight(c.adaptHeight),"left"in c&&this.popupView.element.css({left:c.left}),"top"in c&&this.popupView.element.css({top:c.top}),this.position=c,this.popupView.setVisible(d)}},resetListHeight:function(a){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(a)},resetListWidth:function(a){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(a)},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate.apply(this.combo,arguments)},_setEnable:function(a){BI.Combo.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.combo.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},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(a){this.isEnabled()&&this.combo.isEnabled()&&!this.isViewVisible()&&this._popupView(a)},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())}}),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),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 a=this,b=this.options;this._expanded=!!b.el.open,this._initExpander(),this._initPullDownAction(),this.expander.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Expander.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Expander.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.expander}]}),b.isDefaultInit&&this._assertPopupView(),this.expander.isOpened()===!0&&this._popupView()},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND))},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE))});break;case"click":d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.expander.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.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 a=this,b=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:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_CHANGE,c,d)}),this.popupView.setVisible(this.isExpanded()),BI.nextTick(function(){a.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(a){this.popupView&&this.popupView.populate.apply(this.popupView,arguments),this.expander.populate.apply(this.expander,arguments)},_setEnable:function(a){BI.Expander.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.expander.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},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(a){return this.expander.options.id===a?this.expander:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.expander.getValue()===a?this.expander:this.popupView&&this.popupView.getNodeByValue(a)},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),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(a){var b=this,c=this.options,d=c.children;if(BI.isEmpty(d))throw new Error("ComboGroup构造错误");BI.each(d,function(a,b){var d=BI.formatEL(b).el.children;b=BI.formatEL(b).el,BI.isEmpty(d)||(b.el=BI.clone(b),b.children=d,b.type="bi.combo_group",b.action=c.action,b.height=c.height,b.direction=c.direction,b.isDefaultInit=c.isDefaultInit,b.isNeedAdjustHeight=c.isNeedAdjustHeight,b.isNeedAdjustWidth=c.isNeedAdjustWidth,b.adjustLength=c.adjustLength,b.popup=c.popup)}),this.combo=BI.createWidget({type:"bi.combo",element:this,container:c.container,height:c.height,trigger:c.trigger,direction:c.direction,isDefaultInit:c.isDefaultInit,isNeedAdjustWidth:c.isNeedAdjustWidth,isNeedAdjustHeight:c.isNeedAdjustHeight,adjustLength:c.adjustLength,el:a,popup:BI.extend({},c.popup,{el:BI.extend({items:d},c.popup.el)})}),this.combo.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.ComboGroup.EVENT_CHANGE,d)})},getValue:function(){return this.combo.getValue()},setValue:function(a){this.combo.setValue(a)}}),BI.ComboGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.combo_group",BI.ComboGroup),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 a=this.options;this.populate(a.items),BI.isKey(a.value)&&this.setValue(a.value)},_packageBtns:function(a){for(var b=this.options,c=this.buttonMap={},d=b.layouts.length-1;d>0;d--)a=BI.map(a,function(a,e){var f=BI.stripEL(e);return BI.extend({},b.layouts[d],{items:[BI.extend({},b.layouts[d].el,{el:BI.extend({ref:function(a){BI.isKey(c[f.value])&&(c[f.value]=a)}},f)})]})});return a},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},addItems:function(a){this.layouts.addItems(a)},prependItems:function(a){this.layouts.prependItems(a)},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttonMap,function(b,c){c&&(a.deepContains(b)?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1))})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttonMap,function(b,c){c&&(!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttonMap,function(b,c){c&&c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},populate:function(a){a=a||[],this.options.items=a,a=this._packageBtns(a),this.layouts?this.layouts.populate(a):this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))}}),BI.VirtualGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.virtual_group",BI.VirtualGroup),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 a=this,b=this.options;this.prev.setLoading(),b.itemsCreator.apply(this,[{times:--this.times},function(){a.prev.setLoaded(),a.prependItems.apply(a,arguments)}])},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.Loader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.prev=!1,b.next=!1),b.prev!==!1&&(this.prev=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.prev)),this.prev.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._prevLoad()})),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}],value:b.value}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Loader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.prev,this.button_group,this.next)})))),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){b.isDefaultInit&&BI.isEmpty(b.items)&&this._populate()},this)),BI.isNotEmptyArray(b.items)&&this._populate(b.items)},hasPrev:function(){var a=this.options;return BI.isNumber(a.count)?this.count0&&f.push(c),BI.Maskers.show(a.getName()),a.popupView.populate.apply(a.popupView,f),b.isAutoSync&&b.adapter&&b.adapter.getValue&&a.popupView.setValue(b.adapter.getValue()),a.popupView.loaded&&a.popupView.loaded(),a.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(a){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(a){BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},getKeyword:function(){return this.editor.getValue()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var a=this.options;return a.isAutoSync&&a.adapter&&a.adapter.getValue?a.adapter.getValue():this.isSearching()?this.popupView.getValue():a.adapter&&a.adapter.getValue?a.adapter.getValue():BI.isNull(this.popupView)?a.popup.value:this.popupView.getValue()},populate:function(a,b,c){var d=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),d.isAutoSync&&d.adapter&&d.adapter.getValue&&this.popupView.setValue(d.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),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 a=this,b=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Switcher.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Switcher.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),b.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.switcher.isEnabled()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND))},function(){a.isEnabled()&&a.switcher.isEnabled()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.switcher.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.switcher.isEnabled()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.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 a=this,b=this.options;this._created||(this.popupView=BI.createWidget(b.popup,{type:"bi.button_group",element:b.adapter&&BI.Maskers.create(this.getName(),b.adapter,BI.extend({container:this},b.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_CHANGE,c,d)}),b.direction===BI.Direction.Custom||b.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){a.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var a=this,b=this.options;b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),BI.nextTick(function(){b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),a.element.removeClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var a=this,b=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),b.adapter?BI.Maskers.show(this.getName()):a.popupView.setVisible(!0),BI.nextTick(function(c){b.adapter?BI.Maskers.show(c):a.popupView.setVisible(!0),a.element.addClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(a){BI.Switcher.superclass._setEnable.apply(this,arguments),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.switcher.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},setAdapter:function(a){this.options.adapter=a,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(a){return this.switcher.attr("id")===a?this.switcher:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.switcher.getValue()===a?this.switcher:this.popupView&&this.popupView.getNodeByValue(a)},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Switcher.superclass.destroy.apply(this,arguments)}}),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),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(a){return BI.createWidget()}})},render:function(){var a=this,b=this.options;BI.isObject(b.tab)&&(this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.tab.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.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(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tab,this.layout)}))));var c=new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardCreator:function(c){var d=b.cardCreator.apply(a,arguments);return a.cardMap[c]=d,d},afterCardShow:function(b){a._deleteOtherCards(b),a.curr=b}});c.on(BI.ShowListener.EVENT_CHANGE,function(b){a.fireEvent(BI.Tab.EVENT_CHANGE,b,a)})},_deleteOtherCards:function(a){var b=this,c=this.options;c.single===!0&&BI.each(this.cardMap,function(c,d){c!==a+""&&(b.layout.deleteCardByName(c),delete b.cardMap[c])})},_assertCard:function(a){if(!this.layout.isCardExisted(a)){var b=this.options.cardCreator(a);this.cardMap[a]=b,this.layout.addCardByName(a,b)}},mounted:function(){var a=this.options;a.showIndex!==!1&&this.setSelect(a.showIndex)},setSelect:function(a){this.tab&&this.tab.setValue(a),this._assertCard(a),this.layout.showCardByName(a),this._deleteOtherCards(a),this.curr!==a&&(this.curr=a)},removeTab:function(a){var b=this;this.options;BI.any(this.cardMap,function(c,d){if(BI.isEqual(c,a+""))return b.layout.deleteCardByName(c),delete b.cardMap[c],!0})},getSelect:function(){return this.curr},getSelectedTab:function(){return this.layout.getShowingCard()},getTab:function(a){return this._assertCard(a),this.layout.getCardByName(a)},setValue:function(a){var b=this.layout.getShowingCard();b&&b.setValue(a)},getValue:function(){var a=this.layout.getShowingCard();if(a)return a.getValue()},populate:function(){var a=this.layout.getShowingCard();if(a)return a.populate&&a.populate.apply(a,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),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 a=this,b=this.options;this.ele=BI.createWidget(b.el),BI.createWidget(b.layout,{type:"bi.adaptive",element:this,items:[this.ele]}),this.ele.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.ele.setValue(a)},getValue:function(){return this.ele.getValue()},populate:function(){this.ele.populate.apply(this,arguments)}}),BI.shortcut("bi.el",BI.EL),BI.Msg=function(){var a,b,c,d=[];return{alert:function(a,b,c){this._show(!1,a,b,c)},confirm:function(a,b,c){this._show(!0,a,b,c)},prompt:function(a,b,c,d,e){},toast:function(a,b,c){b=b||{},c=c||BI.Widget._renderEngine.createElement("body");var e=b.level||"normal",f=!!BI.isNull(b.autoClose)||b.autoClose,g=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:e,autoClose:f,text:a,listeners:[{eventName:BI.Toast.EVENT_DESTORY,action:function(){BI.remove(d,g.element);var a=10;BI.each(d,function(b,c){c.css({top:a}),a+=c.outerHeight()+10})}}]}),h=10;BI.each(d,function(a,b){h+=b.outerHeight()+10}),BI.createWidget({type:"bi.absolute",element:c,items:[{el:g,left:"50%",top:h}]}),d.push(g.element),g.element.css({"margin-left":-1*g.element.outerWidth()/2}),g.element.removeClass("bi-message-leave").addClass("bi-message-enter"),f&&BI.delay(function(){g.element.removeClass("bi-message-enter").addClass("bi-message-leave"),g.destroy()},5e3)},_show:function(d,e,f,g){b=BI.Widget._renderEngine.createElement('
    ').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=BI.Widget._renderEngine.createElement('
    ').css({position:"absolute",zIndex:BI.zIndex_tip-1,top:0,left:0,right:0,bottom:0}).appendTo("body");var h=function(){a.destroy(),b.remove()},i=[];d===!0&&i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_Cancel"),level:"ignore",handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!1])}}}),i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_OK"),handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!0])}}});var j={element:c,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:e||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(){h(),BI.isFunction(g)&&g.apply(null,[!1])}},width:60}}},height:40},center:{el:{type:"bi.label",vgap:10,hgap:20,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",lgap:10,items:i},top:0,left:20,right:20,bottom:0}]},height:44}},width:450,height:200}]};a=BI.createWidget(j)}}}(),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 a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.GridView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&this._populate()},mounted:function(){var a=this.options;0===a.scrollLeft&&0===a.scrollTop||(this.element.scrollTop(a.scrollTop),this.element.scrollLeft(a.scrollLeft))},_getOverscanIndices:function(a,b,c,d){return{overscanStartIndex:Math.max(0,c-b),overscanStopIndex:Math.min(a-1,d+b)}},_calculateChildrenToRender:function(){var a=this,b=this.options,c=b.width,d=b.height,e=BI.clamp(b.scrollLeft,0,this._getMaxScrollLeft()),f=BI.clamp(b.scrollTop,0,this._getMaxScrollTop()),g=b.overscanColumnCount,h=b.overscanRowCount;if(d>0&&c>0){var i=this._columnSizeAndPositionManager.getVisibleCellRange(c,e),j=this._rowSizeAndPositionManager.getVisibleCellRange(d,f);if(BI.isEmpty(i)||BI.isEmpty(j))return;var k=this._columnSizeAndPositionManager.getOffsetAdjustment(c,e),l=this._rowSizeAndPositionManager.getOffsetAdjustment(d,f);this._renderedColumnStartIndex=i.start,this._renderedColumnStopIndex=i.stop,this._renderedRowStartIndex=j.start,this._renderedRowStopIndex=j.stop;var m=this._getOverscanIndices(this.columnCount,g,this._renderedColumnStartIndex,this._renderedColumnStopIndex),n=this._getOverscanIndices(this.rowCount,h,this._renderedRowStartIndex,this._renderedRowStopIndex),o=m.overscanStartIndex,p=m.overscanStopIndex,q=n.overscanStartIndex,r=n.overscanStopIndex,s=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(q),t=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(o),u=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(r),v=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(p),w=s.offset+l,x=t.offset+k,y=u.offset+l+u.size,z=v.offset+k+v.size;if(w>=this.renderRange.minY&&y<=this.renderRange.maxY&&x>=this.renderRange.minX&&z<=this.renderRange.maxX)return;for(var A=[],B={},C={},D=this._getMaxScrollLeft(),E=this._getMaxScrollTop(),F=0,G=0,H=0,I=q;I<=r;I++)for(var J=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(I),K=o;K<=p;K++){var L,M=I+"-"+K,N=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(K),O=this.renderedKeys[M]&&this.renderedKeys[M][2];O>=0?(N.size!==this.renderedCells[O]._width&&(this.renderedCells[O]._width=N.size,this.renderedCells[O].el.setWidth(N.size)),J.size!==this.renderedCells[O]._height&&(this.renderedCells[O]._height=J.size,this.renderedCells[O].el.setHeight(J.size)),this.renderedCells[O]._left!==N.offset+k&&this.renderedCells[O].el.element.css("left",N.offset+k+"px"),this.renderedCells[O]._top!==J.offset+l&&this.renderedCells[O].el.element.css("top",J.offset+l+"px"),A.push(L=this.renderedCells[O])):(L=BI.createWidget(BI.extend({type:"bi.label",width:N.size,height:J.size},b.items[I][K],{cls:(b.items[I][K].cls||"")+" grid-cell"+(0===I?" first-row":"")+(0===K?" first-col":""),_rowIndex:I,_columnIndex:K,_left:N.offset+k,_top:J.offset+l}),this),A.push({el:L,left:N.offset+k,top:J.offset+l,_left:N.offset+k,_top:J.offset+l,_width:N.size,_height:J.size})),D=Math.min(D,N.offset+k),F=Math.max(F,N.offset+k+N.size),E=Math.min(E,J.offset+l),G=Math.max(G,J.offset+l+J.size),B[M]=[I,K,H],C[H]=L,H++}var P={},Q={},R=[];BI.each(B,function(b,c){a.renderedKeys[b]?P[b]=c:Q[b]=c}),BI.each(this.renderedKeys,function(a,b){P[a]||Q[a]||R.push(b[2])}),BI.each(R,function(b,c){a.renderedCells[c].el._destroy()});var S=[];BI.each(Q,function(a,b){S.push(A[b[2]])}),this.container.addItems(S,this),this.container._children=C,this.container.attr("items",A),this.renderedCells=A,this.renderedKeys=B,this.renderRange={minX:D,minY:E,maxX:F,maxY:G}}},_getRealMaxScrollLeft:function(){var a=this.options,b=0;return BI.count(0,this.columnCount,function(c){b+=a.columnWidthGetter(c)}),Math.max(0,b-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(a){var b=this.options;this._reRange(),this.columnCount=0,this.rowCount=0,a&&a!==this.options.items&&(this.options.items=a),BI.isNumber(b.columnCount)?this.columnCount=b.columnCount:b.items.length>0&&(this.columnCount=b.items[0].length),BI.isNumber(b.rowCount)?this.rowCount=b.rowCount:this.rowCount=b.items.length,this.container.setWidth(this.columnCount*b.estimatedColumnSize),this.container.setHeight(this.rowCount*b.estimatedRowSize),this._columnSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.columnCount,b.columnWidthGetter,b.estimatedColumnSize),this._rowSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.rowCount,b.rowHeightGetter,b.estimatedRowSize),this._calculateChildrenToRender();try{this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)}catch(c){}},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getRealMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setColumnCount:function(a){this.options.columnCount=a},setRowCount:function(a){this.options.rowCount=a},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"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(a){this.options.estimatedColumnSize=a},setEstimatedRowSize:function(a){this.options.estimatedRowSize=a},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.GridView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_view",BI.GridView),BI.Popover=BI.inherit(BI.Widget,{_constant:{SIZE:{SMALL:"small",NORMAL:"normal",BIG:"big"},HEADER_HEIGHT:40},_defaultConfig:function(){return BI.extend(BI.Popover.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-popover bi-card",size:"normal",logic:{dynamic:!1},header:null,body:null,footer:null,closable:!0})},render:function(){var a=this,b=this.options;this.startX=0,this.startY=0,this.tracker=new BI.MouseMoveTracker(function(b,c){var d=(a._calculateSize(),BI.Widget._renderEngine.createElement("body").width()),e=BI.Widget._renderEngine.createElement("body").height();a.startX+=b,a.startY+=c,a.element.css({left:BI.clamp(a.startX,0,d-a.element.width())+"px",top:BI.clamp(a.startY,0,e-a.element.height())+"px"}),BI.Resizers._resize()},function(){a.tracker.releaseMouseMoves()},_global);var c=[{el:{type:"bi.htape",cls:"bi-message-title bi-header-background",ref:function(b){a.dragger=b},items:[{type:"bi.absolute",items:[{el:BI.isPlainObject(b.header)?BI.createWidget(b.header,{extraCls:"bi-font-bold"}):{type:"bi.label",cls:"bi-font-bold",height:this._constant.HEADER_HEIGHT,text:b.header,textAlign:"left"},left:20,top:0,right:0,bottom:0}]},{el:b.closable?{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){a.close()}}:{type:"bi.layout"},width:56}],height:this._constant.HEADER_HEIGHT},height:this._constant.HEADER_HEIGHT},{el:b.logic.dynamic?{type:"bi.vertical",scrolly:!1,cls:"popover-body",ref:function(){a.body=this},hgap:20,tgap:10,items:[{el:BI.createWidget(b.body)}]}:{type:"bi.absolute",items:[{el:BI.createWidget(b.body),left:20,top:10,right:20,bottom:0}]}}];b.footer&&c.push({el:{type:"bi.absolute",items:[{el:BI.createWidget(b.footer),left:20,top:0,right:20,bottom:0}],height:44},height:44});var d=this._calculateSize();return BI.extend({type:b.logic.dynamic?"bi.vertical":"bi.vtape",items:c,width:d.width},b.logic.dynamic?{type:"bi.vertical",scrolly:!1}:{type:"bi.vtape",height:d.height})},mounted:function(){var a=this,b=this.options;if(this.dragger.element.mousedown(function(b){var c=a.element.offset();a.startX=c.left,a.startY=c.top,a.tracker.captureMouseMoves(b)}),b.logic.dynamic){var c=this._calculateSize(),d=this.element.height(),e=BI.clamp(d,c.height,600)-(b.footer?84:44);this.body.element.height(e)}},_calculateSize:function(){var a=this.options,b={};if(BI.isNotNull(a.size))switch(a.size){case this._constant.SIZE.SMALL:b.width=450,b.height=200;break;case this._constant.SIZE.BIG:b.width=900,b.height=500;break;default:b.width=550,b.height=500}return{width:a.width||b.width,height:a.height||b.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(a){this.element.css({"z-index":a})},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.i18nText("BI-Basic_Sure")),BI.i18nText(BI.i18nText("BI-Basic_Cancel"))]})},beforeCreate:function(){var a=this,b=this.options;b.footer||(b.footer={type:"bi.right_vertical_adapt",lgap:10,items:[{type:"bi.button",text:this.options.btns[1],value:1,level:"ignore",handler:function(b){a.fireEvent(BI.Popover.EVENT_CANCEL,b),a.close(b)}},{type:"bi.button",text:this.options.btns[0],warningTitle:b.warningTitle,value:0,handler:function(b){a.fireEvent(BI.Popover.EVENT_CONFIRM,b),a.close(b)}}]})}}),BI.shortcut("bi.bar_popover",BI.BarPopover),BI.Popover.EVENT_CLOSE="EVENT_CLOSE",BI.Popover.EVENT_OPEN="EVENT_OPEN",BI.Popover.EVENT_CANCEL="EVENT_CANCEL",BI.Popover.EVENT_CONFIRM="EVENT_CONFIRM",BI.PopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PopupView.superclass._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 a=this,b=this.options,c=function(a){a.stopPropagation()},d=function(a){return a.stopEvent(),!1};this.element.css({"z-index":BI.zIndex_popup,"min-width":b.minWidth+"px","max-width":b.maxWidth+"px"}).bind({click:c}),this.element.bind("mousewheel",c),b.stopPropagation&&this.element.bind({mousedown:c,mouseup:c,mouseover:c}),b.stopEvent&&this.element.bind({mousedown:d,mouseup:d,mouseover:d}),this.tool=this._createTool(),this.tab=this._createTab(),this.view=this._createView(),this.toolbar=this._createToolBar(),this.view.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.PopupView.EVENT_CHANGE)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{scrolly:!1,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap,items:BI.LogicFactory.createLogicItemsByDirection(b.direction,BI.extend({cls:"list-view-outer bi-card list-view-shadow"},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tool,this.tab,this.view,this.toolbar)}))))}))))},_createView:function(){var a=this.options;return this.button_group=BI.createWidget(a.el,{type:"bi.button_group",value:a.value}),this.button_group.element.css({"min-height":a.minHeight+"px","padding-top":a.innerVGap+"px","padding-bottom":a.innerVGap+"px"}),this.button_group},_createTool:function(){var a=this.options;if(!1!==a.tool)return BI.createWidget(a.tool)},_createTab:function(){var a=this.options;if(0!==a.tabs.length)return BI.createWidget({type:"bi.center",cls:"list-view-tab",height:25,items:a.tabs,value:a.value})},_createToolBar:function(){var a=this.options;if(0!==a.buttons.length)return BI.createWidget({type:"bi.center",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.view},populate:function(a){this.view.populate.apply(this.view,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||24:0,c=this.tab?this.tab.attr("height")||24:0,d=(this.tool&&this.tool.attr("height")||24)*(this.tool&&this.tool.isVisible()?1:0),e=a-b-c-d-2*this.options.innerVGap;this.view.resetHeight?this.view.resetHeight(e):this.view.element.css({"max-height":e+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.view.setValue(a)},getValue:function(){return this.view.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView),BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.matcher=BI.createWidget(b.matcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:b.value}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),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(b.searcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:b.value}),this.searcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.matcher,this.spliter,this.searcher]})},startSearch:function(){},stopSearch:function(){},setValue:function(a){this.matcher.setValue(a),this.searcher.setValue(a)},getValue:function(){return this.matcher.getValue().concat(this.searcher.getValue())},populate:function(a,b,c){a||(a=[]),b||(b=[]),this.setTipVisible(a.length+b.length===0),this.spliter.setVisible(BI.isNotEmptyArray(b)&&BI.isNotEmptyArray(a)),this.matcher.populate(b,c),this.searcher.populate(a,c)},empty:function(){this.searcher.empty(),this.matcher.empty()},hasMatched:function(){return this.matcher.getAllButtons().length>0}}),BI.SearcherView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.searcher_view",BI.SearcherView),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 a=this,b=this.options;return{type:"bi.vertical",items:[BI.extend({type:"bi.vertical",scrolly:!1,ref:function(){a.container=this}},b.el)],element:this}},mounted:function(){var a=this,b=this.options;this._populate(),this.element.scroll(function(c){b.scrollTop=a.element.scrollTop(),a._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){a._calculateBlocksToRender()})},_renderMoreIf:function(){for(var a,b=this,c=this.options,d=this.element.height(),e=c.scrollTop+d+c.overscanHeight,f=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+c.blockSize||0,g=this.renderedIndex+1,h=function(){return b.container.element.height()};(a=h())e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.Pager.superclass.attr.apply(this,arguments),"curr"===a&&(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),BI.A=BI.inherit(BI.Text,{_defaultConfig:function(){var a=BI.A.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-a display-block",href:"",target:"_blank",el:null,tagName:"a"})},_init:function(){var a=this.options;BI.A.superclass._init.apply(this,arguments),this.element.attr({href:a.href,target:a.target}),a.el&&BI.createWidget(a.el,{element:this})}}),BI.shortcut("bi.a",BI.A),BI.LoadingBar=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.LoadingBar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-loading-bar bi-tips",height:30,handler:BI.emptyFn})},_init:function(){BI.LoadingBar.superclass._init.apply(this,arguments);var a=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(b){a.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 b=BI.createWidget({type:"bi.center_adapt",items:[this.loaded]}),c=BI.createWidget({type:"bi.center_adapt",items:[this.loading]});this.cardLayout=BI.createWidget({type:"bi.card",element:this,items:[{el:b,cardName:"loaded"},{el:c,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),BI.IconButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-icon-button horizon-center",iconWidth:null,iconHeight:null})},_init:function(){BI.IconButton.superclass._init.apply(this,arguments);var a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.ImageButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ImageButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-button",src:"",iconWidth:"100%",iconHeight:"100%"})},_init:function(){BI.ImageButton.superclass._init.apply(this,arguments);var a=this.options;this.image=BI.createWidget({type:"bi.img",width:a.iconWidth,height:a.iconHeight,src:a.src}),BI.isNumber(a.iconWidth)||BI.isNumber(a.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(a){BI.ImageButton.superclass.setWidth.apply(this,arguments),this.options.width=a},setHeight:function(a){BI.ImageButton.superclass.setHeight.apply(this,arguments),this.options.height=a},setImageWidth:function(a){this.image.setWidth(a)},setImageHeight:function(a){this.image.setHeight(a)},getImageWidth:function(){return this.image.element.width()},getImageHeight:function(){return this.image.element.height()},setSrc:function(a){this.options.src=a,this.image.setSrc(a)},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),BI.Button=BI.inherit(BI.BasicButton,{_defaultConfig:function(a){var b=BI.Button.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{baseCls:(b.baseCls||"")+" bi-button"+(BI.isIE()&&BI.isIE9Below()?" hack":""),minWidth:a.block===!0||a.clear===!0?0:80,height:24,shadow:a.clear!==!0,isShadowShowingOnSelected:!0,readonly:!0,iconCls:"",level:"common",block:!1,clear:!1,ghost:!1,textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:a.clear?0:10,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},_init:function(){BI.Button.superclass._init.apply(this,arguments);var a=this.options;!BI.isNumber(a.height)||a.clear||a.block?a.clear||a.block?this.element.css({lineHeight:a.height+"px"}):this.element.css({lineHeight:a.height-2+"px"}):this.element.css({height:a.height+"px",lineHeight:a.height-2+"px"}),BI.isKey(a.iconCls)?(this.icon=BI.createWidget({type:"bi.icon_label",cls:a.iconCls,width:18,height:a.height-2,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value,height:a.height-2}),BI.createWidget({type:"bi.center_adapt",element:this,hgap:a.hgap,vgap:a.vgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,element:this,text:a.text,value:a.value}),a.block===!0&&this.element.addClass("block"),a.clear===!0&&this.element.addClass("clear"),a.ghost===!0&&this.element.addClass("ghost"),a.minWidth>0&&this.element.css({"min-width":a.minWidth+"px"})},doClick:function(){BI.Button.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Button.EVENT_CHANGE,this)},setText:function(a){BI.Button.superclass.setText.apply(this,arguments),this.text.setText(a)},setValue:function(a){BI.Button.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},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",BI.TextButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-button",textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:0,lgap:0,rgap:0,text:"",py:""})},_init:function(){BI.TextButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,width:a.width,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.rgap,text:a.text,value:a.value,py:a.py,keyword:a.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(a){BI.TextButton.superclass.setText.apply(this,arguments),a=BI.isArray(a)?a.join(","):a,this.text.setText(a)},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.TextButton.superclass.setValue.apply(this,arguments),this.isReadOnly()||(a=BI.isArray(a)?a.join(","):a,this.text.setValue(a))}}),BI.TextButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_button",BI.TextButton),BI.BlankIconIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=(this._const,BI.createWidget({type:"bi.layout",width:a.blankWidth,height:a.height}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,forceNotSelected:!0,width:a.height,height:a.height}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,forceNotSelected:!0,width:a.height,height:a.height}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,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(a){BI.BlankIconIconTextItem.superclass.setSelected.apply(this,arguments),this.icon1.setSelected(a),this.icon2.setSelected(a)},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),BI.BlankIconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.layout",width:a.blankWidth},b,this.text,{type:"bi.layout",width:a.height})}))))},doClick:function(){BI.BlankIconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.BlankIconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_icon_item",BI.BlankIconTextIconItem),BI.BlankIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=(this._const,BI.createWidget({type:"bi.layout",width:a.blankWidth}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.icon,this.text)}))))},doClick:function(){BI.BlankIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_item",BI.BlankIconTextItem),BI.IconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.leftIconWrapperWidth,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.rightIconWrapperWidth,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.iconWrapperWidth||a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.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),BI.TextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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), -BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height,height:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"",root:!0,value:b.value,watermark:b.watermark,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,height:b.height-2*(b.vgap+b.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}}),this.watermark.element.bind("click",function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}));var c=[];this.watermark&&c.push({el:this.watermark,left:3,right:3,top:0,bottom:0}),c.push({el:this.editor,left:0,right:0,top:0,bottom:0});var d=[{el:{type:"bi.absolute",items:c},left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:d}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){a._checkError(),a.element.addClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){a._setErrorVisible(!1),a.element.removeClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){a.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){a.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(b){b.keyCode!==BI.KeyCode.TAB&&a.watermark&&a.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){a._checkWaterMark(),a._setErrorVisible(!1),a.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_ERROR,arguments),a._setErrorVisible(a.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){a._checkWaterMark();var b=a._setErrorVisible(!0);b&&b.element.fadeOut(100,function(){b.element.fadeIn(100)}),a.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){a.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){a.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){a.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){a.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){a.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){a.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){a.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM,arguments)}),this.element.click(function(a){return a.stopPropagation(),!1}),BI.isKey(this.options.value)||BI.isEmptyString(this.options.value)?(this._checkError(),this._checkWaterMark()):this._checkWaterMark()},_checkToolTip:function(){var a=this.options,b=a.errorText;BI.isFunction(b)&&(b=b(this.editor.getValue())),BI.isKey(b)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(b))},_checkError:function(){this._setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(a){this.options.errorText=a},getErrorText:function(){return this.options.errorText},_setErrorVisible:function(a){var b=this.options,c=b.errorText;if(BI.isFunction(c)&&(c=c(BI.trim(this.editor.getValue()))),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,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(a){this.editor.onKeyDown(a)},setValue:function(a){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(a),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),BI.MultifileEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var a=this,b=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:b.name,url:b.url,multiple:b.multiple,accept:b.accept,maxSize:b.maxSize,title:b.title}),this.file.on(BI.File.EVENT_CHANGE,function(){a.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments)}),this.file.on(BI.File.EVENT_ERROR,function(){a.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){a.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){a.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),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},render:function(){var a=this.options,b=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:10,top:4,bottom:8}]}),this.content.element.on("input propertychange",function(a){b._checkWaterMark(),b.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){b.isValid()&&(b._focus(),b.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),BI.Widget._renderEngine.createElement(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&(BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&this.setValue(a.value),BI.isNotNull(a.style)&&this.setStyle(a.style),this._checkWaterMark()},_checkWaterMark:function(){var a=this,b=this.options,c=this.getValue();BI.isNotEmptyString(c)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(b.watermark)&&(this.watermark?(this.watermark.setText(b.watermark),this.watermark.setValid(!b.invalid),this.watermark.setEnable(!b.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark cursor-default",textAlign:"left",height:20,text:b.watermark,invalid:b.invalid,disabled:b.disabled}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){a.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:4,top:4,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(a){this.content.element.val(a),this._checkWaterMark()},setStyle:function(a){this.style=a,this.element.css(a),this.content.element.css(BI.extend({},a,{color:a.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(a.backgroundColor)?BI.DOM.rgb2hex(a.backgroundColor):a.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(a){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)},_setEnable:function(a){BI.TextAreaEditor.superclass._setEnable.apply(this,[a]),this.content&&(this.content.element[0].disabled=!a)}}),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),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(b.text)?this.setText(b.text):BI.isKey(b.value)&&this.setText(b.value),b.highLight&&this.doHighLight()},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Html.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){BI.Html.superclass.setText.apply(this,arguments),this.options.text=a,this.text.element.html(a)}}),BI.shortcut("bi.html",BI.Html),BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"i",baseCls:(a.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),BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"iframe",baseCls:(a.baseCls||"")+" bi-iframe",src:"",name:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.frameborder="0",a.attributes.src=a.src,a.attributes.name=a.name,BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src},setName:function(a){this.options.name=a,this.element.attr("name",a)},getName:function(){return this.options.name}}),BI.shortcut("bi.iframe",BI.Iframe),BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"img",baseCls:(a.baseCls||"")+" bi-img display-block",src:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.src=a.src,BI.Img.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img),BI.ImageCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageCheckbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})}}),BI.ImageCheckbox.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_checkbox",BI.ImageCheckbox),BI.Checkbox=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-checkbox",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16},render:function(){var a=this,b=this.options;return{type:"bi.center_adapt",items:[{type:"bi.default",ref:function(b){a.checkbox=b},cls:"checkbox-content",width:b.iconWidth-2,height:b.iconHeight-2}]}},_setEnable:function(a){BI.Checkbox.superclass._setEnable.apply(this,arguments),a===!0?this.checkbox.element.removeClass("base-disabled disabled"):this.checkbox.element.addClass("base-disabled disabled")},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)},setSelected:function(a){BI.Checkbox.superclass.setSelected.apply(this,arguments),a?this.checkbox.element.addClass("bi-high-light-background"):this.checkbox.element.removeClass("bi-high-light-background")}}),BI.Checkbox.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox),function(document){var F=function(a){return function(b){var c=b.files||[b];return c.item||(c.item=a),c}}(function(a){return this[a]}),event={add:document.addEventListener?function(a,b,c){return a.addEventListener(b,c,!1),this}:function(a,b,c){return a.attachEvent("on"+b,c),this},del:document.removeEventListener?function(a,b,c){return a.removeEventListener(b,c,!1),this}:function(a,b,c){return a.detachEvent("on"+b,c),this},stop:function(a){return a?(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,a.preventDefault?a.preventDefault():a.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(a,b,c){return"--".concat(a,CRLF,'Content-Disposition: form-data; name="',b,'"; filename="',_global.encodeURIComponent(c.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,c.getAsBinary(),CRLF,"--",a,"--",CRLF)},isFunction=function(a){return"[object Function]"===toString.call(a)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(a,b,c,d){if(-1'),iframe=handler.iframe||(handler.iframe=document.createElement(''))}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(a){isFunction(handler.onerror)&&handler.onerror(rpe,a||_global.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loadedc.status||c.status>399?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void a.fireEvent(BI.File.EVENT_ERROR)):void a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url,c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d0&&b.fireEvent(BI.File.EVENT_CHANGE,{files:a.files}),c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){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(a){this.wrap&&this.wrap.upload(a); -},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(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?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||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=!1,c=null,d=!1,e=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),f=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){d=!1,b=e.ctrlKey||e.metaKey,c=e.keyCode,a.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(b){c=null,d&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,e(b.keyCode))}).on("input propertychange",function(b){var f=b.originalEvent;(BI.isNull(f.propertyName)||"value"===f.propertyName)&&(c=null,d=!0,a._keydown_=!0,e(c))}).click(function(a){a.stopPropagation(),f()}).mousedown(function(b){a.element.val(a.element.val())}).focus(function(b){a._focusDebounce()}).focusout(function(b){a._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(){function a(){if(b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()){var a=b._lastValidValue;b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM),b._lastValidValue!==a&&b.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){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)&&(this._pause!==!0||/(\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))),a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN),BI.isEndWithBlank(this.getValue())&&BI.trim(this.getValue())===BI.trim(this._lastValue||"")?(this._pause=!0,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.PAUSE,"",this),this.fireEvent(BI.Input.EVENT_PAUSE),this._defaultState()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===this._lastValue||""===BI.trim(this._lastValue)?this._valueChange():(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_STOP),this._valueChange())},_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 a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastChangedValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(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(a){this.element.val(a),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(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),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),BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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),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 a=this,b=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(b){a.radio=b},width:b.iconWidth,height:b.iconHeight}]}},_setEnable:function(a){BI.Radio.superclass._setEnable.apply(this,arguments),a===!0?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(a){BI.Radio.superclass.setSelected.apply(this,arguments),a?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),BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(a){var b=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{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 a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();return b.textAlign="left",BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:"bi.center_adapt",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,maxWidth:"100%"}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(b,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var a=this.options,b="right"===a.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",c=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:b,height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(c)}]}):void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})),void("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}))):(c.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(c,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(c,{maxWidth:"100%"})),void BI.createWidget({type:b,element:this,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(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}}),BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var a=this.options;return{type:"bi.html",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel),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 a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.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),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),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 a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var a=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+a.level,text:a.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(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),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 a=this,b=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+b.level);var c=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:c,mousedown:c,mouseup:c,mouseover:c,mouseenter:c,mouseleave:c,mousemove:c});var d="close-font";switch(b.level){case"success":d="toast-success-font";break;case"error":d="toast-error-font";break;case"warning":d="toast-warning-font";break;case"normal":default:d="toast-message-font"}var e=[{type:"bi.icon_label",cls:d+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,textHeight:16,textAlign:"left"},rgap:b.autoClose?this._const.hgap:0}],f=[36,""];b.autoClose===!1&&(e.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){a.destroy()},width:36}),f.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:e,vgap:7,columnSize:f})},setText:function(a){this.text.setText(a)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:18})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,height:a.height,textHeight:a.height-2,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{value:e.value},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])},value:c.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},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(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),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(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;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;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(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=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("")},makeDOMNodeMainBefore:function(a,b,c){a.push("
  • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
      "),c.push(d),c.push("
    ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={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"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0};return d},getTreeCheckedNodes:function(a,b,c,d){if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f=a.check.chkboxType,g=""===f.Y&&""===f.N;fullStyle="",b.chkDisabled===!0?fullStyle=d.DISABLED:b.halfCheck?fullStyle=d.PART:a.check.chkStyle==e.STYLE?fullStyle=b.check_Child_State<1?d.FULL:d.PART:fullStyle=b[c]?2===b.check_Child_State||b.check_Child_State===-1||g?d.FULL:d.PART:b.check_Child_State<1||g?d.FULL:d.PART;var h=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+fullStyle;return h=b.check_Focus&&b.chkDisabled!==!0?h+"_"+d.FOCUS:h,t.className.BUTTON+" "+d.DEFAULT+" "+h},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconCls,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconCls!==a&&(this.element.removeClass(b.iconCls).addClass(a),b.iconCls=a)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=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:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:b.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(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),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 a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconCls,once:b.once,iconWrapperWidth:b.iconWrapperWidth,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},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),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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,title:a.title||a.text,warningTitle:a.warningTitle,py:a.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(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 a=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:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var c=BI.createWidget({type:"bi.icon_label",width:24,cls:b.iconCls,iconWidth:b.iconWidth,iconHeight:b.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},{width:24,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},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(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,cls:"bi-list-item-none",id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.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(a){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=a?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),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),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 a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:24,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},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},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),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 a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.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),BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:b.text,value:b.value,ref:function(){a.text=this}},left:b.lgap,right:b.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(a){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(a)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=BI.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=BI.Date._MD.slice(0);i[1]=BI.isLeapYear(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay();var j=(7-BI.StartOfWeek+e.FDay)%7;e.PDay=i[0===b?11:b-1]-j+1,e.NDay=1;var k=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=j&&a=0?c%12:(12+c%12)%12;return{year:BI.getDate().getFullYear()+d,month:e+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[],e=BI.parseDateTime(b.min,"%Y-%X-%d"),f=BI.parseDateTime(b.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var b={};BI.checkDateVoid(c+a,1,1,BI.print(BI.getDate(e.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(f.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(b.disabled=!0),b.text=c+a,d.push(b)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=BI.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=BI.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(a){var b=BI.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?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),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(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),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(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),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 a=this,b=this.options;this.editor=BI.createWidget(b.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.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(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:""})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:b.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(b){a.trigger=b},width:b.width,height:b.height},b.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(b){a.colorPicker=b},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){c(),a._isRGBColor(a.colorPicker.getValue())||a.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){c(),a.combo.hideView()}}]},b.popup),stopPropagation:!0,width:230},value:b.value});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var a=this,b=this.options;this.colorEditor=BI.createWidget(b.editor,{type:b.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:b.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a._dealStoreColors(),a.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:b.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:b.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:b.editor});var c=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:c}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),c.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a._dealStoreColors(),a.more.hideView(),a.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:!b.disabled,ref:function(){a.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_setEnable:function(a){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!a)},_dealStoreColors:function(){var a=this.getValue(),b=this._getStoreColors(),c=new BI.Queue(8);c.fromArray(b),c.remove(a),c.unshift(a);var d=c.toArray();BI.Cache.setItem("colors",BI.array2String(d)),this.setStoreColors(d)},_digestStoreColors:function(a){var b=BI.map(a,function(a,b){return{value:b}});return BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),b},_getStoreColors:function(){var a=this,b=this.options,c=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(c,function(c,d){return!b.simple||a._isRGBColor(d)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},setStoreColors:function(a){BI.isArray(a)&&this.storeColors.populate([this._digestStoreColors(a)])},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},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),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 a=this,b=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:b.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(a){this.popup.setStoreColors(a)},setValue:function(a){this.popup.setValue(a)},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),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:b.container,value:b.value,width:b.width,height:b.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_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 a=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:a,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var a=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(b){a.changeIcon=b},iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(b){a.label=b},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var b=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:b,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?(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"===a?(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":a}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),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:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{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 a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:b.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),d(a.storeValue.r)&&d(a.storeValue.g)&&d(a.storeValue.b)&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[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()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#ffffff"),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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()?(a.lastColor=a.getValue(),a.setValue("transparent")):("transparent"===a.lastColor&&(a.lastColor=""),a.setValue(a.lastColor||"#ffffff")),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){""===a?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===a?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":a}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(a){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){if("transparent"===a)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:""});a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.storeValue={r:BI.isNull(b.r)?"":b.r,g:BI.isNull(b.r)?"":b.g,b:BI.isNull(b.r)?"":b.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),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){this.colorShow.element.css({"background-color":a});var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.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),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 a=this; -return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(b){a.colorWrapper=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(b){a.wheel=b}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(b){a.overlay=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.hMarker=b},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.slMarker=b},scrollable:!1,width:17,height:17}}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this.setValue(a.value)},_unpack:function(a){return 7===a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4===a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},_pack:function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},_setColor:function(a){var b=this._unpack(a);this.value!==a&&b&&(this.value=a,this.rgb=b,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(a){return this.hsl=a,this.rgb=this._HSLToRGB(a),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this._hueToRGB(b,c,d+.33333),this._hueToRGB(b,c,d),this._hueToRGB(b,c,d-.33333)]},_hueToRGB:function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},_RGBToHSL:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},_updateDisplay:function(){var a=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(a)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(a)*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(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var c=this._absolutePosition(a.offsetParent);b.x+=c.x,b.y+=c.y}return b},_widgetCoords:function(a){var b,c,d=a.target||a.srcElement,e=this.wheel.element[0];if("undefined"!=typeof a.offsetX){for(var f={x:a.offsetX,y:a.offsetY},g=d;g;)g.mouseX=f.x,g.mouseY=f.y,f.x+=g.offsetLeft,f.y+=g.offsetTop,g=g.offsetParent;for(var g=e,h={x:0,y:0};g;){if("undefined"!=typeof g.mouseX){b=g.mouseX-h.x,c=g.mouseY-h.y;break}h.x+=g.offsetLeft,h.y+=g.offsetTop,g=g.offsetParent}for(g=d;g;)g.mouseX=void 0,g.mouseY=void 0,g=g.offsetParent}else{var f=this._absolutePosition(e);b=(a.pageX||0)-f.x,c=(a.pageY||0)-f.y}return{x:b-this.constants.WIDTH/2,y:c-this.constants.WIDTH/2}},_doMouseMove:function(a){var b=this._widgetCoords(a);if(this.circleDrag){var c=Math.atan2(b.x,-b.y)/6.28;c<0&&(c+=1),this._setHSL([c,this.hsl[1],this.hsl[2]])}else{var d=Math.max(0,Math.min(1,-(b.x/this.constants.SQUARE)+.5)),e=Math.max(0,Math.min(1,-(b.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],d,e])}},doClick:function(a){var b=this._widgetCoords(a);return this.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>this.constants.SQUARE,this._doMouseMove(a),!1},setValue:function(a){this._setColor(a)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,container:b.container,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.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),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.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 a=this.options,b=this,c=[];return BI.each(a.buttons,function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:24,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:c}]})},_createView:function(){var a=this.options,b=BI.createWidget({type:"bi.button_group",items:[a.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return b.element.css("min-height",a.minHeight-44),b}}),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,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var a=this,b=this.options,c=BI.map(b.buttons,function(b,c){return BI.isWidget(c)?c:BI.extend({type:"bi.button",height:24,handler:function(b){a.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,b)}},c)});return{type:"bi.bubble_bar_popup_view",ref:function(){a.popup=this},el:{type:"bi.label",text:b.text,whiteSpace:"normal",textAlign:"left",ref:function(){a.text=this}},buttons:c}},populate:function(a){this.text.setText(a||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,value:b.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),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 a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconCls:b.iconCls,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,value:b.value}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),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 a=this.options,b="";BI.isKey(a.value)&&(b=this._digest(a.value,a.items)),this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b,disableSelected:!0,width:a.isShowDown?a.width-12:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight,selected:BI.isNotEmptyString(b)}),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(b)}),this.down.setVisible(a.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(a,b){var c="";return a=BI.isArray(a)?a[0]:a,BI.any(b,function(b,d){if(a===d.value)return c=d.iconCls,!0}),c},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c=this._digest(a,this.options.items);a=BI.isArray(a)?a[0]:a,BI.isNotEmptyString(c)?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:b.items,height:b.height,text:b.text,iconCls:b.iconCls,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth,title:b.title,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this.setValue(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:a.behaviors,value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a,b){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var c=this.options;a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:c.iconWrapperWidth,iconHeight:c.iconHeight,iconWidth:c.iconWidth}),this.popup.populate(a,b)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),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 a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,adjustLength:2,toggle:!1,ref:function(){a.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){a.trigger=this},items:b.items,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:b.value,items:b.items,ref:function(){a.popup=this,a.trigger.getSearcher().setAdapter(a.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:252},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){a.triggerBtn=this},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this._checkError(a.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.options.items=a,this.combo.populate(a)},setValue:function(a){this.combo.setValue(a),this._checkError(a)},getValue:function(){var a=this.combo.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo),BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var a=this,b=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){a.popup=this},items:BI.createItems(b.items,{type:"bi.single_select_item",textAlign:b.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,c,d)}}]}]}},mounted:function(){this.check()},populate:function(a,b,c){var d=BI.concat(a,b);BI.SearchTextValueComboPopup.superclass.populate.apply(this,d),d=BI.createItems(d,{type:"bi.single_select_item",height:24}),this.popup.populate(d,c)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup),BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value,b.items),value:b.value,height:b.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(a,c){var d=a.keyword,e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g,f)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(a){this.editor.setState(a)},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this._setState(this._digest(a,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),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,value:b.value,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this._checkError(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){ -this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),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 a=this,b=this.options;this._createValueMap();var c;BI.isNotNull(b.value)&&(c=this._digest(b.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:b.height,items:b.items,text:b.text,value:c}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,value:BI.isNull(c)?[]:[c],items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var b=a.combo.getValue()[0].value;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var b=a.combo.getValue()[0].childValue;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},_digest:function(a){return this.value=a,this.valueMap[a]},setValue:function(a){a=this._digest(a),this.combo.setValue([a]),this.trigger.setValue(a)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text,value:BI.isNull(a.value)?"":a.value.childValue||a.value.value})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a.childValue||a.value)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker,value:b.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(b.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:b.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]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.text.setStyle(a)},setValue:function(a){var b=this.options;this.editor.setValue(a),this._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(a.keyword)&&this.text.doRedMark(a.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text tip-text-style",textAlign:"left",height:b.height,text:b.text,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")},title:BI.isNotNull(b.tipText)?b.tipText:function(){var b="";return BI.isString(a.stateValue)&&(b=a.stateValue),BI.isArray(a.stateValue)&&1===a.stateValue.length&&(b=a.stateValue[0]),b},warningTitle:b.warningTitle,tipType:b.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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.options.disabled===!1&&(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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=a,BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text"))))},setTipType:function(a){this.text.options.tipType=a}}),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),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text",textAlign:"left",text:b.text,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")), -this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),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),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(c,{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(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.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:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded(),a.check()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.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(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{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(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 a=this,b=this.options;return[{type:"bi.label",text:b.text,height:b.height,value:b.value,hgap:b.hgap,ref:function(){a.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){a.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(a){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),a?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var a=this,b=this.options;return{type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.linear_segment_button",height:b.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){a.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.buttonGroup=this}}},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),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 a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(b.value)&&this.setValue(b.value)},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.allSelected=!!a,this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{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(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"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(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),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:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1),this.setPagerVisible(a>1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate(),this.setPagerVisible(this.options.pages>1)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),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 a=this.options;a.vertical,a.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 a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev column-pre-page-h-font"},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 direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev row-pre-page-h-font"},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 direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},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(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[86,110,0,24],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),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),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 a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:a.height,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:b.value,items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},_setEnable:function(a){BI.Segment.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(a){return a.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.selected===!0,d=!b.selected&&b.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())},selected:c,invisible:d}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)},invisible:c||!d}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:b.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(a){this.checkbox.setSelected(!!a)},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this.halfSelected=!!a,a===!0?(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(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(b),!b&&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),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(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};BI.isKey(f.id)||(f.id=BI.UUID()),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.mid_plus_group_node",e===a.length-1&&(g.type="bi.last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a,b){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a,b)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),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(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),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(){function a(a,b){return!1}function b(a,b){return b.isLeaf?{}:{color:"#999999"}}var c={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:b},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return c},_dealWidthNodes:function(a){a=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),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 a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate(),BI.isNotNull(b.value)&&this.setValue(b.value)},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},_digest:function(a){a||(a=[]);var b=this,c={},d=[];return BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),BI.makeObject(a.concat(d))},setValue:function(a){this.tree.setValue(this._digest(a))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,title:function(){return a.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:b.triggerWidth||b.height},width:b.triggerWidth||b.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:24})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(b){a.wrapper=b},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.iconWrapperWidth||b.height},{el:this.text,lgap:BI.isEmptyString(b.iconCls)?5:0},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a)},setIcon:function(a){var b=this.options;this.icon.setIcon(a);var c=this.wrapper.attr("items")[0],d=this.wrapper.attr("items")[1];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,d.lgap=5,this.wrapper.resize()):c.width!==(b.iconWrapperWidth||b.height)&&(c.width=b.iconWrapperWidth||b.height,d.lgap=0,this.wrapper.resize())},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),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 a=this.options,b=this._digist(a.value,a.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:b.text,iconCls:b.iconCls,height:a.height,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth})},_digist:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d,e=BI.Tree.transformToArrayFormat(b);return BI.any(e,function(b,c){if(BI.deepContains(a,c.value))return d={text:c.text||c.value,iconCls:c.iconCls},!0}),BI.isNotNull(d)?{text:d.text,iconCls:d.iconCls}:{text:c.text,iconCls:c.iconCls}},setValue:function(a){var b=this._digist(a,this.options.items);this.trigger.setText(b.text),this.trigger.setIcon(b.iconCls)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text,title:function(){return a.text.getText()},tipType:b.tipType,warningTitle:b.warningTitle,hgap:c.hgap,readonly:b.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setText:function(a){this.text.setText(a)},setTipType:function(a){this.text.options.tipType=a}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),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 a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height,readonly:a.readonly,text:this._digest(a.value,a.items),tipType:a.tipType,warningTitle:a.warningTitle})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},setTipType:function(a){this.trigger.setTipType(a)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),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 a=this.options,b=this._digest(a.text,a.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2,text:b.text,cls:b.cls})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?{cls:"",text:d.join(",")}:{cls:"bi-water-mark",text:c.text}},setValue:function(a){var b=this._digest(a,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(b.cls),this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:a.triggerWidth||a.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:a.triggerWidth||a.height}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:b.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(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:b.behaviors,min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=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===a._month?a.setValue({year:a.year.getValue()-1,month:12}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._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===a._month?a.setValue({year:a.year.getValue()+1,month:1}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:b.behaviors,min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:b.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.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 a=this.options,b=!(1===this._month&&this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(12===this._month&&this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=BI.parseInt(a.year),this._month=BI.parseInt(a.month),this.year.setValue(a.year),this.month.setValue(a.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),BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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(){a.setValue(a.year.getValue()-1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._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(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,behaviors:b.behaviors,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.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:{type:"bi.horizontal_float",width:50,items:[{el:this.year}]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:1});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.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(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.calendar,left:5,right:5},{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),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(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear();var c=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),d=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:[c,d]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();c.setEnable(!b.isFrontYear()),d.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;a=BI.parseInt(a);var c=BI.parseDateTime(b.min,"%Y-%X-%d"),d=BI.parseDateTime(b.max,"%Y-%X-%d");BI.checkDateVoid(a,1,1,BI.print(BI.getDate(c.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(d.getFullYear(),0,1),"%Y-%X-%d"))[0]?(a=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text", -textAlign:"right",text:a.text,value:a.value,height:b.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime={year:b.year,month:b.month},0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(b.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(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDatePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDatePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateCombo.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options,c=BI.getDate();this.storeValue=BI.isNotNull(b.value)?b.value:{year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:b.minDate,max:b.maxDate,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.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(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var d=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});d.on(BI.IconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()||a.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:d,top:0,right:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},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),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 a=this,b=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(){a.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(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.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(b){a.timeSelect=b}}]},height:50},{el:this.dateButton,height:30}]}),this.setValue(b.value)},setValue:function(a){var b,c=a;BI.isNull(c)?(b=BI.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}),this.timeSelect.setValue({hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()})):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.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),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text},{el:BI.createWidget(),width:a.height}]}),this.setValue(a.value)},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=BI.getDate(),b=BI.print(c,"%Y-%X-%d %H:%M:%S");else{var d=BI.getDate(c.year,c.month-1,c.day,c.hour,c.minute,c.second);b=BI.print(d,"%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.StaticDateTimePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime=BI.extend(a.selectedTime,{year:b.year,month:b.month,day:d}),0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.calendar.empty(),a.setValue(a.selectedTime),a.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(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.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(b.selectedTime)},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=BI.extend({},this.timeSelect.getValue(),a)},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){a=a||{},this._setDatePicker(a),this._setCalendar(a),this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_time_pane_card",BI.StaticDateTimePaneCard),BI.DynamicDateTimePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDateTimePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDateTimePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDateTimePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateTimePane.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateTimePane.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:b.stopPropagation,maxHeight:1e3,minWidth:140}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(a){this.downlistcombo.showView(a)},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},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),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 a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:a.value}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:36,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),BI.extend(a.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),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:36,disableSelected:!0,selected:this._digest(a.value)}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:24,forceNotSelected:!0});var c=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(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},_digest:function(a){var b=this.options;return a=BI.isArray(a)?a:[a],BI.any(a,function(a,c){return BI.contains(b.childValues,c)})},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(a){this.icon1.setSelected(this._digest(a))}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),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 a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options,c=this._createChildren(this.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!BI.contains(a.singleValues,d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.isDefaultInit=!0,c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5,maxHeight:378},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=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});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?1:0}},setValue:function(a){a=a||{},this.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT;var b=[],c=[];BI.isNotNull(a.year)&&(b.push(BI.DynamicDateCard.TYPE.YEAR),c.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))),BI.isNotNull(a.quarter)&&(b.push(BI.DynamicDateCard.TYPE.QUARTER),c.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))),BI.isNotNull(a.month)&&(b.push(BI.DynamicDateCard.TYPE.MONTH),c.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))),BI.isNotNull(a.week)&&(b.push(BI.DynamicDateCard.TYPE.WEEK),c.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,a.week))),BI.isNotNull(a.day)&&(b.push(BI.DynamicDateCard.TYPE.DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,a.day))),BI.isNotNull(a.workDay)&&(b.push(BI.DynamicDateCard.TYPE.WORK_DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,a.workDay))),this.checkgroup.setValue(b),this.workDayBox.setSelected(BI.isNotNull(a.workDay)),this.resultPane.populate(this._getParamJson(c,a.position))},getValue:function(){var a=this,b={},c=this.checkgroup.getValue(),d=this.resultPane.getAllButtons();if(0!==c.length&&BI.each(d,function(c,d){var e=d.getValue();switch(e.dateType){case BI.DynamicDateCard.TYPE.YEAR:b.year=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.QUARTER:b.quarter=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.MONTH:b.month=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.WEEK:b.week=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.DAY:b.day=0===e.offset?-e.value:e.value}BI.isNull(e.dateType)&&(b.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var e=d[0].getValue();b.workDay=0===e.offset?-e.value:e.value}return b}}),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}}),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 a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:b.minDate,max:b.maxDate,format:b.format,allowEdit:b.allowEdit,watermark:b.watermark,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.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:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},_defaultState:function(){},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(a){return BI.isNaturalNumber(a)},value:b.value,ref:function(){a.editor=this},errorText:function(a){return BI.isEmptyString(a)?BI.i18nText("BI-Basic_Please_Input_Content"):BI.i18nText("BI-Please_Input_Natural_Number")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:b.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(){a.offsetCombo=this},container:null,value:b.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var a="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:a=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:a=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:a=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:a=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:a=BI.i18nText("BI-Basic_Day");break;case BI.DynamicDateCard.TYPE.WORK_DAY:default:a=BI.i18nText("BI-Basic_Work_Day")}return a},setValue:function(a){a=a||{},a.value=a.value||0,a.offset=a.offset||0,this.editor.setValue(a.value),this.offsetCombo.setValue(a.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),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 a=this,b=this.options,c=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:c.buttonHeight-1,listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){a.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),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),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2]}}}a.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.getDate();e=BI.DynamicDateHelper.getCalculation(c);var f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[0,1,2],d=this._getFormatString().match(/%./g);BI.each(d,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":default:c[2]=a}});var e=BI.parseDateTime(a,this._getFormatString());BI.print(e,this._getFormatString())===a&&(a=BI.print(e,b.compareFormat),c=[0,1,2]);var f=a.match(/\d+/g),g=[];return BI.each(f,function(a){g[a]=f[c[a]]}),g.length===c.length&&2===g[0].length?BI.print(BI.parseDateTime(g.join("-"),b.compareFormat),b.compareFormat):g.join("-")},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,this._getFormatString()),this._const.compareFormat);return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,this._getFormatString()),c=BI.print(b,this._const.compareFormat);return b.getMonth()>=0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),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),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",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:b.minDate,max:b.maxDate,allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate(),hour:0,minute:0,second:0}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},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_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options,c=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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){a.timeSelect=this}},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a.timeSelect.setValue(),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();return{type:a,value:a===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), +BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height,height:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"",root:!0,value:b.value,watermark:b.watermark,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,height:b.height-2*(b.vgap+b.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}}),this.watermark.element.bind("click",function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}));var c=[];this.watermark&&c.push({el:this.watermark,left:3,right:3,top:0,bottom:0}),c.push({el:this.editor,left:0,right:0,top:0,bottom:0});var d=[{el:{type:"bi.absolute",items:c},left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:d}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){a._checkError(),a.element.addClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){a._setErrorVisible(!1),a.element.removeClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){a.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){a.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(b){b.keyCode!==BI.KeyCode.TAB&&a.watermark&&a.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){a._checkWaterMark(),a._setErrorVisible(!1),a.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_ERROR,arguments),a._setErrorVisible(a.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){a._checkWaterMark();var b=a._setErrorVisible(!0);b&&b.element.fadeOut(100,function(){b.element.fadeIn(100)}),a.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){a.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){a.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){a.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){a.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){a.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){a.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){a.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM,arguments)}),this.element.click(function(a){return a.stopPropagation(),!1}),BI.isKey(this.options.value)||BI.isEmptyString(this.options.value)?(this._checkError(),this._checkWaterMark()):this._checkWaterMark()},_checkToolTip:function(){var a=this.options,b=a.errorText;BI.isFunction(b)&&(b=b(this.editor.getValue())),BI.isKey(b)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(b))},_checkError:function(){this._setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(a){this.options.errorText=a},getErrorText:function(){return this.options.errorText},_setErrorVisible:function(a){var b=this.options,c=b.errorText;if(BI.isFunction(c)&&(c=c(BI.trim(this.editor.getValue()))),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,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(a){this.editor.onKeyDown(a)},setValue:function(a){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(a),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),BI.MultifileEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var a=this,b=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:b.name,url:b.url,multiple:b.multiple,accept:b.accept,maxSize:b.maxSize,title:b.title}),this.file.on(BI.File.EVENT_CHANGE,function(){a.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments)}),this.file.on(BI.File.EVENT_ERROR,function(){a.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){a.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){a.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),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},render:function(){var a=this.options,b=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:10,top:4,bottom:8}]}),this.content.element.on("input propertychange",function(a){b._checkWaterMark(),b.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){b.isValid()&&(b._focus(),b.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),BI.Widget._renderEngine.createElement(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&(BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&this.setValue(a.value),BI.isNotNull(a.style)&&this.setStyle(a.style),this._checkWaterMark()},_checkWaterMark:function(){var a=this,b=this.options,c=this.getValue();BI.isNotEmptyString(c)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(b.watermark)&&(this.watermark?(this.watermark.setText(b.watermark),this.watermark.setValid(!b.invalid),this.watermark.setEnable(!b.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark cursor-default",textAlign:"left",height:20,text:b.watermark,invalid:b.invalid,disabled:b.disabled}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){a.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:4,top:4,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(a){this.content.element.val(a),this._checkWaterMark()},setStyle:function(a){this.style=a,this.element.css(a),this.content.element.css(BI.extend({},a,{color:a.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(a.backgroundColor)?BI.DOM.rgb2hex(a.backgroundColor):a.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(a){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)},_setEnable:function(a){BI.TextAreaEditor.superclass._setEnable.apply(this,[a]),this.content&&(this.content.element[0].disabled=!a)}}),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),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(b.text)?this.setText(b.text):BI.isKey(b.value)&&this.setText(b.value),b.highLight&&this.doHighLight()},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Html.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){BI.Html.superclass.setText.apply(this,arguments),this.options.text=a,this.text.element.html(a)}}),BI.shortcut("bi.html",BI.Html),BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"i",baseCls:(a.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),BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"iframe",baseCls:(a.baseCls||"")+" bi-iframe",src:"",name:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.frameborder="0",a.attributes.src=a.src,a.attributes.name=a.name,BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src},setName:function(a){this.options.name=a,this.element.attr("name",a)},getName:function(){return this.options.name}}),BI.shortcut("bi.iframe",BI.Iframe),BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"img",baseCls:(a.baseCls||"")+" bi-img display-block",src:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.src=a.src,BI.Img.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img),BI.ImageCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageCheckbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})}}),BI.ImageCheckbox.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_checkbox",BI.ImageCheckbox),BI.Checkbox=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-checkbox",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16},render:function(){var a=this,b=this.options;return{type:"bi.center_adapt",items:[{type:"bi.default",ref:function(b){a.checkbox=b},cls:"checkbox-content",width:b.iconWidth-2,height:b.iconHeight-2}]}},_setEnable:function(a){BI.Checkbox.superclass._setEnable.apply(this,arguments),a===!0?this.checkbox.element.removeClass("base-disabled disabled"):this.checkbox.element.addClass("base-disabled disabled")},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)},setSelected:function(a){BI.Checkbox.superclass.setSelected.apply(this,arguments),a?this.checkbox.element.addClass("bi-high-light-background"):this.checkbox.element.removeClass("bi-high-light-background")}}),BI.Checkbox.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox),function(document){var F=function(a){return function(b){var c=b.files||[b];return c.item||(c.item=a),c}}(function(a){return this[a]}),event={add:document.addEventListener?function(a,b,c){return a.addEventListener(b,c,!1),this}:function(a,b,c){return a.attachEvent("on"+b,c),this},del:document.removeEventListener?function(a,b,c){return a.removeEventListener(b,c,!1),this}:function(a,b,c){return a.detachEvent("on"+b,c),this},stop:function(a){return a?(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,a.preventDefault?a.preventDefault():a.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(a,b,c){return"--".concat(a,CRLF,'Content-Disposition: form-data; name="',b,'"; filename="',_global.encodeURIComponent(c.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,c.getAsBinary(),CRLF,"--",a,"--",CRLF)},isFunction=function(a){return"[object Function]"===toString.call(a)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(a,b,c,d){if(-1'),iframe=handler.iframe||(handler.iframe=document.createElement(''))}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(a){isFunction(handler.onerror)&&handler.onerror(rpe,a||_global.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loadedd.status||d.status>399)return BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void a.fireEvent(BI.File.EVENT_ERROR);var b=BI.some(c.attach_array,function(b,c){if(c.errorCode)return BI.Msg.toast(c.errorMsg,{level:"error"}),a.fireEvent(BI.File.EVENT_ERROR,c),!0});!b&&a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url,c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d0&&b.fireEvent(BI.File.EVENT_CHANGE,{files:a.files}),c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){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(a){this.wrap&&this.wrap.upload(a)},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(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?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||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=!1,c=null,d=!1,e=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),f=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){d=!1,b=e.ctrlKey||e.metaKey,c=e.keyCode,a.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(b){c=null,d&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,e(b.keyCode))}).on("input propertychange",function(b){var f=b.originalEvent;(BI.isNull(f.propertyName)||"value"===f.propertyName)&&(d=!0,a._keydown_=!0,e(c),c=null)}).click(function(a){a.stopPropagation(),f()}).mousedown(function(b){a.element.val(a.element.val())}).focus(function(b){a._focusDebounce()}).focusout(function(b){a._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(){function a(){if(b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()){var a=b._lastValidValue;b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM),b._lastValidValue!==a&&b.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){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)&&(this._pause!==!0||/(\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))),a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN);var c=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()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===c||""===BI.trim(c)||(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 a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastChangedValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(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(a){this.element.val(a),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(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),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),BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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),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 a=this,b=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(b){a.radio=b},width:b.iconWidth,height:b.iconHeight}]}},_setEnable:function(a){BI.Radio.superclass._setEnable.apply(this,arguments),a===!0?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(a){BI.Radio.superclass.setSelected.apply(this,arguments),a?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),BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(a){var b=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{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 a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();return b.textAlign="left",BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:"bi.center_adapt",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,maxWidth:"100%"}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(b,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var a=this.options,b="right"===a.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",c=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:b,height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(c)}]}):void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})),void("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}))):(c.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(c,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(c,{maxWidth:"100%"})),void BI.createWidget({type:b,element:this,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(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}}),BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var a=this.options;return{type:"bi.html",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel),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 a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.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),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),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 a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var a=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+a.level,text:a.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(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),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 a=this,b=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+b.level);var c=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:c,mousedown:c,mouseup:c,mouseover:c,mouseenter:c,mouseleave:c,mousemove:c});var d="close-font";switch(b.level){case"success":d="toast-success-font";break;case"error":d="toast-error-font";break;case"warning":d="toast-warning-font";break;case"normal":default:d="toast-message-font"}var e=[{type:"bi.icon_label",cls:d+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,textHeight:16,textAlign:"left"},rgap:b.autoClose?this._const.hgap:0}],f=[36,""];b.autoClose===!1&&(e.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){a.destroy()},width:36}),f.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:e,vgap:7,columnSize:f})},setText:function(a){this.text.setText(a)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:18})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,height:a.height,textHeight:a.height-2,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{value:e.value},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])},value:c.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},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(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),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(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;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;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(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=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("
  • ")},makeDOMNodeMainBefore:function(a,b,c){a.push("
  • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
      "),c.push(d),c.push("
    ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={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"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0};return d},getTreeCheckedNodes:function(a,b,c,d){if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f=a.check.chkboxType,g=""===f.Y&&""===f.N;fullStyle="",b.chkDisabled===!0?fullStyle=d.DISABLED:b.halfCheck?fullStyle=d.PART:a.check.chkStyle==e.STYLE?fullStyle=b.check_Child_State<1?d.FULL:d.PART:fullStyle=b[c]?2===b.check_Child_State||b.check_Child_State===-1||g?d.FULL:d.PART:b.check_Child_State<1||g?d.FULL:d.PART;var h=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+fullStyle;return h=b.check_Focus&&b.chkDisabled!==!0?h+"_"+d.FOCUS:h,t.className.BUTTON+" "+d.DEFAULT+" "+h},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconCls,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconCls!==a&&(this.element.removeClass(b.iconCls).addClass(a),b.iconCls=a)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=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:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:b.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(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),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 a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconCls,once:b.once,iconWrapperWidth:b.iconWrapperWidth,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},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),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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,title:a.title||a.text,warningTitle:a.warningTitle,py:a.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(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 a=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:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var c=BI.createWidget({type:"bi.icon_label",width:24,cls:b.iconCls,iconWidth:b.iconWidth,iconHeight:b.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},{width:24,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},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(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,cls:"bi-list-item-none",id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.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(a){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=a?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),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),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 a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:24,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},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},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),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 a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.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),BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:b.text,value:b.value,ref:function(){a.text=this}},left:b.lgap,right:b.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(a){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(a)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=BI.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=BI.Date._MD.slice(0);i[1]=BI.isLeapYear(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay();var j=(7-BI.StartOfWeek+e.FDay)%7;e.PDay=i[0===b?11:b-1]-j+1,e.NDay=1;var k=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=j&&a=0?c%12:(12+c%12)%12;return{year:BI.getDate().getFullYear()+d,month:e+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[],e=BI.parseDateTime(b.min,"%Y-%X-%d"),f=BI.parseDateTime(b.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var b={};BI.checkDateVoid(c+a,1,1,BI.print(BI.getDate(e.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(f.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(b.disabled=!0),b.text=c+a,d.push(b)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=BI.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=BI.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(a){var b=BI.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?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),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(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),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(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),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 a=this,b=this.options;this.editor=BI.createWidget(b.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.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(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:""})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:b.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(b){a.trigger=b},width:b.width,height:b.height},b.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(b){a.colorPicker=b},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){c(),a._isRGBColor(a.colorPicker.getValue())||a.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){c(),a.combo.hideView()}}]},b.popup),stopPropagation:!0,width:230},value:b.value});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var a=this,b=this.options;this.colorEditor=BI.createWidget(b.editor,{type:b.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:b.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a._dealStoreColors(),a.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:b.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:b.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:b.editor});var c=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:c}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),c.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a._dealStoreColors(),a.more.hideView(),a.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:!b.disabled,ref:function(){a.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_setEnable:function(a){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!a)},_dealStoreColors:function(){var a=this.getValue(),b=this._getStoreColors(),c=new BI.Queue(8);c.fromArray(b),c.remove(a),c.unshift(a);var d=c.toArray();BI.Cache.setItem("colors",BI.array2String(d)),this.setStoreColors(d)},_digestStoreColors:function(a){var b=BI.map(a,function(a,b){return{value:b}});return BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),b},_getStoreColors:function(){var a=this,b=this.options,c=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(c,function(c,d){return!b.simple||a._isRGBColor(d)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},setStoreColors:function(a){BI.isArray(a)&&this.storeColors.populate([this._digestStoreColors(a)])},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},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),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 a=this,b=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:b.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(a){this.popup.setStoreColors(a)},setValue:function(a){this.popup.setValue(a)},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),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:b.container,value:b.value,width:b.width,height:b.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_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 a=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:a,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var a=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(b){a.changeIcon=b},iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(b){a.label=b},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var b=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:b,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?(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"===a?(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":a}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),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:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{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 a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:b.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),d(a.storeValue.r)&&d(a.storeValue.g)&&d(a.storeValue.b)&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[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()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#ffffff"),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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()?(a.lastColor=a.getValue(),a.setValue("transparent")):("transparent"===a.lastColor&&(a.lastColor=""),a.setValue(a.lastColor||"#ffffff")),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){""===a?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===a?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":a}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(a){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){if("transparent"===a)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:""});a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.storeValue={r:BI.isNull(b.r)?"":b.r,g:BI.isNull(b.r)?"":b.g,b:BI.isNull(b.r)?"":b.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),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){this.colorShow.element.css({"background-color":a});var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.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),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 a=this;return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(b){a.colorWrapper=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(b){a.wheel=b}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(b){a.overlay=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.hMarker=b},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.slMarker=b},scrollable:!1,width:17,height:17}}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this.setValue(a.value)},_unpack:function(a){return 7===a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4===a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},_pack:function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},_setColor:function(a){var b=this._unpack(a);this.value!==a&&b&&(this.value=a,this.rgb=b,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(a){return this.hsl=a,this.rgb=this._HSLToRGB(a),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this._hueToRGB(b,c,d+.33333),this._hueToRGB(b,c,d),this._hueToRGB(b,c,d-.33333)]},_hueToRGB:function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},_RGBToHSL:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},_updateDisplay:function(){var a=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(a)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(a)*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(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var c=this._absolutePosition(a.offsetParent);b.x+=c.x,b.y+=c.y}return b},_widgetCoords:function(a){var b,c,d=a.target||a.srcElement,e=this.wheel.element[0];if("undefined"!=typeof a.offsetX){for(var f={x:a.offsetX,y:a.offsetY},g=d;g;)g.mouseX=f.x,g.mouseY=f.y,f.x+=g.offsetLeft,f.y+=g.offsetTop,g=g.offsetParent;for(var g=e,h={x:0,y:0};g;){if("undefined"!=typeof g.mouseX){b=g.mouseX-h.x,c=g.mouseY-h.y;break}h.x+=g.offsetLeft,h.y+=g.offsetTop,g=g.offsetParent}for(g=d;g;)g.mouseX=void 0,g.mouseY=void 0,g=g.offsetParent}else{var f=this._absolutePosition(e);b=(a.pageX||0)-f.x,c=(a.pageY||0)-f.y}return{x:b-this.constants.WIDTH/2,y:c-this.constants.WIDTH/2}},_doMouseMove:function(a){var b=this._widgetCoords(a);if(this.circleDrag){var c=Math.atan2(b.x,-b.y)/6.28;c<0&&(c+=1),this._setHSL([c,this.hsl[1],this.hsl[2]])}else{var d=Math.max(0,Math.min(1,-(b.x/this.constants.SQUARE)+.5)),e=Math.max(0,Math.min(1,-(b.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],d,e])}},doClick:function(a){var b=this._widgetCoords(a);return this.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>this.constants.SQUARE,this._doMouseMove(a),!1},setValue:function(a){this._setColor(a)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,container:b.container,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.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),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.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 a=this.options,b=this,c=[];return BI.each(a.buttons,function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:24,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:c}]})},_createView:function(){var a=this.options,b=BI.createWidget({type:"bi.button_group",items:[a.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return b.element.css("min-height",a.minHeight-44),b}}),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,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var a=this,b=this.options,c=BI.map(b.buttons,function(b,c){return BI.isWidget(c)?c:BI.extend({type:"bi.button",height:24,handler:function(b){a.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,b)}},c)});return{type:"bi.bubble_bar_popup_view",ref:function(){a.popup=this},el:{type:"bi.label",text:b.text,whiteSpace:"normal",textAlign:"left",ref:function(){a.text=this}},buttons:c}},populate:function(a){this.text.setText(a||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,value:b.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),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 a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconCls:b.iconCls,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,value:b.value}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),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 a=this.options,b="";BI.isKey(a.value)&&(b=this._digest(a.value,a.items)),this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b,disableSelected:!0,width:a.isShowDown?a.width-12:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight,selected:BI.isNotEmptyString(b)}),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(b)}),this.down.setVisible(a.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(a,b){var c="";return a=BI.isArray(a)?a[0]:a,BI.any(b,function(b,d){if(a===d.value)return c=d.iconCls,!0}),c},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c=this._digest(a,this.options.items);a=BI.isArray(a)?a[0]:a,BI.isNotEmptyString(c)?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:b.items,height:b.height,text:b.text,iconCls:b.iconCls,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth,title:b.title,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this.setValue(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:a.behaviors,value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a,b){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var c=this.options;a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:c.iconWrapperWidth,iconHeight:c.iconHeight,iconWidth:c.iconWidth}),this.popup.populate(a,b)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),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 a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,adjustLength:2,toggle:!1,ref:function(){a.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){a.trigger=this},items:b.items,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:b.value,items:b.items,ref:function(){a.popup=this,a.trigger.getSearcher().setAdapter(a.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:252},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){a.triggerBtn=this},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this._checkError(a.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.options.items=a,this.combo.populate(a)},setValue:function(a){this.combo.setValue(a),this._checkError(a)},getValue:function(){var a=this.combo.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo),BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var a=this,b=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){a.popup=this},items:BI.createItems(b.items,{type:"bi.single_select_item",textAlign:b.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,c,d)}}]}]}},mounted:function(){this.check()},populate:function(a,b,c){var d=BI.concat(a,b);BI.SearchTextValueComboPopup.superclass.populate.apply(this,d),d=BI.createItems(d,{type:"bi.single_select_item",height:24}),this.popup.populate(d,c)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup),BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value,b.items),value:b.value,height:b.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(a,c){var d=a.keyword,e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g,f)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(a){this.editor.setState(a)},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this._setState(this._digest(a,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),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,value:b.value,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this._checkError(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a), +this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),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 a=this,b=this.options;this._createValueMap();var c;BI.isNotNull(b.value)&&(c=this._digest(b.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:b.height,items:b.items,text:b.text,value:c}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,value:BI.isNull(c)?[]:[c],items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var b=a.combo.getValue()[0].value;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var b=a.combo.getValue()[0].childValue;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},_digest:function(a){return this.value=a,this.valueMap[a]},setValue:function(a){a=this._digest(a),this.combo.setValue([a]),this.trigger.setValue(a)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text,value:BI.isNull(a.value)?"":a.value.childValue||a.value.value})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a.childValue||a.value)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker,value:b.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(b.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:b.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]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.text.setStyle(a)},setValue:function(a){var b=this.options;this.editor.setValue(a),this._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(a.keyword)&&this.text.doRedMark(a.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text tip-text-style",textAlign:"left",height:b.height,text:b.text,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")},title:BI.isNotNull(b.tipText)?b.tipText:function(){var b="";return BI.isString(a.stateValue)&&(b=a.stateValue),BI.isArray(a.stateValue)&&1===a.stateValue.length&&(b=a.stateValue[0]),b},warningTitle:b.warningTitle,tipType:b.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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.options.disabled===!1&&(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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=a,BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text"))))},setTipType:function(a){this.text.options.tipType=a}}),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),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text",textAlign:"left",text:b.text,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")), +this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),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),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(c,{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(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.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:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded(),a.check()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.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(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{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(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 a=this,b=this.options;return[{type:"bi.label",text:b.text,height:b.height,value:b.value,hgap:b.hgap,ref:function(){a.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){a.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(a){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),a?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var a=this,b=this.options;return{type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.linear_segment_button",height:b.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){a.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.buttonGroup=this}}},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),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 a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(b.value)&&this.setValue(b.value)},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.allSelected=!!a,this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{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(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"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(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),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:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1),this.setPagerVisible(a>1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate(),this.setPagerVisible(this.options.pages>1)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),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 a=this.options;a.vertical,a.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 a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev column-pre-page-h-font"},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 direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev row-pre-page-h-font"},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 direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},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(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[86,110,0,24],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),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),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 a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:a.height,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:b.value,items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},_setEnable:function(a){BI.Segment.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(a){return a.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.selected===!0,d=!b.selected&&b.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())},selected:c,invisible:d}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)},invisible:c||!d}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:b.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(a){this.checkbox.setSelected(!!a)},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this.halfSelected=!!a,a===!0?(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(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(b),!b&&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),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(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};BI.isKey(f.id)||(f.id=BI.UUID()),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.mid_plus_group_node",e===a.length-1&&(g.type="bi.last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a,b){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a,b)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),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(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),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(){function a(a,b){return!1}function b(a,b){return b.isLeaf?{}:{color:"#999999"}}var c={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:b},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return c},_dealWidthNodes:function(a){a=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),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 a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate(),BI.isNotNull(b.value)&&this.setValue(b.value)},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},_digest:function(a){a||(a=[]);var b=this,c={},d=[];return BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),BI.makeObject(a.concat(d))},setValue:function(a){this.tree.setValue(this._digest(a))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,title:function(){return a.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:b.triggerWidth||b.height},width:b.triggerWidth||b.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:24})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(b){a.wrapper=b},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.iconWrapperWidth||b.height},{el:this.text,lgap:BI.isEmptyString(b.iconCls)?5:0},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a)},setIcon:function(a){var b=this.options;this.icon.setIcon(a);var c=this.wrapper.attr("items")[0],d=this.wrapper.attr("items")[1];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,d.lgap=5,this.wrapper.resize()):c.width!==(b.iconWrapperWidth||b.height)&&(c.width=b.iconWrapperWidth||b.height,d.lgap=0,this.wrapper.resize())},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),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 a=this.options,b=this._digist(a.value,a.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:b.text,iconCls:b.iconCls,height:a.height,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth})},_digist:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d,e=BI.Tree.transformToArrayFormat(b);return BI.any(e,function(b,c){if(BI.deepContains(a,c.value))return d={text:c.text||c.value,iconCls:c.iconCls},!0}),BI.isNotNull(d)?{text:d.text,iconCls:d.iconCls}:{text:c.text,iconCls:c.iconCls}},setValue:function(a){var b=this._digist(a,this.options.items);this.trigger.setText(b.text),this.trigger.setIcon(b.iconCls)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text,title:function(){return a.text.getText()},tipType:b.tipType,warningTitle:b.warningTitle,hgap:c.hgap,readonly:b.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setText:function(a){this.text.setText(a)},setTipType:function(a){this.text.options.tipType=a}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),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 a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height,readonly:a.readonly,text:this._digest(a.value,a.items),tipType:a.tipType,warningTitle:a.warningTitle})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},setTipType:function(a){this.trigger.setTipType(a)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),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 a=this.options,b=this._digest(a.text,a.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2,text:b.text,cls:b.cls})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?{cls:"",text:d.join(",")}:{cls:"bi-water-mark",text:c.text}},setValue:function(a){var b=this._digest(a,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(b.cls),this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:a.triggerWidth||a.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:a.triggerWidth||a.height}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:b.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(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:b.behaviors,min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=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===a._month?a.setValue({year:a.year.getValue()-1,month:12}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._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===a._month?a.setValue({year:a.year.getValue()+1,month:1}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:b.behaviors,min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:b.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.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 a=this.options,b=!(1===this._month&&this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(12===this._month&&this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=BI.parseInt(a.year),this._month=BI.parseInt(a.month),this.year.setValue(a.year),this.month.setValue(a.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),BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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(){a.setValue(a.year.getValue()-1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._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(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,behaviors:b.behaviors,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.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:{type:"bi.horizontal_float",width:50,items:[{el:this.year}]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:1});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.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(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.calendar,left:5,right:5},{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),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(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear();var c=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),d=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:[c,d]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();c.setEnable(!b.isFrontYear()),d.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;a=BI.parseInt(a);var c=BI.parseDateTime(b.min,"%Y-%X-%d"),d=BI.parseDateTime(b.max,"%Y-%X-%d");BI.checkDateVoid(a,1,1,BI.print(BI.getDate(c.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(d.getFullYear(),0,1),"%Y-%X-%d"))[0]?(a=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime={year:b.year,month:b.month},0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(b.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(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDatePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDatePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateCombo.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options,c=BI.getDate();this.storeValue=BI.isNotNull(b.value)?b.value:{year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:b.minDate,max:b.maxDate,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.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(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var d=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});d.on(BI.IconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()||a.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:d,top:0,right:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},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),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 a=this,b=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(){a.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(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.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(b){a.timeSelect=b}}]},height:50},{el:this.dateButton,height:30}]}),this.setValue(b.value)},setValue:function(a){var b,c=a;BI.isNull(c)?(b=BI.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}),this.timeSelect.setValue({hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()})):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.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),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text},{el:BI.createWidget(),width:a.height}]}),this.setValue(a.value)},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=BI.getDate(),b=BI.print(c,"%Y-%X-%d %H:%M:%S");else{var d=BI.getDate(c.year,c.month-1,c.day,c.hour,c.minute,c.second);b=BI.print(d,"%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.StaticDateTimePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime=BI.extend(a.selectedTime,{year:b.year,month:b.month,day:d}),0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.calendar.empty(),a.setValue(a.selectedTime),a.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(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.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(b.selectedTime)},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=BI.extend({},this.timeSelect.getValue(),a)},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){a=a||{},this._setDatePicker(a),this._setCalendar(a),this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_time_pane_card",BI.StaticDateTimePaneCard),BI.DynamicDateTimePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDateTimePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDateTimePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDateTimePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateTimePane.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateTimePane.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:b.stopPropagation,maxHeight:1e3,minWidth:140}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(a){this.downlistcombo.showView(a)},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},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),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 a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:a.value}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:36,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),BI.extend(a.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),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:36,disableSelected:!0,selected:this._digest(a.value)}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:24,forceNotSelected:!0});var c=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(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},_digest:function(a){var b=this.options;return a=BI.isArray(a)?a:[a],BI.any(a,function(a,c){return BI.contains(b.childValues,c)})},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(a){this.icon1.setSelected(this._digest(a))}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),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 a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options,c=this._createChildren(this.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!BI.contains(a.singleValues,d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.isDefaultInit=!0,c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5,maxHeight:378},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=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});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?1:0}},setValue:function(a){a=a||{},this.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT;var b=[],c=[];BI.isNotNull(a.year)&&(b.push(BI.DynamicDateCard.TYPE.YEAR),c.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))),BI.isNotNull(a.quarter)&&(b.push(BI.DynamicDateCard.TYPE.QUARTER),c.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))),BI.isNotNull(a.month)&&(b.push(BI.DynamicDateCard.TYPE.MONTH),c.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))),BI.isNotNull(a.week)&&(b.push(BI.DynamicDateCard.TYPE.WEEK),c.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,a.week))),BI.isNotNull(a.day)&&(b.push(BI.DynamicDateCard.TYPE.DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,a.day))),BI.isNotNull(a.workDay)&&(b.push(BI.DynamicDateCard.TYPE.WORK_DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,a.workDay))),this.checkgroup.setValue(b),this.workDayBox.setSelected(BI.isNotNull(a.workDay)),this.resultPane.populate(this._getParamJson(c,a.position))},getValue:function(){var a=this,b={},c=this.checkgroup.getValue(),d=this.resultPane.getAllButtons();if(0!==c.length&&BI.each(d,function(c,d){var e=d.getValue();switch(e.dateType){case BI.DynamicDateCard.TYPE.YEAR:b.year=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.QUARTER:b.quarter=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.MONTH:b.month=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.WEEK:b.week=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.DAY:b.day=0===e.offset?-e.value:e.value}BI.isNull(e.dateType)&&(b.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var e=d[0].getValue();b.workDay=0===e.offset?-e.value:e.value}return b}}),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}}),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 a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:b.minDate,max:b.maxDate,format:b.format,allowEdit:b.allowEdit,watermark:b.watermark,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.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:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},_defaultState:function(){},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(a){return BI.isNaturalNumber(a)},value:b.value,ref:function(){a.editor=this},errorText:function(a){return BI.isEmptyString(a)?BI.i18nText("BI-Basic_Please_Input_Content"):BI.i18nText("BI-Please_Input_Natural_Number")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:b.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(){a.offsetCombo=this},container:null,value:b.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var a="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:a=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:a=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:a=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:a=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:a=BI.i18nText("BI-Basic_Day");break;case BI.DynamicDateCard.TYPE.WORK_DAY:default:a=BI.i18nText("BI-Basic_Work_Day")}return a},setValue:function(a){a=a||{},a.value=a.value||0,a.offset=a.offset||0,this.editor.setValue(a.value),this.offsetCombo.setValue(a.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),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 a=this,b=this.options,c=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:c.buttonHeight-1,listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){a.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),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),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2]}}}a.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.getDate();e=BI.DynamicDateHelper.getCalculation(c);var f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[0,1,2],d=this._getFormatString().match(/%./g);BI.each(d,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":default:c[2]=a}});var e=BI.parseDateTime(a,this._getFormatString());BI.print(e,this._getFormatString())===a&&(a=BI.print(e,b.compareFormat),c=[0,1,2]);var f=a.match(/\d+/g),g=[];return BI.each(f,function(a){g[a]=f[c[a]]}),g.length===c.length&&2===g[0].length?BI.print(BI.parseDateTime(g.join("-"),b.compareFormat),b.compareFormat):g.join("-")},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,this._getFormatString()),this._const.compareFormat);return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,this._getFormatString()),c=BI.print(b,this._const.compareFormat);return b.getMonth()>=0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),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),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",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:b.minDate,max:b.maxDate,allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate(),hour:0,minute:0,second:0}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},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_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options,c=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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){a.timeSelect=this}},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a.timeSelect.setValue(),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();return{type:a,value:a===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), BI.DynamicDateTimeSelect=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-select"},render:function(){var a=this;return{type:"bi.center_adapt",items:[{type:"bi.vertical_adapt",items:[{el:{type:"bi.number_editor",ref:function(){a.hour=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<24},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkHour(b),this.setValue(a._formatValueToDoubleDigit(b)),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.HOUR);this.setValue(b)}}],width:60,height:24}},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.minute=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkMinute(b),this.setValue(a._formatValueToDoubleDigit(b),BI.DynamicDateTimeSelect.MINUTE),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.MINUTE);this.setValue(b)}}],width:60,height:24},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.second=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkSecond(b),this.setValue(a._formatValueToDoubleDigit(b)),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}}],width:60,height:24}]}]}},_checkBorder:function(a){a=a||{},this._checkHour(a.hour),this._checkMinute(a.minute),this._checkSecond(a.second)},_checkHour:function(a){this.hour.setDownEnable(BI.parseInt(a)>0),this.hour.setUpEnable(BI.parseInt(a)<23)},_checkMinute:function(a){this.minute.setDownEnable(BI.parseInt(a)>0),this.minute.setUpEnable(BI.parseInt(a)<59)},_checkSecond:function(a){this.second.setDownEnable(BI.parseInt(a)>0),this.second.setUpEnable(BI.parseInt(a)<59)},_autoSwitch:function(a,b){var c=0,d=a+"";switch(b){case BI.DynamicDateTimeSelect.HOUR:c=2;break;case BI.DynamicDateTimeSelect.MINUTE:c=5}if(1===d.length&&BI.parseInt(d)>c&&(d="0"+d),2===d.length)switch(b){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 d},_formatValueToDoubleDigit:function(a){(BI.isNull(a)||BI.isEmptyString(a))&&(a=0);var b=BI.parseInt(a);return b<10&&(b="0"+b),b},_assertValue:function(a){return a=a||{},a.hour=this._formatValueToDoubleDigit(a.hour)||"00",a.minute=this._formatValueToDoubleDigit(a.minute)||"00",a.second=this._formatValueToDoubleDigit(a.second)||"00",a},getValue:function(){return{hour:BI.parseInt(this.hour.getValue()),minute:BI.parseInt(this.minute.getValue()),second:BI.parseInt(this.second.getValue())}},setValue:function(a){a=this._assertValue(a),this.hour.setValue(a.hour),this.minute.setValue(a.minute),this.second.setValue(a.second),this._checkBorder(a)}}),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}),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2],hour:0|d[3],minute:0|d[4],second:0|d[5]}}}a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.DynamicDateHelper.getCalculation(c),f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[],d=!1,e=this._getFormatString().match(/%./g);BI.each(e,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":c[2]=a;break;case"%S":d=!0}});var f=BI.parseDateTime(a,this._getFormatString());BI.print(f,this._getFormatString())===a&&(a=BI.print(f,b.compareFormat),c=[0,1,2]);var g=a.match(/\d+/g),h=[];BI.each(g.slice(0,3),function(a){h[a]=g[c[a]]});var i=g.slice(3);BI.each(i,function(a,b){BI.isNumeric(b)&&1===b.length&&(i[a]="0"+b)}),2!==i.length||d||i.push("00");var j=i.join(":"),k=h.slice(0,3).join("-");return BI.isNotEmptyString(j)&&(k+=" "+j),k},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S"),"%Y-%x-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S"),"%Y-%x-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S"),"%Y-%X-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d"),c=BI.print(b,"%Y-%X-%d");return b.getMonth()>0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue},isValid:function(){return this.editor.isValid()}}),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),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,hgap:1,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"close-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CHANGE),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.icon_label",cls:"search-font"},width:24},{el:a.editor},{el:this.clear,width:24}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:20})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,title:b.title,tipType:b.tipType,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:20})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.IntervalSlider=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""},render:function(){var a=this,b=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:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=a.valueOne,c=BI.parseFloat(this.getValue());a.valueOne=c;var d=a._getPercentByValue(c),e=BI.parseFloat(d.toFixed(1));a._setSliderOnePosition(e),a._setBlueTrack(),a._checkLabelPosition(b,a.valueTwo,a.valueOne,a.valueTwo),a.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:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=a.valueTwo,c=BI.parseFloat(this.getValue());a.valueTwo=c;var d=a._getPercentByValue(c),e=BI.parseFloat(d.toFixed(1));a._setSliderTwoPosition(e),a._setBlueTrack(),a._checkLabelPosition(a.valueOne,b,a.valueOne,a.valueTwo),a.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:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]}},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit);var g=this.valueOne,h=this.valueTwo;b?(this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f,this._checkLabelPosition(g,h,f,this.valueTwo)):(this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f,this._checkLabelPosition(g,h,this.valueOne,f)),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=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:a.EDITOR_R_GAP,height:a.SLIDER_HEIGHT},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=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:a.SLIDER_WIDTH_HALF,height:a.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(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_checkLabelPosition:function(a,b,c,d,e){if(a=BI.parseFloat(a),b=BI.parseFloat(b),c=BI.parseFloat(c),d=BI.parseFloat(d),a<=b&&c>d||a>=b&&c-1){d=b.split("e");var e=BI.size(d[0].split(".")[1]),f=BI.parseInt(d[1].substring(1));return e-f}return d=b.split("."),d.length>1?d[1].length:0},_assertValue:function(a){return a<=this.min?this.min:a>=this.max?this.max:a},_setEnable:function(a){BI.IntervalSlider.superclass._setEnable.apply(this,[a]),a?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(a){var b=BI.parseFloat(a.min),c=BI.parseFloat(a.max);!isNaN(b)&&!isNaN(c)&&c>=b&&(this.min=b,this.max=c,this.valueOne=b,this.valueTwo=c,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),c===b&&this._setDraggableEnable(!1)},setValue:function(a){var b=this.options,c=BI.parseFloat(a.min),d=BI.parseFloat(a.max);c=b.digit===!1?c:c.toFixed(b.digit),d=b.digit===!1?d:d.toFixed(b.digit),isNaN(c)||isNaN(d)||(this._checkValidation(c)&&(this.valueOne=this.valueOne<=this.valueTwo?c:d),this._checkValidation(d)&&(this.valueTwo=this.valueOne<=this.valueTwo?d:c),cthis.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(){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(this.valueOne),this.labelTwo.setValue(this.valueTwo),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider),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(a){for(var b="1",c=0;c0)var d=b;else{var d=a;c=0-c}for(var e=0;e=b.numDecimal.length?a.numDecimal.length:b.numDecimal.length}function d(a,b){for(var c=b-a.length,d=0;d=BI.parseInt(f.numDecimal))var i=(BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h);else{g--;var k=this._getMagnitude(h),i=(k+BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h)}var l=g+"."+j;return BI.parseFloat(l)},_accurateAddition:function(a,b){function c(a,b){for(var c=b-a.length,d=0;db)var e=d.numInteger.slice(0,d.numInteger.length-b),f=d.numInteger.slice(-b);else var e="0",f=c(d.numInteger,b);var g=e+"."+f+d.numDecimal;return BI.parseFloat(g)},accurateSubtraction:function(a,b){return a>=0&&b>=0?a>=b?this._accurateSubtraction(a,b):-this._accurateSubtraction(b,a):a>=0&&b<0?this._accurateAddition(a,-b):a<0&&b>=0?-this._accurateAddition(-a,b):a<0&&b<0?a>=b?this._accurateSubtraction(-b,-a):this._accurateSubtraction(-a,-b):void 0},accurateAddition:function(a,b){return a>=0&&b>=0?this._accurateAddition(a,b):a>=0&&b<0?this.accurateSubtraction(a,-b):a<0&&b>=0?this.accurateSubtraction(b,-a):a<0&&b<0?-this._accurateAddition(-a,-b):void 0},accurateMultiplication:function(a,b){return a>=0&&b>=0?this._accurateMultiplication(a,b):a>=0&&b<0?-this._accurateMultiplication(a,-b):a<0&&b>=0?-this._accurateMultiplication(-a,b):a<0&&b<0?this._accurateMultiplication(-a,-b):void 0},accurateDivisionTenExponent:function(a,b){return a>=0?this._accurateDivisionTenExponent(a,b):-this._accurateDivisionTenExponent(-a,b)}}),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:24})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger",value:b.value}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM))}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),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 a=this,b=this.options,c=[1,7,2,8,3,9,4,10,5,11,6,12],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),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:b.value}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){a=BI.parseInt(a),this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:24})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(""),this.editor.setValue(""),void this.editor.setTitle(""))},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),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 a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.multi_layer_down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:b.stopPropagation,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(a){this.downlistcombo.showView(a)},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},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),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 a=BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options,c=this._createPopupItems(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])){d=a.childValueMap[b];var e=a.fatherValueMap[b],f=(e+"").split("_");a.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE,d,f.length>1?f:e)}else a.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE,d,c);if(!BI.contains(a.singleValues,d)){var g=a.getValue(),h=[];BI.each(g,function(a,b){b.value!=d&&h.push(b)}),a.setValue(h)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createPopupItems:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5},c.el.childValues=[],BI.each(c.children,function(a,d){d=d.el?BI.extend(d.el,{children:d.children}):d;var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value),BI.isNotEmptyArray(d.children)&&(d.type="bi.down_list_group_item",b._createChildren(d),d.height=b.constants.height,d.iconCls2=b.constants.nextIcon,c.el.childValues=BI.concat(c.el.childValues,d.childValues))})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=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});c.push(g)}}),c},_createChildren:function(a){var b=this;a.childValues=[],BI.each(a.children,function(c,d){var e=BI.deepClone(a.value),f=BI.deepClone(d.value);d.type="bi.down_list_item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),a.childValues.push(d.value)})},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a1?g:f}else e.value=d;b.push(e)}),b}}),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),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})},render:function(){var a=this,b=this.options,c=b.itemsCreator===BI.emptyFn?this._getSyncConfig():this._getAsyncConfig();return b.allowEdit||b.itemsCreator!==BI.emptyFn?{type:"bi.absolute",items:[{el:c,left:0,right:0,top:0,bottom:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(b){a.triggerBtn=b},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}:c},_getBaseConfig:function(){var a=this,b=this.options;return{type:"bi.combo",container:b.container,adjustLength:2,ref:function(b){a.combo=b},popup:{el:{type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,itemsCreator:b.itemsCreator,items:b.items,ref:function(b){a.trigger&&a.trigger.getSearcher().setAdapter(b)},listeners:[{eventName:BI.MultiLayerSelectTreePopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:400,minHeight:240}}},_getSyncConfig:function(){var a=this.options,b=this._getBaseConfig();return b.el={type:"bi.single_tree_trigger",text:a.text,height:a.height,items:a.items,value:a.value},b},_getAsyncConfig:function(){var a=this,b=this.options,c=this._getBaseConfig();return BI.extend(c,{el:{type:"bi.multilayer_select_tree_trigger",allowEdit:b.allowEdit,cls:"multilayer-select-tree-trigger",ref:function(b){a.trigger=b},items:b.items,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_FOCUS)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BLUR)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING,action:function(){a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING)}}]},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}}]})},setValue:function(a){a=BI.isArray(a)?a:[a],this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(a){this.combo.populate(a)}}),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.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),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 a=this.options;BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.storeValue=a.value,this.initTree(this.options.items),this.check()},_formatItems:function(a,b,c){var d=this,e=this.options,f=e.keywordGetter();return BI.each(a,function(e,g){var h={};g.layer=b,BI.isKey(g.id)||(g.id=BI.UUID()),g.keyword=g.keyword||f,h.pNode=c,g.isParent===!0||g.parent===!0||BI.isNotEmptyArray(g.children)?(h.type="bi.multilayer_select_tree_mid_plus_group_node",e===a.length-1&&(h.type="bi.multilayer_select_tree_last_plus_group_node",h.isLastNode=!0),0!==e||c||(h.type="bi.multilayer_select_tree_first_plus_group_node"),0!==e||e!==a.length-1||c||(h.type="bi.multilayer_select_tree_plus_group_node"),BI.defaults(g,h),d._formatItems(g.children,b+1,g)):(h.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==e||c||(h.type="bi.multilayer_single_tree_first_tree_leaf_item"),e===a.length-1&&(h.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(g,h))}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options,d=!1;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,e){1===a.times&&!a.node&&BI.nextTick(function(){b.loading()}),c.itemsCreator(a,function(c){d=c.hasNext,1===a.times&&!a.node&&b._populate(c.items),e(b._formatItems(BI.Tree.transformToTreeFormat(c.items),a.node?a.node.layer+1:0,a.node)),b.setValue(b.storeValue),1===a.times&&!a.node&&BI.nextTick(function(){b.loaded()})})},value:c.value,el:{type:"bi.loader",isDefaultInit:c.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:c.chooseType,behaviors:c.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return d}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&(b.setValue(c),b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:c.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(a){this._populate(a),BI.isNull(a)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.options.chooseType===BI.Selection.None||(this.storeValue=a,this.tree.setValue(a))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),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:""})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator,keywordGetter:b.keywordGetter,value:b.value,scrollable:null}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-multi-layer-select-tree-trigger bi-border bi-focus-shadow",height:24,valueFormatter:function(a){return a},itemsCreator:BI.emptyFn},render:function(){var a=this,b=this.options,c={type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value),value:b.value,height:b.height,tipText:"",listeners:[{eventName:BI.StateEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS)}},{eventName:BI.StateEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_BLUR)}},{eventName:BI.StateEditor.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING)}}]},popup:{type:"bi.multilayer_select_tree_popup",itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},keywordGetter:function(){return a.editor.getValue()},cls:"bi-card"},onSearch:function(a,c){var d=a.keyword;if(b.itemsCreator===BI.emptyFn){var e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g.concat(f))}else c()},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]};return b.allowEdit?c:{type:"bi.absolute",items:[{el:c,left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}},_digest:function(a){return this.options.valueFormatter(a)},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this.editor.setState(this._digest(a[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.shortcut("bi.multilayer_select_tree_trigger",BI.MultiLayerSelectTreeTrigger),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSelectTreePlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_plus_group_node",BI.MultiLayerSelectTreePlusGroupNode),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})},render:function(){ var a=this,b=this.options,c=b.itemsCreator===BI.emptyFn?this._getSyncConfig():this._getAsyncConfig();return b.allowEdit||b.itemsCreator!==BI.emptyFn?{type:"bi.absolute",items:[{el:c,left:0,right:0,top:0,bottom:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(b){a.triggerBtn=b},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}:c},_getBaseConfig:function(){var a=this,b=this.options;return{type:"bi.combo",container:b.container,adjustLength:2,ref:function(b){a.combo=b},popup:{el:{type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,itemsCreator:b.itemsCreator,items:b.items,ref:function(b){a.trigger&&a.trigger.getSearcher().setAdapter(b)},listeners:[{eventName:BI.MultiLayerSingleTreePopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:400,minHeight:240}}},_getSyncConfig:function(){var a=this.options,b=this._getBaseConfig();return b.el={type:"bi.single_tree_trigger",text:a.text,height:a.height,items:a.items,value:a.value},b},_getAsyncConfig:function(){var a=this,b=this.options,c=this._getBaseConfig();return BI.extend(c,{el:{type:"bi.multilayer_single_tree_trigger",allowEdit:b.allowEdit,cls:"multilayer-single-tree-trigger",ref:function(b){a.trigger=b},items:b.items,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_FOCUS)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BLUR)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING,action:function(){a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING)}}]},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}}]})},setValue:function(a){a=BI.isArray(a)?a:[a],this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(a){this.combo.populate(a)}}),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.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),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 a=this.options;BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.storeValue=a.value,this.initTree(this.options.items),this.check()},_formatItems:function(a,b,c){var d=this,e=this.options,f=e.keywordGetter();return BI.each(a,function(e,g){var h={};g.layer=b,BI.isKey(g.id)||(g.id=BI.UUID()),g.keyword=g.keyword||f,h.pNode=c,g.isParent===!0||g.parent===!0||BI.isNotEmptyArray(g.children)?(h.type="bi.multilayer_single_tree_mid_plus_group_node",e===a.length-1&&(h.type="bi.multilayer_single_tree_last_plus_group_node",h.isLastNode=!0),0!==e||c||(h.type="bi.multilayer_single_tree_first_plus_group_node"),0!==e||e!==a.length-1||c||(h.type="bi.multilayer_single_tree_plus_group_node"),BI.defaults(g,h),d._formatItems(g.children,b+1,g)):(h.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==e||c||(h.type="bi.multilayer_single_tree_first_tree_leaf_item"),e===a.length-1&&(h.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(g,h))}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options,d=!1;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,itemsCreator:function(a,e){1===a.times&&!a.node&&BI.nextTick(function(){b.loading()}),c.itemsCreator(a,function(c){d=c.hasNext,1===a.times&&!a.node&&b._populate(c.items),e(b._formatItems(BI.Tree.transformToTreeFormat(c.items),a.node?a.node.layer+1:0,a.node)),b.setValue(b.storeValue),1===a.times&&!a.node&&BI.nextTick(function(){b.loaded()})})},el:{type:"bi.loader",isDefaultInit:c.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:c.chooseType,behaviors:c.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return d}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&(b.setValue(c),b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:c.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(a){this._populate(a),BI.isNull(a)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.options.chooseType===BI.Selection.None||(this.storeValue=a,this.tree.setValue(a))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),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:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator,keywordGetter:b.keywordGetter,value:b.value,scrollable:null}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-multi-layer-single-tree-trigger bi-border bi-focus-shadow",height:24,valueFormatter:function(a){return a},itemsCreator:BI.emptyFn},render:function(){var a=this,b=this.options,c={type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value),value:b.value,height:b.height,tipText:"",listeners:[{eventName:BI.StateEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS)}},{eventName:BI.StateEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_BLUR)}},{eventName:BI.StateEditor.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING)}}]},popup:{type:"bi.multilayer_single_tree_popup",itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},keywordGetter:function(){return a.editor.getValue()},cls:"bi-card"},onSearch:function(a,c){var d=a.keyword;if(b.itemsCreator===BI.emptyFn){var e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g.concat(f))}else c()},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]};return b.allowEdit?c:{type:"bi.absolute",items:[{el:c,left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}},_digest:function(a){return this.options.valueFormatter(a)},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this.editor.setState(this._digest(a[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.shortcut("bi.multilayer_single_tree_trigger",BI.MultiLayerSingleTreeTrigger),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.node=this._createNode();for(var b=[],c=a.pNode;c;)c.isLastNode&&b.push(c.layer),c=c.pNode;var d=[];BI.count(0,a.layer,function(c){d.push({type:"bi.layout",cls:BI.contains(b,c)?"":"base-line-conn-background",width:12,height:a.height})}),d.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(a.layer,12),items:[d]})},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(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)},_createNode:function(){var a=this,b=this.options;return BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,isLastNode:b.isLastNode,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.node=this._createNode();for(var b=[],c=a.pNode;c;)c.isLastNode&&b.push(c.layer),c=c.pNode;var d=[];BI.count(0,a.layer,function(c){d.push({type:"bi.layout",cls:BI.contains(b,c)?"":"base-line-conn-background",width:12,height:a.height})}),d.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(a.layer,12),items:[d]})},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(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)},_createNode:function(){var a=this,b=this.options;return BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.node=this._createNode();for(var b=[],c=a.pNode;c;)c.isLastNode&&b.push(c.layer),c=c.pNode;var d=[];BI.count(0,a.layer,function(c){d.push({type:"bi.layout",cls:BI.contains(b,c)?"":"base-line-conn-background",width:12,height:a.height})}),d.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(a.layer,12),items:[d]})},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(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)},_createNode:function(){var a=this,b=this.options;return BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.node=this._createNode();for(var b=[],c=a.pNode;c;)c.isLastNode&&b.push(c.layer),c=c.pNode;var d=[];BI.count(0,a.layer,function(c){d.push({type:"bi.layout",cls:BI.contains(b,c)?"":"base-line-conn-background",width:12,height:a.height})}),d.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(a.layer,12),items:[d]})},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(a){BI.MultiLayerSingleTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)},_createNode:function(){var a=this,b=this.options;return BI.createWidget({type:"bi.plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,isLastNode:b.isLastNode,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_plus_group_node",BI.MultiLayerSingleTreePlusGroupNode),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),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 a=this,b=this.options;this.storeValue=b.value||{},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),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(){b.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(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),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 a=this,b=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(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{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(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),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 a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=b.value||{},this._assertValue(this.storeValue),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:b.allowEdit,height:b.height,text:b.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})},value:this.storeValue}),this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue(""),a.fireEvent(BI.MultiSelectCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())}),a.fireEvent(BI.MultiSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()}),a.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().updateSelectedValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()}),a.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&(d.storeValue.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,c.storeValue.assist&&c.storeValue.assist.push(g[b]),delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,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),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 diff --git a/dist/2.0/fineui.js b/dist/2.0/fineui.js index 04ed26473..77a474ac7 100644 --- a/dist/2.0/fineui.js +++ b/dist/2.0/fineui.js @@ -21674,8 +21674,10 @@ BI.prepares.push(function () { }; var addResizeListener = function (element, fn) { - if (attachEvent) element.attachEvent("onresize", fn); - else { + if (attachEvent) { + element.attachEvent("onresize", fn); + fn(); + } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; createStyles(); @@ -38479,14 +38481,15 @@ BI.Pane = BI.inherit(BI.Widget, { loading: function () { var self = this, o = this.options; + var isIE = BI.isIE(); var loadingAnimation = BI.createWidget({ type: "bi.horizontal", - cls: "bi-loading-widget" + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""), + cls: "bi-loading-widget" + (isIE ? " wave-loading hack" : ""), height: 30, width: 30, hgap: 5, vgap: 2.5, - items: [{ + items: isIE ? [] : [{ type: "bi.layout", cls: "animate-rect rect1", height: 25, @@ -48277,9 +48280,13 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/** handler.attach_array.push(attachO); } } catch (e) { - if (isFunction(handler.onerror)) {handler.onerror(rpe, event || _global.event);} + if (isFunction(handler.onerror)) { + handler.onerror(rpe, event || _global.event); + } + } + if (isFunction(handler.onload)) { + handler.onload(rpe, {responseText: responseText}); } - if (isFunction(handler.onload)) {handler.onload(rpe, {responseText: responseText});} }, target = ["AjaxUpload", (new Date).getTime(), String(Math.random()).substring(2)].join("_"); try { // IE < 8 does not accept enctype attribute ... @@ -48490,7 +48497,14 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/** self.fireEvent(BI.File.EVENT_ERROR); return; } - self.fireEvent(BI.File.EVENT_UPLOADED); + var error = BI.some(_wrap.attach_array, function (index, attach) { + if (attach.errorCode) { + BI.Msg.toast(attach.errorMsg, {level: "error"}); + self.fireEvent(BI.File.EVENT_ERROR, attach); + return true; + } + }); + !error && self.fireEvent(BI.File.EVENT_UPLOADED); // enable again the submit button/element }, 1000); }; @@ -48696,10 +48710,10 @@ BI.Input = BI.inherit(BI.Single, { // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓) var originalEvent = e.originalEvent; if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { - keyCode = null; inputEventValid = true; self._keydown_ = true; _keydown(keyCode); + keyCode = null; } }) .click(function (e) { @@ -48804,18 +48818,20 @@ BI.Input = BI.inherit(BI.Single, { } this.fireEvent(BI.Input.EVENT_KEY_DOWN); - if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) { + // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 + var lastValue = this._lastValue; + if(BI.trim(this.getValue()) !== BI.trim(this._lastValue || "")){ + this._valueChange(); + } + if (BI.isEndWithBlank(this.getValue())) { this._pause = true; this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this); this.fireEvent(BI.Input.EVENT_PAUSE); this._defaultState(); } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && - BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { + BI.trim(this.getValue()) === "" && (lastValue !== null && BI.trim(lastValue) !== "")) { this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); this.fireEvent(BI.Input.EVENT_STOP); - this._valueChange(); - } else { - this._valueChange(); } }, diff --git a/dist/2.0/fineui.min.js b/dist/2.0/fineui.min.js index 668f3da0f..69003c3c3 100644 --- a/dist/2.0/fineui.min.js +++ b/dist/2.0/fineui.min.js @@ -1,29 +1,29 @@ -/*! fineui 2019-07-12 17:17:35 */ +/*! fineui 2019-07-17 10:06:48 */ function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),function(){function a(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function b(a,b,c,d){for(var e=-1,f=null==a?0:a.length;++e-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0:return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){ var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["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"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||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(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJCZGJMZMGXMPRYXKJNYMSGMZJYMKMFXMLDTGFBHCJHKYLPFMDXLQJJSMTQGZSJLQDLDGJYCALCMZCSDJLLNXDJFFFFJCZFMZFFPFKHKGDPSXKTACJDHHZDDCRRCFQYJKQCCWJDXHWJLYLLZGCFCQDSMLZPBJJPLSBCJGGDCKKDEZSQCCKJGCGKDJTJDLZYCXKLQSCGJCLTFPCQCZGWPJDQYZJJBYJHSJDZWGFSJGZKQCCZLLPSPKJGQJHZZLJPLGJGJJTHJJYJZCZMLZLYQBGJWMLJKXZDZNJQSYZMLJLLJKYWXMKJLHSKJGBMCLYYMKXJQLBMLLKMDXXKWYXYSLMLPSJQQJQXYXFJTJDXMXXLLCXQBSYJBGWYMBGGBCYXPJYGPEPFGDJGBHBNSQJYZJKJKHXQFGQZKFHYGKHDKLLSDJQXPQYKYBNQSXQNSZSWHBSXWHXWBZZXDMNSJBSBKBBZKLYLXGWXDRWYQZMYWSJQLCJXXJXKJEQXSCYETLZHLYYYSDZPAQYZCMTLSHTZCFYZYXYLJSDCJQAGYSLCQLYYYSHMRQQKLDXZSCSSSYDYCJYSFSJBFRSSZQSBXXPXJYSDRCKGJLGDKZJZBDKTCSYQPYHSTCLDJDHMXMCGXYZHJDDTMHLTXZXYLYMOHYJCLTYFBQQXPFBDFHHTKSQHZYYWCNXXCRWHOWGYJLEGWDQCWGFJYCSNTMYTOLBYGWQWESJPWNMLRYDZSZTXYQPZGCWXHNGPYXSHMYQJXZTDPPBFYHZHTJYFDZWKGKZBLDNTSXHQEEGZZYLZMMZYJZGXZXKHKSTXNXXWYLYAPSTHXDWHZYMPXAGKYDXBHNHXKDPJNMYHYLPMGOCSLNZHKXXLPZZLBMLSFBHHGYGYYGGBHSCYAQTYWLXTZQCEZYDQDQMMHTKLLSZHLSJZWFYHQSWSCWLQAZYNYTLSXTHAZNKZZSZZLAXXZWWCTGQQTDDYZTCCHYQZFLXPSLZYGPZSZNGLNDQTBDLXGTCTAJDKYWNSYZLJHHZZCWNYYZYWMHYCHHYXHJKZWSXHZYXLYSKQYSPSLYZWMYPPKBYGLKZHTYXAXQSYSHXASMCHKDSCRSWJPWXSGZJLWWSCHSJHSQNHCSEGNDAQTBAALZZMSSTDQJCJKTSCJAXPLGGXHHGXXZCXPDMMHLDGTYBYSJMXHMRCPXXJZCKZXSHMLQXXTTHXWZFKHCCZDYTCJYXQHLXDHYPJQXYLSYYDZOZJNYXQEZYSQYAYXWYPDGXDDXSPPYZNDLTWRHXYDXZZJHTCXMCZLHPYYYYMHZLLHNXMYLLLMDCPPXHMXDKYCYRDLTXJCHHZZXZLCCLYLNZSHZJZZLNNRLWHYQSNJHXYNTTTKYJPYCHHYEGKCTTWLGQRLGGTGTYGYHPYHYLQYQGCWYQKPYYYTTTTLHYHLLTYTTSPLKYZXGZWGPYDSSZZDQXSKCQNMJJZZBXYQMJRTFFBTKHZKBXLJJKDXJTLBWFZPPTKQTZTGPDGNTPJYFALQMKGXBDCLZFHZCLLLLADPMXDJHLCCLGYHDZFGYDDGCYYFGYDXKSSEBDHYKDKDKHNAXXYBPBYYHXZQGAFFQYJXDMLJCSQZLLPCHBSXGJYNDYBYQSPZWJLZKSDDTACTBXZDYZYPJZQSJNKKTKNJDJGYYPGTLFYQKASDNTCYHBLWDZHBBYDWJRYGKZYHEYYFJMSDTYFZJJHGCXPLXHLDWXXJKYTCYKSSSMTWCTTQZLPBSZDZWZXGZAGYKTYWXLHLSPBCLLOQMMZSSLCMBJCSZZKYDCZJGQQDSMCYTZQQLWZQZXSSFPTTFQMDDZDSHDTDWFHTDYZJYQJQKYPBDJYYXTLJHDRQXXXHAYDHRJLKLYTWHLLRLLRCXYLBWSRSZZSYMKZZHHKYHXKSMDSYDYCJPBZBSQLFCXXXNXKXWYWSDZYQOGGQMMYHCDZTTFJYYBGSTTTYBYKJDHKYXBELHTYPJQNFXFDYKZHQKZBYJTZBXHFDXKDASWTAWAJLDYJSFHBLDNNTNQJTJNCHXFJSRFWHZFMDRYJYJWZPDJKZYJYMPCYZNYNXFBYTFYFWYGDBNZZZDNYTXZEMMQBSQEHXFZMBMFLZZSRXYMJGSXWZJSPRYDJSJGXHJJGLJJYNZZJXHGXKYMLPYYYCXYTWQZSWHWLYRJLPXSLSXMFSWWKLCTNXNYNPSJSZHDZEPTXMYYWXYYSYWLXJQZQXZDCLEEELMCPJPCLWBXSQHFWWTFFJTNQJHJQDXHWLBYZNFJLALKYYJLDXHHYCSTYYWNRJYXYWTRMDRQHWQCMFJDYZMHMYYXJWMYZQZXTLMRSPWWCHAQBXYGZYPXYYRRCLMPYMGKSJSZYSRMYJSNXTPLNBAPPYPYLXYYZKYNLDZYJZCZNNLMZHHARQMPGWQTZMXXMLLHGDZXYHXKYXYCJMFFYYHJFSBSSQLXXNDYCANNMTCJCYPRRNYTYQNYYMBMSXNDLYLYSLJRLXYSXQMLLYZLZJJJKYZZCSFBZXXMSTBJGNXYZHLXNMCWSCYZYFZLXBRNNNYLBNRTGZQYSATSWRYHYJZMZDHZGZDWYBSSCSKXSYHYTXXGCQGXZZSHYXJSCRHMKKBXCZJYJYMKQHZJFNBHMQHYSNJNZYBKNQMCLGQHWLZNZSWXKHLJHYYBQLBFCDSXDLDSPFZPSKJYZWZXZDDXJSMMEGJSCSSMGCLXXKYYYLNYPWWWGYDKZJGGGZGGSYCKNJWNJPCXBJJTQTJWDSSPJXZXNZXUMELPXFSXTLLXCLJXJJLJZXCTPSWXLYDHLYQRWHSYCSQYYBYAYWJJJQFWQCQQCJQGXALDBZZYJGKGXPLTZYFXJLTPADKYQHPMATLCPDCKBMTXYBHKLENXDLEEGQDYMSAWHZMLJTWYGXLYQZLJEEYYBQQFFNLYXRDSCTGJGXYYNKLLYQKCCTLHJLQMKKZGCYYGLLLJDZGYDHZWXPYSJBZKDZGYZZHYWYFQYTYZSZYEZZLYMHJJHTSMQWYZLKYYWZCSRKQYTLTDXWCTYJKLWSQZWBDCQYNCJSRSZJLKCDCDTLZZZACQQZZDDXYPLXZBQJYLZLLLQDDZQJYJYJZYXNYYYNYJXKXDAZWYRDLJYYYRJLXLLDYXJCYWYWNQCCLDDNYYYNYCKCZHXXCCLGZQJGKWPPCQQJYSBZZXYJSQPXJPZBSBDSFNSFPZXHDWZTDWPPTFLZZBZDMYYPQJRSDZSQZSQXBDGCPZSWDWCSQZGMDHZXMWWFYBPDGPHTMJTHZSMMBGZMBZJCFZWFZBBZMQCFMBDMCJXLGPNJBBXGYHYYJGPTZGZMQBQTCGYXJXLWZKYDPDYMGCFTPFXYZTZXDZXTGKMTYBBCLBJASKYTSSQYYMSZXFJEWLXLLSZBQJJJAKLYLXLYCCTSXMCWFKKKBSXLLLLJYXTYLTJYYTDPJHNHNNKBYQNFQYYZBYYESSESSGDYHFHWTCJBSDZZTFDMXHCNJZYMQWSRYJDZJQPDQBBSTJGGFBKJBXTGQHNGWJXJGDLLTHZHHYYYYYYSXWTYYYCCBDBPYPZYCCZYJPZYWCBDLFWZCWJDXXHYHLHWZZXJTCZLCDPXUJCZZZLYXJJTXPHFXWPYWXZPTDZZBDZCYHJHMLXBQXSBYLRDTGJRRCTTTHYTCZWMXFYTWWZCWJWXJYWCSKYBZSCCTZQNHXNWXXKHKFHTSWOCCJYBCMPZZYKBNNZPBZHHZDLSYDDYTYFJPXYNGFXBYQXCBHXCPSXTYZDMKYSNXSXLHKMZXLYHDHKWHXXSSKQYHHCJYXGLHZXCSNHEKDTGZXQYPKDHEXTYKCNYMYYYPKQYYYKXZLTHJQTBYQHXBMYHSQCKWWYLLHCYYLNNEQXQWMCFBDCCMLJGGXDQKTLXKGNQCDGZJWYJJLYHHQTTTNWCHMXCXWHWSZJYDJCCDBQCDGDNYXZTHCQRXCBHZTQCBXWGQWYYBXHMBYMYQTYEXMQKYAQYRGYZSLFYKKQHYSSQYSHJGJCNXKZYCXSBXYXHYYLSTYCXQTHYSMGSCPMMGCCCCCMTZTASMGQZJHKLOSQYLSWTMXSYQKDZLJQQYPLSYCZTCQQPBBQJZCLPKHQZYYXXDTDDTSJCXFFLLCHQXMJLWCJCXTSPYCXNDTJSHJWXDQQJSKXYAMYLSJHMLALYKXCYYDMNMDQMXMCZNNCYBZKKYFLMCHCMLHXRCJJHSYLNMTJZGZGYWJXSRXCWJGJQHQZDQJDCJJZKJKGDZQGJJYJYLXZXXCDQHHHEYTMHLFSBDJSYYSHFYSTCZQLPBDRFRZTZYKYWHSZYQKWDQZRKMSYNBCRXQBJYFAZPZZEDZCJYWBCJWHYJBQSZYWRYSZPTDKZPFPBNZTKLQYHBBZPNPPTYZZYBQNYDCPJMMCYCQMCYFZZDCMNLFPBPLNGQJTBTTNJZPZBBZNJKLJQYLNBZQHKSJZNGGQSZZKYXSHPZSNBCGZKDDZQANZHJKDRTLZLSWJLJZLYWTJNDJZJHXYAYNCBGTZCSSQMNJPJYTYSWXZFKWJQTKHTZPLBHSNJZSYZBWZZZZLSYLSBJHDWWQPSLMMFBJDWAQYZTCJTBNNWZXQXCDSLQGDSDPDZHJTQQPSWLYYJZLGYXYZLCTCBJTKTYCZJTQKBSJLGMGZDMCSGPYNJZYQYYKNXRPWSZXMTNCSZZYXYBYHYZAXYWQCJTLLCKJJTJHGDXDXYQYZZBYWDLWQCGLZGJGQRQZCZSSBCRPCSKYDZNXJSQGXSSJMYDNSTZTPBDLTKZWXQWQTZEXNQCZGWEZKSSBYBRTSSSLCCGBPSZQSZLCCGLLLZXHZQTHCZMQGYZQZNMCOCSZJMMZSQPJYGQLJYJPPLDXRGZYXCCSXHSHGTZNLZWZKJCXTCFCJXLBMQBCZZWPQDNHXLJCTHYZLGYLNLSZZPCXDSCQQHJQKSXZPBAJYEMSMJTZDXLCJYRYYNWJBNGZZTMJXLTBSLYRZPYLSSCNXPHLLHYLLQQZQLXYMRSYCXZLMMCZLTZSDWTJJLLNZGGQXPFSKYGYGHBFZPDKMWGHCXMSGDXJMCJZDYCABXJDLNBCDQYGSKYDQTXDJJYXMSZQAZDZFSLQXYJSJZYLBTXXWXQQZBJZUFBBLYLWDSLJHXJYZJWTDJCZFQZQZZDZSXZZQLZCDZFJHYSPYMPQZMLPPLFFXJJNZZYLSJEYQZFPFZKSYWJJJHRDJZZXTXXGLGHYDXCSKYSWMMZCWYBAZBJKSHFHJCXMHFQHYXXYZFTSJYZFXYXPZLCHMZMBXHZZSXYFYMNCWDABAZLXKTCSHHXKXJJZJSTHYGXSXYYHHHJWXKZXSSBZZWHHHCWTZZZPJXSNXQQJGZYZYWLLCWXZFXXYXYHXMKYYSWSQMNLNAYCYSPMJKHWCQHYLAJJMZXHMMCNZHBHXCLXTJPLTXYJHDYYLTTXFSZHYXXSJBJYAYRSMXYPLCKDUYHLXRLNLLSTYZYYQYGYHHSCCSMZCTZQXKYQFPYYRPFFLKQUNTSZLLZMWWTCQQYZWTLLMLMPWMBZSSTZRBPDDTLQJJBXZCSRZQQYGWCSXFWZLXCCRSZDZMCYGGDZQSGTJSWLJMYMMZYHFBJDGYXCCPSHXNZCSBSJYJGJMPPWAFFYFNXHYZXZYLREMZGZCYZSSZDLLJCSQFNXZKPTXZGXJJGFMYYYSNBTYLBNLHPFZDCYFBMGQRRSSSZXYSGTZRNYDZZCDGPJAFJFZKNZBLCZSZPSGCYCJSZLMLRSZBZZLDLSLLYSXSQZQLYXZLSKKBRXBRBZCYCXZZZEEYFGKLZLYYHGZSGZLFJHGTGWKRAAJYZKZQTSSHJJXDCYZUYJLZYRZDQQHGJZXSSZBYKJPBFRTJXLLFQWJHYLQTYMBLPZDXTZYGBDHZZRBGXHWNJTJXLKSCFSMWLSDQYSJTXKZSCFWJLBXFTZLLJZLLQBLSQMQQCGCZFPBPHZCZJLPYYGGDTGWDCFCZQYYYQYSSCLXZSKLZZZGFFCQNWGLHQYZJJCZLQZZYJPJZZBPDCCMHJGXDQDGDLZQMFGPSYTSDYFWWDJZJYSXYYCZCYHZWPBYKXRYLYBHKJKSFXTZJMMCKHLLTNYYMSYXYZPYJQYCSYCWMTJJKQYRHLLQXPSGTLYYCLJSCPXJYZFNMLRGJJTYZBXYZMSJYJHHFZQMSYXRSZCWTLRTQZSSTKXGQKGSPTGCZNJSJCQCXHMXGGZTQYDJKZDLBZSXJLHYQGGGTHQSZPYHJHHGYYGKGGCWJZZYLCZLXQSFTGZSLLLMLJSKCTBLLZZSZMMNYTPZSXQHJCJYQXYZXZQZCPSHKZZYSXCDFGMWQRLLQXRFZTLYSTCTMJCXJJXHJNXTNRZTZFQYHQGLLGCXSZSJDJLJCYDSJTLNYXHSZXCGJZYQPYLFHDJSBPCCZHJJJQZJQDYBSSLLCMYTTMQTBHJQNNYGKYRQYQMZGCJKPDCGMYZHQLLSLLCLMHOLZGDYYFZSLJCQZLYLZQJESHNYLLJXGJXLYSYYYXNBZLJSSZCQQCJYLLZLTJYLLZLLBNYLGQCHXYYXOXCXQKYJXXXYKLXSXXYQXCYKQXQCSGYXXYQXYGYTQOHXHXPYXXXULCYEYCHZZCBWQBBWJQZSCSZSSLZYLKDESJZWMYMCYTSDSXXSCJPQQSQYLYYZYCMDJDZYWCBTJSYDJKCYDDJLBDJJSODZYSYXQQYXDHHGQQYQHDYXWGMMMAJDYBBBPPBCMUUPLJZSMTXERXJMHQNUTPJDCBSSMSSSTKJTSSMMTRCPLZSZMLQDSDMJMQPNQDXCFYNBFSDQXYXHYAYKQYDDLQYYYSSZBYDSLNTFQTZQPZMCHDHCZCWFDXTMYQSPHQYYXSRGJCWTJTZZQMGWJJTJHTQJBBHWZPXXHYQFXXQYWYYHYSCDYDHHQMNMTMWCPBSZPPZZGLMZFOLLCFWHMMSJZTTDHZZYFFYTZZGZYSKYJXQYJZQBHMBZZLYGHGFMSHPZFZSNCLPBQSNJXZSLXXFPMTYJYGBXLLDLXPZJYZJYHHZCYWHJYLSJEXFSZZYWXKZJLUYDTMLYMQJPWXYHXSKTQJEZRPXXZHHMHWQPWQLYJJQJJZSZCPHJLCHHNXJLQWZJHBMZYXBDHHYPZLHLHLGFWLCHYYTLHJXCJMSCPXSTKPNHQXSRTYXXTESYJCTLSSLSTDLLLWWYHDHRJZSFGXTSYCZYNYHTDHWJSLHTZDQDJZXXQHGYLTZPHCSQFCLNJTCLZPFSTPDYNYLGMJLLYCQHYSSHCHYLHQYQTMZYPBYWRFQYKQSYSLZDQJMPXYYSSRHZJNYWTQDFZBWWTWWRXCWHGYHXMKMYYYQMSMZHNGCEPMLQQMTCWCTMMPXJPJJHFXYYZSXZHTYBMSTSYJTTQQQYYLHYNPYQZLCYZHZWSMYLKFJXLWGXYPJYTYSYXYMZCKTTWLKSMZSYLMPWLZWXWQZSSAQSYXYRHSSNTSRAPXCPWCMGDXHXZDZYFJHGZTTSBJHGYZSZYSMYCLLLXBTYXHBBZJKSSDMALXHYCFYGMQYPJYCQXJLLLJGSLZGQLYCJCCZOTYXMTMTTLLWTGPXYMZMKLPSZZZXHKQYSXCTYJZYHXSHYXZKXLZWPSQPYHJWPJPWXQQYLXSDHMRSLZZYZWTTCYXYSZZSHBSCCSTPLWSSCJCHNLCGCHSSPHYLHFHHXJSXYLLNYLSZDHZXYLSXLWZYKCLDYAXZCMDDYSPJTQJZLNWQPSSSWCTSTSZLBLNXSMNYYMJQBQHRZWTYYDCHQLXKPZWBGQYBKFCMZWPZLLYYLSZYDWHXPSBCMLJBSCGBHXLQHYRLJXYSWXWXZSLDFHLSLYNJLZYFLYJYCDRJLFSYZFSLLCQYQFGJYHYXZLYLMSTDJCYHBZLLNWLXXYGYYHSMGDHXXHHLZZJZXCZZZCYQZFNGWPYLCPKPYYPMCLQKDGXZGGWQBDXZZKZFBXXLZXJTPJPTTBYTSZZDWSLCHZHSLTYXHQLHYXXXYYZYSWTXZKHLXZXZPYHGCHKCFSYHUTJRLXFJXPTZTWHPLYXFCRHXSHXKYXXYHZQDXQWULHYHMJTBFLKHTXCWHJFWJCFPQRYQXCYYYQYGRPYWSGSUNGWCHKZDXYFLXXHJJBYZWTSXXNCYJJYMSWZJQRMHXZWFQSYLZJZGBHYNSLBGTTCSYBYXXWXYHXYYXNSQYXMQYWRGYQLXBBZLJSYLPSYTJZYHYZAWLRORJMKSCZJXXXYXCHDYXRYXXJDTSQFXLYLTSFFYXLMTYJMJUYYYXLTZCSXQZQHZXLYYXZHDNBRXXXJCTYHLBRLMBRLLAXKYLLLJLYXXLYCRYLCJTGJCMTLZLLCYZZPZPCYAWHJJFYBDYYZSMPCKZDQYQPBPCJPDCYZMDPBCYYDYCNNPLMTMLRMFMMGWYZBSJGYGSMZQQQZTXMKQWGXLLPJGZBQCDJJJFPKJKCXBLJMSWMDTQJXLDLPPBXCWRCQFBFQJCZAHZGMYKPHYYHZYKNDKZMBPJYXPXYHLFPNYYGXJDBKXNXHJMZJXSTRSTLDXSKZYSYBZXJLXYSLBZYSLHXJPFXPQNBYLLJQKYGZMCYZZYMCCSLCLHZFWFWYXZMWSXTYNXJHPYYMCYSPMHYSMYDYSHQYZCHMJJMZCAAGCFJBBHPLYZYLXXSDJGXDHKXXTXXNBHRMLYJSLTXMRHNLXQJXYZLLYSWQGDLBJHDCGJYQYCMHWFMJYBMBYJYJWYMDPWHXQLDYGPDFXXBCGJSPCKRSSYZJMSLBZZJFLJJJLGXZGYXYXLSZQYXBEXYXHGCXBPLDYHWETTWWCJMBTXCHXYQXLLXFLYXLLJLSSFWDPZSMYJCLMWYTCZPCHQEKCQBWLCQYDPLQPPQZQFJQDJHYMMCXTXDRMJWRHXCJZYLQXDYYNHYYHRSLSRSYWWZJYMTLTLLGTQCJZYABTCKZCJYCCQLJZQXALMZYHYWLWDXZXQDLLQSHGPJFJLJHJABCQZDJGTKHSSTCYJLPSWZLXZXRWGLDLZRLZXTGSLLLLZLYXXWGDZYGBDPHZPBRLWSXQBPFDWOFMWHLYPCBJCCLDMBZPBZZLCYQXLDOMZBLZWPDWYYGDSTTHCSQSCCRSSSYSLFYBFNTYJSZDFNDPDHDZZMBBLSLCMYFFGTJJQWFTMTPJWFNLBZCMMJTGBDZLQLPYFHYYMJYLSDCHDZJWJCCTLJCLDTLJJCPDDSQDSSZYBNDBJLGGJZXSXNLYCYBJXQYCBYLZCFZPPGKCXZDZFZTJJFJSJXZBNZYJQTTYJYHTYCZHYMDJXTTMPXSPLZCDWSLSHXYPZGTFMLCJTYCBPMGDKWYCYZCDSZZYHFLYCTYGWHKJYYLSJCXGYWJCBLLCSNDDBTZBSCLYZCZZSSQDLLMQYYHFSLQLLXFTYHABXGWNYWYYPLLSDLDLLBJCYXJZMLHLJDXYYQYTDLLLBUGBFDFBBQJZZMDPJHGCLGMJJPGAEHHBWCQXAXHHHZCHXYPHJAXHLPHJPGPZJQCQZGJJZZUZDMQYYBZZPHYHYBWHAZYJHYKFGDPFQSDLZMLJXKXGALXZDAGLMDGXMWZQYXXDXXPFDMMSSYMPFMDMMKXKSYZYSHDZKXSYSMMZZZMSYDNZZCZXFPLSTMZDNMXCKJMZTYYMZMZZMSXHHDCZJEMXXKLJSTLWLSQLYJZLLZJSSDPPMHNLZJCZYHMXXHGZCJMDHXTKGRMXFWMCGMWKDTKSXQMMMFZZYDKMSCLCMPCGMHSPXQPZDSSLCXKYXTWLWJYAHZJGZQMCSNXYYMMPMLKJXMHLMLQMXCTKZMJQYSZJSYSZHSYJZJCDAJZYBSDQJZGWZQQXFKDMSDJLFWEHKZQKJPEYPZYSZCDWYJFFMZZYLTTDZZEFMZLBNPPLPLPEPSZALLTYLKCKQZKGENQLWAGYXYDPXLHSXQQWQCQXQCLHYXXMLYCCWLYMQYSKGCHLCJNSZKPYZKCQZQLJPDMDZHLASXLBYDWQLWDNBQCRYDDZTJYBKBWSZDXDTNPJDTCTQDFXQQMGNXECLTTBKPWSLCTYQLPWYZZKLPYGZCQQPLLKCCYLPQMZCZQCLJSLQZDJXLDDHPZQDLJJXZQDXYZQKZLJCYQDYJPPYPQYKJYRMPCBYMCXKLLZLLFQPYLLLMBSGLCYSSLRSYSQTMXYXZQZFDZUYSYZTFFMZZSMZQHZSSCCMLYXWTPZGXZJGZGSJSGKDDHTQGGZLLBJDZLCBCHYXYZHZFYWXYZYMSDBZZYJGTSMTFXQYXQSTDGSLNXDLRYZZLRYYLXQHTXSRTZNGZXBNQQZFMYKMZJBZYMKBPNLYZPBLMCNQYZZZSJZHJCTZKHYZZJRDYZHNPXGLFZTLKGJTCTSSYLLGZRZBBQZZKLPKLCZYSSUYXBJFPNJZZXCDWXZYJXZZDJJKGGRSRJKMSMZJLSJYWQSKYHQJSXPJZZZLSNSHRNYPZTWCHKLPSRZLZXYJQXQKYSJYCZTLQZYBBYBWZPQDWWYZCYTJCJXCKCWDKKZXSGKDZXWWYYJQYYTCYTDLLXWKCZKKLCCLZCQQDZLQLCSFQCHQHSFSMQZZLNBJJZBSJHTSZDYSJQJPDLZCDCWJKJZZLPYCGMZWDJJBSJQZSYZYHHXJPBJYDSSXDZNCGLQMBTSFSBPDZDLZNFGFJGFSMPXJQLMBLGQCYYXBQKDJJQYRFKZTJDHCZKLBSDZCFJTPLLJGXHYXZCSSZZXSTJYGKGCKGYOQXJPLZPBPGTGYJZGHZQZZLBJLSQFZGKQQJZGYCZBZQTLDXRJXBSXXPZXHYZYCLWDXJJHXMFDZPFZHQHQMQGKSLYHTYCGFRZGNQXCLPDLBZCSCZQLLJBLHBZCYPZZPPDYMZZSGYHCKCPZJGSLJLNSCDSLDLXBMSTLDDFJMKDJDHZLZXLSZQPQPGJLLYBDSZGQLBZLSLKYYHZTTNTJYQTZZPSZQZTLLJTYYLLQLLQYZQLBDZLSLYYZYMDFSZSNHLXZNCZQZPBWSKRFBSYZMTHBLGJPMCZZLSTLXSHTCSYZLZBLFEQHLXFLCJLYLJQCBZLZJHHSSTBRMHXZHJZCLXFNBGXGTQJCZTMSFZKJMSSNXLJKBHSJXNTNLZDNTLMSJXGZJYJCZXYJYJWRWWQNZTNFJSZPZSHZJFYRDJSFSZJZBJFZQZZHZLXFYSBZQLZSGYFTZDCSZXZJBQMSZKJRHYJZCKMJKHCHGTXKXQGLXPXFXTRTYLXJXHDTSJXHJZJXZWZLCQSBTXWXGXTXXHXFTSDKFJHZYJFJXRZSDLLLTQSQQZQWZXSYQTWGWBZCGZLLYZBCLMQQTZHZXZXLJFRMYZFLXYSQXXJKXRMQDZDMMYYBSQBHGZMWFWXGMXLZPYYTGZYCCDXYZXYWGSYJYZNBHPZJSQSYXSXRTFYZGRHZTXSZZTHCBFCLSYXZLZQMZLMPLMXZJXSFLBYZMYQHXJSXRXSQZZZSSLYFRCZJRCRXHHZXQYDYHXSJJHZCXZBTYNSYSXJBQLPXZQPYMLXZKYXLXCJLCYSXXZZLXDLLLJJYHZXGYJWKJRWYHCPSGNRZLFZWFZZNSXGXFLZSXZZZBFCSYJDBRJKRDHHGXJLJJTGXJXXSTJTJXLYXQFCSGSWMSBCTLQZZWLZZKXJMLTMJYHSDDBXGZHDLBMYJFRZFSGCLYJBPMLYSMSXLSZJQQHJZFXGFQFQBPXZGYYQXGZTCQWYLTLGWSGWHRLFSFGZJMGMGBGTJFSYZZGZYZAFLSSPMLPFLCWBJZCLJJMZLPJJLYMQDMYYYFBGYGYZMLYZDXQYXRQQQHSYYYQXYLJTYXFSFSLLGNQCYHYCWFHCCCFXPYLYPLLZYXXXXXKQHHXSHJZCFZSCZJXCPZWHHHHHAPYLQALPQAFYHXDYLUKMZQGGGDDESRNNZLTZGCHYPPYSQJJHCLLJTOLNJPZLJLHYMHEYDYDSQYCDDHGZUNDZCLZYZLLZNTNYZGSLHSLPJJBDGWXPCDUTJCKLKCLWKLLCASSTKZZDNQNTTLYYZSSYSSZZRYLJQKCQDHHCRXRZYDGRGCWCGZQFFFPPJFZYNAKRGYWYQPQXXFKJTSZZXSWZDDFBBXTBGTZKZNPZZPZXZPJSZBMQHKCYXYLDKLJNYPKYGHGDZJXXEAHPNZKZTZCMXCXMMJXNKSZQNMNLWBWWXJKYHCPSTMCSQTZJYXTPCTPDTNNPGLLLZSJLSPBLPLQHDTNJNLYYRSZFFJFQWDPHZDWMRZCCLODAXNSSNYZRESTYJWJYJDBCFXNMWTTBYLWSTSZGYBLJPXGLBOCLHPCBJLTMXZLJYLZXCLTPNCLCKXTPZJSWCYXSFYSZDKNTLBYJCYJLLSTGQCBXRYZXBXKLYLHZLQZLNZCXWJZLJZJNCJHXMNZZGJZZXTZJXYCYYCXXJYYXJJXSSSJSTSSTTPPGQTCSXWZDCSYFPTFBFHFBBLZJCLZZDBXGCXLQPXKFZFLSYLTUWBMQJHSZBMDDBCYSCCLDXYCDDQLYJJWMQLLCSGLJJSYFPYYCCYLTJANTJJPWYCMMGQYYSXDXQMZHSZXPFTWWZQSWQRFKJLZJQQYFBRXJHHFWJJZYQAZMYFRHCYYBYQWLPEXCCZSTYRLTTDMQLYKMBBGMYYJPRKZNPBSXYXBHYZDJDNGHPMFSGMWFZMFQMMBCMZZCJJLCNUXYQLMLRYGQZCYXZLWJGCJCGGMCJNFYZZJHYCPRRCMTZQZXHFQGTJXCCJEAQCRJYHPLQLSZDJRBCQHQDYRHYLYXJSYMHZYDWLDFRYHBPYDTSSCNWBXGLPZMLZZTQSSCPJMXXYCSJYTYCGHYCJWYRXXLFEMWJNMKLLSWTXHYYYNCMMCWJDQDJZGLLJWJRKHPZGGFLCCSCZMCBLTBHBQJXQDSPDJZZGHGLFQYWBZYZJLTSTDHQHCTCBCHFLQMPWDSHYYTQWCNZZJTLBYMBPDYYYXSQKXWYYFLXXNCWCXYPMAELYKKJMZZZBRXYYQJFLJPFHHHYTZZXSGQQMHSPGDZQWBWPJHZJDYSCQWZKTXXSQLZYYMYSDZGRXCKKUJLWPYSYSCSYZLRMLQSYLJXBCXTLWDQZPCYCYKPPPNSXFYZJJRCEMHSZMSXLXGLRWGCSTLRSXBZGBZGZTCPLUJLSLYLYMTXMTZPALZXPXJTJWTCYYZLBLXBZLQMYLXPGHDSLSSDMXMBDZZSXWHAMLCZCPJMCNHJYSNSYGCHSKQMZZQDLLKABLWJXSFMOCDXJRRLYQZKJMYBYQLYHETFJZFRFKSRYXFJTWDSXXSYSQJYSLYXWJHSNLXYYXHBHAWHHJZXWMYLJCSSLKYDZTXBZSYFDXGXZJKHSXXYBSSXDPYNZWRPTQZCZENYGCXQFJYKJBZMLJCMQQXUOXSLYXXLYLLJDZBTYMHPFSTTQQWLHOKYBLZZALZXQLHZWRRQHLSTMYPYXJJXMQSJFNBXYXYJXXYQYLTHYLQYFMLKLJTMLLHSZWKZHLJMLHLJKLJSTLQXYLMBHHLNLZXQJHXCFXXLHYHJJGBYZZKBXSCQDJQDSUJZYYHZHHMGSXCSYMXFEBCQWWRBPYYJQTYZCYQYQQZYHMWFFHGZFRJFCDPXNTQYZPDYKHJLFRZXPPXZDBBGZQSTLGDGYLCQMLCHHMFYWLZYXKJLYPQHSYWMQQGQZMLZJNSQXJQSYJYCBEHSXFSZPXZWFLLBCYYJDYTDTHWZSFJMQQYJLMQXXLLDTTKHHYBFPWTYYSQQWNQWLGWDEBZWCMYGCULKJXTMXMYJSXHYBRWFYMWFRXYQMXYSZTZZTFYKMLDHQDXWYYNLCRYJBLPSXCXYWLSPRRJWXHQYPHTYDNXHHMMYWYTZCSQMTSSCCDALWZTCPQPYJLLQZYJSWXMZZMMYLMXCLMXCZMXMZSQTZPPQQBLPGXQZHFLJJHYTJSRXWZXSCCDLXTYJDCQJXSLQYCLZXLZZXMXQRJMHRHZJBHMFLJLMLCLQNLDXZLLLPYPSYJYSXCQQDCMQJZZXHNPNXZMEKMXHYKYQLXSXTXJYYHWDCWDZHQYYBGYBCYSCFGPSJNZDYZZJZXRZRQJJYMCANYRJTLDPPYZBSTJKXXZYPFDWFGZZRPYMTNGXZQBYXNBUFNQKRJQZMJEGRZGYCLKXZDSKKNSXKCLJSPJYYZLQQJYBZSSQLLLKJXTBKTYLCCDDBLSPPFYLGYDTZJYQGGKQTTFZXBDKTYYHYBBFYTYYBCLPDYTGDHRYRNJSPTCSNYJQHKLLLZSLYDXXWBCJQSPXBPJZJCJDZFFXXBRMLAZHCSNDLBJDSZBLPRZTSWSBXBCLLXXLZDJZSJPYLYXXYFTFFFBHJJXGBYXJPMMMPSSJZJMTLYZJXSWXTYLEDQPJMYGQZJGDJLQJWJQLLSJGJGYGMSCLJJXDTYGJQJQJCJZCJGDZZSXQGSJGGCXHQXSNQLZZBXHSGZXCXYLJXYXYYDFQQJHJFXDHCTXJYRXYSQTJXYEFYYSSYYJXNCYZXFXMSYSZXYYSCHSHXZZZGZZZGFJDLTYLNPZGYJYZYYQZPBXQBDZTZCZYXXYHHSQXSHDHGQHJHGYWSZTMZMLHYXGEBTYLZKQWYTJZRCLEKYSTDBCYKQQSAYXCJXWWGSBHJYZYDHCSJKQCXSWXFLTYNYZPZCCZJQTZWJQDZZZQZLJJXLSBHPYXXPSXSHHEZTXFPTLQYZZXHYTXNCFZYYHXGNXMYWXTZSJPTHHGYMXMXQZXTSBCZYJYXXTYYZYPCQLMMSZMJZZLLZXGXZAAJZYXJMZXWDXZSXZDZXLEYJJZQBHZWZZZQTZPSXZTDSXJJJZNYAZPHXYYSRNQDTHZHYYKYJHDZXZLSWCLYBZYECWCYCRYLCXNHZYDZYDYJDFRJJHTRSQTXYXJRJHOJYNXELXSFSFJZGHPZSXZSZDZCQZBYYKLSGSJHCZSHDGQGXYZGXCHXZJWYQWGYHKSSEQZZNDZFKWYSSTCLZSTSYMCDHJXXYWEYXCZAYDMPXMDSXYBSQMJMZJMTZQLPJYQZCGQHXJHHLXXHLHDLDJQCLDWBSXFZZYYSCHTYTYYBHECXHYKGJPXHHYZJFXHWHBDZFYZBCAPNPGNYDMSXHMMMMAMYNBYJTMPXYYMCTHJBZYFCGTYHWPHFTWZZEZSBZEGPFMTSKFTYCMHFLLHGPZJXZJGZJYXZSBBQSCZZLZCCSTPGXMJSFTCCZJZDJXCYBZLFCJSYZFGSZLYBCWZZBYZDZYPSWYJZXZBDSYUXLZZBZFYGCZXBZHZFTPBGZGEJBSTGKDMFHYZZJHZLLZZGJQZLSFDJSSCBZGPDLFZFZSZYZYZSYGCXSNXXCHCZXTZZLJFZGQSQYXZJQDCCZTQCDXZJYQJQCHXZTDLGSCXZSYQJQTZWLQDQZTQCHQQJZYEZZZPBWKDJFCJPZTYPQYQTTYNLMBDKTJZPQZQZZFPZSBNJLGYJDXJDZZKZGQKXDLPZJTCJDQBXDJQJSTCKNXBXZMSLYJCQMTJQWWCJQNJNLLLHJCWQTBZQYDZCZPZZDZYDDCYZZZCCJTTJFZDPRRTZTJDCQTQZDTJNPLZBCLLCTZSXKJZQZPZLBZRBTJDCXFCZDBCCJJLTQQPLDCGZDBBZJCQDCJWYNLLZYZCCDWLLXWZLXRXNTQQCZXKQLSGDFQTDDGLRLAJJTKUYMKQLLTZYTDYYCZGJWYXDXFRSKSTQTENQMRKQZHHQKDLDAZFKYPBGGPZREBZZYKZZSPEGJXGYKQZZZSLYSYYYZWFQZYLZZLZHWCHKYPQGNPGBLPLRRJYXCCSYYHSFZFYBZYYTGZXYLXCZWXXZJZBLFFLGSKHYJZEYJHLPLLLLCZGXDRZELRHGKLZZYHZLYQSZZJZQLJZFLNBHGWLCZCFJYSPYXZLZLXGCCPZBLLCYBBBBUBBCBPCRNNZCZYRBFSRLDCGQYYQXYGMQZWTZYTYJXYFWTEHZZJYWLCCNTZYJJZDEDPZDZTSYQJHDYMBJNYJZLXTSSTPHNDJXXBYXQTZQDDTJTDYYTGWSCSZQFLSHLGLBCZPHDLYZJYCKWTYTYLBNYTSDSYCCTYSZYYEBHEXHQDTWNYGYCLXTSZYSTQMYGZAZCCSZZDSLZCLZRQXYYELJSBYMXSXZTEMBBLLYYLLYTDQYSHYMRQWKFKBFXNXSBYCHXBWJYHTQBPBSBWDZYLKGZSKYHXQZJXHXJXGNLJKZLYYCDXLFYFGHLJGJYBXQLYBXQPQGZTZPLNCYPXDJYQYDYMRBESJYYHKXXSTMXRCZZYWXYQYBMCLLYZHQYZWQXDBXBZWZMSLPDMYSKFMZKLZCYQYCZLQXFZZYDQZPZYGYJYZMZXDZFYFYTTQTZHGSPCZMLCCYTZXJCYTJMKSLPZHYSNZLLYTPZCTZZCKTXDHXXTQCYFKSMQCCYYAZHTJPCYLZLYJBJXTPNYLJYYNRXSYLMMNXJSMYBCSYSYLZYLXJJQYLDZLPQBFZZBLFNDXQKCZFYWHGQMRDSXYCYTXNQQJZYYPFZXDYZFPRXEJDGYQBXRCNFYYQPGHYJDYZXGRHTKYLNWDZNTSMPKLBTHBPYSZBZTJZSZZJTYYXZPHSSZZBZCZPTQFZMYFLYPYBBJQXZMXXDJMTSYSKKBJZXHJCKLPSMKYJZCXTMLJYXRZZQSLXXQPYZXMKYXXXJCLJPRMYYGADYSKQLSNDHYZKQXZYZTCGHZTLMLWZYBWSYCTBHJHJFCWZTXWYTKZLXQSHLYJZJXTMPLPYCGLTBZZTLZJCYJGDTCLKLPLLQPJMZPAPXYZLKKTKDZCZZBNZDYDYQZJYJGMCTXLTGXSZLMLHBGLKFWNWZHDXUHLFMKYSLGXDTWWFRJEJZTZHYDXYKSHWFZCQSHKTMQQHTZHYMJDJSKHXZJZBZZXYMPAGQMSTPXLSKLZYNWRTSQLSZBPSPSGZWYHTLKSSSWHZZLYYTNXJGMJSZSUFWNLSOZTXGXLSAMMLBWLDSZYLAKQCQCTMYCFJBSLXCLZZCLXXKSBZQCLHJPSQPLSXXCKSLNHPSFQQYTXYJZLQLDXZQJZDYYDJNZPTUZDSKJFSLJHYLZSQZLBTXYDGTQFDBYAZXDZHZJNHHQBYKNXJJQCZMLLJZKSPLDYCLBBLXKLELXJLBQYCXJXGCNLCQPLZLZYJTZLJGYZDZPLTQCSXFDMNYCXGBTJDCZNBGBQYQJWGKFHTNPYQZQGBKPBBYZMTJDYTBLSQMPSXTBNPDXKLEMYYCJYNZCTLDYKZZXDDXHQSHDGMZSJYCCTAYRZLPYLTLKXSLZCGGEXCLFXLKJRTLQJAQZNCMBYDKKCXGLCZJZXJHPTDJJMZQYKQSECQZDSHHADMLZFMMZBGNTJNNLGBYJBRBTMLBYJDZXLCJLPLDLPCQDHLXZLYCBLCXZZJADJLNZMMSSSMYBHBSQKBHRSXXJMXSDZNZPXLGBRHWGGFCXGMSKLLTSJYYCQLTSKYWYYHYWXBXQYWPYWYKQLSQPTNTKHQCWDQKTWPXXHCPTHTWUMSSYHBWCRWXHJMKMZNGWTMLKFGHKJYLSYYCXWHYECLQHKQHTTQKHFZLDXQWYZYYDESBPKYRZPJFYYZJCEQDZZDLATZBBFJLLCXDLMJSSXEGYGSJQXCWBXSSZPDYZCXDNYXPPZYDLYJCZPLTXLSXYZYRXCYYYDYLWWNZSAHJSYQYHGYWWAXTJZDAXYSRLTDPSSYYFNEJDXYZHLXLLLZQZSJNYQYQQXYJGHZGZCYJCHZLYCDSHWSHJZYJXCLLNXZJJYYXNFXMWFPYLCYLLABWDDHWDXJMCXZTZPMLQZHSFHZYNZTLLDYWLSLXHYMMYLMBWWKYXYADTXYLLDJPYBPWUXJMWMLLSAFDLLYFLBHHHBQQLTZJCQJLDJTFFKMMMBYTHYGDCQRDDWRQJXNBYSNWZDBYYTBJHPYBYTTJXAAHGQDQTMYSTQXKBTZPKJLZRBEQQSSMJJBDJOTGTBXPGBKTLHQXJJJCTHXQDWJLWRFWQGWSHCKRYSWGFTGYGBXSDWDWRFHWYTJJXXXJYZYSLPYYYPAYXHYDQKXSHXYXGSKQHYWFDDDPPLCJLQQEEWXKSYYKDYPLTJTHKJLTCYYHHJTTPLTZZCDLTHQKZXQYSTEEYWYYZYXXYYSTTJKLLPZMCYHQGXYHSRMBXPLLNQYDQHXSXXWGDQBSHYLLPJJJTHYJKYPPTHYYKTYEZYENMDSHLCRPQFDGFXZPSFTLJXXJBSWYYSKSFLXLPPLBBBLBSFXFYZBSJSSYLPBBFFFFSSCJDSTZSXZRYYSYFFSYZYZBJTBCTSBSDHRTJJBYTCXYJEYLXCBNEBJDSYXYKGSJZBXBYTFZWGENYHHTHZHHXFWGCSTBGXKLSXYWMTMBYXJSTZSCDYQRCYTWXZFHMYMCXLZNSDJTTTXRYCFYJSBSDYERXJLJXBBDEYNJGHXGCKGSCYMBLXJMSZNSKGXFBNBPTHFJAAFXYXFPXMYPQDTZCXZZPXRSYWZDLYBBKTYQPQJPZYPZJZNJPZJLZZFYSBTTSLMPTZRTDXQSJEHBZYLZDHLJSQMLHTXTJECXSLZZSPKTLZKQQYFSYGYWPCPQFHQHYTQXZKRSGTTSQCZLPTXCDYYZXSQZSLXLZMYCPCQBZYXHBSXLZDLTCDXTYLZJYYZPZYZLTXJSJXHLPMYTXCQRBLZSSFJZZTNJYTXMYJHLHPPLCYXQJQQKZZSCPZKSWALQSBLCCZJSXGWWWYGYKTJBBZTDKHXHKGTGPBKQYSLPXPJCKBMLLXDZSTBKLGGQKQLSBKKTFXRMDKBFTPZFRTBBRFERQGXYJPZSSTLBZTPSZQZSJDHLJQLZBPMSMMSXLQQNHKNBLRDDNXXDHDDJCYYGYLXGZLXSYGMQQGKHBPMXYXLYTQWLWGCPBMQXCYZYDRJBHTDJYHQSHTMJSBYPLWHLZFFNYPMHXXHPLTBQPFBJWQDBYGPNZTPFZJGSDDTQSHZEAWZZYLLTYYBWJKXXGHLFKXDJTMSZSQYNZGGSWQSPHTLSSKMCLZXYSZQZXNCJDQGZDLFNYKLJCJLLZLMZZNHYDSSHTHZZLZZBBHQZWWYCRZHLYQQJBEYFXXXWHSRXWQHWPSLMSSKZTTYGYQQWRSLALHMJTQJSMXQBJJZJXZYZKXBYQXBJXSHZTSFJLXMXZXFGHKZSZGGYLCLSARJYHSLLLMZXELGLXYDJYTLFBHBPNLYZFBBHPTGJKWETZHKJJXZXXGLLJLSTGSHJJYQLQZFKCGNNDJSSZFDBCTWWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ 19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=0,f=a.length;e14){var i=g.substring(0,1);for(b=0;b0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(c=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return BI.contains(this.array,a)},indexOf:function(a){return BI.contains(this.array,a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){BI.remove(this.array,a)},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(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;c0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},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(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);null!=b&&b.setRight(c||null),null!=c&&c.setLeft(b||null),this.children.splice(a,1)},removeAllChilds:function(){this.children=[]},addChild:function(a,b){var c=null;c=BI.isUndefined(b)?this.children.length-1:b-1,a.setParent(this),c>=0&&(this.getChild(c)&&this.getChild(c).setRight(a),a.setLeft(this.getChild(c))),BI.isUndefined(b)?this.children.push(a):this.children.splice(b,0,a)},equals:function(a){return this===a||this.id===a.id},clear:function(){this.parent=null,this.left=null,this.right=null,this.children=[]}},BI.extend(BI.Tree,{transformToArrayFormat:function(a,b){if(!a)return[];var c=[];if(BI.isArray(a))for(var d=0,e=a.length;d=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},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(){}}),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(a){this.element.append(a)},_mountChildren:function(){var a=this,b=BI.Widget._renderEngine.createFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.appendFragment(b)},_getChildName:function(a){return a+""},_addElement:function(a,b,c){var d,e=this;return this.hasWidget(this._getChildName(a))?d=this.getWidgetByName(this._getChildName(a)):(d=BI.createWidget(b,c),d.on(BI.Events.DESTROY,function(){BI.each(e._children,function(a,b){b===d&&(BI.remove(e._children,b),e.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),d)),d},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a,b){var c=this,d=this.options,e=BI.Widget._renderEngine.createFragment(),f=[];BI.each(a,function(a,g){var h=c._addElement(d.items.length,g,b);c._children[c._getChildName(d.items.length)]=h,d.items.push(g),f.push(h),e.appendChild(h.element[0])}),this._isMounted&&(this._getWrapper().append(e),BI.each(f,function(a,b){b._mount()}))},prependItems:function(a,b){var c=this;a=a||[];for(var d=BI.Widget._renderEngine.createFragment(),e=[],f=a.length-1;f>=0;f--){this._addItemAt(0,a[f]);var g=this._addElement(0,a[f],b);c._children[c._getChildName(0)]=g,this.options.items.unshift(a[f]),e.push(g),d.appendChild(g.element[0])}this._isMounted&&(this._getWrapper().prepend(d),BI.each(e,function(a,b){b._mount()}))},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=k._getOptions(a),b=k._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=k._getOptions(a),d=null==c.key?k._getChildName(b):c.key;return t[d]=k._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=a[b];if(BI.isNotNull(d)){var e=k._getOptions(d),f=null==e.key?k._getChildName(b):e.key;delete k._children[k._getChildName(f)],t[f]._destroy()}}}function g(a,b,c,d){a=k._getOptions(a),b=b&&k._getOptions(b);var e=BI.isKey(a.key)?a.key:k._getChildName(d);if(b&&t[b.key]){var f,g=BI.isKey(b.key)?b.key:k._getChildName(d);f=c?t[g].element.next():t[g].element,f.length>0?f.before(t[e].element):k._getWrapper().append(t[e].element)}else k._getWrapper().append(t[e].element)}function h(a,b,d,e){var f,g;for(f=d;f<=e;++f)a[f]&&c(a[f],b)&&(g=a[f]);return g}var i,j,k=this,l=0,m=0,n=a.length-1,o=a[0],p=a[n],q=b.length-1,r=b[0],s=b[q],t={};for(BI.each(a,function(a,b){b=k._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(t[c]=k._children[k._getChildName(a)])});l<=n&&m<=q;)if(BI.isNull(o))o=a[++l];else if(BI.isNull(p))p=a[--n];else if(c(o,r,l,m))j=this.patchItem(o,r,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],o=a[++l],r=b[++m];else if(c(p,s,n,q))j=this.patchItem(p,s,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],p=a[--n],s=b[--q];else if(c(o,s))j=this.patchItem(o,s,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],g(o,p,!0),o=a[++l],s=b[--q];else if(c(p,r))j=this.patchItem(p,r,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],g(p,o),p=a[--n],r=b[++m];else{var u=h(a,r,l,n);if(BI.isNull(u)){var v=d(r);g(v,o),r=b[++m]}else BI.each(a,function(b,d){d&&c(d,r)&&(j=k.patchItem(u,r,b)||j,t[null==u.key?k._getChildName(b):u.key]=k._children[k._getChildName(b)],a[b]=void 0,g(u,o))}),r=b[++m]}return l>n?(i=BI.isNull(b[q+1])?null:b[q+1],e(i,b,m,q)):m>q&&f(a,l,n),this._children={},BI.each(b,function(a,b){var c=k._getOptions(b),d=null==c.key?k._getChildName(a):c.key;t[d]._mount(),k._children[k._getChildName(a)]=t[d]}),j},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},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(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a,b,c={},d={},e={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(a&&a(b,d),e[b])for(var f=e[b].length-1;f>=0;f--)e[b][f](d);if(c[b])for(var g,f=c[b].length-1;f>=0;f--)if(g=c[b][f](d))return g;return d},config:function(c,d){a=c,b=d},configWidget:function(a,b){e[a]||(e[a]=[]),e[a].push(b)},registerWidget:function(a,b){c[a]||(c[a]=[]),c[a].length>0&&console.log("组件已经注册过了!"),c[a].push(b)},relieveWidget:function(a){delete c[a]},getObject:function(a,c){if(b&&b(a,c),d[a])for(var e,f=0,g=d[a].length;f0&&console.log("对象已经注册过了!"),d[a].push(b)},relieveObject:function(a){delete d[a]}})}(),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(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},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(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){function c(a,b){var c=a<0?(a*=-1,"-"):"",h="",i=a>0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;iBI.Widget._renderEngine.createElement("body").outerWidth()&&(l-=k.element.outerWidth()+15);var n=BI.Widget._renderEngine.createElement("body").outerHeight();return m+k.element.outerHeight()>n||j+k.element.outerHeight()>n?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.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"}}),_.extend(BI,{pushArray:function(a,b){for(var c=0;ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",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(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),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(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){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(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},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 a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.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 a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p 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%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?b.attachEvent("onresize",c):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
    ',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
    ").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",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(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),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(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){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(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},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 a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.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 a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p 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%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?(b.attachEvent("onresize",c),c()):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
    ',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
    ").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g0&&b-1 in a)))}function d(a){var b=xa[a]={};return ia.each(a.match(ka)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(ia.acceptData(a)){var f,g,h=ia.expando,i="string"==typeof c,j=a.nodeType,k=j?ia.cache:a,l=j?a[h]:a[h]&&h;if(l&&k[l]&&(e||k[l].data)||!i||d!==b)return l||(j?a[h]=l=_.pop()||ia.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=ia.noop)),"object"!=typeof c&&"function"!=typeof c||(e?k[l]=ia.extend(k[l],c):k[l].data=ia.extend(k[l].data,c)),f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[ia.camelCase(c)]=d),i?(g=f[c],null==g&&(g=f[ia.camelCase(c)])):g=f,g}}function f(a,b,c){if(ia.acceptData(a)){var d,e,f,g=a.nodeType,i=g?ia.cache:a,j=g?a[ia.expando]:ia.expando;if(i[j]){if(b&&(f=c?i[j]:i[j].data)){ia.isArray(b)?b=b.concat(ia.map(b,ia.camelCase)):b in f?b=[b]:(b=ia.camelCase(b),b=b in f?[b]:b.split(" "));for(d=0,e=b.length;d=0===c})}function m(a){var b=Ua.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function n(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function o(a){var b=a.getAttributeNode("type");return a.type=(b&&b.specified)+"/"+a.type,a}function p(a){var b=eb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function q(a,b){for(var c,d=0;null!=(c=a[d]);d++)ia._data(c,"globalEval",!b||ia._data(b[d],"globalEval"))}function r(a,b){if(1===b.nodeType&&ia.hasData(a)){var c,d,e,f=ia._data(a),g=ia._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jb[0].contentWindow||jb[0].contentDocument).document,b.write(""),b.close(),c=C(a,b),jb.detach()),ub[a]=c),c}function C(a,b){var c=ia(b.createElement(a)).appendTo(b.body),d=ia.css(c[0],"display");return c.remove(),d}function D(a,b,c,d){var e;if(ia.isArray(b))ia.each(b,function(b,e){c||Ab.test(a)?d(a,e):D(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==ia.type(b))d(a,b);else for(e in b)D(a+"["+e+"]",b[e],c,d)}function E(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(ka)||[];if(ia.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function F(a,b,c,d){function e(h){var i;return f[h]=!0,ia.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function G(a,c){var d,e,f=ia.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&ia.extend(!0,a,d),a}function H(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(h in k)h in d&&(c[k[h]]=d[h]);for(;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}if(g)return g!==j[0]&&j.unshift(g),d[g]}function I(a,b){var c,d,e,f,g={},h=0,i=a.dataTypes.slice(),j=i[0];if(a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i[1])for(e in a.converters)g[e.toLowerCase()]=a.converters[e];for(;d=i[++h];)if("*"!==d){if("*"!==j&&j!==d){if(e=g[j+" "+d]||g["* "+d],!e)for(c in g)if(f=c.split(" "),f[1]===d&&(e=g[j+" "+f[0]]||g["* "+f[0]])){e===!0?e=g[c]:g[c]!==!0&&(d=f[0],i.splice(h--,0,d));break}if(e!==!0)if(e&&a["throws"])b=e(b);else try{b=e(b)}catch(k){return{state:"parsererror",error:e?k:"No conversion from "+j+" to "+d}}}j=d}return{state:"success",data:b}}function J(){try{return new a.XMLHttpRequest}catch(b){}}function K(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function L(){return setTimeout(function(){$b=b}),$b=ia.now()}function M(a,b){ia.each(b,function(b,c){for(var d=(ec[b]||[]).concat(ec["*"]),e=0,f=d.length;e)[^>]*|#([\w-]*))$/,na=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,oa=/^[\],:{}\s]*$/,pa=/(?:^|:|,)(?:\s*\[)+/g,qa=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,ra=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,sa=/^-ms-/,ta=/-([\da-z])/gi,ua=function(a,b){return b.toUpperCase()},va=function(a){(W.addEventListener||"load"===a.type||"complete"===W.readyState)&&(wa(),ia.ready())},wa=function(){W.addEventListener?(W.removeEventListener("DOMContentLoaded",va,!1),a.removeEventListener("load",va,!1)):(W.detachEvent("onreadystatechange",va),a.detachEvent("onload",va))};ia.fn=ia.prototype={jquery:aa,constructor:ia,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ma.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof ia?c[0]:c,ia.merge(this,ia.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:W,!0)),na.test(e[1])&&ia.isPlainObject(c))for(e in c)ia.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=W.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=W,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):ia.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),ia.makeArray(a,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return da.call(this)},get:function(a){return null==a?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a){var b=ia.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return ia.each(this,a,b)},ready:function(a){return ia.ready.promise().done(a),this},slice:function(){return this.pushStack(da.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0||(T.resolveWith(W,[ia]),ia.fn.trigger&&ia(W).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===ia.type(a)},isArray:Array.isArray||function(a){return"array"===ia.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?$[fa.call(a)]||"object":typeof a},isPlainObject:function(a){if(!a||"object"!==ia.type(a)||a.nodeType||ia.isWindow(a))return!1;try{if(a.constructor&&!ga.call(a,"constructor")&&!ga.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||ga.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||W;var d=na.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=ia.buildFragment([a],b,e),e&&ia(e).remove(),ia.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=ia.trim(b),b&&oa.test(b.replace(qa,"@").replace(ra,"]").replace(pa,"")))?new Function("return "+b)():void ia.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||ia.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&ia.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(sa,"ms-").replace(ta,ua)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;f-1;)j.splice(d,1),c&&(d<=g&&g--,d<=h&&h--)}),this},has:function(a){return a?ia.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!j||f&&!k||(c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},ia.extend({Deferred:function(a){var b=[["resolve","done",ia.Callbacks("once memory"),"resolved"],["reject","fail",ia.Callbacks("once memory"),"rejected"],["notify","progress",ia.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return ia.Deferred(function(c){ia.each(b,function(b,f){var g=f[0],h=ia.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&ia.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?ia.extend(a,d):d}},e={};return d.pipe=d.then,ia.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=da.call(arguments),g=f.length,h=1!==g||a&&ia.isFunction(a.promise)?g:0,i=1===h?a:ia.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?da.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e
  • a",c=l.getElementsByTagName("*"),d=l.getElementsByTagName("a")[0],!c||!d||!c.length)return{};f=W.createElement("select"),h=f.appendChild(W.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b={getSetAttribute:"t"!==l.className,leadingWhitespace:3===l.firstChild.nodeType,tbody:!l.getElementsByTagName("tbody").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:!!e.value,optSelected:h.selected,enctype:!!W.createElement("form").enctype,html5Clone:"<:nav>"!==W.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===W.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=W.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=W.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;return l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip,ia(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=W.getElementsByTagName("body")[0];g&&(c=W.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="
    t
    ",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.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%;",b.boxSizing=4===l.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==g.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(W.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==V&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="
    ",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}();var ya=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,za=/([A-Z])/g;ia.extend({cache:{},expando:"jQuery"+(aa+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?ia.cache[a[ia.expando]]:a[ia.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&ia.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),ia.fn.extend({data:function(a,c){var d,e,f=this[0],h=0,i=null;if(a===b){if(this.length&&(i=ia.data(f),1===f.nodeType&&!ia._data(f,"parsedAttrs"))){for(d=f.attributes;h1,null,!0)},removeData:function(a){return this.each(function(){ia.removeData(this,a)})}}),ia.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=ia._data(a,b),c&&(!d||ia.isArray(c)?d=ia._data(a,b,ia.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=ia.queue(a,b),d=c.length,e=c.shift(),f=ia._queueHooks(a,b),g=function(){ia.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),f.cur=e,e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return ia._data(a,c)||ia._data(a,c,{empty:ia.Callbacks("once memory").add(function(){ia._removeData(a,b+"queue"),ia._removeData(a,c)})})}}),ia.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){ia.removeAttr(this,a)})},prop:function(a,b){return ia.access(this,ia.prop,a,b,arguments.length>1)},removeProp:function(a){return a=ia.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(ia.isFunction(a))return this.each(function(b){ia(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(ka)||[];g=0;)d=d.replace(" "+e+" "," ");c.className=a?ia.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return ia.isFunction(a)?this.each(function(c){ia(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=ia(this),h=b,i=a.match(ka)||[];e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else c!==V&&"boolean"!==c||(this.className&&ia._data(this,"__className__",this.className),this.className=this.className||a===!1?"":ia._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=ia.isFunction(a),this.each(function(c){var f,g=ia(this);1===this.nodeType&&(f=e?a.call(this,c,g.val()):a,null==f?f="":"number"==typeof f?f+="":ia.isArray(f)&&(f=ia.map(f,function(a){return null==a?"":a+""})),d=ia.valHooks[this.type]||ia.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=ia.valHooks[f.type]||ia.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Da,""):null==c?"":c)}}}),ia.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i=0}),c.length||(a.selectedIndex=-1),c}}},attr:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return typeof a.getAttribute===V?ia.prop(a,c,d):(f=1!==h||!ia.isXMLDoc(a),f&&(c=c.toLowerCase(),e=ia.attrHooks[c]||(Ga.test(c)?Ba:Aa)),d===b?e&&f&&"get"in e&&null!==(g=e.get(a,c))?g:(typeof a.getAttribute!==V&&(g=a.getAttribute(c)),null==g?b:g):null!==d?e&&f&&"set"in e&&(g=e.set(a,d,c))!==b?g:(a.setAttribute(c,d+""),d):void ia.removeAttr(a,c))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ka);if(f&&1===a.nodeType)for(;c=f[e++];)d=ia.propFix[c]||c,Ga.test(c)?!Ia&&Ha.test(c)?a[ia.camelCase("default-"+c)]=a[d]=!1:a[d]=!1:ia.attr(a,c,""),a.removeAttribute(Ia?c:d)},attrHooks:{type:{set:function(a,b){if(!ia.support.radioValue&&"radio"===b&&ia.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},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(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!ia.isXMLDoc(a),g&&(c=ia.propFix[c]||c,f=ia.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):Ea.test(a.nodeName)||Fa.test(a.nodeName)&&a.href?0:b}}}}),Ba={get:function(a,c){var d=ia.prop(a,c),e="boolean"==typeof d&&a.getAttribute(c),f="boolean"==typeof d?Ja&&Ia?null!=e:Ha.test(c)?a[ia.camelCase("default-"+c)]:!!e:a.getAttributeNode(c);return f&&f.value!==!1?c.toLowerCase():b},set:function(a,b,c){return b===!1?ia.removeAttr(a,c):Ja&&Ia||!Ha.test(c)?a.setAttribute(!Ia&&ia.propFix[c]||c,c):a[ia.camelCase("default-"+c)]=a[c]=!0,c}},Ja&&Ia||(ia.attrHooks.value={get:function(a,c){var d=a.getAttributeNode(c);return ia.nodeName(a,"input")?a.defaultValue:d&&d.specified?d.value:b},set:function(a,b,c){return ia.nodeName(a,"input")?void(a.defaultValue=b):Aa&&Aa.set(a,b,c)}}),Ia||(Aa=ia.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&("id"===c||"name"===c||"coords"===c?""!==d.value:d.specified)?d.value:b},set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},ia.attrHooks.contenteditable={get:Aa.get,set:function(a,b,c){Aa.set(a,""!==b&&b,c)}},ia.each(["width","height"],function(a,b){ia.attrHooks[b]=ia.extend(ia.attrHooks[b],{set:function(a,c){if(""===c)return a.setAttribute(b,"auto"),c}})})),ia.support.hrefNormalized||(ia.each(["href","src","width","height"],function(a,c){ia.attrHooks[c]=ia.extend(ia.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null==d?b:d}})}),ia.each(["href","src"],function(a,b){ia.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}})),ia.support.style||(ia.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),ia.support.optSelected||(ia.propHooks.selected=ia.extend(ia.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),ia.support.enctype||(ia.propFix.enctype="encoding"),ia.support.checkOn||ia.each(["radio","checkbox"],function(){ia.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),ia.each(["radio","checkbox"],function(){ia.valHooks[this]=ia.extend(ia.valHooks[this],{set:function(a,b){if(ia.isArray(b))return a.checked=ia.inArray(ia(a).val(),b)>=0}})});var Ka=/^(?:input|select|textarea)$/i,La=/^key/,Ma=/^(?:mouse|contextmenu)|click/,Na=/^(?:focusinfocus|focusoutblur)$/,Oa=/^([^.]*)(?:\.(.+)|)$/;ia.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=ia._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=ia.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof ia===V||a&&ia.event.triggered===a.type?b:ia.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(ka)||[""],i=c.length;i--;)g=Oa.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),k=ia.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=ia.event.special[o]||{},m=ia.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&ia.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),ia.event.global[o]=!0;a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ia.hasData(a)&&ia._data(a);if(q&&(k=q.events)){for(b=(b||"").match(ka)||[""],j=b.length;j--;)if(h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=ia.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||ia.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)ia.event.remove(a,n+b[j],c,d,!0);ia.isEmptyObject(k)&&(delete q.handle,ia._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||W],o=ga.call(c,"type")?c.type:c,p=ga.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||W,3!==e.nodeType&&8!==e.nodeType&&!Na.test(o+ia.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[ia.expando]?c:new ia.Event(o,"object"==typeof c&&c),c.isTrigger=!0,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:ia.makeArray(d,[c]),k=ia.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!ia.isWindow(e)){for(j=k.delegateType||o,Na.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||W)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(ia._data(i,"events")||{})[c.type]&&ia._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&ia.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(e.ownerDocument,d)===!1)&&("click"!==o||!ia.nodeName(e,"a"))&&ia.acceptData(e)&&h&&e[o]&&!ia.isWindow(e)){l=e[h],l&&(e[h]=null),ia.event.triggered=o;try{e[o]()}catch(q){}ia.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=ia.event.fix(a);var c,d,e,f,g,h=[],i=da.call(arguments),j=(ia._data(this,"events")||{})[a.type]||[],k=ia.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=ia.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(e.namespace)){a.handleObj=e,a.data=e.data;var l=(ia.event.special[e.origType]||{}).handle||e.handler;l.apply&&(d=l.apply(f.elem,i)),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation())}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;g=0:ia.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return iy.cacheLength&&delete a[b.shift()],a[c]=d}}function e(a){return a[N]=!0,a}function f(a){var b=F.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}}function g(a,b,c,d){var e,f,g,h,i,j,k,n,o,p;if((b?b.ownerDocument||b:O)!==F&&E(b),b=b||F,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(!H&&!d){if(e=pa.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&L(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return Z.apply(c,$.call(b.getElementsByTagName(a),0)),c;if((g=e[3])&&P.getByClassName&&b.getElementsByClassName)return Z.apply(c,$.call(b.getElementsByClassName(g),0)),c}if(P.qsa&&!I.test(a)){if(k=!0,n=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=l(a),(k=b.getAttribute("id"))?n=k.replace(sa,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=na.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return Z.apply(c,$.call(o.querySelectorAll(p),0)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return u(a.replace(ga,"$1"),b,c,d)}function h(a,b){var c=b&&a,d=c&&(~b.sourceIndex||W)-(~a.sourceIndex||W);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(a,b){var c,d,e,f,h,i,j,k=T[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=y.preFilter;h;){c&&!(d=ha.exec(h))||(d&&(h=h.slice(d[0].length)||h),i.push(e=[])),c=!1,(d=ja.exec(h))&&(c=d.shift(),e.push({value:c,type:d[0].replace(ga," ")}),h=h.slice(c.length));for(f in y.filter)!(d=ma[f].exec(h))||j[f]&&!(d=j[f](d))||(c=d.shift(),e.push({value:c,type:f,matches:d}),h=h.slice(c.length));if(!c)break}return b?h.length:h?g.error(a):T(a,i).slice(0)}function m(a){for(var b=0,c=a.length,d="";b1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h-1&&(e[j]=!(g[j]=l))}}else s=p(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):Z.apply(g,s)})}function r(a){for(var b,c,d,e=a.length,f=y.relative[a[0].type],g=f||y.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return _.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];h1&&o(k),h>1&&m(a.slice(0,h-1)).replace(ga,"$1"),c,h0,f=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],q=0,r="0",s=e&&[],t=null!=k,u=D,v=e||f&&y.find.TAG("*",k&&h.parentNode||h),w=Q+=null==u?1:Math.random()||.1;for(t&&(D=h!==F&&h,x=c);null!=(l=v[r]);r++){if(f&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(Q=w,x=++c)}d&&((l=!n&&l)&&q--,e&&s.push(l))}if(q+=r,d&&r!==q){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(q>0)for(;r--;)s[r]||o[r]||(o[r]=Y.call(j));o=p(o)}Z.apply(j,o),t&&!e&&o.length>0&&q+b.length>1&&g.uniqueSort(j)}return t&&(Q=w,D=u),s};return d?e(h):h}function t(a,b,c){for(var d=0,e=b.length;d2&&"ID"===(g=f[0]).type&&9===b.nodeType&&!H&&y.relative[f[1].type]){if(b=y.find.ID(g.matches[0].replace(ua,va),b)[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=ma.needsContext.test(a)?0:f.length;e--&&(g=f[e],!y.relative[h=g.type]);)if((i=y.find[h])&&(d=i(g.matches[0].replace(ua,va),na.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return Z.apply(c,$.call(d,0)),c;break}}return B(a,j)(d,b,H,c,na.test(a)),c}function v(){}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P={},Q=0,R=0,S=d(),T=d(),U=d(),V=typeof b,W=1<<31,X=[],Y=X.pop,Z=X.push,$=X.slice,_=X.indexOf||function(a){for(var b=0,c=this.length;b+~])"+aa+"*"),ka=new RegExp(fa),la=new RegExp("^"+ca+"$"),ma={ID:new RegExp("^#("+ba+")"),CLASS:new RegExp("^\\.("+ba+")"),NAME:new RegExp("^\\[name=['\"]?("+ba+")['\"]?\\]"),TAG:new RegExp("^("+ba.replace("w","w*")+")"),ATTR:new RegExp("^"+ea),PSEUDO:new RegExp("^"+fa),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+aa+"*(even|odd|(([+-]|)(\\d*)n|)"+aa+"*(?:([+-]|)"+aa+"*(\\d+)|))"+aa+"*\\)|)","i"),needsContext:new RegExp("^"+aa+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+aa+"*((?:-\\d)?\\d*)"+aa+"*\\)|)(?=[^-]|$)","i")},na=/[\x20\t\r\n\f]*[+~]/,oa=/^[^{]+\{\s*\[native code/,pa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,qa=/^(?:input|select|textarea|button)$/i,ra=/^h\d$/i,sa=/'|\\/g,ta=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,ua=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,va=function(a,b){var c="0x"+b-65536;return c!==c?b:c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320)};try{$.call(O.documentElement.childNodes,0)[0].nodeType}catch(wa){$=function(a){for(var b,c=[];b=this[a++];)c.push(b);return c}}A=g.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},E=g.setDocument=function(a){var d=a?a.ownerDocument||a:O;return d!==F&&9===d.nodeType&&d.documentElement?(F=d,G=d.documentElement,H=A(d),P.tagNameNoComments=f(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),P.attributes=f(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),P.getByClassName=f(function(a){return a.innerHTML="",!(!a.getElementsByClassName||!a.getElementsByClassName("e").length)&&(a.lastChild.className="e",2===a.getElementsByClassName("e").length)}),P.getByName=f(function(a){a.id=N+0,a.innerHTML="
    ",G.insertBefore(a,G.firstChild);var b=d.getElementsByName&&d.getElementsByName(N).length===2+d.getElementsByName(N+0).length;return P.getIdNotName=!d.getElementById(N),G.removeChild(a),b}),y.attrHandle=f(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==V&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},P.getIdNotName?(y.find.ID=function(a,b){if(typeof b.getElementById!==V&&!H){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){return a.getAttribute("id")===b}}):(y.find.ID=function(a,c){if(typeof c.getElementById!==V&&!H){var d=c.getElementById(a);return d?d.id===a||typeof d.getAttributeNode!==V&&d.getAttributeNode("id").value===a?[d]:b:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){var c=typeof a.getAttributeNode!==V&&a.getAttributeNode("id");return c&&c.value===b}}),y.find.TAG=P.tagNameNoComments?function(a,b){if(typeof b.getElementsByTagName!==V)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},y.find.NAME=P.getByName&&function(a,b){if(typeof b.getElementsByName!==V)return b.getElementsByName(name)},y.find.CLASS=P.getByClassName&&function(a,b){if(typeof b.getElementsByClassName!==V&&!H)return b.getElementsByClassName(a)},J=[],I=[":focus"],(P.qsa=c(d.querySelectorAll))&&(f(function(a){a.innerHTML="",a.querySelectorAll("[selected]").length||I.push("\\["+aa+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||I.push(":checked")}),f(function(a){a.innerHTML="",a.querySelectorAll("[i^='']").length&&I.push("[*^$]="+aa+"*(?:\"\"|'')"),a.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),I.push(",.*:")})),(P.matchesSelector=c(K=G.matchesSelector||G.mozMatchesSelector||G.webkitMatchesSelector||G.oMatchesSelector||G.msMatchesSelector))&&f(function(a){P.disconnectedMatch=K.call(a,"div"),K.call(a,"[s!='']:x"),J.push("!=",fa)}),I=new RegExp(I.join("|")),J=new RegExp(J.join("|")),L=c(G.contains)||G.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},M=G.compareDocumentPosition?function(a,b){var c;return a===b?(C=!0,0):(c=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b))?1&c||a.parentNode&&11===a.parentNode.nodeType?a===d||L(O,a)?-1:b===d||L(O,b)?1:0:4&c?-1:1:a.compareDocumentPosition?-1:1}:function(a,b){var c,e=0,f=a.parentNode,g=b.parentNode,i=[a],j=[b];if(a===b)return C=!0,0;if(!f||!g)return a===d?-1:b===d?1:f?-1:g?1:0;if(f===g)return h(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},C=!1,[0,0].sort(M),P.detectDuplicates=C,F):F},g.matches=function(a,b){return g(a,null,null,b)},g.matchesSelector=function(a,b){if((a.ownerDocument||a)!==F&&E(a),b=b.replace(ta,"='$1']"),P.matchesSelector&&!H&&(!J||!J.test(b))&&!I.test(b))try{var c=K.call(a,b);if(c||P.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(d){}return g(b,F,null,[a]).length>0},g.contains=function(a,b){return(a.ownerDocument||a)!==F&&E(a),L(a,b)},g.attr=function(a,b){var c;return(a.ownerDocument||a)!==F&&E(a),H||(b=b.toLowerCase()),(c=y.attrHandle[b])?c(a):H||P.attributes?a.getAttribute(b):((c=a.getAttributeNode(b))||a.getAttribute(b))&&a[b]===!0?b:c&&c.specified?c.value:null},g.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},g.uniqueSort=function(a){var b,c=[],d=1,e=0;if(C=!P.detectDuplicates,a.sort(M),C){for(;b=a[d];d++)b===a[d-1]&&(e=c.push(d));for(;e--;)a.splice(c[e],1)}return a},z=g.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=z(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=z(b);return c},y=g.selectors={cacheLength:50,createPseudo:e,match:ma,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ua,va),a[3]=(a[4]||a[5]||"").replace(ua,va),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||g.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&g.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return ma.CHILD.test(a[0])?null:(a[4]?a[2]=a[4]:c&&ka.test(c)&&(b=l(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(ua,va).toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=S[a+" "];return b||(b=new RegExp("(^|"+aa+")"+a+"("+aa+"|$)"))&&S(a,function(a){return b.test(a.className||typeof a.getAttribute!==V&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=g.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===Q&&j[1],m=j[0]===Q&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[Q,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===Q)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[Q,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,d=y.pseudos[a]||y.setFilters[a.toLowerCase()]||g.error("unsupported pseudo: "+a);return d[N]?d(b):d.length>1?(c=[a,a,"",b],y.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var e,f=d(a,b),g=f.length;g--;)e=_.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:e(function(a){var b=[],c=[],d=B(a.replace(ga,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return g(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||z(b)).indexOf(a)>-1}}),lang:e(function(a){return la.test(a||"")||g.error("unsupported lang: "+a),a=a.replace(ua,va).toLowerCase(),function(b){var c;do if(c=H?b.getAttribute("xml:lang")||b.getAttribute("lang"):b.lang)return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===G},focus:function(a){return a===F.activeElement&&(!F.hasFocus||F.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!y.pseudos.empty(a)},header:function(a){return ra.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[c<0?c+b:c]}),even:k(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=c<0?c+b:c;++d1?ia.unique(c):c),c.selector=(this.selector?this.selector+" ":"")+a,c},has:function(a){var b,c=ia(a,this),d=c.length;return this.filter(function(){for(b=0;b=0:ia.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sa.test(a)||"string"!=typeof a?ia(a,b||this.context):0;d-1:ia.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}return this.pushStack(f.length>1?ia.unique(f):f)},index:function(a){return a?"string"==typeof a?ia.inArray(this[0],ia(a)):ia.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?ia(a,b):ia.makeArray(a&&a.nodeType?[a]:a),d=ia.merge(this.get(),c);return this.pushStack(ia.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),ia.fn.andSelf=ia.fn.addBack,ia.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return ia.dir(a,"parentNode")},parentsUntil:function(a,b,c){return ia.dir(a,"parentNode",c)},next:function(a){return k(a,"nextSibling")},prev:function(a){return k(a,"previousSibling")},nextAll:function(a){return ia.dir(a,"nextSibling")},prevAll:function(a){return ia.dir(a,"previousSibling")},nextUntil:function(a,b,c){return ia.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return ia.dir(a,"previousSibling",c)},siblings:function(a){return ia.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return ia.sibling(a.firstChild)},contents:function(a){return ia.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:ia.merge([],a.childNodes)}},function(a,b){ia.fn[a]=function(c,d){var e=ia.map(this,b,c);return Pa.test(a)||(d=c),d&&"string"==typeof d&&(e=ia.filter(d,e)),e=this.length>1&&!Ta[a]?ia.unique(e):e,this.length>1&&Qa.test(a)&&(e=e.reverse()),this.pushStack(e)}}),ia.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?ia.find.matchesSelector(b[0],a)?[b[0]]:[]:ia.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!ia(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ua="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Va=/ jQuery\d+="(?:null|\d+)"/g,Wa=new RegExp("<(?:"+Ua+")[\\s/>]","i"),Xa=/^\s+/,Ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Za=/<([\w:]+)/,$a=/\s*$/g,gb={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:ia.support.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},hb=m(W),ib=hb.appendChild(W.createElement("div"));gb.optgroup=gb.option,gb.tbody=gb.tfoot=gb.colgroup=gb.caption=gb.thead,gb.th=gb.td,ia.fn.extend({text:function(a){return ia.access(this,function(a){return a===b?ia.text(this):this.empty().append((this[0]&&this[0].ownerDocument||W).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(ia.isFunction(a))return this.each(function(b){ia(this).wrapAll(a.call(this,b))});if(this[0]){var b=ia(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return ia.isFunction(a)?this.each(function(b){ia(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ia(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ia.isFunction(a);return this.each(function(c){ia(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){ia.nodeName(this,"body")||ia(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||ia.filter(a,[c]).length>0)&&(b||1!==c.nodeType||ia.cleanData(t(c)),c.parentNode&&(b&&ia.contains(c.ownerDocument,c)&&q(t(c,"script")),c.parentNode.removeChild(c)));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&ia.cleanData(t(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&ia.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return ia.clone(this,a,b)})},html:function(a){return ia.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Va,""):b;if("string"==typeof a&&!ab.test(a)&&(ia.support.htmlSerialize||!Wa.test(a))&&(ia.support.leadingWhitespace||!Xa.test(a))&&!gb[(Za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ya,"<$1>");try{for(;d")?f=a.cloneNode(!0):(ib.innerHTML=a.outerHTML,ib.removeChild(f=ib.firstChild)),!(ia.support.noCloneEvent&&ia.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ia.isXMLDoc(a)))for(d=t(f),h=t(a),g=0;null!=(e=h[g]);++g)d[g]&&s(e,d[g]);if(b)if(c)for(h=h||t(a),d=d||t(f),g=0;null!=(e=h[g]);g++)r(e,d[g]);else r(a,f);return d=t(f,"script"),d.length>0&&q(d,!i&&t(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,n=m(b),o=[],p=0;p")+k[2],e=k[0];e--;)h=h.lastChild;if(!ia.support.leadingWhitespace&&Xa.test(f)&&o.push(b.createTextNode(Xa.exec(f)[0])),!ia.support.tbody)for(f="table"!==i||$a.test(f)?""!==k[1]||$a.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)ia.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(ia.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=n.lastChild}else o.push(b.createTextNode(f));for(h&&n.removeChild(h),ia.support.appendChecked||ia.grep(t(o,"input"),u),p=0;f=o[p++];)if((!d||ia.inArray(f,d)===-1)&&(g=ia.contains(f.ownerDocument,f),h=t(n.appendChild(f),"script"),g&&q(h),c))for(e=0;f=h[e++];)db.test(f.type||"")&&c.push(f);return h=null,n},cleanData:function(a,b){for(var c,d,e,f,g=0,h=ia.expando,i=ia.cache,j=ia.support.deleteExpando,k=ia.event.special;null!=(c=a[g]);g++)if((b||ia.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?ia.event.remove(c,d):ia.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==V?c.removeAttribute(h):c[h]=null,_.push(e))}}});var jb,kb,lb,mb=/alpha\([^)]*\)/i,nb=/opacity\s*=\s*([^)]*)/,ob=/^(top|right|bottom|left)$/,pb=/^(none|table(?!-c[ea]).+)/,qb=/^margin/,rb=new RegExp("^("+ja+")(.*)$","i"),sb=new RegExp("^("+ja+")(?!px)[a-z%]+$","i"),tb=new RegExp("^([+-])=("+ja+")","i"),ub={BODY:"block"},vb={position:"absolute",visibility:"hidden",display:"block"},wb={letterSpacing:0,fontWeight:400},xb=["Top","Right","Bottom","Left"],yb=["Webkit","O","Moz","ms"];ia.fn.extend({css:function(a,c){return ia.access(this,function(a,c,d){var e,f,g={},h=0;if(ia.isArray(c)){for(f=kb(a),e=c.length;h1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(a){var b="boolean"==typeof a;return this.each(function(){(b?a:w(this))?ia(this).show():ia(this).hide()})}}),ia.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ia.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=ia.camelCase(c),j=a.style;if(c=ia.cssProps[i]||(ia.cssProps[i]=v(j,i)),h=ia.cssHooks[c]||ia.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tb.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(ia.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||ia.cssNumber[i]||(d+="px"),ia.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=ia.camelCase(c);return c=ia.cssProps[i]||(ia.cssProps[i]=v(a.style,i)),h=ia.cssHooks[c]||ia.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lb(a,c,e)),"normal"===g&&c in wb&&(g=wb[c]),""===d||d?(f=parseFloat(g),d===!0||ia.isNumeric(f)?f||0:g):g},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),a.getComputedStyle?(kb=function(b){return a.getComputedStyle(b,null)},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||ia.contains(a.ownerDocument,a)||(i=ia.style(a,c)),sb.test(i)&&qb.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):W.documentElement.currentStyle&&(kb=function(a){return a.currentStyle},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sb.test(i)&&!ob.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),ia.each(["height","width"],function(a,b){ia.cssHooks[b]={get:function(a,c,d){if(c)return 0===a.offsetWidth&&pb.test(ia.css(a,"display"))?ia.swap(a,vb,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&kb(a);return y(a,c,d?z(a,b,d,ia.support.boxSizing&&"border-box"===ia.css(a,"boxSizing",!1,e),e):0)}}}),ia.support.opacity||(ia.cssHooks.opacity={get:function(a,b){return nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=ia.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===ia.trim(f.replace(mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mb.test(f)?f.replace(mb,e):f+" "+e)}}),ia(function(){ia.support.reliableMarginRight||(ia.cssHooks.marginRight={get:function(a,b){if(b)return ia.swap(a,{display:"inline-block"},lb,[a,"marginRight"])}}),!ia.support.pixelPosition&&ia.fn.position&&ia.each(["top","left"],function(a,b){ia.cssHooks[b]={get:function(a,c){if(c)return c=lb(a,b),sb.test(c)?ia(a).position()[b]+"px":c}}})}),ia.expr&&ia.expr.filters&&(ia.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!ia.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||ia.css(a,"display"))},ia.expr.filters.visible=function(a){return!ia.expr.filters.hidden(a)}),ia.each({margin:"",padding:"",border:"Width"},function(a,b){ia.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+xb[d]+b]=f[d]||f[d-2]||f[0];return e}},qb.test(a)||(ia.cssHooks[a+b].set=y)});var zb=/%20/g,Ab=/\[\]$/,Bb=/\r?\n/g,Cb=/^(?:submit|button|image|reset|file)$/i,Db=/^(?:input|select|textarea|keygen)/i;ia.fn.extend({serialize:function(){return ia.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ia.prop(this,"elements");return a?ia.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ia(this).is(":disabled")&&Db.test(this.nodeName)&&!Cb.test(a)&&(this.checked||!bb.test(a))}).map(function(a,b){var c=ia(this).val();return null==c?null:ia.isArray(c)?ia.map(c,function(a){return{name:b.name,value:a.replace(Bb,"\r\n")}}):{name:b.name,value:c.replace(Bb,"\r\n")}}).get()}}),ia.param=function(a,c){var d,e=[],f=function(a,b){b=ia.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=ia.ajaxSettings&&ia.ajaxSettings.traditional),ia.isArray(a)||a.jquery&&!ia.isPlainObject(a))ia.each(a,function(){f(this.name,this.value)});else for(d in a)D(d,a[d],c,f);return e.join("&").replace(zb,"+")},ia.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(a,b){ia.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),ia.fn.hover=function(a,b){return this.mouseenter(a).mouseleave(b||a)};var Eb,Fb,Gb=ia.now(),Hb=/\?/,Ib=/#.*$/,Jb=/([?&])_=[^&]*/,Kb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mb=/^(?:GET|HEAD)$/,Nb=/^\/\//,Ob=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pb=ia.fn.load,Qb={},Rb={},Sb="*/".concat("*");try{Fb=X.href}catch(Tb){Fb=W.createElement("a"),Fb.href="",Fb=Fb.href}Eb=Ob.exec(Fb.toLowerCase())||[],ia.fn.load=function(a,c,d){if("string"!=typeof a&&Pb)return Pb.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),ia.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&ia.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?ia("
    ").append(ia.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},ia.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){ia.fn[b]=function(a){return this.on(b,a)}}),ia.each(["get","post"],function(a,c){ia[c]=function(a,d,e,f){return ia.isFunction(d)&&(f=f||e,e=d,d=b),ia.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),ia.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fb,type:"GET",isLocal:Lb.test(Eb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sb,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":a.String,"text html":!0,"text json":ia.parseJSON,"text xml":ia.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?G(G(a,ia.ajaxSettings),b):G(ia.ajaxSettings,a)},ajaxPrefilter:E(Qb),ajaxTransport:E(Rb),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,d&&(t=H(m,w,d)),a>=200&&a<300||304===a?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(ia.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(ia.etag[g]=v)),204===a?(f=!0,x="nocontent"):304===a?(f=!0,x="notmodified"):(f=I(m,t),x=f.state,l=f.data,s=f.error,f=!s)):(s=x,!a&&x||(x="error",a<0&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--ia.active||ia.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=ia.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?ia(n):ia.event,p=ia.Deferred(),q=ia.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kb.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(u<2)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fb)+"").replace(Ib,"").replace(Nb,Eb[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=ia.trim(m.dataType||"*").toLowerCase().match(ka)||[""],null==m.crossDomain&&(e=Ob.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Eb[1]&&e[2]===Eb[2]&&(e[3]||("http:"===e[1]?80:443))==(Eb[3]||("http:"===Eb[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=ia.param(m.data,m.traditional)),F(Qb,m,c,w),2===u)return w;j=m.global,j&&0===ia.active++&&ia.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mb.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hb.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jb.test(g)?g.replace(Jb,"$1_="+Gb++):g+(Hb.test(g)?"&":"?")+"_="+Gb++)),m.ifModified&&(ia.lastModified[g]&&w.setRequestHeader("If-Modified-Since",ia.lastModified[g]),ia.etag[g]&&w.setRequestHeader("If-None-Match",ia.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sb+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=F(Rb,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(u<2))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getScript:function(a,c){return ia.get(a,b,c,"script")},getJSON:function(a,b,c){return ia.get(a,b,c,"json")}}),ia.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return ia.globalEval(a),a}}}),ia.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),ia.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=W.head||ia("head")[0]||W.documentElement;return{send:function(b,e){c=W.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Ub=[],Vb=/(=)\?(?=&|$)|\?\?/;ia.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Ub.pop()||ia.expando+"_"+Gb++;return this[a]=!0,a}}),ia.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vb.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vb.test(c.data)&&"data");if(i||"jsonp"===c.dataTypes[0])return f=c.jsonpCallback=ia.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vb,"$1"+f):c.jsonp!==!1&&(c.url+=(Hb.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||ia.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Ub.push(f)),h&&ia.isFunction(g)&&g(h[0]),h=g=b}),"script"});var Wb,Xb,Yb=0,Zb=a.ActiveXObject&&function(){var a;for(a in Wb)Wb[a](b,!0)};ia.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&J()||K()}:J,Xb=ia.ajaxSettings.xhr(),ia.support.cors=!!Xb&&"withCredentials"in Xb,Xb=ia.support.ajax=!!Xb,Xb&&ia.ajaxTransport(function(c){if(!c.crossDomain||ia.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=ia.noop,Zb&&delete Wb[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yb,Zb&&(Wb||(Wb={},ia(a).unload(Zb)),Wb[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+ja+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[P],ec={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=bc.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||(ia.cssNumber[a]?"":"px"),"px"!==d&&h){h=ia.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,ia.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};ia.Animation=ia.extend(N,{tweener:function(a,b){ia.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),ia.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},ia.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===ia.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),ia.nodeName(a[0],"html")||(c=a.offset()),c.top+=ia.css(a[0],"borderTopWidth",!0),c.left+=ia.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-ia.css(d,"marginTop",!0),left:b.left-c.left-ia.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||W.documentElement;a&&!ia.nodeName(a,"html")&&"static"===ia.css(a,"position");)a=a.offsetParent;return a||W.documentElement})}}),ia.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);ia.fn[a]=function(e){return ia.access(this,function(a,e,f){var g=S(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:void(g?g.scrollTo(d?ia(g).scrollLeft():f,d?f:ia(g).scrollTop()):a[e]=f)},a,e,arguments.length,null)}}),ia.each({Height:"height",Width:"width"},function(a,c){ia.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){ia.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return ia.access(this,function(c,d,e){var f;return ia.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?ia.css(c,d,h):ia.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=ia,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ia})}(window),$.extend($.Event.prototype,{stopEvent:function(){this.stopPropagation(),this.preventDefault()}}),jQuery&&(!function(a){a.fn.insets||(a.fn.insets=function(){var a=this.padding(),b=this.border();return{top:a.top,bottom:a.bottom+b.bottom+b.top,left:a.left,right:a.right+b.right+b.left}}),a.fn.bounds||(a.fn.bounds=function(a){var b={hasIgnoredBounds:!0};return a?(isNaN(a.x)||(b.left=a.x),isNaN(a.y)||(b.top=a.y),null!=a.width&&(b.width=a.width-(this.outerWidth(!0)-this.width()),b.width=b.width>=0?b.width:a.width),null!=a.height&&(b.height=a.height-(this.outerHeight(!0)-this.height()),b.height=b.height>=0?b.height:a.height),this.css(b),this):(b=this.position(),{x:b.left,y:b.top,width:this.outerWidth(),height:this.outerHeight()})})}(jQuery),BI.extend(jQuery.fn,{destroy:function(){this.remove(),BI.isIE()===!0&&(this[0].outerHTML="")},__textKeywordMarked__:function(a,b,c){if(!BI.isKey(b)||(a+"").length>100)return this.html(BI.htmlEncode(a));b+="",b=BI.toUpperCase(b);var d=(a||"")+"";for(c=(c||BI.makeFirstPY(a))+"",null!=c&&(c=BI.toUpperCase(c)),this.empty();;){var e=BI.toUpperCase(d).indexOf(b),f=null;if(null!=c&&(f=c.indexOf(b),f>=0&&(f%=a.length)),e>=0)this.append(BI.htmlEncode(d.substr(0,e))),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(e,b.length)))),d=d.substr(e+b.length),null!=c&&(c=c.substr(e+b.length));else{if(!(null!=f&&f>=0&&Math.floor(f/a.length)===Math.floor((f+b.length-1)/a.length))){this.append(BI.htmlEncode(d));break}this.append(BI.htmlEncode(d.substr(0,f))),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(f,b.length)))),null!=c&&(c=c.substr(f+b.length)),d=d.substr(f+b.length)}}return this},getDomHeight:function(a){var b=$(this).clone();b.appendTo($(a||"body"));var c=b.height();return b.remove(),c},hasVerticalScroll:function(){return this.height()>0&&this[0].clientWidth0&&this[0].clientHeightb.left+c||a.pageYb.top+d)},__hasZIndexMask__:function(a){return a&&null!=this.zIndexMask[a]},__buildZIndexMask__:function(a,b){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var c=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:b});return c.element.css({"z-index":a}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(c),a&&(this.zIndexMask[a]=c),c.element},__releaseZIndexMask__:function(a){if(a&&this.zIndexMask[a])return BI.remove(this.indexMask,this.zIndexMask[a]),void this.zIndexMask[a].destroy();this.indexMask=this.indexMask||[];var b=this.indexMask.pop();b&&b.destroy()}})),_.extend(BI,{$import:function(){function a(a,c){var d=$("head script, body script");$.each(d,function(c,d){d.src.indexOf(a)!=-1&&(b[a]=!0)});var e=$("head link");$.each(e,function(d,e){e.href.indexOf(a)!=-1&&c&&(b[a]=!1,$(e).remove())})}var b={};return function(c,d,e){if(a(c,e),b[c]!==!0)if("css"===d){var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.href=c;var g=document.getElementsByTagName("head")[0];g.appendChild(f),b[c]=!0}else $.ajax({url:c,dataType:"script",async:!1,cache:!0,complete:function(a,d){"success"==d&&(b[c]=!0)}})}}()}),Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||!function(){function a(a,b){for(var c=-1;++c=0;)c+=h[b],h[b]=Math.floor(c/a),c=c%a*f}function c(){for(var a=g,b="";--a>=0;)if(""!==b||0===a||0!==h[a]){var c=String(h[a]);""===b?b=c:b+="0000000".slice(0,7-c.length)+c}return b}function d(a,b,c){return 0===b?c:b%2===1?d(a,b-1,c*a):d(a*a,b/2,c)}function e(a){for(var b=0;a>=4096;)b+=12,a/=4096;for(;a>=2;)b+=1,a/=2;return b}var f,g,h;f=1e7,g=6,h=[0,0,0,0,0,0],Number.prototype.toFixed=function(f){var g,h,i,j,k,l,m,n;if(g=Number(f),g=g!==g?0:Math.floor(g),g<0||g>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(h=Number(this),h!==h)return"NaN";if(h<=-1e21||h>1e21)return String(h);if(i="",h<0&&(i="-",h=-h),j="0",h>1e-21)if(k=e(h*d(2,69,1))-69,l=k<0?h*d(2,-k,1):h/d(2,k,1),l*=4503599627370496,k=52-k,k>0){for(a(0,l),m=g;m>=7;)a(1e7,0),m-=7;for(a(d(10,m,1),0),m=k-1;m>=23;)b(1<<23),m-=23;b(1<0?(n=j.length,j=n<=g?i+"0.0000000000000000000".slice(0,g-n+2)+j:i+j.slice(0,n-g)+"."+j.slice(n-g)):j=i+j,j}}(),_.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}),BI.version="2.0",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(a,b){var c=this.options,d=BI.AbsoluteCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0),right:c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0),top:c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0),bottom:c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0),margin:"auto"}),d},resize:function(){},populate:function(a){BI.AbsoluteCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_center_adapt",BI.AbsoluteCenterLayout),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(a,b){var c=this.options,d=BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0),right:c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0),margin:"auto"}),c.vgap+c.tgap+(b.vgap||0)+(b.tgap||0)!==0&&d.element.css("top",c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)),c.vgap+c.bgap+(b.vgap||0)+(b.bgap||0)!==0&&d.element.css("bottom",c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_horizontal_adapt",BI.AbsoluteHorizontalLayout),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(a,b){var c=this.options,d=BI.AbsoluteVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:b.lgap,right:b.rgap,top:c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0),bottom:c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0),margin:"auto"}),c.hgap+c.lgap+(b.hgap||0)+(b.lgap||0)!==0&&d.element.css("left",c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)),c.hgap+c.rgap+(b.hgap||0)+(b.rgap||0)!==0&&d.element.css("right",c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_vertical_adapt",BI.AbsoluteVerticalLayout),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 a=this.options,b=this;return BI.CenterAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:a.horizontalAlign,columnSize:a.columnSize,scrollx:a.scrollx,items:a.items,ref:function(a){b.layout=a},hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.center_adapt",BI.CenterAdaptLayout),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 a=this,b=this.options;return BI.HorizontalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,items:b.items,scrollx:b.scrollx,ref:function(b){a.layout=b},hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.horizontal_adapt",BI.HorizontalAdaptLayout),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 a=this.options;BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this,arguments);var b=[];return"left"in a.items&&b.push({type:"bi.left",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items.left,hgap:a.lhgap,lgap:a.llgap,rgap:a.lrgap}}]}),"right"in a.items&&b.push({type:"bi.right",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items.right,textAlign:"right",hgap:a.rhgap,lgap:a.rlgap,rgap:a.rrgap}}]}),b},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){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 a=this.options,b=this;return BI.LeftVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.left",ref:function(a){b.layout=a},items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items,lgap:a.lgap,hgap:a.hgap,rgap:a.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){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 a=this.options,b=this;return BI.RightVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.right",ref:function(a){b.layout=a},items:[{el:{type:"bi.vertical_adapt",height:"100%",textAlign:"right",items:a.items,lgap:a.lgap,hgap:a.hgap,rgap:a.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.right_vertical_adapt",BI.RightVerticalAdaptLayout),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 a=this.options;BI.TableAdaptLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("
    ").css({position:"relative",display:"table",height:a.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:a.horizontalAlign===BI.HorizontalAlign.Center?"100%":"auto","white-space":"nowrap"}),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.width(e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",width:e,items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]<=1?e:e+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative",display:"table-cell","vertical-align":d.verticalAlign,margin:"0",padding:"0",height:"100%"}),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},appendFragment:function(a){this.$table.append(a),this.element.append(this.$table)},resize:function(){},populate:function(a){BI.TableAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table_adapt",BI.TableAdaptLayout),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 a=this,b=this.options;return BI.VerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,items:b.items,scrollx:b.scrollx,ref:function(b){a.layout=b},hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.vertical_adapt",BI.VerticalAdaptLayout),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(a,b){var c=this.options,d=BI.HorizontalAutoLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",margin:"0px auto"}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":(0===a?c.vgap:0)+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_auto",BI.HorizontalAutoLayout),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 a=this,b=this.left.element.width(),c=this.left.element.height();this.left.element.width(b).height(c).css("float","none"),BI.remove(this._children,function(b,c){c===a.container&&delete a._children[b]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.left]})},_addElement:function(a,b){var c=this.options;return this.left=BI.createWidget({type:"bi.vertical",items:[b],hgap:c.hgap,vgap:c.vgap,tgap:c.tgap,bgap:c.bgap,lgap:c.lgap,rgap:c.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]}),this.left},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_float",BI.FloatHorizontalLayout),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(a,b,c){var d=this.options,e=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return e.element.css({position:"relative","vertical-align":"middle"}),e.element.addClass("inline-center-adapt-item"),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&e.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&e.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&e.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&e.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),e},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("不能添加元素")},stroke:function(a){var b=this;BI.each(a,function(c,d){d&&b._addElement(c,d,a.length)})},populate:function(a){BI.InlineCenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_center_adapt",BI.InlineCenterAdaptLayout),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 a=this.options;this.element.css({whiteSpace:"nowrap",textAlign:a.textAlign}),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","vertical-align":"middle"}),d.element.addClass("inline-vertical-adapt-item"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.InlineVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_vertical_adapt",BI.InlineVerticalAdaptLayout),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(a,b){var c=this.options,d=BI.FlexCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0","margin-left":(0===a?c.hgap:0)+"px","margin-right":c.hgap+"px","margin-top":c.vgap+"px","margin-bottom":c.vgap+"px"}),d},resize:function(){},populate:function(a){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_center_adapt",BI.FlexCenterLayout),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 a=this,b=this.options;return{type:"bi.flex_vertical",ref:function(b){a.wrapper=b},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:b.verticalAlign,rowSize:b.rowSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},resize:function(){},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_horizontal_adapt",BI.FlexHorizontalCenter),BI.shortcut("bi.flex_horizontal_center_adapt",BI.FlexHorizontalCenter),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 a=this.options;this.element.addClass("v-"+a.verticalAlign).addClass("h-"+a.horizontalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.columnSize[a]>0&&d.element.width(c.columnSize[a]),"fill"===c.columnSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-center-adapt-layout",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var a=this,b=this.options;return{type:"bi.flex_horizontal",ref:function(b){a.wrapper=b},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,hgap:b.hgap,items:b.items}},resize:function(){},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_vertical_adapt",BI.FlexVerticalCenter),BI.shortcut("bi.flex_vertical_center_adapt",BI.FlexVerticalCenter),BI.FlexVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-layout",horizontalAlign:BI.HorizontalAlign.Left,verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrolly:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalLayout.superclass.render.apply(this,arguments);var a=this.options;this.element.addClass("h-"+a.horizontalAlign).addClass("v-"+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=BI.FlexVerticalLayout.superclass._addElement.apply(this,arguments),d=this.options;return c.element.css({position:"relative","flex-shrink":"0"}),d.rowSize[a]>0&&c.element.height(d.rowSize[a]),"fill"===d.rowSize[a]&&c.element.css("flex","1"),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&c.element.css({"margin-top":(0===a?d.vgap:0)+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&c.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&c.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&c.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},resize:function(){},populate:function(a){BI.FlexVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical",BI.FlexVerticalLayout),BI.FlexWrapperCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-center-adapt-layout clearfix",scrollable:!0})},render:function(){BI.FlexWrapperCenterLayout.superclass.render.apply(this,arguments),this.$wrapper=BI.Widget._renderEngine.createElement("
    ").addClass("flex-scrollable-center-adapt-layout-wrapper"),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","margin-left":(0===a?c.hgap:0)+"px","margin-right":c.hgap+"px","margin-top":c.vgap+"px","margin-bottom":c.vgap+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_center_adapt",BI.FlexWrapperCenterLayout),BI.FlexWrapperHorizontalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-center-adapt-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 a=this,b=this.options;return{type:"bi.flex_scrollable_vertical",ref:function(b){a.wrapper=b},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:b.verticalAlign,rowSize:b.rowSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_scrollable_horizontal_adapt",BI.FlexWrapperHorizontalCenter),BI.shortcut("bi.flex_scrollable_horizontal_center_adapt",BI.FlexWrapperHorizontalCenter),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 a=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("
    ").addClass("flex-scrollable-horizontal-layout-wrapper v-"+a.verticalAlign).addClass("h-"+a.horizontalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.columnSize[a]>0&&d.element.width(c.columnSize[a]),"fill"===c.columnSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_horizontal",BI.FlexWrapperHorizontalLayout),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 a=this,b=this.options;return{type:"bi.flex_scrollable_horizontal",ref:function(b){a.wrapper=b},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,items:b.items}},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_scrollable_vertical_adapt",BI.FlexWrapperVerticalCenter),BI.shortcut("bi.flex_scrollable_vertical_center_adapt",BI.FlexWrapperVerticalCenter),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 a=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("
    ").addClass("flex-scrollable-vertical-layout-wrapper h-"+a.horizontalAlign).addClass("v-"+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.rowSize[a]>0&&d.element.height(c.rowSize[a]),"fill"===c.rowSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":(0===a?c.vgap:0)+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_vertical",BI.FlexWrapperVerticalLayout),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(a,b){var c=this.options,d=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),e=0,f=0,g=0,h=0; return BI.isNotNull(b.left)&&(d.element.css({left:b.left}),e+=b.left),BI.isNotNull(b.right)&&(d.element.css({right:b.right}),f+=b.right),BI.isNotNull(b.top)&&(d.element.css({top:b.top}),g+=b.top),BI.isNotNull(b.bottom)&&(d.element.css({bottom:b.bottom}),h+=b.bottom),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d.element.css({position:"absolute"}),d},resize:function(){this.stroke(this.options.items)},stroke:function(a){this.options.items=a||[];var b=this;BI.each(a,function(a,c){if(c){if(!BI.isWidget(c)&&!c.el)throw new Error("el must be exist");b._addElement(a,c)}})},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute",BI.AbsoluteLayout),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(a,b){var c=this.options,d=BI.AdaptiveLayout.superclass._addElement.apply(this,arguments);d.element.css({position:"relative"});var e=0,f=0,g=0,h=0;return BI.isNotNull(b.left)&&d.element.css({"margin-left":b.left}),BI.isNotNull(b.right)&&d.element.css({"margin-right":b.right}),BI.isNotNull(b.top)&&d.element.css({"margin-top":b.top}),BI.isNotNull(b.bottom)&&d.element.css({"margin-bottom":b.bottom}),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.adaptive",BI.AdaptiveLayout),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(a){throw new Error("cannot be added")},stroke:function(a){var b,c=0,d=0,e=0,f=0;if("north"in a&&(b=a.north,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"north")){var g=BI.createWidget(b);this.addWidget(this.getName()+"north",g)}this.getWidgetByName(this.getName()+"north").element.height(b.height).css({position:"absolute",top:b.top||0,left:b.left||0,right:b.right||0,bottom:"initial"})}c=(b.height||0)+(b.top||0)+(b.bottom||0)}if("south"in a&&(b=a.south,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"south")){var g=BI.createWidget(b);this.addWidget(this.getName()+"south",g)}this.getWidgetByName(this.getName()+"south").element.height(b.height).css({position:"absolute",bottom:b.bottom||0,left:b.left||0,right:b.right||0,top:"initial"})}d=(b.height||0)+(b.top||0)+(b.bottom||0)}if("west"in a&&(b=a.west,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"west")){var g=BI.createWidget(b);this.addWidget(this.getName()+"west",g)}this.getWidgetByName(this.getName()+"west").element.width(b.width).css({position:"absolute",left:b.left||0,top:c,bottom:d,right:"initial"})}e=(b.width||0)+(b.left||0)+(b.right||0)}if("east"in a&&(b=a.east,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"east")){var g=BI.createWidget(b);this.addWidget(this.getName()+"east",g)}this.getWidgetByName(this.getName()+"east").element.width(b.width).css({position:"absolute",right:b.right||0,top:c,bottom:d,left:"initial"})}f=(b.width||0)+(b.left||0)+(b.right||0)}if("center"in a&&(b=a.center,null!=b)){if(!this.hasWidget(this.getName()+"center")){var g=BI.createWidget(b);this.addWidget(this.getName()+"center",g)}this.getWidgetByName(this.getName()+"center").element.css({position:"absolute",top:c,bottom:d,left:e,right:f})}},update:function(a){},populate:function(a){BI.BorderLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.border",BI.BorderLayout),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(a){var b=this,c=this.options;this.showIndex=void 0,BI.each(a,function(a,d){if(d){if(b.hasWidget(d.cardName))var e=b.getWidgetByName(d.cardName);else{var e=BI.createWidget(d);e.on(BI.Events.DESTROY,function(){var a=BI.findIndex(c.items,function(a,b){return b.cardName==d.cardName});a>-1&&c.items.splice(a,1)}),b.addWidget(d.cardName,e)}e.element.css({position:"absolute",top:"0",right:"0",bottom:"0",left:"0"}),e.setVisible(!1)}})},update:function(){},empty:function(){BI.CardLayout.superclass.empty.apply(this,arguments),this.options.items=[]},populate:function(a){BI.CardLayout.superclass.populate.apply(this,arguments),this._mount(),this.options.defaultShowName&&this.showCardByName(this.options.defaultShowName)},isCardExisted:function(a){return BI.some(this.options.items,function(b,c){return c.cardName==a&&c.el})},getCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");return this._children[a]},_deleteCardByName:function(a){delete this._children[a];var b=BI.findIndex(this.options.items,function(b,c){return c.cardName==a});b>-1&&this.options.items.splice(b,1)},deleteCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");var b=this._children[a];this._deleteCardByName(a),b&&b._destroy()},addCardByName:function(a,b){if(this.isCardExisted(a))throw new Error("cardName is already exist");var c=BI.createWidget(b,this);return c.element.css({position:"relative",top:"0",left:"0",width:"100%",height:"100%"}).appendTo(this.element),c.invisible(),this.addWidget(a,c),this.options.items.push({el:b,cardName:a}),c},showCardByName:function(a,b,c){var d=this,e=this.isCardExisted(a);null!=this.showIndex&&(this.lastShowIndex=this.showIndex),this.showIndex=a;var f=!1;BI.each(this.options.items,function(g,h){var i=d._children[h.cardName];i&&(a!=h.cardName?!f&&!e&&BI.Action&&b instanceof BI.Action?(b.actionBack(i),f=!0):i.invisible():BI.Action&&b instanceof BI.Action?b.actionPerformed(void 0,i,c):(i.visible(),c&&c()))})},showLastCard:function(){var a=this;this.showIndex=this.lastShowIndex,BI.each(this.options.items,function(b,c){a._children[c.cardName].setVisible(a.showIndex==b)})},setDefaultShowName:function(a){return this.options.defaultShowName=a,this},getDefaultShowName:function(){return this.options.defaultShowName},getAllCardNames:function(){return BI.map(this.options.items,function(a,b){return b.cardName})},getShowingCard:function(){if(BI.isKey(this.showIndex))return this.getWidgetByName(this.showIndex)},deleteAllCard:function(){var a=this;BI.each(this.getAllCardNames(),function(b,c){a.deleteCardByName(c)})},hideAllCard:function(){var a=this;BI.each(this.options.items,function(b,c){a._children[c.cardName].invisible()})},isAllCardHide:function(){var a=this,b=!0;return BI.some(this.options.items,function(c,d){if(a._children[d.cardName].isVisible())return b=!1,!1}),b},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._deleteCardByName(b)}}),BI.shortcut("bi.card",BI.CardLayout),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(a,b){var c=this.options,d=BI.DefaultLayout.superclass._addElement.apply(this,arguments);return c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.DefaultLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.default",BI.DefaultLayout),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(a){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=BI.makeArray(f),i={},j={};BI.each(h,function(a){h[a]=BI.makeArray(g)}),BI.each(a,function(a,b){return BI.isArray(b)?void BI.each(b,function(c,d){i[a]=(i[a]||0)+b.width,j[c]=(j[c]||0)+b.height,h[a][c]=d}):(i[b.row]=(i[b.row]||0)+b.width,j[b.column]=(j[b.column]||0)+b.height,void(h[b.row][b.column]=b))});for(var k=0;k0){var p=this.getWidgetByName(this.getName()+k+"_"+(m-1));p.element.css({right:100-o+"%"})}m==e.columns-1&&n.element.css({right:"0%"}),d(n,k,m),l+=h[k][m].width}for(var m=0;m0){var p=this.getWidgetByName(this.getName()+(k-1)+"_"+m);p.element.css({bottom:100-r+"%"})}k==e.rows-1&&n.element.css({bottom:"0%"}),q+=h[k][m].height}},update:function(){},populate:function(a){BI.DivisionLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.division",BI.DivisionLayout),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(a,b){var c=this.options,d=BI.FloatLeftLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"left"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),BI.isNotNull(b.bottom)&&d.element.css({bottom:b.bottom}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){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(a,b){var c=this.options,d=BI.FloatRightLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"right"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),BI.isNotNull(b.bottom)&&d.element.css({bottom:b.bottom}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":(0===a?c.hgap:0)+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.FloatRightLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right",BI.FloatRightLayout),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(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}for(var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=100/g,i=100/f,j=[],k=0;k").attr({cellspacing:0,cellpadding:0}).css({position:"relative","white-space":"nowrap",height:a.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:a.horizontalAlign===BI.HorizontalAlign.Center||a.horizontalAlign===BI.HorizontalAlign.Stretch?"100%":"auto","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=BI.Widget._renderEngine.createElement("
    "),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]<=1?e:e+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative","vertical-align":d.verticalAlign,margin:"0",padding:"0",border:"none"}),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},appendFragment:function(a){this.$tr.append(a),this.element.append(this.$table)},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){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(a,b){var c=this.options,d=BI.HorizontalCellLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"table-cell","vertical-align":"middle"}),c.hgap+c.lgap>0&&d.element.css({"margin-left":c.hgap+c.lgap+"px"}),c.hgap+c.rgap>0&&d.element.css({"margin-right":c.hgap+c.rgap+"px"}),c.vgap+c.tgap>0&&d.element.css({"margin-top":c.vgap+c.tgap+"px"}),c.vgap+c.bgap>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalCellLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_cell",BI.HorizontalCellLayout),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(a,b){var c=this.options,d=BI.InlineLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"inline-block","*display":"inline","*zoom":1}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.InlineLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline",BI.InlineLayout),BI.LatticeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LatticeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-lattice-layout clearfix"})},render:function(){BI.LatticeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.LatticeLayout.superclass._addElement.apply(this,arguments);if(c.columnSize&&c.columnSize[a])var e=c.columnSize[a]/BI.sum(c.columnSize)*100+"%";else var e=1/this.options.items.length*100+"%";return d.element.css({position:"relative","float":"left",width:e}),d},addItem:function(a){var b=BI.LatticeLayout.superclass.addItem.apply(this,arguments);return this.resize(),b},addItemAt:function(a){var b=BI.LatticeLayout.superclass.addItemAt.apply(this,arguments);return this.resize(),b},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.LatticeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.lattice",BI.LatticeLayout),BI.TableLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-layout",scrolly:!0,columnSize:[200,200,"fill"],rowSize:30,hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TableLayout.superclass.render.apply(this,arguments),this.rows=0,this.populate(this.options.items)},_addElement:function(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}var f,g,h=this.options,i=[],j=0,k=0;for(f=0;ff;g--){if(!BI.isNumber(h.columnSize[g]))throw new Error("item with fill can only be one");e(b[g],this.rows,g),i.push(BI.extend({top:0,bottom:0,right:h.columnSize[g]<=1?100*k+"%":k,width:h.columnSize[g]<=1?100*h.columnSize[g]+"%":h.columnSize[g]},b[g])),k+=h.columnSize[g]+(h.columnSize[g]<1?0:h.hgap)}f>=0&&f0&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":h.vgap}),l.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,l),l},resize:function(){},addItem:function(a){if(!BI.isArray(a))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},update:function(){},populate:function(a){BI.TableLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table",BI.TableLayout),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(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",top:(d.vgap||0)+(d.tgap||0)+c.vgap+c.tgap+"px",bottom:(d.bgap||0)+(d.vgap||0)+c.vgap+c.bgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].width+(a[e-1].lgap||0)+2*(a[e-1].hgap||0)+c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({left:100*d[e]+"%",width:100*f.width+"%"}):g.element.css({left:d[e]+(f.lgap||0)+(f.hgap||0)+c.hgap+c.lgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].width+(a[d+1].rgap||0)+2*(a[d+1].hgap||0)+c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({right:100*e[d]+"%",width:100*f.width+"%"}):g.element.css({right:e[d]+(f.rgap||0)+(f.hgap||0)+c.hgap+c.rgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0})},update:function(){var a;return BI.each(this._children,function(b,c){a=c.update()||a}),a},populate:function(a){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(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",left:(d.lgap||0)+(d.hgap||0)+c.hgap+c.lgap+"px",right:+(d.hgap||0)+(d.rgap||0)+c.hgap+c.rgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].height+(a[e-1].tgap||0)+2*(a[e-1].vgap||0)+c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({top:100*d[e]+"%",height:100*f.height+"%"}):g.element.css({top:d[e]+(f.vgap||0)+(f.tgap||0)+c.vgap+c.tgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].height+(a[d+1].bgap||0)+2*(a[d+1].vgap||0)+c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({bottom:100*e[d]+"%",height:100*f.height+"%"}):g.element.css({bottom:e[d]+(f.vgap||0)+(f.bgap||0)+c.vgap+c.bgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0})},update:function(){},populate:function(a){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout),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("
    ").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(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}for(var f=this.options,g=BI.createWidget({type:"bi.default",tagName:"tr"}),h=0;h=0;f--){for(var g=0;g=0;g--){for(var f=0;f-1)return a.splice(c,1)}}function i(a){if(!X.test(a)){var b=a.split(".");return function(a){for(var c=0;cva&&qa[d].watcher.id>a.id;)d--;qa.splice(d+1,0,{watcher:a,options:b})}else qa.push({watcher:a,options:b});ta||(ta=!0,Y(v))}}function x(a){ya.clear(),y(a,ya)}function y(a,b){var c=void 0,d=void 0,e=_.isArray(a);if(e||_.isObject(a)){if(a.__ob__){var f=a.__ob__.dep.id;if(b.has(f))return;b.add(f)}if(e)for(c=a.length;c--;)y(a[c],b);else for(d=_.keys(a),c=d.length;c--;)y(a[d[c]],b)}}function z(a){for(var b="",c=0,d=a.length;c 0 Then","\t\t["+a+'] = [$vbsetter](Me, [$accessors],"'+a+'")',"\tEnd If","\tOn Error Goto 0","\tEnd Property"));for(a in c)f[a]||(f[a]=!0,e.push("\tPublic ["+a+"]"));e.push("\tPublic [hasOwnProperty]"),e.push("End Class");var g=e.join("\r\n"),h=ja[g];h||(h=d("VBClass"),window.parseVB("Class "+h+g),window.parseVB(["Function "+h+"Factory(acc, vbm)","\tDim o","\tSet o = (New "+h+")(acc, vbm)","\tSet "+h+"Factory = o","End Function"].join("\r\n")),ja[g]=h);var i=window[h+"Factory"](b,ka);return i}}var la,ma=ga,na=_.keys(da),oa={shouldConvert:!0},pa=function(){function a(b){if(_classCallCheck(this,a),this.value=b,this.dep=new aa,this.vmCount=0,_.isArray(b)){var c=S?m:n;c(b,da,na),this.model=this.observeArray(b)}else this.model=this.walk(b);V?this.model.__ob__=this:l(this.model,"__ob__",this)}return a.prototype.walk=function(a){return q(a,this)},a.prototype.observeArray=function(a){for(var b=0,c=a.length;b=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),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 a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(BI.isIE()&&BI.getIEVersion()<10?" hack":""),height:30,width:30,hgap:5,vgap:2.5,items:[{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),b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:c}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=c,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 a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(a,b){b||(b={});var c=this.options,d=this.getTipType()||(this.isEnabled()?"success":"warning"),e="success"===d?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(e)&&(BI.Tooltips.show(a,this.getName(),e,d,this,b),c.action&&BI.Actions.runAction(c.action,"hover",c,this),BI.Actions.runGlobalAction("hover",c,this))},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover({belowMouse:a.belowMouse,container:a.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(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(c){b._e=c,BI.isNotNull(b.showTimeout)&&(clearTimeout(b.showTimeout),b.showTimeout=null),BI.isNull(b.hideTimeout)&&(b.hideTimeout=BI.delay(function(){BI.isNotNull(b.hideTimeout)&&b._hideTooltip()},500)),b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&(BI.isNotNull(b.hideTimeout)&&(clearTimeout(b.hideTimeout),b.hideTimeout=null),b._showToolTip(b._e||c,a))},500)}),this.element.on("mouseleave.title"+this.getName(),function(a){b._e=null,b._clearTimeOut(),b._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(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.Tooltips.remove(this.getName())}}),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var c=this._getShowText();BI.isKey(c)?this.setText(c):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.doRedMark(b.keyword),b.highLight&&this.doHighLight()},_getShowText:function(){var a=this.options;return BI.isFunction(a.text)?a.text():a.text},doRedMark:function(a){var b=this.options;b.keyword=a,this.text.element.__textKeywordMarked__(this._getShowText()||b.value,a,b.py)},unRedMark:function(){var a=this.options;a.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){return BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(a)?a:"",BI.isIE9Below()?void this.text.element.html(BI.htmlEncode(this._getShowText())):void(/\s/.test(a)?this.text.element[0].innerHTML=BI.htmlEncode(this._getShowText()):this.text.element[0].textContent=this._getShowText()); +var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options;BI.isNumber(e.rowSize)&&(e.rowSize=BI.makeArray(e.items.length,1/e.items.length)),BI.isNumber(e.columnSize)&&(e.columnSize=BI.makeArray(e.items[0].length,1/e.items[0].length));for(var f=0;f=0;f--){for(var g=0;g=0;g--){for(var f=0;f-1)return a.splice(c,1)}}function i(a){if(!X.test(a)){var b=a.split(".");return function(a){for(var c=0;cva&&qa[d].watcher.id>a.id;)d--;qa.splice(d+1,0,{watcher:a,options:b})}else qa.push({watcher:a,options:b});ta||(ta=!0,Y(v))}}function x(a){ya.clear(),y(a,ya)}function y(a,b){var c=void 0,d=void 0,e=_.isArray(a);if(e||_.isObject(a)){if(a.__ob__){var f=a.__ob__.dep.id;if(b.has(f))return;b.add(f)}if(e)for(c=a.length;c--;)y(a[c],b);else for(d=_.keys(a),c=d.length;c--;)y(a[d[c]],b)}}function z(a){for(var b="",c=0,d=a.length;c 0 Then","\t\t["+a+'] = [$vbsetter](Me, [$accessors],"'+a+'")',"\tEnd If","\tOn Error Goto 0","\tEnd Property"));for(a in c)f[a]||(f[a]=!0,e.push("\tPublic ["+a+"]"));e.push("\tPublic [hasOwnProperty]"),e.push("End Class");var g=e.join("\r\n"),h=ja[g];h||(h=d("VBClass"),window.parseVB("Class "+h+g),window.parseVB(["Function "+h+"Factory(acc, vbm)","\tDim o","\tSet o = (New "+h+")(acc, vbm)","\tSet "+h+"Factory = o","End Function"].join("\r\n")),ja[g]=h);var i=window[h+"Factory"](b,ka);return i}}var la,ma=ga,na=_.keys(da),oa={shouldConvert:!0},pa=function(){function a(b){if(_classCallCheck(this,a),this.value=b,this.dep=new aa,this.vmCount=0,_.isArray(b)){var c=S?m:n;c(b,da,na),this.model=this.observeArray(b)}else this.model=this.walk(b);V?this.model.__ob__=this:l(this.model,"__ob__",this)}return a.prototype.walk=function(a){return q(a,this)},a.prototype.observeArray=function(a){for(var b=0,c=a.length;b=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),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 a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var a=this,b=this.options,c=BI.isIE(),d=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(c?" wave-loading hack":""),height:30,width:30,hgap:5,vgap:2.5,items:c?[]:[{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),b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:d}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=d,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 a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(a,b){b||(b={});var c=this.options,d=this.getTipType()||(this.isEnabled()?"success":"warning"),e="success"===d?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(e)&&(BI.Tooltips.show(a,this.getName(),e,d,this,b),c.action&&BI.Actions.runAction(c.action,"hover",c,this),BI.Actions.runGlobalAction("hover",c,this))},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover({belowMouse:a.belowMouse,container:a.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(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(c){b._e=c,BI.isNotNull(b.showTimeout)&&(clearTimeout(b.showTimeout),b.showTimeout=null),BI.isNull(b.hideTimeout)&&(b.hideTimeout=BI.delay(function(){BI.isNotNull(b.hideTimeout)&&b._hideTooltip()},500)),b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&(BI.isNotNull(b.hideTimeout)&&(clearTimeout(b.hideTimeout),b.hideTimeout=null),b._showToolTip(b._e||c,a))},500)}),this.element.on("mouseleave.title"+this.getName(),function(a){b._e=null,b._clearTimeOut(),b._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(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.Tooltips.remove(this.getName())}}),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var c=this._getShowText();BI.isKey(c)?this.setText(c):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.doRedMark(b.keyword),b.highLight&&this.doHighLight()},_getShowText:function(){var a=this.options;return BI.isFunction(a.text)?a.text():a.text},doRedMark:function(a){var b=this.options;b.keyword=a,this.text.element.__textKeywordMarked__(this._getShowText()||b.value,a,b.py)},unRedMark:function(){var a=this.options;a.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){return BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(a)?a:"",BI.isIE9Below()?void this.text.element.html(BI.htmlEncode(this._getShowText())):void(/\s/.test(a)?this.text.element[0].innerHTML=BI.htmlEncode(this._getShowText()):this.text.element[0].textContent=this._getShowText()); }}),BI.shortcut("bi.text",BI.Text),BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-basic-button"+(a.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 a=this.options;a.selected===!0&&BI.nextTick(BI.bind(function(){this.setSelected(a.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),a.shadow&&this._createShadow(),a.level&&this.element.addClass("button-"+a.level)},_createShadow:function(){var a=this,b=this.options,c=function(){a.$mask||(a.$mask=BI.createWidget(BI.isObject(b.shadow)?b.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),a.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:a,items:[{el:a.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){a._hover||b.isShadowShowingOnSelected||(c(),a.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(d){a.element.__isMouseInBounds__(d)&&(!a.isEnabled()||a._hover||!b.isShadowShowingOnSelected&&a.isSelected()||(c(),a.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(b){a.element.__isMouseInBounds__(b)||a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())})},bindEvent:function(){function a(a){e.stopEvent&&a.stopEvent(),e.stopPropagation&&a.stopPropagation()}function b(b){if(a(b),!(!d.isEnabled()||d.isOnce()&&d.isSelected())){if(BI.isKey(e.bubble)||BI.isFunction(e.bubble)){if(BI.isNull(d.combo)){var f;BI.createWidget({type:"bi.absolute",element:d,items:[{el:{type:"bi.bubble_combo",trigger:"",ref:function(){d.combo=this},el:{type:"bi.layout",height:"100%"},popup:{type:"bi.text_bubble_bar_popup_view",text:c(),ref:function(){f=this},listeners:[{eventName:BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,action:function(a){d.combo.hideView(),a&&h.apply(d,arguments)}}]},listeners:[{eventName:BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,action:function(){f.populate(c())}}]},left:0,right:0,bottom:0,top:0}]})}return void(d.combo.isViewVisible()?d.combo.hideView():d.combo.showView())}h.apply(d,arguments)}}function c(){var a=d.options.bubble;return BI.isFunction(a)?a():a}var d=this,e=this.options,f=this.handle();if(f){f=f.element;var g=(e.trigger||"").split(",");BI.each(g,function(c,g){switch(g){case"mouseup":var h=!1;f.mousedown(function(){h=!0}),f.mouseup(function(c){h===!0&&b(c),h=!1,a(c)});break;case"mousedown":var h=!1,i=!1;f.mousedown(function(c){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){!BI.DOM.isExist(d)||f.__isMouseInBounds__(a)||h!==!0||i||d._trigger(),h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(d.isSelected()?i=!0:b(c),h=!0,a(c))}),f.mouseup(function(a){BI.DOM.isExist(d)&&h===!0&&i===!0&&b(a),h=!1,i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())});break;case"dblclick":f.dblclick(b);break;case"lclick":var j,h=!1;f.mousedown(function(b){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){j&&clearInterval(j),j=null,h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(!d.isEnabled()||d.isOnce()&&d.isSelected()||(j=setInterval(function(){d.isEnabled()&&d.doClick()},180),h=!0,a(b)))});break;default:(e.stopEvent||e.stopPropagation)&&f.mousedown(function(b){a(b)}),f.click(b)}});var h=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1})}},_trigger:function(a){var b=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())),this.isValid())){b.handler.call(this,this.getValue(),this,a);var c=this.getValue();this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,c,this,a),this.fireEvent(BI.BasicButton.EVENT_CHANGE,c,this),b.action&&BI.Actions.runAction(b.action,"click",b,this),BI.Actions.runGlobalAction("click",b,this)}},_doClick:function(a){this.isValid()&&this.beforeClick(a),this._trigger(a),this.isValid()&&this.doClick(a)},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(a){var b=this.options;b.selected=a,a?this.handle().element.addClass("active"):this.handle().element.removeClass("active"),b.shadow&&!b.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(a){this.options.text=a},getText:function(){return this.options.text},_setEnable:function(a){BI.BasicButton.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),a||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",BI.NodeButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.NodeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-node",open:!1})},_init:function(){BI.NodeButton.superclass._init.apply(this,arguments);var a=this;BI.nextTick(function(){a.setOpened(a.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(a){this.options.open=!!a},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))}}),BI.Tip=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Tip.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-tip",zIndex:BI.zIndex_tip})},_init:function(){BI.Tip.superclass._init.apply(this,arguments),this.element.css({zIndex:this.options.zIndex})}}),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 a=this.options,b={};BI.each(a.behaviors,function(a,c){b[a]=BI.BehaviorFactory.createBehavior(a,{rule:c})}),this.behaviors=b,this.populate(a.items),(BI.isKey(a.value)||BI.isNotEmptyArray(a.value))&&this.setValue(a.value)},_createBtns:function(a){this.options;return BI.createWidgets(BI.createItems(a,{type:"bi.text_button"}))},_btnsCreator:function(a){var b=this,c=Array.prototype.slice.call(arguments),d=this.options,e=this._createBtns(a);return c[0]=e,BI.each(this.behaviors,function(a,b){b.doBehavior.apply(b,c)}),BI.each(e,function(a,c){c.on(BI.Controller.EVENT_CHANGE,function(a,e,f){if(a===BI.Events.CLICK){switch(d.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:b.setValue(c.getValue());break;case BI.ButtonGroup.CHOOSE_TYPE_NONE:b.setValue([])}b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b.fireEvent(BI.ButtonGroup.EVENT_CHANGE,e,f)}else b.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),c.on(BI.Events.DESTROY,function(){BI.remove(b.buttons,c)})}),e},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:d})]})});return a},_packageSimpleItems:function(a){var b=this.options;return BI.map(b.items,function(b,c){return BI.stripEL(c)===c?a[b]:BI.extend({},c,{el:a[b]})})},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},_isSimpleLayout:function(){var a=this.options;return 1===a.layouts.length&&!BI.isArray(a.items[0])},doBehavior:function(){var a=Array.prototype.slice.call(arguments);a.unshift(this.buttons),BI.each(this.behaviors,function(b,c){c.doBehavior.apply(c,a)})},prependItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(b,this.buttons),this._isSimpleLayout()&&this.layouts&&this.layouts.prependItems?void this.layouts.prependItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.prependItems(this._packageLayout(a).items))},addItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(this.buttons,b),this._isSimpleLayout()&&this.layouts&&this.layouts.addItems?void this.layouts.addItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.addItems(this._packageLayout(a).items))},removeItemAt:function(a){BI.removeAt(this.buttons,a),this.layouts.removeItemAt(a)},removeItems:function(a){a=BI.isArray(a)?a:[a];var b=[];BI.each(this.buttons,function(c,d){BI.deepContains(a,d.getValue())&&b.push(c)}),BI.removeAt(this.buttons,b),this.layouts.removeItemAt(b)},populate:function(a){a=a||[],this.empty(),this.options.items=a,this.buttons=this._btnsCreator.apply(this,arguments),a=this._isSimpleLayout()?this._packageSimpleItems(this.buttons):this._packageItems(a,this._packageBtns(this.buttons)),this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1)})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue())}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},getAllButtons:function(){return this.buttons},getAllLeaves:function(){return this.buttons},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&c.isSelected()&&a.push(c)}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&!c.isSelected()&&a.push(c)}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.options.id===a)return b=d,!0}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=d,!0}),b},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),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(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!1):c.setSelected(!0)):void c.setNotSelectedValue(a)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setEnabledValue)?void c.setEnabledValue(a):void(BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1))})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!0):c.setSelected(!1)):void c.setValue(a)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getNotSelectedValue())):void(c.isEnabled()&&c.isSelected&&!c.isSelected()&&a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getValue())):void(c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue()))}),a},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getSelectedButtons())):void(c.isSelected&&c.isSelected()&&a.push(c))}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getNotSelectedButtons())):void(c.isSelected&&!c.isSelected()&&a.push(c))}),a},getAllLeaves:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getAllLeaves())):void(c.isEnabled()&&a.push(c))}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){var e=d.getValue();if(d.isEnabled()&&(e===a||BI.contains(e,a)))return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()){if(d.attr("id")===a)return b=d,!0;if(BI.isFunction(d.getNodeById)&&(b=d.getNodeById(a)))return!0}}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled())if(BI.isFunction(d.getNodeByValue)){if(b=d.getNodeByValue(a))return!0}else if(d.attr("value")===a)return b=d,!0}),b}}),BI.ButtonTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_tree",BI.ButtonTree),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 a=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(a.value)&&this.setSelectedValue(a.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:"
      "}),BI.createWidget({type:"bi.default",element:this.element,items:[this.tree]})},_selectTreeNode:function(a,b){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,b,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,b,this)},_configSetting:function(){function a(a,b,c){var d=c.checked,e=c.getCheckStatus();e.half===!0&&e.checked===!0&&(d=!1),l.nodes.checkNode(c,!d,!0,!0)}function b(a,b){var c=l._getParentValues(b);b.times=b.times||1;var d="id="+b.id+"×="+b.times++ +"&parentValues= "+_global.encodeURIComponent(BI.jsonEncode(c))+"&checkState="+_global.encodeURIComponent(BI.jsonEncode(b.getCheckStatus()));return"&"+d}function c(a,b){return b.isAjaxing?(BI.Msg.toast("Please Wait。","warning"),!1):(b.children||(b.times=1,f(b,"refresh")),!0)}function d(a,b,c,d){if(c.halfCheck=!1,d&&0!==d.length&&!/^[\s,\S]*<\/html>$/gi.test(d)&&!l._stop){var e=l.nodes,g=c.count||0;c.children.length>g?(c.count=c.children.length,BI.delay(function(){f(c)},n)):(e.updateNode(c),e.selectNode(c.children[0]))}}function e(a,b,c,d,e,f){l.nodes;BI.Msg.toast("Error!","warning")}function f(a,b){var c=l.nodes;"refresh"==b&&c.updateNode(a),c.reAsyncChildNodes(a,b,!0)}function g(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=l.nodes,e=d.getSelectedNodes();$.each(e,function(a,b){b.halfCheck=!1})}var f=b.getCheckStatus();f.half===!0&&f.checked===!0&&(b.checked=!1)}function h(a,b,c){l._selectTreeNode(b,c)}function i(a,b,c){c.halfCheck=!1}function j(a,b,c){}var k=this.options.paras,l=this,m={async:{enable:!0,url:b,autoParam:["id","name"],otherParam:BI.cjkEncodeDO(k)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:c,onAsyncSuccess:d,onAsyncError:e,beforeCheck:g,onCheck:h,onExpand:i,onCollapse:j,onClick:a}},n=100;return m},_getParentValues:function(a){if(!a.getParentNode())return[];var b=a.getParentNode(),c=this._getParentValues(b);return c=c.concat([this._getNodeValue(b)])},_getNodeValue:function(a){return null==a.value?BI.replaceAll(a.text.replace(/<[^>]+>/g,"")," "," "):a.value},_getHalfSelectedValues:function(a,b){var c=this,d=b.getCheckStatus();if(d.checked!==!1||d.half!==!1){if(BI.isNotEmptyArray(b.children)&&d.half===!0){var e=b.children;return void BI.each(e,function(b,d){c._getHalfSelectedValues(a,d)})}var f=b.parentValues||c._getParentValues(b),g=f.concat(this._getNodeValue(b));if(BI.isNotEmptyArray(b.children)||d.half===!1)return void this._buildTree(a,g);var h=BI.deepClone(this.options.paras.selectedValues),i=this._getTree(h,g);this._addTreeNode(a,f,this._getNodeValue(b),i)}},_getTree:function(a,b){var c=a;return BI.any(b,function(a,b){return null==c[b]||void(c=c[b])}),c},_addTreeNode:function(a,b,c,d){var e=a;BI.each(b,function(a,b){null==e[b]&&(e[b]={}),e=e[b]}),e[c]=d},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){null==c[b]&&(c[b]={}),c=c[b]})},_getSelectedValues:function(){function a(a){BI.each(a,function(a,d){var e=d.getCheckStatus();if(e.checked===!0||e.half===!0)if(e.half===!0)b._getHalfSelectedValues(c,d);else{var f=d.parentValues||b._getParentValues(d),g=f.concat([b._getNodeValue(d)]);b._buildTree(c,g)}})}var b=this,c={},d=this.nodes.getNodes();return a(d),c},_dealWidthNodes:function(a){var b=this.options,c=BI.Tree.arrayFormat(a);return BI.each(c,function(a,c){c.title=c.title||c.text||c.value,c.isParent=c.isParent||c.parent,BI.isKey(b.paras.keyword)?c.text=$("
      ").__textKeywordMarked__(c.text,b.paras.keyword,c.py).html():c.text=BI.htmlEncode(c.text+"")}),a},_loadMore:function(){var a=this,b=this.options;this.tip.setLoading();var c=BI.extend({},b.paras,{times:++this.times});b.itemsCreator(c,function(b){if(a._stop!==!0){var c=!!b.hasNext,d=b.items||[];c?a.tip.setLoaded():a.tip.setEnd(),d.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(d))}})},_initTree:function(a){var b=this,c=this.options;b.fireEvent(BI.Events.INIT),this.times=1;var d=this.tree;d.empty(),this.loading(),this.tip.setVisible(!1);var e=function(c){b._stop!==!0&&(b.nodes=$.fn.zTree.init(d.element,a,c))},f=BI.extend({},c.paras,{times:1});c.itemsCreator(f,function(a){if(b._stop!==!0){var c=!!a.hasNext,d=a.items||[];d.length>0&&e(b._dealWidthNodes(d)),b.setTipVisible(d.length<=0),b.loaded(),c?b.tip.setLoaded():b.tip.invisible(),1===f.times&&b.fireEvent(BI.Events.AFTERINIT)}})},initTree:function(a,b){var b=b||{async:{enable:!1},check:{enable:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=$.fn.zTree.init(this.tree.element,b,a)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._createTree(),this.start(),this._initTree(b)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){var a=this.nodes;return a.getCheckedNodes(!0).length>0},checkAll:function(a){function b(a){BI.each(a,function(a,c){c.halfCheck=!1,b(c.children)})}this.nodes&&(BI.each(this.nodes.getNodes(),function(a,c){c.halfCheck=!1,b(c.children)}),this.nodes.checkAllNodes(a))},expandAll:function(a){this.nodes&&this.nodes.expandAll(a)},setValue:function(a,b){this.checkAll(!1),this.updateValue(a,b),this.refresh()},setSelectedValue:function(a){this.options.paras.selectedValues=BI.deepClone(a||{})},updateValue:function(a,b){if(this.nodes){b||(b="value");var c=this.nodes;BI.each(a,function(a,d){var e=c.getNodesByParam(b,a,null);BI.each(e,function(a,b){BI.extend(b,{checked:!0},d),c.updateNode(b)})})}},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),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)},_configSetting:function(){function a(a,b,c){var d=$.fn.zTree.getZTreeObj(b),e=c.checked,f=c.getCheckStatus();f.half===!0&&f.checked===!0&&(e=!1),d.checkNode(c,!e,!0,!0)}function b(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=$.fn.zTree.getZTreeObj(a),e=d.getSelectedNodes();BI.each(e,function(a,b){b.halfCheck=!1})}var f=b.getCheckStatus();f.half===!0&&f.checked===!0&&(b.checked=!1)}function c(a,b){h._beforeExpandNode(a,b)}function d(a,b,c){h._selectTreeNode(b,c)}function e(a,b,c){c.halfCheck=!1}function f(a,b,c){c.halfCheck=!1}var g=this.options.paras,h=this,i={async:{enable:!1,otherParam:BI.cjkEncodeDO(g)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeCheck:b,onCheck:d,beforeExpand:c,onExpand:e,onCollapse:f,onClick:a}};return i},_selectTreeNode:function(a,b){var c=this,d=(this.options,BI.deepClone(b.parentValues||c._getParentValues(b))),e=this._getNodeValue(b);if(b.checked===!0);else{var f=b,g=this._getTree(this.options.paras.selectedValues,d);for(BI.isNotNull(g[e])&&delete g[e];null!=f&&BI.isEmpty(g);)d=d.slice(0,d.length-1),f=f.getParentNode(),null!=f&&(g=this._getTree(this.options.paras.selectedValues,d),e=this._getNodeValue(f),delete g[e])}BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b)),checkState:b.getCheckStatus()}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||setTimeout(function(){e.itemsCreator(g,h)},17)},_join:function(a,b){function c(a,b,f){BI.each(b,function(g,h){BI.isNull(f[g])?d._addTreeNode(e,a,g,h):BI.isEmpty(f[g])?d._addTreeNode(e,a,g,{}):c(a.concat([g]),b[g],f[g])})}var d=this,e={};return c([],a,b),c([],b,a),e},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.AsyncTree.superclass.hasChecked.apply(this,arguments)},_getJoinValue:function(){if(!this.nodes)return{};var a=this._getSelectedValues();return BI.isEmpty(a)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?a:this._join(a,this.options.paras.selectedValues)},getValue:function(){return this._getJoinValue()},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.async_tree",BI.AsyncTree),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 a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_selectTreeNode:function(a,b){var c=this,d=this.options,e=BI.deepClone(b.parentValues||c._getParentValues(b)),f=this._getNodeValue(b);if(b.checked===!0)this.options.paras.selectedValues=this._getJoinValue(),d.itemsCreator(BI.extend({},d.paras,{type:BI.TreeView.REQ_TYPE_ADJUST_DATA,curSelectedValue:f,parentValues:e}),function(a){c.options.paras.selectedValues=a,BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)});else{for(var g=this.options.paras.selectedValues,h=e.concat(f),i=0,j=h.length;i0?d._dealWidthNodes(g):[]),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},getValue:function(){return BI.deepClone(this.options.paras.selectedValues||{})},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.part_tree",BI.PartTree),BI.ListTreeView=BI.inherit(BI.TreeView,{_constants:{SPLIT:"<|>"},_defaultConfig:function(){return BI.extend(BI.ListTreeView.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ListTreeView.superclass._init.apply(this,arguments);var a=this.options;this.storeValue=a.value||{}},_configSetting:function(){function a(a,b,d){var e=$.fn.zTree.getZTreeObj(b),f=d.checked;c._checkValue(d,!f),e.checkNode(d,!f,!0,!0)}function b(a,b,d){c._selectTreeNode(b,d)}var c=(this.options.paras,this),d={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:b,onClick:a}};return d},_selectTreeNode:function(a,b){this._checkValue(b,b.checked),BI.ListTreeView.superclass._selectTreeNode.apply(this,arguments)},_transArrayToMap:function(a){var b=this,c={};return BI.each(a,function(a,d){var e=d.join(b._constants.SPLIT);c[e]=!0}),c},_transMapToArray:function(a){var b=this,c=[];return BI.each(a,function(a){var d=a.split(b._constants.SPLIT);c.push(d)}),c},_checkValue:function(a,b){var c=BI.concat(this._getParentValues(a),this._getNodeValue(a)).join(this._constants.SPLIT);b?this.storeValue[c]=!0:delete this.storeValue[c]},setSelectedValue:function(a){this.options.paras.selectedValues=a||[],this.storeValue=this._transArrayToMap(a)},getValue:function(){return this._transMapToArray(this.storeValue)}}),BI.shortcut("bi.list_tree_view",BI.ListTreeView),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(){function a(a,b){b.half=!1}function b(a,b,c){var d=$.fn.zTree.getZTreeObj(b),e=c.checked;f._checkValue(c,!e),d.checkNode(c,!e,!0,!0)}function c(a,b){f._beforeExpandNode(a,b)}function d(a,b,c){f._selectTreeNode(b,c)}var e=this.options.paras,f=this,g={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:d,beforeExpand:c,beforeCheck:a,onClick:b}};return g},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b))}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||setTimeout(function(){e.itemsCreator(g,h)},17)},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.ListAsyncTree.superclass.hasChecked.apply(this,arguments)},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.list_async_tree",BI.ListAsyncTree),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 a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_initTree:function(a,b){function c(b){d._stop!==!0&&(d.nodes=$.fn.zTree.init(f.element,a,b))}var d=this,e=this.options;this.times=1;var f=this.tree;f.empty(),d.tip.setVisible(!1),this.loading();var g=BI.extend({},e.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:this.times}),h=function(a){if(d._stop!==!0&&b==e.paras.keyword){var f=!!a.hasNext,g=a.items||[];e.paras.lastSearchValue=a.lastSearchValue,c(g.length>0?d._dealWidthNodes(g):[]), d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.list_part_tree",BI.ListPartTree),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}),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 a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.CollectionView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&(this._calculateSizeAndPositionData(),this._populate())},mounted:function(){var a=this.options;0===a.scrollLeft&&0===a.scrollTop||(this.element.scrollTop(a.scrollTop),this.element.scrollLeft(a.scrollLeft))},_calculateSizeAndPositionData:function(){for(var a=this.options,b=[],c=new BI.SectionManager,d=0,e=0,f=0,g=a.items.length;f0&&h>0){if(f>=this.renderRange.minY&&h<=this.renderRange.maxY&&e>=this.renderRange.minX&&g<=this.renderRange.maxX)return;for(var i=this._cellRenderers(h-f,g-e,e,f),j=[],k={},l={},m={},n={},o=0,p=i.length;o=0?(q.width!==this.renderedCells[A]._width&&(this.renderedCells[A]._width=q.width,this.renderedCells[A].el.setWidth(q.width)),q.height!==this.renderedCells[A]._height&&(this.renderedCells[A]._height=q.height,this.renderedCells[A].el.setHeight(q.height)),this.renderedCells[A]._left!==q.x&&this.renderedCells[A].el.element.css("left",q.x+"px"),this.renderedCells[A]._top!==q.y&&this.renderedCells[A].el.element.css("top",q.y+"px"),j.push(z=this.renderedCells[A])):(z=BI.createWidget(BI.extend({type:"bi.label",width:q.width,height:q.height},b.items[q.index],{cls:(b.items[q.index].cls||"")+" container-cell"+(0===q.y?" first-row":"")+(0===q.x?" first-col":""),_left:q.x,_top:q.y})),j.push({el:z,left:q.x,top:q.y,_left:q.x,_top:q.y,_width:q.width,_height:q.height}));for(var B=0|s[q.y],C=0|s[q.y+q.height],D=B;D<=C;D++){var E=n[D];x(t,E),y(u,E),t[E]=Math.min(t[E],q.x),u[E]=Math.max(u[E],q.x+q.width)}for(var F=0|r[q.x],G=0|r[q.x+q.width],D=F;D<=G;D++){var H=m[D];x(v,H),y(w,H),v[H]=Math.min(v[H],q.y),w[H]=Math.max(w[H],q.y+q.height)}k[q.index]=[q.index,o],l[o]=z}var I={},J={},K=[];BI.each(k,function(b,c){a.renderedKeys[b]?I[b]=c:J[b]=c}),BI.each(this.renderedKeys,function(a,b){I[a]||J[a]||K.push(b[1])}),BI.each(K,function(b,c){a.renderedCells[c].el._destroy()});var L=[];BI.each(J,function(a,b){L.push(j[b[1]])}),this.container.addItems(L),this.container._children=l,this.container.attr("items",j),this.renderedCells=j,this.renderedKeys=k;var M=BI.min(t),N=BI.max(u),O=BI.max(v),P=BI.min(w);this.renderRange={minX:M,minY:O,maxX:N,maxY:P}}},_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(a){var b=this.options;if(this._reRange(),a&&a!==this.options.items&&(this.options.items=a,this._calculateSizeAndPositionData()),b.items.length>0){this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender();try{this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)}catch(c){}}},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"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(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.CollectionView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.collection_view",BI.CollectionView),BI.Combo=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Combo.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Combo.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,d))}),a.element.on("mouseenter."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.addClass(b.hoverClass)}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(b.logic,{items:[{el:this.combo}]})))),b.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(){function a(){b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&c.toggle===!0&&(b._hideView(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",b.combo),b.fireEvent(BI.Combo.EVENT_COLLAPSE)),b.popupView&&b.popupView.element.off("mouseenter."+b.getName()).off("mouseleave."+b.getName()),f=!1}var b=this,c=this.options,d=(this.options.trigger||"").split(","),e=function(a){c.stopEvent&&a.stopEvent(),c.stopPropagation&&a.stopPropagation()},f=!1;BI.each(d,function(d,g){switch(g){case"hover":b.element.on("mouseenter."+b.getName(),function(a){b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(b._popupView(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND))}),b.element.on("mouseleave."+b.getName(),function(c){b.popupView&&(b.popupView.element.on("mouseenter."+b.getName(),function(c){f=!0,b.popupView.element.on("mouseleave."+b.getName(),function(b){a()}),b.popupView.element.off("mouseenter."+b.getName())}),BI.defer(function(){f||a()},50))});break;case"click":var h=BI.debounce(function(a){b.combo.element.__isMouseInBounds__(a)&&b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(c.toggle?b._toggle():b._popupView(),b.isViewVisible()?(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND)):(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",b.combo),b.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});b.element.off(g+"."+b.getName()).on(g+"."+b.getName(),function(a){h(a),e(a)});break;case"click-hover":var h=BI.debounce(function(a){b.combo.element.__isMouseInBounds__(a)&&b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(b._popupView(),b.isViewVisible()&&(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});b.element.off("click."+b.getName()).on("click."+b.getName(),function(a){h(a),e(a)}),b.element.on("mouseleave."+b.getName(),function(c){b.popupView&&(b.popupView.element.on("mouseenter."+b.getName(),function(c){f=!0,b.popupView.element.on("mouseleave."+b.getName(),function(b){a()}),b.popupView.element.off("mouseenter."+b.getName())}),BI.defer(function(){f||a()},50))})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var a=this,b=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view",value:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a.combo.setValue(a.getValue()),a.fireEvent(BI.Combo.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){a.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(a){if(this.element.find(a.target).length>0||this.popupView&&this.popupView.element.find(a.target).length>0||"CodeMirror-cursor"===a.target.className||BI.Widget._renderEngine.createElement(a.target).closest(".CodeMirror-hints").length>0){var b=this.options.direction.split(",");return void((BI.contains(b,"innerLeft")||BI.contains(b,"innerRight"))&&(this.adjustWidth(),this.adjustHeight()))}var c=this.options.hideChecker.apply(this,[a]);c!==!1&&this._hideView()},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),this.options.destroyWhenHide===!0?(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(a){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(a),this.adjustHeight(a),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(a){var b=this.options;if(this.popupView&&b.isNeedAdjustWidth===!0){this.resetListWidth("");var c=this.popupView.element.outerWidth(),d=this.element.outerWidth()||b.width;c>d+80?d+=80:c>d&&(d=c),this.resetListWidth(d<100?100:d)}},adjustHeight:function(a){var b=this.options,c={};if(this.popupView){var d=this.popupView.isVisible();this.popupView.visible();var e=BI.isNotNull(a)?{element:{offset:function(){return{left:a.pageX,top:a.pageY}},bounds:function(){return{x:a.offsetX,y:a.offsetY,width:0,height:24}},outerWidth:function(){return 0},outerHeight:function(){return 24}}}:this.combo;switch(b.direction){case"bottom":case"bottom,right":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["bottom","top","right","left"],b.offsetStyle);break;case"top":case"top,right":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["top","bottom","right","left"],b.offsetStyle);break;case"left":case"left,bottom":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["left","right","bottom","top"],b.offsetStyle);break;case"right":case"right,bottom":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","bottom","top"],b.offsetStyle);break;case"top,left":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["top","bottom","left","right"],b.offsetStyle);break;case"bottom,left":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["bottom","top","left","right"],b.offsetStyle);break;case"left,top":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["left","right","top","bottom"],b.offsetStyle);break;case"right,top":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","top","bottom"],b.offsetStyle);break;case"right,innerRight":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","innerRight","innerLeft","bottom","top"],b.offsetStyle);break;case"right,innerLeft":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","innerLeft","innerRight","bottom","top"],b.offsetStyle);break;case"innerRight":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["innerRight","innerLeft","right","left","bottom","top"],b.offsetStyle);break;case"innerLeft":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["innerLeft","innerRight","left","right","bottom","top"],b.offsetStyle);break;case"top,custom":case"custom,top":c=BI.DOM.getTopAdaptPosition(e,this.popupView,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":c=BI.DOM.getBottomAdaptPosition(e,this.popupView,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight);break;case"left,custom":case"custom,left":c=BI.DOM.getLeftAdaptPosition(e,this.popupView,b.adjustXOffset||b.adjustLength),delete c.top,delete c.adaptHeight;break;case"custom,right":case"right,custom":c=BI.DOM.getRightAdaptPosition(e,this.popupView,b.adjustXOffset||b.adjustLength),delete c.top,delete c.adaptHeight}"adaptHeight"in c&&this.resetListHeight(c.adaptHeight),"left"in c&&this.popupView.element.css({left:c.left}),"top"in c&&this.popupView.element.css({top:c.top}),this.position=c,this.popupView.setVisible(d)}},resetListHeight:function(a){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(a)},resetListWidth:function(a){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(a)},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate.apply(this.combo,arguments)},_setEnable:function(a){BI.Combo.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.combo.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},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(a){this.isEnabled()&&this.combo.isEnabled()&&!this.isViewVisible()&&this._popupView(a)},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())}}),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),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 a=this,b=this.options;this._expanded=!!b.el.open,this._initExpander(),this._initPullDownAction(),this.expander.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Expander.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Expander.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.expander}]}),b.isDefaultInit&&this._assertPopupView(),this.expander.isOpened()===!0&&this._popupView()},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND))},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE))});break;case"click":d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.expander.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.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 a=this,b=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:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_CHANGE,c,d)}),this.popupView.setVisible(this.isExpanded()),BI.nextTick(function(){a.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(a){this.popupView&&this.popupView.populate.apply(this.popupView,arguments),this.expander.populate.apply(this.expander,arguments)},_setEnable:function(a){BI.Expander.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.expander.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},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(a){return this.expander.options.id===a?this.expander:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.expander.getValue()===a?this.expander:this.popupView&&this.popupView.getNodeByValue(a)},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),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(a){var b=this,c=this.options,d=c.children;if(BI.isEmpty(d))throw new Error("ComboGroup构造错误");BI.each(d,function(a,b){var d=BI.formatEL(b).el.children;b=BI.formatEL(b).el,BI.isEmpty(d)||(b.el=BI.clone(b),b.children=d,b.type="bi.combo_group",b.action=c.action,b.height=c.height,b.direction=c.direction,b.isDefaultInit=c.isDefaultInit,b.isNeedAdjustHeight=c.isNeedAdjustHeight,b.isNeedAdjustWidth=c.isNeedAdjustWidth,b.adjustLength=c.adjustLength,b.popup=c.popup)}),this.combo=BI.createWidget({type:"bi.combo",element:this,container:c.container,height:c.height,trigger:c.trigger,direction:c.direction,isDefaultInit:c.isDefaultInit,isNeedAdjustWidth:c.isNeedAdjustWidth,isNeedAdjustHeight:c.isNeedAdjustHeight,adjustLength:c.adjustLength,el:a,popup:BI.extend({},c.popup,{el:BI.extend({items:d},c.popup.el)})}),this.combo.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.ComboGroup.EVENT_CHANGE,d)})},getValue:function(){return this.combo.getValue()},setValue:function(a){this.combo.setValue(a)}}),BI.ComboGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.combo_group",BI.ComboGroup),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 a=this.options;this.populate(a.items),BI.isKey(a.value)&&this.setValue(a.value)},_packageBtns:function(a){for(var b=this.options,c=this.buttonMap={},d=b.layouts.length-1;d>0;d--)a=BI.map(a,function(a,e){var f=BI.stripEL(e);return BI.extend({},b.layouts[d],{items:[BI.extend({},b.layouts[d].el,{el:BI.extend({ref:function(a){BI.isKey(c[f.value])&&(c[f.value]=a)}},f)})]})});return a},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},addItems:function(a){this.layouts.addItems(a)},prependItems:function(a){this.layouts.prependItems(a)},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttonMap,function(b,c){c&&(a.deepContains(b)?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1))})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttonMap,function(b,c){c&&(!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttonMap,function(b,c){c&&c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},populate:function(a){a=a||[],this.options.items=a,a=this._packageBtns(a),this.layouts?this.layouts.populate(a):this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))}}),BI.VirtualGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.virtual_group",BI.VirtualGroup),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 a=this,b=this.options;this.prev.setLoading(),b.itemsCreator.apply(this,[{times:--this.times},function(){a.prev.setLoaded(),a.prependItems.apply(a,arguments)}])},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.Loader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.prev=!1,b.next=!1),b.prev!==!1&&(this.prev=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.prev)),this.prev.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._prevLoad()})),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}],value:b.value}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Loader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.prev,this.button_group,this.next)})))),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){b.isDefaultInit&&BI.isEmpty(b.items)&&this._populate()},this)),BI.isNotEmptyArray(b.items)&&this._populate(b.items)},hasPrev:function(){var a=this.options;return BI.isNumber(a.count)?this.count0&&f.push(c),BI.Maskers.show(a.getName()),a.popupView.populate.apply(a.popupView,f),b.isAutoSync&&b.adapter&&b.adapter.getValue&&a.popupView.setValue(b.adapter.getValue()),a.popupView.loaded&&a.popupView.loaded(),a.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(a){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(a){BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},getKeyword:function(){return this.editor.getValue()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var a=this.options;return a.isAutoSync&&a.adapter&&a.adapter.getValue?a.adapter.getValue():this.isSearching()?this.popupView.getValue():a.adapter&&a.adapter.getValue?a.adapter.getValue():BI.isNull(this.popupView)?a.popup.value:this.popupView.getValue()},populate:function(a,b,c){var d=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),d.isAutoSync&&d.adapter&&d.adapter.getValue&&this.popupView.setValue(d.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),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 a=this,b=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Switcher.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Switcher.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),b.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.switcher.isEnabled()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND))},function(){a.isEnabled()&&a.switcher.isEnabled()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.switcher.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.switcher.isEnabled()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.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 a=this,b=this.options;this._created||(this.popupView=BI.createWidget(b.popup,{type:"bi.button_group",element:b.adapter&&BI.Maskers.create(this.getName(),b.adapter,BI.extend({container:this},b.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_CHANGE,c,d)}),b.direction===BI.Direction.Custom||b.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){a.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var a=this,b=this.options;b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),BI.nextTick(function(){b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),a.element.removeClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var a=this,b=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),b.adapter?BI.Maskers.show(this.getName()):a.popupView.setVisible(!0),BI.nextTick(function(c){b.adapter?BI.Maskers.show(c):a.popupView.setVisible(!0),a.element.addClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(a){BI.Switcher.superclass._setEnable.apply(this,arguments),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.switcher.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},setAdapter:function(a){this.options.adapter=a,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(a){return this.switcher.attr("id")===a?this.switcher:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.switcher.getValue()===a?this.switcher:this.popupView&&this.popupView.getNodeByValue(a)},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Switcher.superclass.destroy.apply(this,arguments)}}),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),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(a){return BI.createWidget()}})},render:function(){var a=this,b=this.options;BI.isObject(b.tab)&&(this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.tab.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.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(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tab,this.layout)}))));var c=new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardCreator:function(c){var d=b.cardCreator.apply(a,arguments);return a.cardMap[c]=d,d},afterCardShow:function(b){a._deleteOtherCards(b),a.curr=b}});c.on(BI.ShowListener.EVENT_CHANGE,function(b){a.fireEvent(BI.Tab.EVENT_CHANGE,b,a)})},_deleteOtherCards:function(a){var b=this,c=this.options;c.single===!0&&BI.each(this.cardMap,function(c,d){c!==a+""&&(b.layout.deleteCardByName(c),delete b.cardMap[c])})},_assertCard:function(a){if(!this.layout.isCardExisted(a)){var b=this.options.cardCreator(a);this.cardMap[a]=b,this.layout.addCardByName(a,b)}},mounted:function(){var a=this.options;a.showIndex!==!1&&this.setSelect(a.showIndex)},setSelect:function(a){this.tab&&this.tab.setValue(a),this._assertCard(a),this.layout.showCardByName(a),this._deleteOtherCards(a),this.curr!==a&&(this.curr=a)},removeTab:function(a){var b=this;this.options;BI.any(this.cardMap,function(c,d){if(BI.isEqual(c,a+""))return b.layout.deleteCardByName(c),delete b.cardMap[c],!0})},getSelect:function(){return this.curr},getSelectedTab:function(){return this.layout.getShowingCard()},getTab:function(a){return this._assertCard(a),this.layout.getCardByName(a)},setValue:function(a){var b=this.layout.getShowingCard();b&&b.setValue(a)},getValue:function(){var a=this.layout.getShowingCard();if(a)return a.getValue()},populate:function(){var a=this.layout.getShowingCard();if(a)return a.populate&&a.populate.apply(a,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),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 a=this,b=this.options;this.ele=BI.createWidget(b.el),BI.createWidget(b.layout,{type:"bi.adaptive",element:this,items:[this.ele]}),this.ele.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.ele.setValue(a)},getValue:function(){return this.ele.getValue()},populate:function(){this.ele.populate.apply(this,arguments)}}),BI.shortcut("bi.el",BI.EL),BI.Msg=function(){var a,b,c,d=[];return{alert:function(a,b,c){this._show(!1,a,b,c)},confirm:function(a,b,c){this._show(!0,a,b,c)},prompt:function(a,b,c,d,e){},toast:function(a,b,c){b=b||{},c=c||BI.Widget._renderEngine.createElement("body");var e=b.level||"normal",f=!!BI.isNull(b.autoClose)||b.autoClose,g=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:e,autoClose:f,text:a,listeners:[{eventName:BI.Toast.EVENT_DESTORY,action:function(){BI.remove(d,g.element);var a=10;BI.each(d,function(b,c){c.css({top:a}),a+=c.outerHeight()+10})}}]}),h=10;BI.each(d,function(a,b){h+=b.outerHeight()+10}),BI.createWidget({type:"bi.absolute",element:c,items:[{el:g,left:"50%",top:h}]}),d.push(g.element),g.element.css({"margin-left":-1*g.element.outerWidth()/2}),g.element.removeClass("bi-message-leave").addClass("bi-message-enter"),f&&BI.delay(function(){g.element.removeClass("bi-message-enter").addClass("bi-message-leave"),g.destroy()},5e3)},_show:function(d,e,f,g){b=BI.Widget._renderEngine.createElement('
      ').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=BI.Widget._renderEngine.createElement('
      ').css({position:"absolute",zIndex:BI.zIndex_tip-1,top:0,left:0,right:0,bottom:0}).appendTo("body");var h=function(){a.destroy(),b.remove()},i=[];d===!0&&i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_Cancel"),level:"ignore",handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!1])}}}),i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_OK"),handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!0])}}});var j={element:c,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:e||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(){h(),BI.isFunction(g)&&g.apply(null,[!1])}},width:60}}},height:40},center:{el:{type:"bi.label",vgap:10,hgap:20,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",lgap:10,items:i},top:0,left:20,right:20,bottom:0}]},height:44}},width:450,height:200}]};a=BI.createWidget(j)}}}(),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 a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.GridView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&this._populate()},mounted:function(){var a=this.options;0===a.scrollLeft&&0===a.scrollTop||(this.element.scrollTop(a.scrollTop),this.element.scrollLeft(a.scrollLeft))},_getOverscanIndices:function(a,b,c,d){return{overscanStartIndex:Math.max(0,c-b),overscanStopIndex:Math.min(a-1,d+b)}},_calculateChildrenToRender:function(){var a=this,b=this.options,c=b.width,d=b.height,e=BI.clamp(b.scrollLeft,0,this._getMaxScrollLeft()),f=BI.clamp(b.scrollTop,0,this._getMaxScrollTop()),g=b.overscanColumnCount,h=b.overscanRowCount;if(d>0&&c>0){var i=this._columnSizeAndPositionManager.getVisibleCellRange(c,e),j=this._rowSizeAndPositionManager.getVisibleCellRange(d,f);if(BI.isEmpty(i)||BI.isEmpty(j))return;var k=this._columnSizeAndPositionManager.getOffsetAdjustment(c,e),l=this._rowSizeAndPositionManager.getOffsetAdjustment(d,f);this._renderedColumnStartIndex=i.start,this._renderedColumnStopIndex=i.stop,this._renderedRowStartIndex=j.start,this._renderedRowStopIndex=j.stop;var m=this._getOverscanIndices(this.columnCount,g,this._renderedColumnStartIndex,this._renderedColumnStopIndex),n=this._getOverscanIndices(this.rowCount,h,this._renderedRowStartIndex,this._renderedRowStopIndex),o=m.overscanStartIndex,p=m.overscanStopIndex,q=n.overscanStartIndex,r=n.overscanStopIndex,s=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(q),t=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(o),u=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(r),v=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(p),w=s.offset+l,x=t.offset+k,y=u.offset+l+u.size,z=v.offset+k+v.size;if(w>=this.renderRange.minY&&y<=this.renderRange.maxY&&x>=this.renderRange.minX&&z<=this.renderRange.maxX)return;for(var A=[],B={},C={},D=this._getMaxScrollLeft(),E=this._getMaxScrollTop(),F=0,G=0,H=0,I=q;I<=r;I++)for(var J=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(I),K=o;K<=p;K++){var L,M=I+"-"+K,N=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(K),O=this.renderedKeys[M]&&this.renderedKeys[M][2];O>=0?(N.size!==this.renderedCells[O]._width&&(this.renderedCells[O]._width=N.size,this.renderedCells[O].el.setWidth(N.size)),J.size!==this.renderedCells[O]._height&&(this.renderedCells[O]._height=J.size,this.renderedCells[O].el.setHeight(J.size)),this.renderedCells[O]._left!==N.offset+k&&this.renderedCells[O].el.element.css("left",N.offset+k+"px"),this.renderedCells[O]._top!==J.offset+l&&this.renderedCells[O].el.element.css("top",J.offset+l+"px"),A.push(L=this.renderedCells[O])):(L=BI.createWidget(BI.extend({type:"bi.label",width:N.size,height:J.size},b.items[I][K],{cls:(b.items[I][K].cls||"")+" grid-cell"+(0===I?" first-row":"")+(0===K?" first-col":""),_rowIndex:I,_columnIndex:K,_left:N.offset+k,_top:J.offset+l}),this),A.push({el:L,left:N.offset+k,top:J.offset+l,_left:N.offset+k,_top:J.offset+l,_width:N.size,_height:J.size})),D=Math.min(D,N.offset+k),F=Math.max(F,N.offset+k+N.size),E=Math.min(E,J.offset+l),G=Math.max(G,J.offset+l+J.size),B[M]=[I,K,H],C[H]=L,H++}var P={},Q={},R=[];BI.each(B,function(b,c){a.renderedKeys[b]?P[b]=c:Q[b]=c}),BI.each(this.renderedKeys,function(a,b){P[a]||Q[a]||R.push(b[2])}),BI.each(R,function(b,c){a.renderedCells[c].el._destroy()});var S=[];BI.each(Q,function(a,b){S.push(A[b[2]])}),this.container.addItems(S,this),this.container._children=C,this.container.attr("items",A),this.renderedCells=A,this.renderedKeys=B,this.renderRange={minX:D,minY:E,maxX:F,maxY:G}}},_getRealMaxScrollLeft:function(){var a=this.options,b=0;return BI.count(0,this.columnCount,function(c){b+=a.columnWidthGetter(c)}),Math.max(0,b-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(a){var b=this.options;this._reRange(),this.columnCount=0,this.rowCount=0,a&&a!==this.options.items&&(this.options.items=a),BI.isNumber(b.columnCount)?this.columnCount=b.columnCount:b.items.length>0&&(this.columnCount=b.items[0].length),BI.isNumber(b.rowCount)?this.rowCount=b.rowCount:this.rowCount=b.items.length,this.container.setWidth(this.columnCount*b.estimatedColumnSize),this.container.setHeight(this.rowCount*b.estimatedRowSize),this._columnSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.columnCount,b.columnWidthGetter,b.estimatedColumnSize),this._rowSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.rowCount,b.rowHeightGetter,b.estimatedRowSize),this._calculateChildrenToRender();try{this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)}catch(c){}},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getRealMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setColumnCount:function(a){this.options.columnCount=a},setRowCount:function(a){this.options.rowCount=a},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"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(a){this.options.estimatedColumnSize=a},setEstimatedRowSize:function(a){this.options.estimatedRowSize=a},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.GridView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_view",BI.GridView),BI.Popover=BI.inherit(BI.Widget,{_constant:{SIZE:{SMALL:"small",NORMAL:"normal",BIG:"big"},HEADER_HEIGHT:40},_defaultConfig:function(){return BI.extend(BI.Popover.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-popover bi-card",size:"normal",logic:{dynamic:!1},header:null,body:null,footer:null,closable:!0})},render:function(){var a=this,b=this.options;this.startX=0,this.startY=0,this.tracker=new BI.MouseMoveTracker(function(b,c){var d=(a._calculateSize(),BI.Widget._renderEngine.createElement("body").width()),e=BI.Widget._renderEngine.createElement("body").height();a.startX+=b,a.startY+=c,a.element.css({left:BI.clamp(a.startX,0,d-a.element.width())+"px",top:BI.clamp(a.startY,0,e-a.element.height())+"px"}),BI.Resizers._resize()},function(){a.tracker.releaseMouseMoves()},_global);var c=[{el:{type:"bi.htape",cls:"bi-message-title bi-header-background",ref:function(b){a.dragger=b},items:[{type:"bi.absolute",items:[{el:BI.isPlainObject(b.header)?BI.createWidget(b.header,{extraCls:"bi-font-bold"}):{type:"bi.label",cls:"bi-font-bold",height:this._constant.HEADER_HEIGHT,text:b.header,textAlign:"left"},left:20,top:0,right:0,bottom:0}]},{el:b.closable?{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){a.close()}}:{type:"bi.layout"},width:56}],height:this._constant.HEADER_HEIGHT},height:this._constant.HEADER_HEIGHT},{el:b.logic.dynamic?{type:"bi.vertical",scrolly:!1,cls:"popover-body",ref:function(){a.body=this},hgap:20,tgap:10,items:[{el:BI.createWidget(b.body)}]}:{type:"bi.absolute",items:[{el:BI.createWidget(b.body),left:20,top:10,right:20,bottom:0}]}}];b.footer&&c.push({el:{type:"bi.absolute",items:[{el:BI.createWidget(b.footer),left:20,top:0,right:20,bottom:0}],height:44},height:44});var d=this._calculateSize();return BI.extend({type:b.logic.dynamic?"bi.vertical":"bi.vtape",items:c,width:d.width},b.logic.dynamic?{type:"bi.vertical",scrolly:!1}:{type:"bi.vtape",height:d.height})},mounted:function(){var a=this,b=this.options;if(this.dragger.element.mousedown(function(b){var c=a.element.offset();a.startX=c.left,a.startY=c.top,a.tracker.captureMouseMoves(b)}),b.logic.dynamic){var c=this._calculateSize(),d=this.element.height(),e=BI.clamp(d,c.height,600)-(b.footer?84:44);this.body.element.height(e)}},_calculateSize:function(){var a=this.options,b={};if(BI.isNotNull(a.size))switch(a.size){case this._constant.SIZE.SMALL:b.width=450,b.height=200;break;case this._constant.SIZE.BIG:b.width=900,b.height=500;break;default:b.width=550,b.height=500}return{width:a.width||b.width,height:a.height||b.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(a){this.element.css({"z-index":a})},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.i18nText("BI-Basic_Sure")),BI.i18nText(BI.i18nText("BI-Basic_Cancel"))]})},beforeCreate:function(){var a=this,b=this.options;b.footer||(b.footer={type:"bi.right_vertical_adapt", lgap:10,items:[{type:"bi.button",text:this.options.btns[1],value:1,level:"ignore",handler:function(b){a.fireEvent(BI.Popover.EVENT_CANCEL,b),a.close(b)}},{type:"bi.button",text:this.options.btns[0],warningTitle:b.warningTitle,value:0,handler:function(b){a.fireEvent(BI.Popover.EVENT_CONFIRM,b),a.close(b)}}]})}}),BI.shortcut("bi.bar_popover",BI.BarPopover),BI.Popover.EVENT_CLOSE="EVENT_CLOSE",BI.Popover.EVENT_OPEN="EVENT_OPEN",BI.Popover.EVENT_CANCEL="EVENT_CANCEL",BI.Popover.EVENT_CONFIRM="EVENT_CONFIRM",BI.PopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PopupView.superclass._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 a=this,b=this.options,c=function(a){a.stopPropagation()},d=function(a){return a.stopEvent(),!1};this.element.css({"z-index":BI.zIndex_popup,"min-width":b.minWidth+"px","max-width":b.maxWidth+"px"}).bind({click:c}),this.element.bind("mousewheel",c),b.stopPropagation&&this.element.bind({mousedown:c,mouseup:c,mouseover:c}),b.stopEvent&&this.element.bind({mousedown:d,mouseup:d,mouseover:d}),this.tool=this._createTool(),this.tab=this._createTab(),this.view=this._createView(),this.toolbar=this._createToolBar(),this.view.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.PopupView.EVENT_CHANGE)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{scrolly:!1,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap,items:BI.LogicFactory.createLogicItemsByDirection(b.direction,BI.extend({cls:"list-view-outer bi-card list-view-shadow"},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tool,this.tab,this.view,this.toolbar)}))))}))))},_createView:function(){var a=this.options;return this.button_group=BI.createWidget(a.el,{type:"bi.button_group",value:a.value}),this.button_group.element.css({"min-height":a.minHeight+"px","padding-top":a.innerVGap+"px","padding-bottom":a.innerVGap+"px"}),this.button_group},_createTool:function(){var a=this.options;if(!1!==a.tool)return BI.createWidget(a.tool)},_createTab:function(){var a=this.options;if(0!==a.tabs.length)return BI.createWidget({type:"bi.center",cls:"list-view-tab",height:25,items:a.tabs,value:a.value})},_createToolBar:function(){var a=this.options;if(0!==a.buttons.length)return BI.createWidget({type:"bi.center",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.view},populate:function(a){this.view.populate.apply(this.view,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||24:0,c=this.tab?this.tab.attr("height")||24:0,d=(this.tool&&this.tool.attr("height")||24)*(this.tool&&this.tool.isVisible()?1:0),e=a-b-c-d-2*this.options.innerVGap;this.view.resetHeight?this.view.resetHeight(e):this.view.element.css({"max-height":e+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.view.setValue(a)},getValue:function(){return this.view.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView),BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.matcher=BI.createWidget(b.matcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:b.value}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),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(b.searcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:b.value}),this.searcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.matcher,this.spliter,this.searcher]})},startSearch:function(){},stopSearch:function(){},setValue:function(a){this.matcher.setValue(a),this.searcher.setValue(a)},getValue:function(){return this.matcher.getValue().concat(this.searcher.getValue())},populate:function(a,b,c){a||(a=[]),b||(b=[]),this.setTipVisible(a.length+b.length===0),this.spliter.setVisible(BI.isNotEmptyArray(b)&&BI.isNotEmptyArray(a)),this.matcher.populate(b,c),this.searcher.populate(a,c)},empty:function(){this.searcher.empty(),this.matcher.empty()},hasMatched:function(){return this.matcher.getAllButtons().length>0}}),BI.SearcherView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.searcher_view",BI.SearcherView),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 a=this,b=this.options;return{type:"bi.vertical",items:[BI.extend({type:"bi.vertical",scrolly:!1,ref:function(){a.container=this}},b.el)],element:this}},mounted:function(){var a=this,b=this.options;this._populate(),this.element.scroll(function(c){b.scrollTop=a.element.scrollTop(),a._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){a._calculateBlocksToRender()})},_renderMoreIf:function(){for(var a,b=this,c=this.options,d=this.element.height(),e=c.scrollTop+d+c.overscanHeight,f=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+c.blockSize||0,g=this.renderedIndex+1,h=function(){return b.container.element.height()};(a=h())e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.Pager.superclass.attr.apply(this,arguments),"curr"===a&&(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),BI.A=BI.inherit(BI.Text,{_defaultConfig:function(){var a=BI.A.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-a display-block",href:"",target:"_blank",el:null,tagName:"a"})},_init:function(){var a=this.options;BI.A.superclass._init.apply(this,arguments),this.element.attr({href:a.href,target:a.target}),a.el&&BI.createWidget(a.el,{element:this})}}),BI.shortcut("bi.a",BI.A),BI.LoadingBar=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.LoadingBar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-loading-bar bi-tips",height:30,handler:BI.emptyFn})},_init:function(){BI.LoadingBar.superclass._init.apply(this,arguments);var a=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(b){a.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 b=BI.createWidget({type:"bi.center_adapt",items:[this.loaded]}),c=BI.createWidget({type:"bi.center_adapt",items:[this.loading]});this.cardLayout=BI.createWidget({type:"bi.card",element:this,items:[{el:b,cardName:"loaded"},{el:c,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),BI.IconButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-icon-button horizon-center",iconWidth:null,iconHeight:null})},_init:function(){BI.IconButton.superclass._init.apply(this,arguments);var a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.ImageButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ImageButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-button",src:"",iconWidth:"100%",iconHeight:"100%"})},_init:function(){BI.ImageButton.superclass._init.apply(this,arguments);var a=this.options;this.image=BI.createWidget({type:"bi.img",width:a.iconWidth,height:a.iconHeight,src:a.src}),BI.isNumber(a.iconWidth)||BI.isNumber(a.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(a){BI.ImageButton.superclass.setWidth.apply(this,arguments),this.options.width=a},setHeight:function(a){BI.ImageButton.superclass.setHeight.apply(this,arguments),this.options.height=a},setImageWidth:function(a){this.image.setWidth(a)},setImageHeight:function(a){this.image.setHeight(a)},getImageWidth:function(){return this.image.element.width()},getImageHeight:function(){return this.image.element.height()},setSrc:function(a){this.options.src=a,this.image.setSrc(a)},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),BI.Button=BI.inherit(BI.BasicButton,{_defaultConfig:function(a){var b=BI.Button.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{baseCls:(b.baseCls||"")+" bi-button"+(BI.isIE()&&BI.isIE9Below()?" hack":""),minWidth:a.block===!0||a.clear===!0?0:80,height:24,shadow:a.clear!==!0,isShadowShowingOnSelected:!0,readonly:!0,iconCls:"",level:"common",block:!1,clear:!1,ghost:!1,textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:a.clear?0:10,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},_init:function(){BI.Button.superclass._init.apply(this,arguments);var a=this.options;!BI.isNumber(a.height)||a.clear||a.block?a.clear||a.block?this.element.css({lineHeight:a.height+"px"}):this.element.css({lineHeight:a.height-2+"px"}):this.element.css({height:a.height+"px",lineHeight:a.height-2+"px"}),BI.isKey(a.iconCls)?(this.icon=BI.createWidget({type:"bi.icon_label",cls:a.iconCls,width:18,height:a.height-2,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value,height:a.height-2}),BI.createWidget({type:"bi.center_adapt",element:this,hgap:a.hgap,vgap:a.vgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,element:this,text:a.text,value:a.value}),a.block===!0&&this.element.addClass("block"),a.clear===!0&&this.element.addClass("clear"),a.ghost===!0&&this.element.addClass("ghost"),a.minWidth>0&&this.element.css({"min-width":a.minWidth+"px"})},doClick:function(){BI.Button.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Button.EVENT_CHANGE,this)},setText:function(a){BI.Button.superclass.setText.apply(this,arguments),this.text.setText(a)},setValue:function(a){BI.Button.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},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",BI.TextButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-button",textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:0,lgap:0,rgap:0,text:"",py:""})},_init:function(){BI.TextButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,width:a.width,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.rgap,text:a.text,value:a.value,py:a.py,keyword:a.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(a){BI.TextButton.superclass.setText.apply(this,arguments),a=BI.isArray(a)?a.join(","):a,this.text.setText(a)},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.TextButton.superclass.setValue.apply(this,arguments),this.isReadOnly()||(a=BI.isArray(a)?a.join(","):a,this.text.setValue(a))}}),BI.TextButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_button",BI.TextButton),BI.BlankIconIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=(this._const,BI.createWidget({type:"bi.layout",width:a.blankWidth,height:a.height}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,forceNotSelected:!0,width:a.height,height:a.height}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,forceNotSelected:!0,width:a.height,height:a.height}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,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(a){BI.BlankIconIconTextItem.superclass.setSelected.apply(this,arguments),this.icon1.setSelected(a),this.icon2.setSelected(a)},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),BI.BlankIconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.layout",width:a.blankWidth},b,this.text,{type:"bi.layout",width:a.height})}))))},doClick:function(){BI.BlankIconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.BlankIconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_icon_item",BI.BlankIconTextIconItem),BI.BlankIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=(this._const,BI.createWidget({type:"bi.layout",width:a.blankWidth}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.icon,this.text)}))))},doClick:function(){BI.BlankIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_item",BI.BlankIconTextItem),BI.IconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.leftIconWrapperWidth,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.rightIconWrapperWidth,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.iconWrapperWidth||a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend(a.logic,{ items:BI.LogicFactory.createLogicItemsByDirection(a.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),BI.TextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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),BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height,height:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"",root:!0,value:b.value,watermark:b.watermark,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,height:b.height-2*(b.vgap+b.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}}),this.watermark.element.bind("click",function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}));var c=[];this.watermark&&c.push({el:this.watermark,left:3,right:3,top:0,bottom:0}),c.push({el:this.editor,left:0,right:0,top:0,bottom:0});var d=[{el:{type:"bi.absolute",items:c},left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:d}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){a._checkError(),a.element.addClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){a._setErrorVisible(!1),a.element.removeClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){a.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){a.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(b){b.keyCode!==BI.KeyCode.TAB&&a.watermark&&a.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){a._checkWaterMark(),a._setErrorVisible(!1),a.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_ERROR,arguments),a._setErrorVisible(a.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){a._checkWaterMark();var b=a._setErrorVisible(!0);b&&b.element.fadeOut(100,function(){b.element.fadeIn(100)}),a.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){a.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){a.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){a.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){a.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){a.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){a.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){a.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM,arguments)}),this.element.click(function(a){return a.stopPropagation(),!1}),BI.isKey(this.options.value)||BI.isEmptyString(this.options.value)?(this._checkError(),this._checkWaterMark()):this._checkWaterMark()},_checkToolTip:function(){var a=this.options,b=a.errorText;BI.isFunction(b)&&(b=b(this.editor.getValue())),BI.isKey(b)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(b))},_checkError:function(){this._setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(a){this.options.errorText=a},getErrorText:function(){return this.options.errorText},_setErrorVisible:function(a){var b=this.options,c=b.errorText;if(BI.isFunction(c)&&(c=c(BI.trim(this.editor.getValue()))),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,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(a){this.editor.onKeyDown(a)},setValue:function(a){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(a),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),BI.MultifileEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var a=this,b=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:b.name,url:b.url,multiple:b.multiple,accept:b.accept,maxSize:b.maxSize,title:b.title}),this.file.on(BI.File.EVENT_CHANGE,function(){a.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments)}),this.file.on(BI.File.EVENT_ERROR,function(){a.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){a.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){a.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),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},render:function(){var a=this.options,b=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:10,top:4,bottom:8}]}),this.content.element.on("input propertychange",function(a){b._checkWaterMark(),b.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){b.isValid()&&(b._focus(),b.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),BI.Widget._renderEngine.createElement(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&(BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&this.setValue(a.value),BI.isNotNull(a.style)&&this.setStyle(a.style),this._checkWaterMark()},_checkWaterMark:function(){var a=this,b=this.options,c=this.getValue();BI.isNotEmptyString(c)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(b.watermark)&&(this.watermark?(this.watermark.setText(b.watermark),this.watermark.setValid(!b.invalid),this.watermark.setEnable(!b.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark cursor-default",textAlign:"left",height:20,text:b.watermark,invalid:b.invalid,disabled:b.disabled}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){a.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:4,top:4,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(a){this.content.element.val(a),this._checkWaterMark()},setStyle:function(a){this.style=a,this.element.css(a),this.content.element.css(BI.extend({},a,{color:a.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(a.backgroundColor)?BI.DOM.rgb2hex(a.backgroundColor):a.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(a){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)},_setEnable:function(a){BI.TextAreaEditor.superclass._setEnable.apply(this,[a]),this.content&&(this.content.element[0].disabled=!a)}}),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),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(b.text)?this.setText(b.text):BI.isKey(b.value)&&this.setText(b.value),b.highLight&&this.doHighLight()},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Html.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){BI.Html.superclass.setText.apply(this,arguments),this.options.text=a,this.text.element.html(a)}}),BI.shortcut("bi.html",BI.Html),BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"i",baseCls:(a.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),BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"iframe",baseCls:(a.baseCls||"")+" bi-iframe",src:"",name:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.frameborder="0",a.attributes.src=a.src,a.attributes.name=a.name,BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src},setName:function(a){this.options.name=a,this.element.attr("name",a)},getName:function(){return this.options.name}}),BI.shortcut("bi.iframe",BI.Iframe),BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"img",baseCls:(a.baseCls||"")+" bi-img display-block",src:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.src=a.src,BI.Img.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img),BI.ImageCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageCheckbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})}}),BI.ImageCheckbox.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_checkbox",BI.ImageCheckbox),BI.Checkbox=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-checkbox",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16},render:function(){var a=this,b=this.options;return{type:"bi.center_adapt",items:[{type:"bi.default",ref:function(b){a.checkbox=b},cls:"checkbox-content",width:b.iconWidth-2,height:b.iconHeight-2}]}},_setEnable:function(a){BI.Checkbox.superclass._setEnable.apply(this,arguments),a===!0?this.checkbox.element.removeClass("base-disabled disabled"):this.checkbox.element.addClass("base-disabled disabled")},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)},setSelected:function(a){BI.Checkbox.superclass.setSelected.apply(this,arguments),a?this.checkbox.element.addClass("bi-high-light-background"):this.checkbox.element.removeClass("bi-high-light-background")}}),BI.Checkbox.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox),function(document){var F=function(a){return function(b){var c=b.files||[b];return c.item||(c.item=a),c}}(function(a){return this[a]}),event={add:document.addEventListener?function(a,b,c){return a.addEventListener(b,c,!1),this}:function(a,b,c){return a.attachEvent("on"+b,c),this},del:document.removeEventListener?function(a,b,c){return a.removeEventListener(b,c,!1),this}:function(a,b,c){return a.detachEvent("on"+b,c),this},stop:function(a){return a?(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,a.preventDefault?a.preventDefault():a.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(a,b,c){return"--".concat(a,CRLF,'Content-Disposition: form-data; name="',b,'"; filename="',_global.encodeURIComponent(c.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,c.getAsBinary(),CRLF,"--",a,"--",CRLF)},isFunction=function(a){return"[object Function]"===toString.call(a)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(a,b,c,d){if(-1'),iframe=handler.iframe||(handler.iframe=document.createElement(''))}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(a){isFunction(handler.onerror)&&handler.onerror(rpe,a||_global.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loadedc.status||c.status>399?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void a.fireEvent(BI.File.EVENT_ERROR)):void a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url,c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d0&&b.fireEvent(BI.File.EVENT_CHANGE,{files:a.files}),c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){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(a){this.wrap&&this.wrap.upload(a)},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(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?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||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=!1,c=null,d=!1,e=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),f=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){d=!1,b=e.ctrlKey||e.metaKey,c=e.keyCode,a.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(b){c=null,d&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,e(b.keyCode))}).on("input propertychange",function(b){var f=b.originalEvent;(BI.isNull(f.propertyName)||"value"===f.propertyName)&&(c=null,d=!0,a._keydown_=!0,e(c))}).click(function(a){a.stopPropagation(),f()}).mousedown(function(b){a.element.val(a.element.val())}).focus(function(b){a._focusDebounce()}).focusout(function(b){a._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(){function a(){if(b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()){var a=b._lastValidValue;b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM),b._lastValidValue!==a&&b.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){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)&&(this._pause!==!0||/(\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))),a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN),BI.isEndWithBlank(this.getValue())&&BI.trim(this.getValue())===BI.trim(this._lastValue||"")?(this._pause=!0,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.PAUSE,"",this),this.fireEvent(BI.Input.EVENT_PAUSE),this._defaultState()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===this._lastValue||""===BI.trim(this._lastValue)?this._valueChange():(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_STOP),this._valueChange())},_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 a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastChangedValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(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(a){this.element.val(a),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(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),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),BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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),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 a=this,b=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(b){a.radio=b},width:b.iconWidth,height:b.iconHeight}]}},_setEnable:function(a){BI.Radio.superclass._setEnable.apply(this,arguments),a===!0?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(a){BI.Radio.superclass.setSelected.apply(this,arguments),a?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),BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(a){var b=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{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 a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();return b.textAlign="left",BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:"bi.center_adapt",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,maxWidth:"100%"}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(b,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var a=this.options,b="right"===a.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",c=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:b,height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(c)}]}):void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})),void("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}))):(c.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(c,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(c,{maxWidth:"100%"})),void BI.createWidget({type:b,element:this,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(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}}),BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var a=this.options;return{type:"bi.html",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel),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 a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.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),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),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 a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var a=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+a.level,text:a.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(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),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 a=this,b=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+b.level);var c=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:c,mousedown:c,mouseup:c,mouseover:c,mouseenter:c,mouseleave:c,mousemove:c});var d="close-font";switch(b.level){case"success":d="toast-success-font";break;case"error":d="toast-error-font";break;case"warning":d="toast-warning-font";break;case"normal":default:d="toast-message-font"}var e=[{type:"bi.icon_label",cls:d+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,textHeight:16,textAlign:"left"},rgap:b.autoClose?this._const.hgap:0}],f=[36,""];b.autoClose===!1&&(e.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){a.destroy()},width:36}),f.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:e,vgap:7,columnSize:f})},setText:function(a){this.text.setText(a)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:18})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,height:a.height,textHeight:a.height-2,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{value:e.value},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])},value:c.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},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(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),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(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[], -zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;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;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(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=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("")},makeDOMNodeMainBefore:function(a,b,c){a.push("
    • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
        "),c.push(d),c.push("
      ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={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"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0};return d},getTreeCheckedNodes:function(a,b,c,d){ -if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f=a.check.chkboxType,g=""===f.Y&&""===f.N;fullStyle="",b.chkDisabled===!0?fullStyle=d.DISABLED:b.halfCheck?fullStyle=d.PART:a.check.chkStyle==e.STYLE?fullStyle=b.check_Child_State<1?d.FULL:d.PART:fullStyle=b[c]?2===b.check_Child_State||b.check_Child_State===-1||g?d.FULL:d.PART:b.check_Child_State<1||g?d.FULL:d.PART;var h=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+fullStyle;return h=b.check_Focus&&b.chkDisabled!==!0?h+"_"+d.FOCUS:h,t.className.BUTTON+" "+d.DEFAULT+" "+h},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconCls,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconCls!==a&&(this.element.removeClass(b.iconCls).addClass(a),b.iconCls=a)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=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:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:b.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(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),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 a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconCls,once:b.once,iconWrapperWidth:b.iconWrapperWidth,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},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),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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,title:a.title||a.text,warningTitle:a.warningTitle,py:a.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(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 a=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:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var c=BI.createWidget({type:"bi.icon_label",width:24,cls:b.iconCls,iconWidth:b.iconWidth,iconHeight:b.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},{width:24,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},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(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,cls:"bi-list-item-none",id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.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(a){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=a?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),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),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 a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:24,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},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},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({ -type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),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 a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.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),BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:b.text,value:b.value,ref:function(){a.text=this}},left:b.lgap,right:b.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(a){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(a)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=BI.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=BI.Date._MD.slice(0);i[1]=BI.isLeapYear(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay();var j=(7-BI.StartOfWeek+e.FDay)%7;e.PDay=i[0===b?11:b-1]-j+1,e.NDay=1;var k=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=j&&a=0?c%12:(12+c%12)%12;return{year:BI.getDate().getFullYear()+d,month:e+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[],e=BI.parseDateTime(b.min,"%Y-%X-%d"),f=BI.parseDateTime(b.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var b={};BI.checkDateVoid(c+a,1,1,BI.print(BI.getDate(e.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(f.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(b.disabled=!0),b.text=c+a,d.push(b)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=BI.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=BI.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(a){var b=BI.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?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),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(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),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(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),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 a=this,b=this.options;this.editor=BI.createWidget(b.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.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(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:""})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:b.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(b){a.trigger=b},width:b.width,height:b.height},b.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(b){a.colorPicker=b},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){c(),a._isRGBColor(a.colorPicker.getValue())||a.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){c(),a.combo.hideView()}}]},b.popup),stopPropagation:!0,width:230},value:b.value});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var a=this,b=this.options;this.colorEditor=BI.createWidget(b.editor,{type:b.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:b.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a._dealStoreColors(),a.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:b.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:b.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:b.editor});var c=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:c}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),c.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a._dealStoreColors(),a.more.hideView(),a.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:!b.disabled,ref:function(){a.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_setEnable:function(a){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!a)},_dealStoreColors:function(){var a=this.getValue(),b=this._getStoreColors(),c=new BI.Queue(8);c.fromArray(b),c.remove(a),c.unshift(a);var d=c.toArray();BI.Cache.setItem("colors",BI.array2String(d)),this.setStoreColors(d)},_digestStoreColors:function(a){var b=BI.map(a,function(a,b){return{value:b}});return BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),b},_getStoreColors:function(){var a=this,b=this.options,c=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(c,function(c,d){return!b.simple||a._isRGBColor(d)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},setStoreColors:function(a){BI.isArray(a)&&this.storeColors.populate([this._digestStoreColors(a)])},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},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),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 a=this,b=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:b.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(a){this.popup.setStoreColors(a)},setValue:function(a){this.popup.setValue(a)},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),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:b.container,value:b.value,width:b.width,height:b.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_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 a=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:a,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var a=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(b){a.changeIcon=b},iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(b){a.label=b},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var b=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:b,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?(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"===a?(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":a}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),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:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{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 a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:b.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),d(a.storeValue.r)&&d(a.storeValue.g)&&d(a.storeValue.b)&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[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()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#ffffff"),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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()?(a.lastColor=a.getValue(),a.setValue("transparent")):("transparent"===a.lastColor&&(a.lastColor=""),a.setValue(a.lastColor||"#ffffff")),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){""===a?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===a?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":a}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(a){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){if("transparent"===a)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:""});a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.storeValue={r:BI.isNull(b.r)?"":b.r,g:BI.isNull(b.r)?"":b.g,b:BI.isNull(b.r)?"":b.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),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){this.colorShow.element.css({"background-color":a});var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.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),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 a=this;return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(b){a.colorWrapper=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(b){a.wheel=b}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(b){a.overlay=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.hMarker=b},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.slMarker=b},scrollable:!1,width:17,height:17}}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this.setValue(a.value)},_unpack:function(a){return 7===a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4===a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},_pack:function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},_setColor:function(a){var b=this._unpack(a);this.value!==a&&b&&(this.value=a,this.rgb=b,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(a){return this.hsl=a,this.rgb=this._HSLToRGB(a),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this._hueToRGB(b,c,d+.33333),this._hueToRGB(b,c,d),this._hueToRGB(b,c,d-.33333)]},_hueToRGB:function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},_RGBToHSL:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},_updateDisplay:function(){var a=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(a)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(a)*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(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var c=this._absolutePosition(a.offsetParent);b.x+=c.x,b.y+=c.y}return b},_widgetCoords:function(a){var b,c,d=a.target||a.srcElement,e=this.wheel.element[0];if("undefined"!=typeof a.offsetX){for(var f={x:a.offsetX,y:a.offsetY},g=d;g;)g.mouseX=f.x,g.mouseY=f.y,f.x+=g.offsetLeft,f.y+=g.offsetTop,g=g.offsetParent;for(var g=e,h={x:0,y:0};g;){if("undefined"!=typeof g.mouseX){b=g.mouseX-h.x,c=g.mouseY-h.y;break}h.x+=g.offsetLeft,h.y+=g.offsetTop,g=g.offsetParent}for(g=d;g;)g.mouseX=void 0,g.mouseY=void 0,g=g.offsetParent}else{var f=this._absolutePosition(e);b=(a.pageX||0)-f.x,c=(a.pageY||0)-f.y}return{x:b-this.constants.WIDTH/2,y:c-this.constants.WIDTH/2}},_doMouseMove:function(a){var b=this._widgetCoords(a);if(this.circleDrag){var c=Math.atan2(b.x,-b.y)/6.28;c<0&&(c+=1),this._setHSL([c,this.hsl[1],this.hsl[2]])}else{var d=Math.max(0,Math.min(1,-(b.x/this.constants.SQUARE)+.5)),e=Math.max(0,Math.min(1,-(b.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],d,e])}},doClick:function(a){var b=this._widgetCoords(a);return this.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>this.constants.SQUARE,this._doMouseMove(a),!1},setValue:function(a){this._setColor(a)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,container:b.container,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.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),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.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 a=this.options,b=this,c=[];return BI.each(a.buttons,function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:24,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:c}]})},_createView:function(){var a=this.options,b=BI.createWidget({type:"bi.button_group",items:[a.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return b.element.css("min-height",a.minHeight-44),b}}),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,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var a=this,b=this.options,c=BI.map(b.buttons,function(b,c){return BI.isWidget(c)?c:BI.extend({type:"bi.button",height:24,handler:function(b){a.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,b)}},c)});return{type:"bi.bubble_bar_popup_view",ref:function(){a.popup=this},el:{type:"bi.label",text:b.text,whiteSpace:"normal",textAlign:"left",ref:function(){a.text=this}},buttons:c}},populate:function(a){this.text.setText(a||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,value:b.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),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 a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconCls:b.iconCls,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,value:b.value}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),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 a=this.options,b="";BI.isKey(a.value)&&(b=this._digest(a.value,a.items)),this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b,disableSelected:!0,width:a.isShowDown?a.width-12:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight,selected:BI.isNotEmptyString(b)}),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(b)}),this.down.setVisible(a.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(a,b){var c="";return a=BI.isArray(a)?a[0]:a,BI.any(b,function(b,d){if(a===d.value)return c=d.iconCls,!0}),c},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c=this._digest(a,this.options.items);a=BI.isArray(a)?a[0]:a,BI.isNotEmptyString(c)?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:b.items,height:b.height,text:b.text,iconCls:b.iconCls,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth,title:b.title,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this.setValue(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:a.behaviors,value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a,b){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var c=this.options;a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:c.iconWrapperWidth,iconHeight:c.iconHeight,iconWidth:c.iconWidth}),this.popup.populate(a,b)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),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 a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,adjustLength:2,toggle:!1,ref:function(){a.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){a.trigger=this},items:b.items,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:b.value,items:b.items,ref:function(){a.popup=this,a.trigger.getSearcher().setAdapter(a.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:252},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){a.triggerBtn=this},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this._checkError(a.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.options.items=a,this.combo.populate(a)},setValue:function(a){this.combo.setValue(a),this._checkError(a)},getValue:function(){var a=this.combo.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo),BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var a=this,b=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){a.popup=this},items:BI.createItems(b.items,{type:"bi.single_select_item",textAlign:b.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,c,d)}}]}]}},mounted:function(){this.check()},populate:function(a,b,c){var d=BI.concat(a,b);BI.SearchTextValueComboPopup.superclass.populate.apply(this,d),d=BI.createItems(d,{type:"bi.single_select_item",height:24}),this.popup.populate(d,c)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup),BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value,b.items),value:b.value,height:b.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(a,c){var d=a.keyword,e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g,f)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(a){this.editor.setState(a)},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this._setState(this._digest(a,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),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options; -this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,value:b.value,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this._checkError(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),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 a=this,b=this.options;this._createValueMap();var c;BI.isNotNull(b.value)&&(c=this._digest(b.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:b.height,items:b.items,text:b.text,value:c}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,value:BI.isNull(c)?[]:[c],items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var b=a.combo.getValue()[0].value;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var b=a.combo.getValue()[0].childValue;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},_digest:function(a){return this.value=a,this.valueMap[a]},setValue:function(a){a=this._digest(a),this.combo.setValue([a]),this.trigger.setValue(a)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text,value:BI.isNull(a.value)?"":a.value.childValue||a.value.value})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a.childValue||a.value)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker,value:b.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(b.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:b.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]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.text.setStyle(a)},setValue:function(a){var b=this.options;this.editor.setValue(a),this._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(a.keyword)&&this.text.doRedMark(a.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text tip-text-style",textAlign:"left",height:b.height,text:b.text,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")},title:BI.isNotNull(b.tipText)?b.tipText:function(){var b="";return BI.isString(a.stateValue)&&(b=a.stateValue),BI.isArray(a.stateValue)&&1===a.stateValue.length&&(b=a.stateValue[0]),b},warningTitle:b.warningTitle,tipType:b.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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.options.disabled===!1&&(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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=a,BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text"))))},setTipType:function(a){this.text.options.tipType=a}}),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),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker, -quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text",textAlign:"left",text:b.text,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),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),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(c,{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(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.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:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded(),a.check()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.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(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{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(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 a=this,b=this.options;return[{type:"bi.label",text:b.text,height:b.height,value:b.value,hgap:b.hgap,ref:function(){a.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){a.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(a){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),a?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var a=this,b=this.options;return{type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.linear_segment_button",height:b.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){a.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.buttonGroup=this}}},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),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 a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(b.value)&&this.setValue(b.value)},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.allSelected=!!a,this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{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(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"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(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),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:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1),this.setPagerVisible(a>1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate(),this.setPagerVisible(this.options.pages>1)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),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 a=this.options;a.vertical,a.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 a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev column-pre-page-h-font"},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 direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev row-pre-page-h-font"},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 direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage, -lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},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(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[86,110,0,24],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),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),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 a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:a.height,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:b.value,items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},_setEnable:function(a){BI.Segment.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(a){return a.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.selected===!0,d=!b.selected&&b.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())},selected:c,invisible:d}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)},invisible:c||!d}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:b.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(a){this.checkbox.setSelected(!!a)},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this.halfSelected=!!a,a===!0?(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(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(b),!b&&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),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(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};BI.isKey(f.id)||(f.id=BI.UUID()),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.mid_plus_group_node",e===a.length-1&&(g.type="bi.last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a,b){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a,b)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),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(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),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(){function a(a,b){return!1}function b(a,b){return b.isLeaf?{}:{color:"#999999"}}var c={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:b},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return c},_dealWidthNodes:function(a){a=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),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 a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate(),BI.isNotNull(b.value)&&this.setValue(b.value)},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},_digest:function(a){a||(a=[]);var b=this,c={},d=[];return BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),BI.makeObject(a.concat(d))},setValue:function(a){this.tree.setValue(this._digest(a))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,title:function(){return a.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:b.triggerWidth||b.height},width:b.triggerWidth||b.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:24})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(b){a.wrapper=b},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.iconWrapperWidth||b.height},{el:this.text,lgap:BI.isEmptyString(b.iconCls)?5:0},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a)},setIcon:function(a){var b=this.options;this.icon.setIcon(a);var c=this.wrapper.attr("items")[0],d=this.wrapper.attr("items")[1];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,d.lgap=5,this.wrapper.resize()):c.width!==(b.iconWrapperWidth||b.height)&&(c.width=b.iconWrapperWidth||b.height,d.lgap=0,this.wrapper.resize())},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),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 a=this.options,b=this._digist(a.value,a.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:b.text,iconCls:b.iconCls,height:a.height,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth})},_digist:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d,e=BI.Tree.transformToArrayFormat(b);return BI.any(e,function(b,c){if(BI.deepContains(a,c.value))return d={text:c.text||c.value,iconCls:c.iconCls},!0}),BI.isNotNull(d)?{text:d.text,iconCls:d.iconCls}:{text:c.text,iconCls:c.iconCls}},setValue:function(a){var b=this._digist(a,this.options.items);this.trigger.setText(b.text),this.trigger.setIcon(b.iconCls)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text,title:function(){return a.text.getText()},tipType:b.tipType,warningTitle:b.warningTitle,hgap:c.hgap,readonly:b.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setText:function(a){this.text.setText(a)},setTipType:function(a){this.text.options.tipType=a}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),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 a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height,readonly:a.readonly,text:this._digest(a.value,a.items),tipType:a.tipType,warningTitle:a.warningTitle})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},setTipType:function(a){this.trigger.setTipType(a)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),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 a=this.options,b=this._digest(a.text,a.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2,text:b.text,cls:b.cls})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?{cls:"",text:d.join(",")}:{cls:"bi-water-mark",text:c.text}},setValue:function(a){var b=this._digest(a,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(b.cls),this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:a.triggerWidth||a.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:a.triggerWidth||a.height}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:b.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(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:b.behaviors,min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=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===a._month?a.setValue({year:a.year.getValue()-1,month:12}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._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===a._month?a.setValue({year:a.year.getValue()+1,month:1}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:b.behaviors,min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:b.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.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 a=this.options,b=!(1===this._month&&this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(12===this._month&&this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=BI.parseInt(a.year),this._month=BI.parseInt(a.month),this.year.setValue(a.year),this.month.setValue(a.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),BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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(){a.setValue(a.year.getValue()-1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._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(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,behaviors:b.behaviors,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.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:{type:"bi.horizontal_float",width:50,items:[{el:this.year}]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({ +appendChild(form),form.submit();return handler},xhr=null,sendFile}(Object.prototype.toString),sendFiles=function(a,b,c,d){var e=a.files.length,f=a.onload,g=a.onloadstart;for(a.current=0,a.total=0,a.sent=0;a.currentd.status||d.status>399)return BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void a.fireEvent(BI.File.EVENT_ERROR);var b=BI.some(c.attach_array,function(b,c){if(c.errorCode)return BI.Msg.toast(c.errorMsg,{level:"error"}),a.fireEvent(BI.File.EVENT_ERROR,c),!0});!b&&a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url,c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d0&&b.fireEvent(BI.File.EVENT_CHANGE,{files:a.files}),c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){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(a){this.wrap&&this.wrap.upload(a)},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(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?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||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=!1,c=null,d=!1,e=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),f=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){d=!1,b=e.ctrlKey||e.metaKey,c=e.keyCode,a.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(b){c=null,d&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,e(b.keyCode))}).on("input propertychange",function(b){var f=b.originalEvent;(BI.isNull(f.propertyName)||"value"===f.propertyName)&&(d=!0,a._keydown_=!0,e(c),c=null)}).click(function(a){a.stopPropagation(),f()}).mousedown(function(b){a.element.val(a.element.val())}).focus(function(b){a._focusDebounce()}).focusout(function(b){a._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(){function a(){if(b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()){var a=b._lastValidValue;b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM),b._lastValidValue!==a&&b.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){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)&&(this._pause!==!0||/(\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))),a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN);var c=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()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===c||""===BI.trim(c)||(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 a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastChangedValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(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(a){this.element.val(a),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(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),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),BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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),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 a=this,b=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(b){a.radio=b},width:b.iconWidth,height:b.iconHeight}]}},_setEnable:function(a){BI.Radio.superclass._setEnable.apply(this,arguments),a===!0?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(a){BI.Radio.superclass.setSelected.apply(this,arguments),a?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),BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(a){var b=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{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 a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();return b.textAlign="left",BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:"bi.center_adapt",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,maxWidth:"100%"}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(b,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var a=this.options,b="right"===a.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",c=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:b,height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(c)}]}):void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})),void("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}))):(c.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(c,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(c,{maxWidth:"100%"})),void BI.createWidget({type:b,element:this,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(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}}),BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var a=this.options;return{type:"bi.html",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel),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 a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.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),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),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 a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var a=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+a.level,text:a.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(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),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 a=this,b=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+b.level);var c=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:c,mousedown:c,mouseup:c,mouseover:c,mouseenter:c,mouseleave:c,mousemove:c});var d="close-font";switch(b.level){case"success":d="toast-success-font";break;case"error":d="toast-error-font";break;case"warning":d="toast-warning-font";break;case"normal":default:d="toast-message-font"}var e=[{type:"bi.icon_label",cls:d+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,textHeight:16,textAlign:"left"},rgap:b.autoClose?this._const.hgap:0}],f=[36,""];b.autoClose===!1&&(e.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){a.destroy()},width:36}),f.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:e,vgap:7,columnSize:f})},setText:function(a){this.text.setText(a)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:18})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,height:a.height,textHeight:a.height-2,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{value:e.value},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])},value:c.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},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(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),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(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent], +caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;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;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(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=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("
    • ")},makeDOMNodeMainBefore:function(a,b,c){a.push("
    • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
        "),c.push(d),c.push("
      ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={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"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0 +};return d},getTreeCheckedNodes:function(a,b,c,d){if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f=a.check.chkboxType,g=""===f.Y&&""===f.N;fullStyle="",b.chkDisabled===!0?fullStyle=d.DISABLED:b.halfCheck?fullStyle=d.PART:a.check.chkStyle==e.STYLE?fullStyle=b.check_Child_State<1?d.FULL:d.PART:fullStyle=b[c]?2===b.check_Child_State||b.check_Child_State===-1||g?d.FULL:d.PART:b.check_Child_State<1||g?d.FULL:d.PART;var h=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+fullStyle;return h=b.check_Focus&&b.chkDisabled!==!0?h+"_"+d.FOCUS:h,t.className.BUTTON+" "+d.DEFAULT+" "+h},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconCls,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconCls!==a&&(this.element.removeClass(b.iconCls).addClass(a),b.iconCls=a)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=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:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:b.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(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),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 a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconCls,once:b.once,iconWrapperWidth:b.iconWrapperWidth,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},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),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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,title:a.title||a.text,warningTitle:a.warningTitle,py:a.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(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 a=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:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var c=BI.createWidget({type:"bi.icon_label",width:24,cls:b.iconCls,iconWidth:b.iconWidth,iconHeight:b.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},{width:24,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},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(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,cls:"bi-list-item-none",id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.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(a){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=a?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),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),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 a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:24,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},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},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({ +type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),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 a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.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),BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:b.text,value:b.value,ref:function(){a.text=this}},left:b.lgap,right:b.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(a){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(a)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=BI.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=BI.Date._MD.slice(0);i[1]=BI.isLeapYear(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay();var j=(7-BI.StartOfWeek+e.FDay)%7;e.PDay=i[0===b?11:b-1]-j+1,e.NDay=1;var k=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=j&&a=0?c%12:(12+c%12)%12;return{year:BI.getDate().getFullYear()+d,month:e+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[],e=BI.parseDateTime(b.min,"%Y-%X-%d"),f=BI.parseDateTime(b.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var b={};BI.checkDateVoid(c+a,1,1,BI.print(BI.getDate(e.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(f.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(b.disabled=!0),b.text=c+a,d.push(b)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=BI.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=BI.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(a){var b=BI.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?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),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(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),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(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),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 a=this,b=this.options;this.editor=BI.createWidget(b.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.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(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:""})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:b.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(b){a.trigger=b},width:b.width,height:b.height},b.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(b){a.colorPicker=b},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){c(),a._isRGBColor(a.colorPicker.getValue())||a.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){c(),a.combo.hideView()}}]},b.popup),stopPropagation:!0,width:230},value:b.value});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var a=this,b=this.options;this.colorEditor=BI.createWidget(b.editor,{type:b.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:b.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a._dealStoreColors(),a.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:b.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:b.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:b.editor});var c=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:c}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),c.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a._dealStoreColors(),a.more.hideView(),a.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:!b.disabled,ref:function(){a.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_setEnable:function(a){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!a)},_dealStoreColors:function(){var a=this.getValue(),b=this._getStoreColors(),c=new BI.Queue(8);c.fromArray(b),c.remove(a),c.unshift(a);var d=c.toArray();BI.Cache.setItem("colors",BI.array2String(d)),this.setStoreColors(d)},_digestStoreColors:function(a){var b=BI.map(a,function(a,b){return{value:b}});return BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),b},_getStoreColors:function(){var a=this,b=this.options,c=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(c,function(c,d){return!b.simple||a._isRGBColor(d)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},setStoreColors:function(a){BI.isArray(a)&&this.storeColors.populate([this._digestStoreColors(a)])},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},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),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 a=this,b=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:b.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(a){this.popup.setStoreColors(a)},setValue:function(a){this.popup.setValue(a)},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),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:b.container,value:b.value,width:b.width,height:b.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_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 a=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:a,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var a=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(b){a.changeIcon=b},iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(b){a.label=b},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var b=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:b,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?(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"===a?(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":a}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),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:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{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 a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:b.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),d(a.storeValue.r)&&d(a.storeValue.g)&&d(a.storeValue.b)&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[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()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#ffffff"),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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()?(a.lastColor=a.getValue(),a.setValue("transparent")):("transparent"===a.lastColor&&(a.lastColor=""),a.setValue(a.lastColor||"#ffffff")),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){""===a?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===a?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":a}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(a){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){if("transparent"===a)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:""});a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.storeValue={r:BI.isNull(b.r)?"":b.r,g:BI.isNull(b.r)?"":b.g,b:BI.isNull(b.r)?"":b.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),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){this.colorShow.element.css({"background-color":a});var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.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),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 a=this;return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(b){a.colorWrapper=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(b){a.wheel=b}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(b){a.overlay=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.hMarker=b},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.slMarker=b},scrollable:!1,width:17,height:17}}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this.setValue(a.value)},_unpack:function(a){return 7===a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4===a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},_pack:function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},_setColor:function(a){var b=this._unpack(a);this.value!==a&&b&&(this.value=a,this.rgb=b,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(a){return this.hsl=a,this.rgb=this._HSLToRGB(a),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this._hueToRGB(b,c,d+.33333),this._hueToRGB(b,c,d),this._hueToRGB(b,c,d-.33333)]},_hueToRGB:function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},_RGBToHSL:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},_updateDisplay:function(){var a=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(a)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(a)*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(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var c=this._absolutePosition(a.offsetParent);b.x+=c.x,b.y+=c.y}return b},_widgetCoords:function(a){var b,c,d=a.target||a.srcElement,e=this.wheel.element[0];if("undefined"!=typeof a.offsetX){for(var f={x:a.offsetX,y:a.offsetY},g=d;g;)g.mouseX=f.x,g.mouseY=f.y,f.x+=g.offsetLeft,f.y+=g.offsetTop,g=g.offsetParent;for(var g=e,h={x:0,y:0};g;){if("undefined"!=typeof g.mouseX){b=g.mouseX-h.x,c=g.mouseY-h.y;break}h.x+=g.offsetLeft,h.y+=g.offsetTop,g=g.offsetParent}for(g=d;g;)g.mouseX=void 0,g.mouseY=void 0,g=g.offsetParent}else{var f=this._absolutePosition(e);b=(a.pageX||0)-f.x,c=(a.pageY||0)-f.y}return{x:b-this.constants.WIDTH/2,y:c-this.constants.WIDTH/2}},_doMouseMove:function(a){var b=this._widgetCoords(a);if(this.circleDrag){var c=Math.atan2(b.x,-b.y)/6.28;c<0&&(c+=1),this._setHSL([c,this.hsl[1],this.hsl[2]])}else{var d=Math.max(0,Math.min(1,-(b.x/this.constants.SQUARE)+.5)),e=Math.max(0,Math.min(1,-(b.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],d,e])}},doClick:function(a){var b=this._widgetCoords(a);return this.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>this.constants.SQUARE,this._doMouseMove(a),!1},setValue:function(a){this._setColor(a)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,container:b.container,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.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),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.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 a=this.options,b=this,c=[];return BI.each(a.buttons,function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:24,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:c}]})},_createView:function(){var a=this.options,b=BI.createWidget({type:"bi.button_group",items:[a.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return b.element.css("min-height",a.minHeight-44),b}}),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,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var a=this,b=this.options,c=BI.map(b.buttons,function(b,c){return BI.isWidget(c)?c:BI.extend({type:"bi.button",height:24,handler:function(b){a.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,b)}},c)});return{type:"bi.bubble_bar_popup_view",ref:function(){a.popup=this},el:{type:"bi.label",text:b.text,whiteSpace:"normal",textAlign:"left",ref:function(){a.text=this}},buttons:c}},populate:function(a){this.text.setText(a||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,value:b.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),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 a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconCls:b.iconCls,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,value:b.value}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),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 a=this.options,b="";BI.isKey(a.value)&&(b=this._digest(a.value,a.items)),this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b,disableSelected:!0,width:a.isShowDown?a.width-12:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight,selected:BI.isNotEmptyString(b)}),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(b)}),this.down.setVisible(a.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(a,b){var c="";return a=BI.isArray(a)?a[0]:a,BI.any(b,function(b,d){if(a===d.value)return c=d.iconCls,!0}),c},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c=this._digest(a,this.options.items);a=BI.isArray(a)?a[0]:a,BI.isNotEmptyString(c)?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:b.items,height:b.height,text:b.text,iconCls:b.iconCls,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth,title:b.title,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this.setValue(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:a.behaviors,value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a,b){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var c=this.options;a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:c.iconWrapperWidth,iconHeight:c.iconHeight,iconWidth:c.iconWidth}),this.popup.populate(a,b)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),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 a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,adjustLength:2,toggle:!1,ref:function(){a.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){a.trigger=this},items:b.items,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:b.value,items:b.items,ref:function(){a.popup=this,a.trigger.getSearcher().setAdapter(a.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:252},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){a.triggerBtn=this},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this._checkError(a.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.options.items=a,this.combo.populate(a)},setValue:function(a){this.combo.setValue(a),this._checkError(a)},getValue:function(){var a=this.combo.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo),BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var a=this,b=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){a.popup=this},items:BI.createItems(b.items,{type:"bi.single_select_item",textAlign:b.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,c,d)}}]}]}},mounted:function(){this.check()},populate:function(a,b,c){var d=BI.concat(a,b);BI.SearchTextValueComboPopup.superclass.populate.apply(this,d),d=BI.createItems(d,{type:"bi.single_select_item",height:24}),this.popup.populate(d,c)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup),BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value,b.items),value:b.value,height:b.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(a,c){var d=a.keyword,e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g,f)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(a){this.editor.setState(a)},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this._setState(this._digest(a,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),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments); +var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,value:b.value,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this._checkError(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),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 a=this,b=this.options;this._createValueMap();var c;BI.isNotNull(b.value)&&(c=this._digest(b.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:b.height,items:b.items,text:b.text,value:c}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,value:BI.isNull(c)?[]:[c],items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var b=a.combo.getValue()[0].value;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var b=a.combo.getValue()[0].childValue;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},_digest:function(a){return this.value=a,this.valueMap[a]},setValue:function(a){a=this._digest(a),this.combo.setValue([a]),this.trigger.setValue(a)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text,value:BI.isNull(a.value)?"":a.value.childValue||a.value.value})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a.childValue||a.value)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker,value:b.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(b.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:b.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]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.text.setStyle(a)},setValue:function(a){var b=this.options;this.editor.setValue(a),this._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(a.keyword)&&this.text.doRedMark(a.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text tip-text-style",textAlign:"left",height:b.height,text:b.text,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")},title:BI.isNotNull(b.tipText)?b.tipText:function(){var b="";return BI.isString(a.stateValue)&&(b=a.stateValue),BI.isArray(a.stateValue)&&1===a.stateValue.length&&(b=a.stateValue[0]),b},warningTitle:b.warningTitle,tipType:b.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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.options.disabled===!1&&(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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=a,BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text"))))},setTipType:function(a){this.text.options.tipType=a}}),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),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value, +validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text",textAlign:"left",text:b.text,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),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),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(c,{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(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.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:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded(),a.check()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.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(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{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(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 a=this,b=this.options;return[{type:"bi.label",text:b.text,height:b.height,value:b.value,hgap:b.hgap,ref:function(){a.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){a.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(a){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),a?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var a=this,b=this.options;return{type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.linear_segment_button",height:b.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){a.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.buttonGroup=this}}},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),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 a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(b.value)&&this.setValue(b.value)},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.allSelected=!!a,this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{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(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"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(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),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:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1),this.setPagerVisible(a>1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate(),this.setPagerVisible(this.options.pages>1)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),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 a=this.options;a.vertical,a.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 a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev column-pre-page-h-font"},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 direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev row-pre-page-h-font"},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 direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev, +hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},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(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[86,110,0,24],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),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),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 a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:a.height,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:b.value,items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},_setEnable:function(a){BI.Segment.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(a){return a.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.selected===!0,d=!b.selected&&b.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())},selected:c,invisible:d}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)},invisible:c||!d}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:b.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(a){this.checkbox.setSelected(!!a)},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this.halfSelected=!!a,a===!0?(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(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(b),!b&&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),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(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};BI.isKey(f.id)||(f.id=BI.UUID()),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.mid_plus_group_node",e===a.length-1&&(g.type="bi.last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a,b){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a,b)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),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(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),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(){function a(a,b){return!1}function b(a,b){return b.isLeaf?{}:{color:"#999999"}}var c={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:b},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return c},_dealWidthNodes:function(a){a=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),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 a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate(),BI.isNotNull(b.value)&&this.setValue(b.value)},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},_digest:function(a){a||(a=[]);var b=this,c={},d=[];return BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),BI.makeObject(a.concat(d))},setValue:function(a){this.tree.setValue(this._digest(a))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,title:function(){return a.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:b.triggerWidth||b.height},width:b.triggerWidth||b.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:24})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(b){a.wrapper=b},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.iconWrapperWidth||b.height},{el:this.text,lgap:BI.isEmptyString(b.iconCls)?5:0},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a)},setIcon:function(a){var b=this.options;this.icon.setIcon(a);var c=this.wrapper.attr("items")[0],d=this.wrapper.attr("items")[1];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,d.lgap=5,this.wrapper.resize()):c.width!==(b.iconWrapperWidth||b.height)&&(c.width=b.iconWrapperWidth||b.height,d.lgap=0,this.wrapper.resize())},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),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 a=this.options,b=this._digist(a.value,a.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:b.text,iconCls:b.iconCls,height:a.height,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth})},_digist:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d,e=BI.Tree.transformToArrayFormat(b);return BI.any(e,function(b,c){if(BI.deepContains(a,c.value))return d={text:c.text||c.value,iconCls:c.iconCls},!0}),BI.isNotNull(d)?{text:d.text,iconCls:d.iconCls}:{text:c.text,iconCls:c.iconCls}},setValue:function(a){var b=this._digist(a,this.options.items);this.trigger.setText(b.text),this.trigger.setIcon(b.iconCls)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text,title:function(){return a.text.getText()},tipType:b.tipType,warningTitle:b.warningTitle,hgap:c.hgap,readonly:b.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setText:function(a){this.text.setText(a)},setTipType:function(a){this.text.options.tipType=a}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),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 a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height,readonly:a.readonly,text:this._digest(a.value,a.items),tipType:a.tipType,warningTitle:a.warningTitle})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},setTipType:function(a){this.trigger.setTipType(a)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),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 a=this.options,b=this._digest(a.text,a.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2,text:b.text,cls:b.cls})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?{cls:"",text:d.join(",")}:{cls:"bi-water-mark",text:c.text}},setValue:function(a){var b=this._digest(a,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(b.cls),this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:a.triggerWidth||a.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:a.triggerWidth||a.height}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:b.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(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:b.behaviors,min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=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===a._month?a.setValue({year:a.year.getValue()-1,month:12}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._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===a._month?a.setValue({year:a.year.getValue()+1,month:1}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:b.behaviors,min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:b.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.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 a=this.options,b=!(1===this._month&&this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(12===this._month&&this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=BI.parseInt(a.year),this._month=BI.parseInt(a.month),this.year.setValue(a.year),this.month.setValue(a.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),BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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(){a.setValue(a.year.getValue()-1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._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(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,behaviors:b.behaviors,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.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:{type:"bi.horizontal_float",width:50,items:[{el:this.year}]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({ type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:1});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.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(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.calendar,left:5,right:5},{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),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(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear();var c=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),d=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:[c,d]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();c.setEnable(!b.isFrontYear()),d.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;a=BI.parseInt(a);var c=BI.parseDateTime(b.min,"%Y-%X-%d"),d=BI.parseDateTime(b.max,"%Y-%X-%d");BI.checkDateVoid(a,1,1,BI.print(BI.getDate(c.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(d.getFullYear(),0,1),"%Y-%X-%d"))[0]?(a=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime={year:b.year,month:b.month},0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(b.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(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDatePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDatePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateCombo.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options,c=BI.getDate();this.storeValue=BI.isNotNull(b.value)?b.value:{year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:b.minDate,max:b.maxDate,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.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(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var d=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});d.on(BI.IconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()||a.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:d,top:0,right:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},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),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 a=this,b=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(){a.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(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.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(b){a.timeSelect=b}}]},height:50},{el:this.dateButton,height:30}]}),this.setValue(b.value)},setValue:function(a){var b,c=a;BI.isNull(c)?(b=BI.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}),this.timeSelect.setValue({hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()})):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.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),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text},{el:BI.createWidget(),width:a.height}]}),this.setValue(a.value)},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=BI.getDate(),b=BI.print(c,"%Y-%X-%d %H:%M:%S");else{var d=BI.getDate(c.year,c.month-1,c.day,c.hour,c.minute,c.second);b=BI.print(d,"%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.StaticDateTimePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime=BI.extend(a.selectedTime,{year:b.year,month:b.month,day:d}),0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.calendar.empty(),a.setValue(a.selectedTime),a.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(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.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(b.selectedTime)},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=BI.extend({},this.timeSelect.getValue(),a)},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){a=a||{},this._setDatePicker(a),this._setCalendar(a),this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_time_pane_card",BI.StaticDateTimePaneCard),BI.DynamicDateTimePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDateTimePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDateTimePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDateTimePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateTimePane.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateTimePane.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:b.stopPropagation,maxHeight:1e3,minWidth:140}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(a){this.downlistcombo.showView(a)},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},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),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 a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:a.value}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:36,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),BI.extend(a.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),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:36,disableSelected:!0,selected:this._digest(a.value)}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:24,forceNotSelected:!0});var c=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(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},_digest:function(a){var b=this.options;return a=BI.isArray(a)?a:[a],BI.any(a,function(a,c){return BI.contains(b.childValues,c)})},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(a){this.icon1.setSelected(this._digest(a))}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),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 a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options,c=this._createChildren(this.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!BI.contains(a.singleValues,d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.isDefaultInit=!0,c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5,maxHeight:378},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=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});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?1:0}},setValue:function(a){a=a||{},this.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT;var b=[],c=[];BI.isNotNull(a.year)&&(b.push(BI.DynamicDateCard.TYPE.YEAR),c.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))),BI.isNotNull(a.quarter)&&(b.push(BI.DynamicDateCard.TYPE.QUARTER),c.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))),BI.isNotNull(a.month)&&(b.push(BI.DynamicDateCard.TYPE.MONTH),c.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))),BI.isNotNull(a.week)&&(b.push(BI.DynamicDateCard.TYPE.WEEK),c.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,a.week))),BI.isNotNull(a.day)&&(b.push(BI.DynamicDateCard.TYPE.DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,a.day))),BI.isNotNull(a.workDay)&&(b.push(BI.DynamicDateCard.TYPE.WORK_DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,a.workDay))),this.checkgroup.setValue(b),this.workDayBox.setSelected(BI.isNotNull(a.workDay)),this.resultPane.populate(this._getParamJson(c,a.position))},getValue:function(){var a=this,b={},c=this.checkgroup.getValue(),d=this.resultPane.getAllButtons();if(0!==c.length&&BI.each(d,function(c,d){var e=d.getValue();switch(e.dateType){case BI.DynamicDateCard.TYPE.YEAR:b.year=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.QUARTER:b.quarter=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.MONTH:b.month=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.WEEK:b.week=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.DAY:b.day=0===e.offset?-e.value:e.value}BI.isNull(e.dateType)&&(b.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var e=d[0].getValue();b.workDay=0===e.offset?-e.value:e.value}return b}}),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}}),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 a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:b.minDate,max:b.maxDate,format:b.format,allowEdit:b.allowEdit,watermark:b.watermark,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.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:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},_defaultState:function(){},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(a){return BI.isNaturalNumber(a)},value:b.value,ref:function(){a.editor=this},errorText:function(a){return BI.isEmptyString(a)?BI.i18nText("BI-Basic_Please_Input_Content"):BI.i18nText("BI-Please_Input_Natural_Number")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:b.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(){a.offsetCombo=this},container:null,value:b.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var a="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:a=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:a=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:a=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:a=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:a=BI.i18nText("BI-Basic_Day");break;case BI.DynamicDateCard.TYPE.WORK_DAY:default:a=BI.i18nText("BI-Basic_Work_Day")}return a},setValue:function(a){a=a||{},a.value=a.value||0,a.offset=a.offset||0,this.editor.setValue(a.value),this.offsetCombo.setValue(a.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),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 a=this,b=this.options,c=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:c.buttonHeight-1,listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){a.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),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),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2]}}}a.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.getDate();e=BI.DynamicDateHelper.getCalculation(c);var f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[0,1,2],d=this._getFormatString().match(/%./g);BI.each(d,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":default:c[2]=a}});var e=BI.parseDateTime(a,this._getFormatString());BI.print(e,this._getFormatString())===a&&(a=BI.print(e,b.compareFormat),c=[0,1,2]);var f=a.match(/\d+/g),g=[];return BI.each(f,function(a){g[a]=f[c[a]]}),g.length===c.length&&2===g[0].length?BI.print(BI.parseDateTime(g.join("-"),b.compareFormat),b.compareFormat):g.join("-")},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,this._getFormatString()),this._const.compareFormat);return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,this._getFormatString()),c=BI.print(b,this._const.compareFormat);return b.getMonth()>=0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),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),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",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:b.minDate,max:b.maxDate,allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate(),hour:0,minute:0,second:0}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},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_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options,c=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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){a.timeSelect=this}},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a.timeSelect.setValue(),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();return{type:a,value:a===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),BI.DynamicDateTimeSelect=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-select"},render:function(){var a=this;return{type:"bi.center_adapt",items:[{type:"bi.vertical_adapt",items:[{el:{type:"bi.number_editor",ref:function(){a.hour=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<24},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkHour(b),this.setValue(a._formatValueToDoubleDigit(b)),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.HOUR);this.setValue(b)}}],width:60,height:24}},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.minute=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkMinute(b),this.setValue(a._formatValueToDoubleDigit(b),BI.DynamicDateTimeSelect.MINUTE),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.MINUTE);this.setValue(b)}}],width:60,height:24},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.second=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkSecond(b),this.setValue(a._formatValueToDoubleDigit(b)),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}}],width:60,height:24}]}]}},_checkBorder:function(a){a=a||{},this._checkHour(a.hour),this._checkMinute(a.minute),this._checkSecond(a.second)},_checkHour:function(a){this.hour.setDownEnable(BI.parseInt(a)>0),this.hour.setUpEnable(BI.parseInt(a)<23)},_checkMinute:function(a){this.minute.setDownEnable(BI.parseInt(a)>0),this.minute.setUpEnable(BI.parseInt(a)<59)},_checkSecond:function(a){this.second.setDownEnable(BI.parseInt(a)>0),this.second.setUpEnable(BI.parseInt(a)<59)},_autoSwitch:function(a,b){var c=0,d=a+"";switch(b){case BI.DynamicDateTimeSelect.HOUR:c=2;break;case BI.DynamicDateTimeSelect.MINUTE:c=5}if(1===d.length&&BI.parseInt(d)>c&&(d="0"+d),2===d.length)switch(b){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 d},_formatValueToDoubleDigit:function(a){(BI.isNull(a)||BI.isEmptyString(a))&&(a=0);var b=BI.parseInt(a);return b<10&&(b="0"+b),b},_assertValue:function(a){return a=a||{},a.hour=this._formatValueToDoubleDigit(a.hour)||"00",a.minute=this._formatValueToDoubleDigit(a.minute)||"00",a.second=this._formatValueToDoubleDigit(a.second)||"00",a},getValue:function(){return{hour:BI.parseInt(this.hour.getValue()),minute:BI.parseInt(this.minute.getValue()),second:BI.parseInt(this.second.getValue())}},setValue:function(a){a=this._assertValue(a),this.hour.setValue(a.hour),this.minute.setValue(a.minute),this.second.setValue(a.second),this._checkBorder(a)}}),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}),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2],hour:0|d[3],minute:0|d[4],second:0|d[5]}}}a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.DynamicDateHelper.getCalculation(c),f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[],d=!1,e=this._getFormatString().match(/%./g);BI.each(e,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":c[2]=a;break;case"%S":d=!0}});var f=BI.parseDateTime(a,this._getFormatString());BI.print(f,this._getFormatString())===a&&(a=BI.print(f,b.compareFormat),c=[0,1,2]);var g=a.match(/\d+/g),h=[];BI.each(g.slice(0,3),function(a){h[a]=g[c[a]]});var i=g.slice(3);BI.each(i,function(a,b){BI.isNumeric(b)&&1===b.length&&(i[a]="0"+b)}),2!==i.length||d||i.push("00");var j=i.join(":"),k=h.slice(0,3).join("-");return BI.isNotEmptyString(j)&&(k+=" "+j),k},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S"),"%Y-%x-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S"),"%Y-%x-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S"),"%Y-%X-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d"),c=BI.print(b,"%Y-%X-%d");return b.getMonth()>0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue},isValid:function(){return this.editor.isValid()}}),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),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,hgap:1,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"close-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CHANGE),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.icon_label",cls:"search-font"},width:24},{el:a.editor},{el:this.clear,width:24}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:20})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,title:b.title,tipType:b.tipType,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:20})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.IntervalSlider=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""},render:function(){var a=this,b=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:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=a.valueOne,c=BI.parseFloat(this.getValue());a.valueOne=c;var d=a._getPercentByValue(c),e=BI.parseFloat(d.toFixed(1));a._setSliderOnePosition(e),a._setBlueTrack(),a._checkLabelPosition(b,a.valueTwo,a.valueOne,a.valueTwo),a.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:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=a.valueTwo,c=BI.parseFloat(this.getValue());a.valueTwo=c;var d=a._getPercentByValue(c),e=BI.parseFloat(d.toFixed(1));a._setSliderTwoPosition(e),a._setBlueTrack(),a._checkLabelPosition(a.valueOne,b,a.valueOne,a.valueTwo),a.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:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]}},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit);var g=this.valueOne,h=this.valueTwo;b?(this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f,this._checkLabelPosition(g,h,f,this.valueTwo)):(this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f,this._checkLabelPosition(g,h,this.valueOne,f)),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=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:a.EDITOR_R_GAP,height:a.SLIDER_HEIGHT},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=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:a.SLIDER_WIDTH_HALF,height:a.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(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_checkLabelPosition:function(a,b,c,d,e){if(a=BI.parseFloat(a),b=BI.parseFloat(b),c=BI.parseFloat(c),d=BI.parseFloat(d),a<=b&&c>d||a>=b&&c-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0:return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){ var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["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"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||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(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJCZGJMZMGXMPRYXKJNYMSGMZJYMKMFXMLDTGFBHCJHKYLPFMDXLQJJSMTQGZSJLQDLDGJYCALCMZCSDJLLNXDJFFFFJCZFMZFFPFKHKGDPSXKTACJDHHZDDCRRCFQYJKQCCWJDXHWJLYLLZGCFCQDSMLZPBJJPLSBCJGGDCKKDEZSQCCKJGCGKDJTJDLZYCXKLQSCGJCLTFPCQCZGWPJDQYZJJBYJHSJDZWGFSJGZKQCCZLLPSPKJGQJHZZLJPLGJGJJTHJJYJZCZMLZLYQBGJWMLJKXZDZNJQSYZMLJLLJKYWXMKJLHSKJGBMCLYYMKXJQLBMLLKMDXXKWYXYSLMLPSJQQJQXYXFJTJDXMXXLLCXQBSYJBGWYMBGGBCYXPJYGPEPFGDJGBHBNSQJYZJKJKHXQFGQZKFHYGKHDKLLSDJQXPQYKYBNQSXQNSZSWHBSXWHXWBZZXDMNSJBSBKBBZKLYLXGWXDRWYQZMYWSJQLCJXXJXKJEQXSCYETLZHLYYYSDZPAQYZCMTLSHTZCFYZYXYLJSDCJQAGYSLCQLYYYSHMRQQKLDXZSCSSSYDYCJYSFSJBFRSSZQSBXXPXJYSDRCKGJLGDKZJZBDKTCSYQPYHSTCLDJDHMXMCGXYZHJDDTMHLTXZXYLYMOHYJCLTYFBQQXPFBDFHHTKSQHZYYWCNXXCRWHOWGYJLEGWDQCWGFJYCSNTMYTOLBYGWQWESJPWNMLRYDZSZTXYQPZGCWXHNGPYXSHMYQJXZTDPPBFYHZHTJYFDZWKGKZBLDNTSXHQEEGZZYLZMMZYJZGXZXKHKSTXNXXWYLYAPSTHXDWHZYMPXAGKYDXBHNHXKDPJNMYHYLPMGOCSLNZHKXXLPZZLBMLSFBHHGYGYYGGBHSCYAQTYWLXTZQCEZYDQDQMMHTKLLSZHLSJZWFYHQSWSCWLQAZYNYTLSXTHAZNKZZSZZLAXXZWWCTGQQTDDYZTCCHYQZFLXPSLZYGPZSZNGLNDQTBDLXGTCTAJDKYWNSYZLJHHZZCWNYYZYWMHYCHHYXHJKZWSXHZYXLYSKQYSPSLYZWMYPPKBYGLKZHTYXAXQSYSHXASMCHKDSCRSWJPWXSGZJLWWSCHSJHSQNHCSEGNDAQTBAALZZMSSTDQJCJKTSCJAXPLGGXHHGXXZCXPDMMHLDGTYBYSJMXHMRCPXXJZCKZXSHMLQXXTTHXWZFKHCCZDYTCJYXQHLXDHYPJQXYLSYYDZOZJNYXQEZYSQYAYXWYPDGXDDXSPPYZNDLTWRHXYDXZZJHTCXMCZLHPYYYYMHZLLHNXMYLLLMDCPPXHMXDKYCYRDLTXJCHHZZXZLCCLYLNZSHZJZZLNNRLWHYQSNJHXYNTTTKYJPYCHHYEGKCTTWLGQRLGGTGTYGYHPYHYLQYQGCWYQKPYYYTTTTLHYHLLTYTTSPLKYZXGZWGPYDSSZZDQXSKCQNMJJZZBXYQMJRTFFBTKHZKBXLJJKDXJTLBWFZPPTKQTZTGPDGNTPJYFALQMKGXBDCLZFHZCLLLLADPMXDJHLCCLGYHDZFGYDDGCYYFGYDXKSSEBDHYKDKDKHNAXXYBPBYYHXZQGAFFQYJXDMLJCSQZLLPCHBSXGJYNDYBYQSPZWJLZKSDDTACTBXZDYZYPJZQSJNKKTKNJDJGYYPGTLFYQKASDNTCYHBLWDZHBBYDWJRYGKZYHEYYFJMSDTYFZJJHGCXPLXHLDWXXJKYTCYKSSSMTWCTTQZLPBSZDZWZXGZAGYKTYWXLHLSPBCLLOQMMZSSLCMBJCSZZKYDCZJGQQDSMCYTZQQLWZQZXSSFPTTFQMDDZDSHDTDWFHTDYZJYQJQKYPBDJYYXTLJHDRQXXXHAYDHRJLKLYTWHLLRLLRCXYLBWSRSZZSYMKZZHHKYHXKSMDSYDYCJPBZBSQLFCXXXNXKXWYWSDZYQOGGQMMYHCDZTTFJYYBGSTTTYBYKJDHKYXBELHTYPJQNFXFDYKZHQKZBYJTZBXHFDXKDASWTAWAJLDYJSFHBLDNNTNQJTJNCHXFJSRFWHZFMDRYJYJWZPDJKZYJYMPCYZNYNXFBYTFYFWYGDBNZZZDNYTXZEMMQBSQEHXFZMBMFLZZSRXYMJGSXWZJSPRYDJSJGXHJJGLJJYNZZJXHGXKYMLPYYYCXYTWQZSWHWLYRJLPXSLSXMFSWWKLCTNXNYNPSJSZHDZEPTXMYYWXYYSYWLXJQZQXZDCLEEELMCPJPCLWBXSQHFWWTFFJTNQJHJQDXHWLBYZNFJLALKYYJLDXHHYCSTYYWNRJYXYWTRMDRQHWQCMFJDYZMHMYYXJWMYZQZXTLMRSPWWCHAQBXYGZYPXYYRRCLMPYMGKSJSZYSRMYJSNXTPLNBAPPYPYLXYYZKYNLDZYJZCZNNLMZHHARQMPGWQTZMXXMLLHGDZXYHXKYXYCJMFFYYHJFSBSSQLXXNDYCANNMTCJCYPRRNYTYQNYYMBMSXNDLYLYSLJRLXYSXQMLLYZLZJJJKYZZCSFBZXXMSTBJGNXYZHLXNMCWSCYZYFZLXBRNNNYLBNRTGZQYSATSWRYHYJZMZDHZGZDWYBSSCSKXSYHYTXXGCQGXZZSHYXJSCRHMKKBXCZJYJYMKQHZJFNBHMQHYSNJNZYBKNQMCLGQHWLZNZSWXKHLJHYYBQLBFCDSXDLDSPFZPSKJYZWZXZDDXJSMMEGJSCSSMGCLXXKYYYLNYPWWWGYDKZJGGGZGGSYCKNJWNJPCXBJJTQTJWDSSPJXZXNZXUMELPXFSXTLLXCLJXJJLJZXCTPSWXLYDHLYQRWHSYCSQYYBYAYWJJJQFWQCQQCJQGXALDBZZYJGKGXPLTZYFXJLTPADKYQHPMATLCPDCKBMTXYBHKLENXDLEEGQDYMSAWHZMLJTWYGXLYQZLJEEYYBQQFFNLYXRDSCTGJGXYYNKLLYQKCCTLHJLQMKKZGCYYGLLLJDZGYDHZWXPYSJBZKDZGYZZHYWYFQYTYZSZYEZZLYMHJJHTSMQWYZLKYYWZCSRKQYTLTDXWCTYJKLWSQZWBDCQYNCJSRSZJLKCDCDTLZZZACQQZZDDXYPLXZBQJYLZLLLQDDZQJYJYJZYXNYYYNYJXKXDAZWYRDLJYYYRJLXLLDYXJCYWYWNQCCLDDNYYYNYCKCZHXXCCLGZQJGKWPPCQQJYSBZZXYJSQPXJPZBSBDSFNSFPZXHDWZTDWPPTFLZZBZDMYYPQJRSDZSQZSQXBDGCPZSWDWCSQZGMDHZXMWWFYBPDGPHTMJTHZSMMBGZMBZJCFZWFZBBZMQCFMBDMCJXLGPNJBBXGYHYYJGPTZGZMQBQTCGYXJXLWZKYDPDYMGCFTPFXYZTZXDZXTGKMTYBBCLBJASKYTSSQYYMSZXFJEWLXLLSZBQJJJAKLYLXLYCCTSXMCWFKKKBSXLLLLJYXTYLTJYYTDPJHNHNNKBYQNFQYYZBYYESSESSGDYHFHWTCJBSDZZTFDMXHCNJZYMQWSRYJDZJQPDQBBSTJGGFBKJBXTGQHNGWJXJGDLLTHZHHYYYYYYSXWTYYYCCBDBPYPZYCCZYJPZYWCBDLFWZCWJDXXHYHLHWZZXJTCZLCDPXUJCZZZLYXJJTXPHFXWPYWXZPTDZZBDZCYHJHMLXBQXSBYLRDTGJRRCTTTHYTCZWMXFYTWWZCWJWXJYWCSKYBZSCCTZQNHXNWXXKHKFHTSWOCCJYBCMPZZYKBNNZPBZHHZDLSYDDYTYFJPXYNGFXBYQXCBHXCPSXTYZDMKYSNXSXLHKMZXLYHDHKWHXXSSKQYHHCJYXGLHZXCSNHEKDTGZXQYPKDHEXTYKCNYMYYYPKQYYYKXZLTHJQTBYQHXBMYHSQCKWWYLLHCYYLNNEQXQWMCFBDCCMLJGGXDQKTLXKGNQCDGZJWYJJLYHHQTTTNWCHMXCXWHWSZJYDJCCDBQCDGDNYXZTHCQRXCBHZTQCBXWGQWYYBXHMBYMYQTYEXMQKYAQYRGYZSLFYKKQHYSSQYSHJGJCNXKZYCXSBXYXHYYLSTYCXQTHYSMGSCPMMGCCCCCMTZTASMGQZJHKLOSQYLSWTMXSYQKDZLJQQYPLSYCZTCQQPBBQJZCLPKHQZYYXXDTDDTSJCXFFLLCHQXMJLWCJCXTSPYCXNDTJSHJWXDQQJSKXYAMYLSJHMLALYKXCYYDMNMDQMXMCZNNCYBZKKYFLMCHCMLHXRCJJHSYLNMTJZGZGYWJXSRXCWJGJQHQZDQJDCJJZKJKGDZQGJJYJYLXZXXCDQHHHEYTMHLFSBDJSYYSHFYSTCZQLPBDRFRZTZYKYWHSZYQKWDQZRKMSYNBCRXQBJYFAZPZZEDZCJYWBCJWHYJBQSZYWRYSZPTDKZPFPBNZTKLQYHBBZPNPPTYZZYBQNYDCPJMMCYCQMCYFZZDCMNLFPBPLNGQJTBTTNJZPZBBZNJKLJQYLNBZQHKSJZNGGQSZZKYXSHPZSNBCGZKDDZQANZHJKDRTLZLSWJLJZLYWTJNDJZJHXYAYNCBGTZCSSQMNJPJYTYSWXZFKWJQTKHTZPLBHSNJZSYZBWZZZZLSYLSBJHDWWQPSLMMFBJDWAQYZTCJTBNNWZXQXCDSLQGDSDPDZHJTQQPSWLYYJZLGYXYZLCTCBJTKTYCZJTQKBSJLGMGZDMCSGPYNJZYQYYKNXRPWSZXMTNCSZZYXYBYHYZAXYWQCJTLLCKJJTJHGDXDXYQYZZBYWDLWQCGLZGJGQRQZCZSSBCRPCSKYDZNXJSQGXSSJMYDNSTZTPBDLTKZWXQWQTZEXNQCZGWEZKSSBYBRTSSSLCCGBPSZQSZLCCGLLLZXHZQTHCZMQGYZQZNMCOCSZJMMZSQPJYGQLJYJPPLDXRGZYXCCSXHSHGTZNLZWZKJCXTCFCJXLBMQBCZZWPQDNHXLJCTHYZLGYLNLSZZPCXDSCQQHJQKSXZPBAJYEMSMJTZDXLCJYRYYNWJBNGZZTMJXLTBSLYRZPYLSSCNXPHLLHYLLQQZQLXYMRSYCXZLMMCZLTZSDWTJJLLNZGGQXPFSKYGYGHBFZPDKMWGHCXMSGDXJMCJZDYCABXJDLNBCDQYGSKYDQTXDJJYXMSZQAZDZFSLQXYJSJZYLBTXXWXQQZBJZUFBBLYLWDSLJHXJYZJWTDJCZFQZQZZDZSXZZQLZCDZFJHYSPYMPQZMLPPLFFXJJNZZYLSJEYQZFPFZKSYWJJJHRDJZZXTXXGLGHYDXCSKYSWMMZCWYBAZBJKSHFHJCXMHFQHYXXYZFTSJYZFXYXPZLCHMZMBXHZZSXYFYMNCWDABAZLXKTCSHHXKXJJZJSTHYGXSXYYHHHJWXKZXSSBZZWHHHCWTZZZPJXSNXQQJGZYZYWLLCWXZFXXYXYHXMKYYSWSQMNLNAYCYSPMJKHWCQHYLAJJMZXHMMCNZHBHXCLXTJPLTXYJHDYYLTTXFSZHYXXSJBJYAYRSMXYPLCKDUYHLXRLNLLSTYZYYQYGYHHSCCSMZCTZQXKYQFPYYRPFFLKQUNTSZLLZMWWTCQQYZWTLLMLMPWMBZSSTZRBPDDTLQJJBXZCSRZQQYGWCSXFWZLXCCRSZDZMCYGGDZQSGTJSWLJMYMMZYHFBJDGYXCCPSHXNZCSBSJYJGJMPPWAFFYFNXHYZXZYLREMZGZCYZSSZDLLJCSQFNXZKPTXZGXJJGFMYYYSNBTYLBNLHPFZDCYFBMGQRRSSSZXYSGTZRNYDZZCDGPJAFJFZKNZBLCZSZPSGCYCJSZLMLRSZBZZLDLSLLYSXSQZQLYXZLSKKBRXBRBZCYCXZZZEEYFGKLZLYYHGZSGZLFJHGTGWKRAAJYZKZQTSSHJJXDCYZUYJLZYRZDQQHGJZXSSZBYKJPBFRTJXLLFQWJHYLQTYMBLPZDXTZYGBDHZZRBGXHWNJTJXLKSCFSMWLSDQYSJTXKZSCFWJLBXFTZLLJZLLQBLSQMQQCGCZFPBPHZCZJLPYYGGDTGWDCFCZQYYYQYSSCLXZSKLZZZGFFCQNWGLHQYZJJCZLQZZYJPJZZBPDCCMHJGXDQDGDLZQMFGPSYTSDYFWWDJZJYSXYYCZCYHZWPBYKXRYLYBHKJKSFXTZJMMCKHLLTNYYMSYXYZPYJQYCSYCWMTJJKQYRHLLQXPSGTLYYCLJSCPXJYZFNMLRGJJTYZBXYZMSJYJHHFZQMSYXRSZCWTLRTQZSSTKXGQKGSPTGCZNJSJCQCXHMXGGZTQYDJKZDLBZSXJLHYQGGGTHQSZPYHJHHGYYGKGGCWJZZYLCZLXQSFTGZSLLLMLJSKCTBLLZZSZMMNYTPZSXQHJCJYQXYZXZQZCPSHKZZYSXCDFGMWQRLLQXRFZTLYSTCTMJCXJJXHJNXTNRZTZFQYHQGLLGCXSZSJDJLJCYDSJTLNYXHSZXCGJZYQPYLFHDJSBPCCZHJJJQZJQDYBSSLLCMYTTMQTBHJQNNYGKYRQYQMZGCJKPDCGMYZHQLLSLLCLMHOLZGDYYFZSLJCQZLYLZQJESHNYLLJXGJXLYSYYYXNBZLJSSZCQQCJYLLZLTJYLLZLLBNYLGQCHXYYXOXCXQKYJXXXYKLXSXXYQXCYKQXQCSGYXXYQXYGYTQOHXHXPYXXXULCYEYCHZZCBWQBBWJQZSCSZSSLZYLKDESJZWMYMCYTSDSXXSCJPQQSQYLYYZYCMDJDZYWCBTJSYDJKCYDDJLBDJJSODZYSYXQQYXDHHGQQYQHDYXWGMMMAJDYBBBPPBCMUUPLJZSMTXERXJMHQNUTPJDCBSSMSSSTKJTSSMMTRCPLZSZMLQDSDMJMQPNQDXCFYNBFSDQXYXHYAYKQYDDLQYYYSSZBYDSLNTFQTZQPZMCHDHCZCWFDXTMYQSPHQYYXSRGJCWTJTZZQMGWJJTJHTQJBBHWZPXXHYQFXXQYWYYHYSCDYDHHQMNMTMWCPBSZPPZZGLMZFOLLCFWHMMSJZTTDHZZYFFYTZZGZYSKYJXQYJZQBHMBZZLYGHGFMSHPZFZSNCLPBQSNJXZSLXXFPMTYJYGBXLLDLXPZJYZJYHHZCYWHJYLSJEXFSZZYWXKZJLUYDTMLYMQJPWXYHXSKTQJEZRPXXZHHMHWQPWQLYJJQJJZSZCPHJLCHHNXJLQWZJHBMZYXBDHHYPZLHLHLGFWLCHYYTLHJXCJMSCPXSTKPNHQXSRTYXXTESYJCTLSSLSTDLLLWWYHDHRJZSFGXTSYCZYNYHTDHWJSLHTZDQDJZXXQHGYLTZPHCSQFCLNJTCLZPFSTPDYNYLGMJLLYCQHYSSHCHYLHQYQTMZYPBYWRFQYKQSYSLZDQJMPXYYSSRHZJNYWTQDFZBWWTWWRXCWHGYHXMKMYYYQMSMZHNGCEPMLQQMTCWCTMMPXJPJJHFXYYZSXZHTYBMSTSYJTTQQQYYLHYNPYQZLCYZHZWSMYLKFJXLWGXYPJYTYSYXYMZCKTTWLKSMZSYLMPWLZWXWQZSSAQSYXYRHSSNTSRAPXCPWCMGDXHXZDZYFJHGZTTSBJHGYZSZYSMYCLLLXBTYXHBBZJKSSDMALXHYCFYGMQYPJYCQXJLLLJGSLZGQLYCJCCZOTYXMTMTTLLWTGPXYMZMKLPSZZZXHKQYSXCTYJZYHXSHYXZKXLZWPSQPYHJWPJPWXQQYLXSDHMRSLZZYZWTTCYXYSZZSHBSCCSTPLWSSCJCHNLCGCHSSPHYLHFHHXJSXYLLNYLSZDHZXYLSXLWZYKCLDYAXZCMDDYSPJTQJZLNWQPSSSWCTSTSZLBLNXSMNYYMJQBQHRZWTYYDCHQLXKPZWBGQYBKFCMZWPZLLYYLSZYDWHXPSBCMLJBSCGBHXLQHYRLJXYSWXWXZSLDFHLSLYNJLZYFLYJYCDRJLFSYZFSLLCQYQFGJYHYXZLYLMSTDJCYHBZLLNWLXXYGYYHSMGDHXXHHLZZJZXCZZZCYQZFNGWPYLCPKPYYPMCLQKDGXZGGWQBDXZZKZFBXXLZXJTPJPTTBYTSZZDWSLCHZHSLTYXHQLHYXXXYYZYSWTXZKHLXZXZPYHGCHKCFSYHUTJRLXFJXPTZTWHPLYXFCRHXSHXKYXXYHZQDXQWULHYHMJTBFLKHTXCWHJFWJCFPQRYQXCYYYQYGRPYWSGSUNGWCHKZDXYFLXXHJJBYZWTSXXNCYJJYMSWZJQRMHXZWFQSYLZJZGBHYNSLBGTTCSYBYXXWXYHXYYXNSQYXMQYWRGYQLXBBZLJSYLPSYTJZYHYZAWLRORJMKSCZJXXXYXCHDYXRYXXJDTSQFXLYLTSFFYXLMTYJMJUYYYXLTZCSXQZQHZXLYYXZHDNBRXXXJCTYHLBRLMBRLLAXKYLLLJLYXXLYCRYLCJTGJCMTLZLLCYZZPZPCYAWHJJFYBDYYZSMPCKZDQYQPBPCJPDCYZMDPBCYYDYCNNPLMTMLRMFMMGWYZBSJGYGSMZQQQZTXMKQWGXLLPJGZBQCDJJJFPKJKCXBLJMSWMDTQJXLDLPPBXCWRCQFBFQJCZAHZGMYKPHYYHZYKNDKZMBPJYXPXYHLFPNYYGXJDBKXNXHJMZJXSTRSTLDXSKZYSYBZXJLXYSLBZYSLHXJPFXPQNBYLLJQKYGZMCYZZYMCCSLCLHZFWFWYXZMWSXTYNXJHPYYMCYSPMHYSMYDYSHQYZCHMJJMZCAAGCFJBBHPLYZYLXXSDJGXDHKXXTXXNBHRMLYJSLTXMRHNLXQJXYZLLYSWQGDLBJHDCGJYQYCMHWFMJYBMBYJYJWYMDPWHXQLDYGPDFXXBCGJSPCKRSSYZJMSLBZZJFLJJJLGXZGYXYXLSZQYXBEXYXHGCXBPLDYHWETTWWCJMBTXCHXYQXLLXFLYXLLJLSSFWDPZSMYJCLMWYTCZPCHQEKCQBWLCQYDPLQPPQZQFJQDJHYMMCXTXDRMJWRHXCJZYLQXDYYNHYYHRSLSRSYWWZJYMTLTLLGTQCJZYABTCKZCJYCCQLJZQXALMZYHYWLWDXZXQDLLQSHGPJFJLJHJABCQZDJGTKHSSTCYJLPSWZLXZXRWGLDLZRLZXTGSLLLLZLYXXWGDZYGBDPHZPBRLWSXQBPFDWOFMWHLYPCBJCCLDMBZPBZZLCYQXLDOMZBLZWPDWYYGDSTTHCSQSCCRSSSYSLFYBFNTYJSZDFNDPDHDZZMBBLSLCMYFFGTJJQWFTMTPJWFNLBZCMMJTGBDZLQLPYFHYYMJYLSDCHDZJWJCCTLJCLDTLJJCPDDSQDSSZYBNDBJLGGJZXSXNLYCYBJXQYCBYLZCFZPPGKCXZDZFZTJJFJSJXZBNZYJQTTYJYHTYCZHYMDJXTTMPXSPLZCDWSLSHXYPZGTFMLCJTYCBPMGDKWYCYZCDSZZYHFLYCTYGWHKJYYLSJCXGYWJCBLLCSNDDBTZBSCLYZCZZSSQDLLMQYYHFSLQLLXFTYHABXGWNYWYYPLLSDLDLLBJCYXJZMLHLJDXYYQYTDLLLBUGBFDFBBQJZZMDPJHGCLGMJJPGAEHHBWCQXAXHHHZCHXYPHJAXHLPHJPGPZJQCQZGJJZZUZDMQYYBZZPHYHYBWHAZYJHYKFGDPFQSDLZMLJXKXGALXZDAGLMDGXMWZQYXXDXXPFDMMSSYMPFMDMMKXKSYZYSHDZKXSYSMMZZZMSYDNZZCZXFPLSTMZDNMXCKJMZTYYMZMZZMSXHHDCZJEMXXKLJSTLWLSQLYJZLLZJSSDPPMHNLZJCZYHMXXHGZCJMDHXTKGRMXFWMCGMWKDTKSXQMMMFZZYDKMSCLCMPCGMHSPXQPZDSSLCXKYXTWLWJYAHZJGZQMCSNXYYMMPMLKJXMHLMLQMXCTKZMJQYSZJSYSZHSYJZJCDAJZYBSDQJZGWZQQXFKDMSDJLFWEHKZQKJPEYPZYSZCDWYJFFMZZYLTTDZZEFMZLBNPPLPLPEPSZALLTYLKCKQZKGENQLWAGYXYDPXLHSXQQWQCQXQCLHYXXMLYCCWLYMQYSKGCHLCJNSZKPYZKCQZQLJPDMDZHLASXLBYDWQLWDNBQCRYDDZTJYBKBWSZDXDTNPJDTCTQDFXQQMGNXECLTTBKPWSLCTYQLPWYZZKLPYGZCQQPLLKCCYLPQMZCZQCLJSLQZDJXLDDHPZQDLJJXZQDXYZQKZLJCYQDYJPPYPQYKJYRMPCBYMCXKLLZLLFQPYLLLMBSGLCYSSLRSYSQTMXYXZQZFDZUYSYZTFFMZZSMZQHZSSCCMLYXWTPZGXZJGZGSJSGKDDHTQGGZLLBJDZLCBCHYXYZHZFYWXYZYMSDBZZYJGTSMTFXQYXQSTDGSLNXDLRYZZLRYYLXQHTXSRTZNGZXBNQQZFMYKMZJBZYMKBPNLYZPBLMCNQYZZZSJZHJCTZKHYZZJRDYZHNPXGLFZTLKGJTCTSSYLLGZRZBBQZZKLPKLCZYSSUYXBJFPNJZZXCDWXZYJXZZDJJKGGRSRJKMSMZJLSJYWQSKYHQJSXPJZZZLSNSHRNYPZTWCHKLPSRZLZXYJQXQKYSJYCZTLQZYBBYBWZPQDWWYZCYTJCJXCKCWDKKZXSGKDZXWWYYJQYYTCYTDLLXWKCZKKLCCLZCQQDZLQLCSFQCHQHSFSMQZZLNBJJZBSJHTSZDYSJQJPDLZCDCWJKJZZLPYCGMZWDJJBSJQZSYZYHHXJPBJYDSSXDZNCGLQMBTSFSBPDZDLZNFGFJGFSMPXJQLMBLGQCYYXBQKDJJQYRFKZTJDHCZKLBSDZCFJTPLLJGXHYXZCSSZZXSTJYGKGCKGYOQXJPLZPBPGTGYJZGHZQZZLBJLSQFZGKQQJZGYCZBZQTLDXRJXBSXXPZXHYZYCLWDXJJHXMFDZPFZHQHQMQGKSLYHTYCGFRZGNQXCLPDLBZCSCZQLLJBLHBZCYPZZPPDYMZZSGYHCKCPZJGSLJLNSCDSLDLXBMSTLDDFJMKDJDHZLZXLSZQPQPGJLLYBDSZGQLBZLSLKYYHZTTNTJYQTZZPSZQZTLLJTYYLLQLLQYZQLBDZLSLYYZYMDFSZSNHLXZNCZQZPBWSKRFBSYZMTHBLGJPMCZZLSTLXSHTCSYZLZBLFEQHLXFLCJLYLJQCBZLZJHHSSTBRMHXZHJZCLXFNBGXGTQJCZTMSFZKJMSSNXLJKBHSJXNTNLZDNTLMSJXGZJYJCZXYJYJWRWWQNZTNFJSZPZSHZJFYRDJSFSZJZBJFZQZZHZLXFYSBZQLZSGYFTZDCSZXZJBQMSZKJRHYJZCKMJKHCHGTXKXQGLXPXFXTRTYLXJXHDTSJXHJZJXZWZLCQSBTXWXGXTXXHXFTSDKFJHZYJFJXRZSDLLLTQSQQZQWZXSYQTWGWBZCGZLLYZBCLMQQTZHZXZXLJFRMYZFLXYSQXXJKXRMQDZDMMYYBSQBHGZMWFWXGMXLZPYYTGZYCCDXYZXYWGSYJYZNBHPZJSQSYXSXRTFYZGRHZTXSZZTHCBFCLSYXZLZQMZLMPLMXZJXSFLBYZMYQHXJSXRXSQZZZSSLYFRCZJRCRXHHZXQYDYHXSJJHZCXZBTYNSYSXJBQLPXZQPYMLXZKYXLXCJLCYSXXZZLXDLLLJJYHZXGYJWKJRWYHCPSGNRZLFZWFZZNSXGXFLZSXZZZBFCSYJDBRJKRDHHGXJLJJTGXJXXSTJTJXLYXQFCSGSWMSBCTLQZZWLZZKXJMLTMJYHSDDBXGZHDLBMYJFRZFSGCLYJBPMLYSMSXLSZJQQHJZFXGFQFQBPXZGYYQXGZTCQWYLTLGWSGWHRLFSFGZJMGMGBGTJFSYZZGZYZAFLSSPMLPFLCWBJZCLJJMZLPJJLYMQDMYYYFBGYGYZMLYZDXQYXRQQQHSYYYQXYLJTYXFSFSLLGNQCYHYCWFHCCCFXPYLYPLLZYXXXXXKQHHXSHJZCFZSCZJXCPZWHHHHHAPYLQALPQAFYHXDYLUKMZQGGGDDESRNNZLTZGCHYPPYSQJJHCLLJTOLNJPZLJLHYMHEYDYDSQYCDDHGZUNDZCLZYZLLZNTNYZGSLHSLPJJBDGWXPCDUTJCKLKCLWKLLCASSTKZZDNQNTTLYYZSSYSSZZRYLJQKCQDHHCRXRZYDGRGCWCGZQFFFPPJFZYNAKRGYWYQPQXXFKJTSZZXSWZDDFBBXTBGTZKZNPZZPZXZPJSZBMQHKCYXYLDKLJNYPKYGHGDZJXXEAHPNZKZTZCMXCXMMJXNKSZQNMNLWBWWXJKYHCPSTMCSQTZJYXTPCTPDTNNPGLLLZSJLSPBLPLQHDTNJNLYYRSZFFJFQWDPHZDWMRZCCLODAXNSSNYZRESTYJWJYJDBCFXNMWTTBYLWSTSZGYBLJPXGLBOCLHPCBJLTMXZLJYLZXCLTPNCLCKXTPZJSWCYXSFYSZDKNTLBYJCYJLLSTGQCBXRYZXBXKLYLHZLQZLNZCXWJZLJZJNCJHXMNZZGJZZXTZJXYCYYCXXJYYXJJXSSSJSTSSTTPPGQTCSXWZDCSYFPTFBFHFBBLZJCLZZDBXGCXLQPXKFZFLSYLTUWBMQJHSZBMDDBCYSCCLDXYCDDQLYJJWMQLLCSGLJJSYFPYYCCYLTJANTJJPWYCMMGQYYSXDXQMZHSZXPFTWWZQSWQRFKJLZJQQYFBRXJHHFWJJZYQAZMYFRHCYYBYQWLPEXCCZSTYRLTTDMQLYKMBBGMYYJPRKZNPBSXYXBHYZDJDNGHPMFSGMWFZMFQMMBCMZZCJJLCNUXYQLMLRYGQZCYXZLWJGCJCGGMCJNFYZZJHYCPRRCMTZQZXHFQGTJXCCJEAQCRJYHPLQLSZDJRBCQHQDYRHYLYXJSYMHZYDWLDFRYHBPYDTSSCNWBXGLPZMLZZTQSSCPJMXXYCSJYTYCGHYCJWYRXXLFEMWJNMKLLSWTXHYYYNCMMCWJDQDJZGLLJWJRKHPZGGFLCCSCZMCBLTBHBQJXQDSPDJZZGHGLFQYWBZYZJLTSTDHQHCTCBCHFLQMPWDSHYYTQWCNZZJTLBYMBPDYYYXSQKXWYYFLXXNCWCXYPMAELYKKJMZZZBRXYYQJFLJPFHHHYTZZXSGQQMHSPGDZQWBWPJHZJDYSCQWZKTXXSQLZYYMYSDZGRXCKKUJLWPYSYSCSYZLRMLQSYLJXBCXTLWDQZPCYCYKPPPNSXFYZJJRCEMHSZMSXLXGLRWGCSTLRSXBZGBZGZTCPLUJLSLYLYMTXMTZPALZXPXJTJWTCYYZLBLXBZLQMYLXPGHDSLSSDMXMBDZZSXWHAMLCZCPJMCNHJYSNSYGCHSKQMZZQDLLKABLWJXSFMOCDXJRRLYQZKJMYBYQLYHETFJZFRFKSRYXFJTWDSXXSYSQJYSLYXWJHSNLXYYXHBHAWHHJZXWMYLJCSSLKYDZTXBZSYFDXGXZJKHSXXYBSSXDPYNZWRPTQZCZENYGCXQFJYKJBZMLJCMQQXUOXSLYXXLYLLJDZBTYMHPFSTTQQWLHOKYBLZZALZXQLHZWRRQHLSTMYPYXJJXMQSJFNBXYXYJXXYQYLTHYLQYFMLKLJTMLLHSZWKZHLJMLHLJKLJSTLQXYLMBHHLNLZXQJHXCFXXLHYHJJGBYZZKBXSCQDJQDSUJZYYHZHHMGSXCSYMXFEBCQWWRBPYYJQTYZCYQYQQZYHMWFFHGZFRJFCDPXNTQYZPDYKHJLFRZXPPXZDBBGZQSTLGDGYLCQMLCHHMFYWLZYXKJLYPQHSYWMQQGQZMLZJNSQXJQSYJYCBEHSXFSZPXZWFLLBCYYJDYTDTHWZSFJMQQYJLMQXXLLDTTKHHYBFPWTYYSQQWNQWLGWDEBZWCMYGCULKJXTMXMYJSXHYBRWFYMWFRXYQMXYSZTZZTFYKMLDHQDXWYYNLCRYJBLPSXCXYWLSPRRJWXHQYPHTYDNXHHMMYWYTZCSQMTSSCCDALWZTCPQPYJLLQZYJSWXMZZMMYLMXCLMXCZMXMZSQTZPPQQBLPGXQZHFLJJHYTJSRXWZXSCCDLXTYJDCQJXSLQYCLZXLZZXMXQRJMHRHZJBHMFLJLMLCLQNLDXZLLLPYPSYJYSXCQQDCMQJZZXHNPNXZMEKMXHYKYQLXSXTXJYYHWDCWDZHQYYBGYBCYSCFGPSJNZDYZZJZXRZRQJJYMCANYRJTLDPPYZBSTJKXXZYPFDWFGZZRPYMTNGXZQBYXNBUFNQKRJQZMJEGRZGYCLKXZDSKKNSXKCLJSPJYYZLQQJYBZSSQLLLKJXTBKTYLCCDDBLSPPFYLGYDTZJYQGGKQTTFZXBDKTYYHYBBFYTYYBCLPDYTGDHRYRNJSPTCSNYJQHKLLLZSLYDXXWBCJQSPXBPJZJCJDZFFXXBRMLAZHCSNDLBJDSZBLPRZTSWSBXBCLLXXLZDJZSJPYLYXXYFTFFFBHJJXGBYXJPMMMPSSJZJMTLYZJXSWXTYLEDQPJMYGQZJGDJLQJWJQLLSJGJGYGMSCLJJXDTYGJQJQJCJZCJGDZZSXQGSJGGCXHQXSNQLZZBXHSGZXCXYLJXYXYYDFQQJHJFXDHCTXJYRXYSQTJXYEFYYSSYYJXNCYZXFXMSYSZXYYSCHSHXZZZGZZZGFJDLTYLNPZGYJYZYYQZPBXQBDZTZCZYXXYHHSQXSHDHGQHJHGYWSZTMZMLHYXGEBTYLZKQWYTJZRCLEKYSTDBCYKQQSAYXCJXWWGSBHJYZYDHCSJKQCXSWXFLTYNYZPZCCZJQTZWJQDZZZQZLJJXLSBHPYXXPSXSHHEZTXFPTLQYZZXHYTXNCFZYYHXGNXMYWXTZSJPTHHGYMXMXQZXTSBCZYJYXXTYYZYPCQLMMSZMJZZLLZXGXZAAJZYXJMZXWDXZSXZDZXLEYJJZQBHZWZZZQTZPSXZTDSXJJJZNYAZPHXYYSRNQDTHZHYYKYJHDZXZLSWCLYBZYECWCYCRYLCXNHZYDZYDYJDFRJJHTRSQTXYXJRJHOJYNXELXSFSFJZGHPZSXZSZDZCQZBYYKLSGSJHCZSHDGQGXYZGXCHXZJWYQWGYHKSSEQZZNDZFKWYSSTCLZSTSYMCDHJXXYWEYXCZAYDMPXMDSXYBSQMJMZJMTZQLPJYQZCGQHXJHHLXXHLHDLDJQCLDWBSXFZZYYSCHTYTYYBHECXHYKGJPXHHYZJFXHWHBDZFYZBCAPNPGNYDMSXHMMMMAMYNBYJTMPXYYMCTHJBZYFCGTYHWPHFTWZZEZSBZEGPFMTSKFTYCMHFLLHGPZJXZJGZJYXZSBBQSCZZLZCCSTPGXMJSFTCCZJZDJXCYBZLFCJSYZFGSZLYBCWZZBYZDZYPSWYJZXZBDSYUXLZZBZFYGCZXBZHZFTPBGZGEJBSTGKDMFHYZZJHZLLZZGJQZLSFDJSSCBZGPDLFZFZSZYZYZSYGCXSNXXCHCZXTZZLJFZGQSQYXZJQDCCZTQCDXZJYQJQCHXZTDLGSCXZSYQJQTZWLQDQZTQCHQQJZYEZZZPBWKDJFCJPZTYPQYQTTYNLMBDKTJZPQZQZZFPZSBNJLGYJDXJDZZKZGQKXDLPZJTCJDQBXDJQJSTCKNXBXZMSLYJCQMTJQWWCJQNJNLLLHJCWQTBZQYDZCZPZZDZYDDCYZZZCCJTTJFZDPRRTZTJDCQTQZDTJNPLZBCLLCTZSXKJZQZPZLBZRBTJDCXFCZDBCCJJLTQQPLDCGZDBBZJCQDCJWYNLLZYZCCDWLLXWZLXRXNTQQCZXKQLSGDFQTDDGLRLAJJTKUYMKQLLTZYTDYYCZGJWYXDXFRSKSTQTENQMRKQZHHQKDLDAZFKYPBGGPZREBZZYKZZSPEGJXGYKQZZZSLYSYYYZWFQZYLZZLZHWCHKYPQGNPGBLPLRRJYXCCSYYHSFZFYBZYYTGZXYLXCZWXXZJZBLFFLGSKHYJZEYJHLPLLLLCZGXDRZELRHGKLZZYHZLYQSZZJZQLJZFLNBHGWLCZCFJYSPYXZLZLXGCCPZBLLCYBBBBUBBCBPCRNNZCZYRBFSRLDCGQYYQXYGMQZWTZYTYJXYFWTEHZZJYWLCCNTZYJJZDEDPZDZTSYQJHDYMBJNYJZLXTSSTPHNDJXXBYXQTZQDDTJTDYYTGWSCSZQFLSHLGLBCZPHDLYZJYCKWTYTYLBNYTSDSYCCTYSZYYEBHEXHQDTWNYGYCLXTSZYSTQMYGZAZCCSZZDSLZCLZRQXYYELJSBYMXSXZTEMBBLLYYLLYTDQYSHYMRQWKFKBFXNXSBYCHXBWJYHTQBPBSBWDZYLKGZSKYHXQZJXHXJXGNLJKZLYYCDXLFYFGHLJGJYBXQLYBXQPQGZTZPLNCYPXDJYQYDYMRBESJYYHKXXSTMXRCZZYWXYQYBMCLLYZHQYZWQXDBXBZWZMSLPDMYSKFMZKLZCYQYCZLQXFZZYDQZPZYGYJYZMZXDZFYFYTTQTZHGSPCZMLCCYTZXJCYTJMKSLPZHYSNZLLYTPZCTZZCKTXDHXXTQCYFKSMQCCYYAZHTJPCYLZLYJBJXTPNYLJYYNRXSYLMMNXJSMYBCSYSYLZYLXJJQYLDZLPQBFZZBLFNDXQKCZFYWHGQMRDSXYCYTXNQQJZYYPFZXDYZFPRXEJDGYQBXRCNFYYQPGHYJDYZXGRHTKYLNWDZNTSMPKLBTHBPYSZBZTJZSZZJTYYXZPHSSZZBZCZPTQFZMYFLYPYBBJQXZMXXDJMTSYSKKBJZXHJCKLPSMKYJZCXTMLJYXRZZQSLXXQPYZXMKYXXXJCLJPRMYYGADYSKQLSNDHYZKQXZYZTCGHZTLMLWZYBWSYCTBHJHJFCWZTXWYTKZLXQSHLYJZJXTMPLPYCGLTBZZTLZJCYJGDTCLKLPLLQPJMZPAPXYZLKKTKDZCZZBNZDYDYQZJYJGMCTXLTGXSZLMLHBGLKFWNWZHDXUHLFMKYSLGXDTWWFRJEJZTZHYDXYKSHWFZCQSHKTMQQHTZHYMJDJSKHXZJZBZZXYMPAGQMSTPXLSKLZYNWRTSQLSZBPSPSGZWYHTLKSSSWHZZLYYTNXJGMJSZSUFWNLSOZTXGXLSAMMLBWLDSZYLAKQCQCTMYCFJBSLXCLZZCLXXKSBZQCLHJPSQPLSXXCKSLNHPSFQQYTXYJZLQLDXZQJZDYYDJNZPTUZDSKJFSLJHYLZSQZLBTXYDGTQFDBYAZXDZHZJNHHQBYKNXJJQCZMLLJZKSPLDYCLBBLXKLELXJLBQYCXJXGCNLCQPLZLZYJTZLJGYZDZPLTQCSXFDMNYCXGBTJDCZNBGBQYQJWGKFHTNPYQZQGBKPBBYZMTJDYTBLSQMPSXTBNPDXKLEMYYCJYNZCTLDYKZZXDDXHQSHDGMZSJYCCTAYRZLPYLTLKXSLZCGGEXCLFXLKJRTLQJAQZNCMBYDKKCXGLCZJZXJHPTDJJMZQYKQSECQZDSHHADMLZFMMZBGNTJNNLGBYJBRBTMLBYJDZXLCJLPLDLPCQDHLXZLYCBLCXZZJADJLNZMMSSSMYBHBSQKBHRSXXJMXSDZNZPXLGBRHWGGFCXGMSKLLTSJYYCQLTSKYWYYHYWXBXQYWPYWYKQLSQPTNTKHQCWDQKTWPXXHCPTHTWUMSSYHBWCRWXHJMKMZNGWTMLKFGHKJYLSYYCXWHYECLQHKQHTTQKHFZLDXQWYZYYDESBPKYRZPJFYYZJCEQDZZDLATZBBFJLLCXDLMJSSXEGYGSJQXCWBXSSZPDYZCXDNYXPPZYDLYJCZPLTXLSXYZYRXCYYYDYLWWNZSAHJSYQYHGYWWAXTJZDAXYSRLTDPSSYYFNEJDXYZHLXLLLZQZSJNYQYQQXYJGHZGZCYJCHZLYCDSHWSHJZYJXCLLNXZJJYYXNFXMWFPYLCYLLABWDDHWDXJMCXZTZPMLQZHSFHZYNZTLLDYWLSLXHYMMYLMBWWKYXYADTXYLLDJPYBPWUXJMWMLLSAFDLLYFLBHHHBQQLTZJCQJLDJTFFKMMMBYTHYGDCQRDDWRQJXNBYSNWZDBYYTBJHPYBYTTJXAAHGQDQTMYSTQXKBTZPKJLZRBEQQSSMJJBDJOTGTBXPGBKTLHQXJJJCTHXQDWJLWRFWQGWSHCKRYSWGFTGYGBXSDWDWRFHWYTJJXXXJYZYSLPYYYPAYXHYDQKXSHXYXGSKQHYWFDDDPPLCJLQQEEWXKSYYKDYPLTJTHKJLTCYYHHJTTPLTZZCDLTHQKZXQYSTEEYWYYZYXXYYSTTJKLLPZMCYHQGXYHSRMBXPLLNQYDQHXSXXWGDQBSHYLLPJJJTHYJKYPPTHYYKTYEZYENMDSHLCRPQFDGFXZPSFTLJXXJBSWYYSKSFLXLPPLBBBLBSFXFYZBSJSSYLPBBFFFFSSCJDSTZSXZRYYSYFFSYZYZBJTBCTSBSDHRTJJBYTCXYJEYLXCBNEBJDSYXYKGSJZBXBYTFZWGENYHHTHZHHXFWGCSTBGXKLSXYWMTMBYXJSTZSCDYQRCYTWXZFHMYMCXLZNSDJTTTXRYCFYJSBSDYERXJLJXBBDEYNJGHXGCKGSCYMBLXJMSZNSKGXFBNBPTHFJAAFXYXFPXMYPQDTZCXZZPXRSYWZDLYBBKTYQPQJPZYPZJZNJPZJLZZFYSBTTSLMPTZRTDXQSJEHBZYLZDHLJSQMLHTXTJECXSLZZSPKTLZKQQYFSYGYWPCPQFHQHYTQXZKRSGTTSQCZLPTXCDYYZXSQZSLXLZMYCPCQBZYXHBSXLZDLTCDXTYLZJYYZPZYZLTXJSJXHLPMYTXCQRBLZSSFJZZTNJYTXMYJHLHPPLCYXQJQQKZZSCPZKSWALQSBLCCZJSXGWWWYGYKTJBBZTDKHXHKGTGPBKQYSLPXPJCKBMLLXDZSTBKLGGQKQLSBKKTFXRMDKBFTPZFRTBBRFERQGXYJPZSSTLBZTPSZQZSJDHLJQLZBPMSMMSXLQQNHKNBLRDDNXXDHDDJCYYGYLXGZLXSYGMQQGKHBPMXYXLYTQWLWGCPBMQXCYZYDRJBHTDJYHQSHTMJSBYPLWHLZFFNYPMHXXHPLTBQPFBJWQDBYGPNZTPFZJGSDDTQSHZEAWZZYLLTYYBWJKXXGHLFKXDJTMSZSQYNZGGSWQSPHTLSSKMCLZXYSZQZXNCJDQGZDLFNYKLJCJLLZLMZZNHYDSSHTHZZLZZBBHQZWWYCRZHLYQQJBEYFXXXWHSRXWQHWPSLMSSKZTTYGYQQWRSLALHMJTQJSMXQBJJZJXZYZKXBYQXBJXSHZTSFJLXMXZXFGHKZSZGGYLCLSARJYHSLLLMZXELGLXYDJYTLFBHBPNLYZFBBHPTGJKWETZHKJJXZXXGLLJLSTGSHJJYQLQZFKCGNNDJSSZFDBCTWWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ 19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=0,f=a.length;e14){var i=g.substring(0,1);for(b=0;b0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(c=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return BI.contains(this.array,a)},indexOf:function(a){return BI.contains(this.array,a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){BI.remove(this.array,a)},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(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;c0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},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(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);null!=b&&b.setRight(c||null),null!=c&&c.setLeft(b||null),this.children.splice(a,1)},removeAllChilds:function(){this.children=[]},addChild:function(a,b){var c=null;c=BI.isUndefined(b)?this.children.length-1:b-1,a.setParent(this),c>=0&&(this.getChild(c)&&this.getChild(c).setRight(a),a.setLeft(this.getChild(c))),BI.isUndefined(b)?this.children.push(a):this.children.splice(b,0,a)},equals:function(a){return this===a||this.id===a.id},clear:function(){this.parent=null,this.left=null,this.right=null,this.children=[]}},BI.extend(BI.Tree,{transformToArrayFormat:function(a,b){if(!a)return[];var c=[];if(BI.isArray(a))for(var d=0,e=a.length;d=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},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(){}}),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(a){this.element.append(a)},_mountChildren:function(){var a=this,b=BI.Widget._renderEngine.createFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.appendFragment(b)},_getChildName:function(a){return a+""},_addElement:function(a,b,c){var d,e=this;return this.hasWidget(this._getChildName(a))?d=this.getWidgetByName(this._getChildName(a)):(d=BI.createWidget(b,c),d.on(BI.Events.DESTROY,function(){BI.each(e._children,function(a,b){b===d&&(BI.remove(e._children,b),e.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),d)),d},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a,b){var c=this,d=this.options,e=BI.Widget._renderEngine.createFragment(),f=[];BI.each(a,function(a,g){var h=c._addElement(d.items.length,g,b);c._children[c._getChildName(d.items.length)]=h,d.items.push(g),f.push(h),e.appendChild(h.element[0])}),this._isMounted&&(this._getWrapper().append(e),BI.each(f,function(a,b){b._mount()}))},prependItems:function(a,b){var c=this;a=a||[];for(var d=BI.Widget._renderEngine.createFragment(),e=[],f=a.length-1;f>=0;f--){this._addItemAt(0,a[f]);var g=this._addElement(0,a[f],b);c._children[c._getChildName(0)]=g,this.options.items.unshift(a[f]),e.push(g),d.appendChild(g.element[0])}this._isMounted&&(this._getWrapper().prepend(d),BI.each(e,function(a,b){b._mount()}))},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=k._getOptions(a),b=k._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=k._getOptions(a),d=null==c.key?k._getChildName(b):c.key;return t[d]=k._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=a[b];if(BI.isNotNull(d)){var e=k._getOptions(d),f=null==e.key?k._getChildName(b):e.key;delete k._children[k._getChildName(f)],t[f]._destroy()}}}function g(a,b,c,d){a=k._getOptions(a),b=b&&k._getOptions(b);var e=BI.isKey(a.key)?a.key:k._getChildName(d);if(b&&t[b.key]){var f,g=BI.isKey(b.key)?b.key:k._getChildName(d);f=c?t[g].element.next():t[g].element,f.length>0?f.before(t[e].element):k._getWrapper().append(t[e].element)}else k._getWrapper().append(t[e].element)}function h(a,b,d,e){var f,g;for(f=d;f<=e;++f)a[f]&&c(a[f],b)&&(g=a[f]);return g}var i,j,k=this,l=0,m=0,n=a.length-1,o=a[0],p=a[n],q=b.length-1,r=b[0],s=b[q],t={};for(BI.each(a,function(a,b){b=k._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(t[c]=k._children[k._getChildName(a)])});l<=n&&m<=q;)if(BI.isNull(o))o=a[++l];else if(BI.isNull(p))p=a[--n];else if(c(o,r,l,m))j=this.patchItem(o,r,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],o=a[++l],r=b[++m];else if(c(p,s,n,q))j=this.patchItem(p,s,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],p=a[--n],s=b[--q];else if(c(o,s))j=this.patchItem(o,s,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],g(o,p,!0),o=a[++l],s=b[--q];else if(c(p,r))j=this.patchItem(p,r,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],g(p,o),p=a[--n],r=b[++m];else{var u=h(a,r,l,n);if(BI.isNull(u)){var v=d(r);g(v,o),r=b[++m]}else BI.each(a,function(b,d){d&&c(d,r)&&(j=k.patchItem(u,r,b)||j,t[null==u.key?k._getChildName(b):u.key]=k._children[k._getChildName(b)],a[b]=void 0,g(u,o))}),r=b[++m]}return l>n?(i=BI.isNull(b[q+1])?null:b[q+1],e(i,b,m,q)):m>q&&f(a,l,n),this._children={},BI.each(b,function(a,b){var c=k._getOptions(b),d=null==c.key?k._getChildName(a):c.key;t[d]._mount(),k._children[k._getChildName(a)]=t[d]}),j},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},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(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a,b,c={},d={},e={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(a&&a(b,d),e[b])for(var f=e[b].length-1;f>=0;f--)e[b][f](d);if(c[b])for(var g,f=c[b].length-1;f>=0;f--)if(g=c[b][f](d))return g;return d},config:function(c,d){a=c,b=d},configWidget:function(a,b){e[a]||(e[a]=[]),e[a].push(b)},registerWidget:function(a,b){c[a]||(c[a]=[]),c[a].length>0&&console.log("组件已经注册过了!"),c[a].push(b)},relieveWidget:function(a){delete c[a]},getObject:function(a,c){if(b&&b(a,c),d[a])for(var e,f=0,g=d[a].length;f0&&console.log("对象已经注册过了!"),d[a].push(b)},relieveObject:function(a){delete d[a]}})}(),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(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},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(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){function c(a,b){var c=a<0?(a*=-1,"-"):"",h="",i=a>0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;iBI.Widget._renderEngine.createElement("body").outerWidth()&&(l-=k.element.outerWidth()+15);var n=BI.Widget._renderEngine.createElement("body").outerHeight();return m+k.element.outerHeight()>n||j+k.element.outerHeight()>n?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.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"}}),_.extend(BI,{pushArray:function(a,b){for(var c=0;ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",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(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),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(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){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(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},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 a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.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 a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p 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%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?b.attachEvent("onresize",c):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
      ',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
      ").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",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(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),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(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){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(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},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 a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.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 a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p 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%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?(b.attachEvent("onresize",c),c()):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
      ',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
      ").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g0&&b-1 in a)))}function d(a){var b=xa[a]={};return ia.each(a.match(ka)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(ia.acceptData(a)){var f,g,h=ia.expando,i="string"==typeof c,j=a.nodeType,k=j?ia.cache:a,l=j?a[h]:a[h]&&h;if(l&&k[l]&&(e||k[l].data)||!i||d!==b)return l||(j?a[h]=l=_.pop()||ia.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=ia.noop)),"object"!=typeof c&&"function"!=typeof c||(e?k[l]=ia.extend(k[l],c):k[l].data=ia.extend(k[l].data,c)),f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[ia.camelCase(c)]=d),i?(g=f[c],null==g&&(g=f[ia.camelCase(c)])):g=f,g}}function f(a,b,c){if(ia.acceptData(a)){var d,e,f,g=a.nodeType,i=g?ia.cache:a,j=g?a[ia.expando]:ia.expando;if(i[j]){if(b&&(f=c?i[j]:i[j].data)){ia.isArray(b)?b=b.concat(ia.map(b,ia.camelCase)):b in f?b=[b]:(b=ia.camelCase(b),b=b in f?[b]:b.split(" "));for(d=0,e=b.length;d=0===c})}function m(a){var b=Ua.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function n(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function o(a){var b=a.getAttributeNode("type");return a.type=(b&&b.specified)+"/"+a.type,a}function p(a){var b=eb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function q(a,b){for(var c,d=0;null!=(c=a[d]);d++)ia._data(c,"globalEval",!b||ia._data(b[d],"globalEval"))}function r(a,b){if(1===b.nodeType&&ia.hasData(a)){var c,d,e,f=ia._data(a),g=ia._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jb[0].contentWindow||jb[0].contentDocument).document,b.write(""),b.close(),c=C(a,b),jb.detach()),ub[a]=c),c}function C(a,b){var c=ia(b.createElement(a)).appendTo(b.body),d=ia.css(c[0],"display");return c.remove(),d}function D(a,b,c,d){var e;if(ia.isArray(b))ia.each(b,function(b,e){c||Ab.test(a)?d(a,e):D(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==ia.type(b))d(a,b);else for(e in b)D(a+"["+e+"]",b[e],c,d)}function E(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(ka)||[];if(ia.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function F(a,b,c,d){function e(h){var i;return f[h]=!0,ia.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function G(a,c){var d,e,f=ia.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&ia.extend(!0,a,d),a}function H(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(h in k)h in d&&(c[k[h]]=d[h]);for(;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}if(g)return g!==j[0]&&j.unshift(g),d[g]}function I(a,b){var c,d,e,f,g={},h=0,i=a.dataTypes.slice(),j=i[0];if(a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i[1])for(e in a.converters)g[e.toLowerCase()]=a.converters[e];for(;d=i[++h];)if("*"!==d){if("*"!==j&&j!==d){if(e=g[j+" "+d]||g["* "+d],!e)for(c in g)if(f=c.split(" "),f[1]===d&&(e=g[j+" "+f[0]]||g["* "+f[0]])){e===!0?e=g[c]:g[c]!==!0&&(d=f[0],i.splice(h--,0,d));break}if(e!==!0)if(e&&a["throws"])b=e(b);else try{b=e(b)}catch(k){return{state:"parsererror",error:e?k:"No conversion from "+j+" to "+d}}}j=d}return{state:"success",data:b}}function J(){try{return new a.XMLHttpRequest}catch(b){}}function K(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function L(){return setTimeout(function(){$b=b}),$b=ia.now()}function M(a,b){ia.each(b,function(b,c){for(var d=(ec[b]||[]).concat(ec["*"]),e=0,f=d.length;e)[^>]*|#([\w-]*))$/,na=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,oa=/^[\],:{}\s]*$/,pa=/(?:^|:|,)(?:\s*\[)+/g,qa=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,ra=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,sa=/^-ms-/,ta=/-([\da-z])/gi,ua=function(a,b){return b.toUpperCase()},va=function(a){(W.addEventListener||"load"===a.type||"complete"===W.readyState)&&(wa(),ia.ready())},wa=function(){W.addEventListener?(W.removeEventListener("DOMContentLoaded",va,!1),a.removeEventListener("load",va,!1)):(W.detachEvent("onreadystatechange",va),a.detachEvent("onload",va))};ia.fn=ia.prototype={jquery:aa,constructor:ia,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ma.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof ia?c[0]:c,ia.merge(this,ia.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:W,!0)),na.test(e[1])&&ia.isPlainObject(c))for(e in c)ia.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=W.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=W,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):ia.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),ia.makeArray(a,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return da.call(this)},get:function(a){return null==a?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a){var b=ia.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return ia.each(this,a,b)},ready:function(a){return ia.ready.promise().done(a),this},slice:function(){return this.pushStack(da.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0||(T.resolveWith(W,[ia]),ia.fn.trigger&&ia(W).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===ia.type(a)},isArray:Array.isArray||function(a){return"array"===ia.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?$[fa.call(a)]||"object":typeof a},isPlainObject:function(a){if(!a||"object"!==ia.type(a)||a.nodeType||ia.isWindow(a))return!1;try{if(a.constructor&&!ga.call(a,"constructor")&&!ga.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||ga.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||W;var d=na.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=ia.buildFragment([a],b,e),e&&ia(e).remove(),ia.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=ia.trim(b),b&&oa.test(b.replace(qa,"@").replace(ra,"]").replace(pa,"")))?new Function("return "+b)():void ia.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||ia.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&ia.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(sa,"ms-").replace(ta,ua)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;f-1;)j.splice(d,1),c&&(d<=g&&g--,d<=h&&h--)}),this},has:function(a){return a?ia.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!j||f&&!k||(c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},ia.extend({Deferred:function(a){var b=[["resolve","done",ia.Callbacks("once memory"),"resolved"],["reject","fail",ia.Callbacks("once memory"),"rejected"],["notify","progress",ia.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return ia.Deferred(function(c){ia.each(b,function(b,f){var g=f[0],h=ia.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&ia.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?ia.extend(a,d):d}},e={};return d.pipe=d.then,ia.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=da.call(arguments),g=f.length,h=1!==g||a&&ia.isFunction(a.promise)?g:0,i=1===h?a:ia.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?da.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e
    • a",c=l.getElementsByTagName("*"),d=l.getElementsByTagName("a")[0],!c||!d||!c.length)return{};f=W.createElement("select"),h=f.appendChild(W.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b={getSetAttribute:"t"!==l.className,leadingWhitespace:3===l.firstChild.nodeType,tbody:!l.getElementsByTagName("tbody").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:!!e.value,optSelected:h.selected,enctype:!!W.createElement("form").enctype,html5Clone:"<:nav>"!==W.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===W.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=W.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=W.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;return l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip,ia(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=W.getElementsByTagName("body")[0];g&&(c=W.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="
      t
      ",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.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%;",b.boxSizing=4===l.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==g.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(W.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==V&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="
      ",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}();var ya=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,za=/([A-Z])/g;ia.extend({cache:{},expando:"jQuery"+(aa+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?ia.cache[a[ia.expando]]:a[ia.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&ia.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),ia.fn.extend({data:function(a,c){var d,e,f=this[0],h=0,i=null;if(a===b){if(this.length&&(i=ia.data(f),1===f.nodeType&&!ia._data(f,"parsedAttrs"))){for(d=f.attributes;h1,null,!0)},removeData:function(a){return this.each(function(){ia.removeData(this,a)})}}),ia.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=ia._data(a,b),c&&(!d||ia.isArray(c)?d=ia._data(a,b,ia.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=ia.queue(a,b),d=c.length,e=c.shift(),f=ia._queueHooks(a,b),g=function(){ia.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),f.cur=e,e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return ia._data(a,c)||ia._data(a,c,{empty:ia.Callbacks("once memory").add(function(){ia._removeData(a,b+"queue"),ia._removeData(a,c)})})}}),ia.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){ia.removeAttr(this,a)})},prop:function(a,b){return ia.access(this,ia.prop,a,b,arguments.length>1)},removeProp:function(a){return a=ia.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(ia.isFunction(a))return this.each(function(b){ia(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(ka)||[];g=0;)d=d.replace(" "+e+" "," ");c.className=a?ia.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return ia.isFunction(a)?this.each(function(c){ia(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=ia(this),h=b,i=a.match(ka)||[];e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else c!==V&&"boolean"!==c||(this.className&&ia._data(this,"__className__",this.className),this.className=this.className||a===!1?"":ia._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=ia.isFunction(a),this.each(function(c){var f,g=ia(this);1===this.nodeType&&(f=e?a.call(this,c,g.val()):a,null==f?f="":"number"==typeof f?f+="":ia.isArray(f)&&(f=ia.map(f,function(a){return null==a?"":a+""})),d=ia.valHooks[this.type]||ia.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=ia.valHooks[f.type]||ia.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Da,""):null==c?"":c)}}}),ia.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i=0}),c.length||(a.selectedIndex=-1),c}}},attr:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return typeof a.getAttribute===V?ia.prop(a,c,d):(f=1!==h||!ia.isXMLDoc(a),f&&(c=c.toLowerCase(),e=ia.attrHooks[c]||(Ga.test(c)?Ba:Aa)),d===b?e&&f&&"get"in e&&null!==(g=e.get(a,c))?g:(typeof a.getAttribute!==V&&(g=a.getAttribute(c)),null==g?b:g):null!==d?e&&f&&"set"in e&&(g=e.set(a,d,c))!==b?g:(a.setAttribute(c,d+""),d):void ia.removeAttr(a,c))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ka);if(f&&1===a.nodeType)for(;c=f[e++];)d=ia.propFix[c]||c,Ga.test(c)?!Ia&&Ha.test(c)?a[ia.camelCase("default-"+c)]=a[d]=!1:a[d]=!1:ia.attr(a,c,""),a.removeAttribute(Ia?c:d)},attrHooks:{type:{set:function(a,b){if(!ia.support.radioValue&&"radio"===b&&ia.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},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(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!ia.isXMLDoc(a),g&&(c=ia.propFix[c]||c,f=ia.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):Ea.test(a.nodeName)||Fa.test(a.nodeName)&&a.href?0:b}}}}),Ba={get:function(a,c){var d=ia.prop(a,c),e="boolean"==typeof d&&a.getAttribute(c),f="boolean"==typeof d?Ja&&Ia?null!=e:Ha.test(c)?a[ia.camelCase("default-"+c)]:!!e:a.getAttributeNode(c);return f&&f.value!==!1?c.toLowerCase():b},set:function(a,b,c){return b===!1?ia.removeAttr(a,c):Ja&&Ia||!Ha.test(c)?a.setAttribute(!Ia&&ia.propFix[c]||c,c):a[ia.camelCase("default-"+c)]=a[c]=!0,c}},Ja&&Ia||(ia.attrHooks.value={get:function(a,c){var d=a.getAttributeNode(c);return ia.nodeName(a,"input")?a.defaultValue:d&&d.specified?d.value:b},set:function(a,b,c){return ia.nodeName(a,"input")?void(a.defaultValue=b):Aa&&Aa.set(a,b,c)}}),Ia||(Aa=ia.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&("id"===c||"name"===c||"coords"===c?""!==d.value:d.specified)?d.value:b},set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},ia.attrHooks.contenteditable={get:Aa.get,set:function(a,b,c){Aa.set(a,""!==b&&b,c)}},ia.each(["width","height"],function(a,b){ia.attrHooks[b]=ia.extend(ia.attrHooks[b],{set:function(a,c){if(""===c)return a.setAttribute(b,"auto"),c}})})),ia.support.hrefNormalized||(ia.each(["href","src","width","height"],function(a,c){ia.attrHooks[c]=ia.extend(ia.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null==d?b:d}})}),ia.each(["href","src"],function(a,b){ia.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}})),ia.support.style||(ia.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),ia.support.optSelected||(ia.propHooks.selected=ia.extend(ia.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),ia.support.enctype||(ia.propFix.enctype="encoding"),ia.support.checkOn||ia.each(["radio","checkbox"],function(){ia.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),ia.each(["radio","checkbox"],function(){ia.valHooks[this]=ia.extend(ia.valHooks[this],{set:function(a,b){if(ia.isArray(b))return a.checked=ia.inArray(ia(a).val(),b)>=0}})});var Ka=/^(?:input|select|textarea)$/i,La=/^key/,Ma=/^(?:mouse|contextmenu)|click/,Na=/^(?:focusinfocus|focusoutblur)$/,Oa=/^([^.]*)(?:\.(.+)|)$/;ia.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=ia._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=ia.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof ia===V||a&&ia.event.triggered===a.type?b:ia.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(ka)||[""],i=c.length;i--;)g=Oa.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),k=ia.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=ia.event.special[o]||{},m=ia.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&ia.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),ia.event.global[o]=!0;a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ia.hasData(a)&&ia._data(a);if(q&&(k=q.events)){for(b=(b||"").match(ka)||[""],j=b.length;j--;)if(h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=ia.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||ia.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)ia.event.remove(a,n+b[j],c,d,!0);ia.isEmptyObject(k)&&(delete q.handle,ia._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||W],o=ga.call(c,"type")?c.type:c,p=ga.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||W,3!==e.nodeType&&8!==e.nodeType&&!Na.test(o+ia.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[ia.expando]?c:new ia.Event(o,"object"==typeof c&&c),c.isTrigger=!0,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:ia.makeArray(d,[c]),k=ia.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!ia.isWindow(e)){for(j=k.delegateType||o,Na.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||W)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(ia._data(i,"events")||{})[c.type]&&ia._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&ia.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(e.ownerDocument,d)===!1)&&("click"!==o||!ia.nodeName(e,"a"))&&ia.acceptData(e)&&h&&e[o]&&!ia.isWindow(e)){l=e[h],l&&(e[h]=null),ia.event.triggered=o;try{e[o]()}catch(q){}ia.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=ia.event.fix(a);var c,d,e,f,g,h=[],i=da.call(arguments),j=(ia._data(this,"events")||{})[a.type]||[],k=ia.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=ia.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(e.namespace)){a.handleObj=e,a.data=e.data;var l=(ia.event.special[e.origType]||{}).handle||e.handler;l.apply&&(d=l.apply(f.elem,i)),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation())}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;g=0:ia.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return iy.cacheLength&&delete a[b.shift()],a[c]=d}}function e(a){return a[N]=!0,a}function f(a){var b=F.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}}function g(a,b,c,d){var e,f,g,h,i,j,k,n,o,p;if((b?b.ownerDocument||b:O)!==F&&E(b),b=b||F,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(!H&&!d){if(e=pa.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&L(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return Z.apply(c,$.call(b.getElementsByTagName(a),0)),c;if((g=e[3])&&P.getByClassName&&b.getElementsByClassName)return Z.apply(c,$.call(b.getElementsByClassName(g),0)),c}if(P.qsa&&!I.test(a)){if(k=!0,n=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=l(a),(k=b.getAttribute("id"))?n=k.replace(sa,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=na.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return Z.apply(c,$.call(o.querySelectorAll(p),0)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return u(a.replace(ga,"$1"),b,c,d)}function h(a,b){var c=b&&a,d=c&&(~b.sourceIndex||W)-(~a.sourceIndex||W);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(a,b){var c,d,e,f,h,i,j,k=T[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=y.preFilter;h;){c&&!(d=ha.exec(h))||(d&&(h=h.slice(d[0].length)||h),i.push(e=[])),c=!1,(d=ja.exec(h))&&(c=d.shift(),e.push({value:c,type:d[0].replace(ga," ")}),h=h.slice(c.length));for(f in y.filter)!(d=ma[f].exec(h))||j[f]&&!(d=j[f](d))||(c=d.shift(),e.push({value:c,type:f,matches:d}),h=h.slice(c.length));if(!c)break}return b?h.length:h?g.error(a):T(a,i).slice(0)}function m(a){for(var b=0,c=a.length,d="";b1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h-1&&(e[j]=!(g[j]=l))}}else s=p(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):Z.apply(g,s)})}function r(a){for(var b,c,d,e=a.length,f=y.relative[a[0].type],g=f||y.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return _.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];h1&&o(k),h>1&&m(a.slice(0,h-1)).replace(ga,"$1"),c,h0,f=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],q=0,r="0",s=e&&[],t=null!=k,u=D,v=e||f&&y.find.TAG("*",k&&h.parentNode||h),w=Q+=null==u?1:Math.random()||.1;for(t&&(D=h!==F&&h,x=c);null!=(l=v[r]);r++){if(f&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(Q=w,x=++c)}d&&((l=!n&&l)&&q--,e&&s.push(l))}if(q+=r,d&&r!==q){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(q>0)for(;r--;)s[r]||o[r]||(o[r]=Y.call(j));o=p(o)}Z.apply(j,o),t&&!e&&o.length>0&&q+b.length>1&&g.uniqueSort(j)}return t&&(Q=w,D=u),s};return d?e(h):h}function t(a,b,c){for(var d=0,e=b.length;d2&&"ID"===(g=f[0]).type&&9===b.nodeType&&!H&&y.relative[f[1].type]){if(b=y.find.ID(g.matches[0].replace(ua,va),b)[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=ma.needsContext.test(a)?0:f.length;e--&&(g=f[e],!y.relative[h=g.type]);)if((i=y.find[h])&&(d=i(g.matches[0].replace(ua,va),na.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return Z.apply(c,$.call(d,0)),c;break}}return B(a,j)(d,b,H,c,na.test(a)),c}function v(){}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P={},Q=0,R=0,S=d(),T=d(),U=d(),V=typeof b,W=1<<31,X=[],Y=X.pop,Z=X.push,$=X.slice,_=X.indexOf||function(a){for(var b=0,c=this.length;b+~])"+aa+"*"),ka=new RegExp(fa),la=new RegExp("^"+ca+"$"),ma={ID:new RegExp("^#("+ba+")"),CLASS:new RegExp("^\\.("+ba+")"),NAME:new RegExp("^\\[name=['\"]?("+ba+")['\"]?\\]"),TAG:new RegExp("^("+ba.replace("w","w*")+")"),ATTR:new RegExp("^"+ea),PSEUDO:new RegExp("^"+fa),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+aa+"*(even|odd|(([+-]|)(\\d*)n|)"+aa+"*(?:([+-]|)"+aa+"*(\\d+)|))"+aa+"*\\)|)","i"),needsContext:new RegExp("^"+aa+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+aa+"*((?:-\\d)?\\d*)"+aa+"*\\)|)(?=[^-]|$)","i")},na=/[\x20\t\r\n\f]*[+~]/,oa=/^[^{]+\{\s*\[native code/,pa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,qa=/^(?:input|select|textarea|button)$/i,ra=/^h\d$/i,sa=/'|\\/g,ta=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,ua=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,va=function(a,b){var c="0x"+b-65536;return c!==c?b:c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320)};try{$.call(O.documentElement.childNodes,0)[0].nodeType}catch(wa){$=function(a){for(var b,c=[];b=this[a++];)c.push(b);return c}}A=g.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},E=g.setDocument=function(a){var d=a?a.ownerDocument||a:O;return d!==F&&9===d.nodeType&&d.documentElement?(F=d,G=d.documentElement,H=A(d),P.tagNameNoComments=f(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),P.attributes=f(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),P.getByClassName=f(function(a){return a.innerHTML="",!(!a.getElementsByClassName||!a.getElementsByClassName("e").length)&&(a.lastChild.className="e",2===a.getElementsByClassName("e").length)}),P.getByName=f(function(a){a.id=N+0,a.innerHTML="
      ",G.insertBefore(a,G.firstChild);var b=d.getElementsByName&&d.getElementsByName(N).length===2+d.getElementsByName(N+0).length;return P.getIdNotName=!d.getElementById(N),G.removeChild(a),b}),y.attrHandle=f(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==V&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},P.getIdNotName?(y.find.ID=function(a,b){if(typeof b.getElementById!==V&&!H){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){return a.getAttribute("id")===b}}):(y.find.ID=function(a,c){if(typeof c.getElementById!==V&&!H){var d=c.getElementById(a);return d?d.id===a||typeof d.getAttributeNode!==V&&d.getAttributeNode("id").value===a?[d]:b:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){var c=typeof a.getAttributeNode!==V&&a.getAttributeNode("id");return c&&c.value===b}}),y.find.TAG=P.tagNameNoComments?function(a,b){if(typeof b.getElementsByTagName!==V)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},y.find.NAME=P.getByName&&function(a,b){if(typeof b.getElementsByName!==V)return b.getElementsByName(name)},y.find.CLASS=P.getByClassName&&function(a,b){if(typeof b.getElementsByClassName!==V&&!H)return b.getElementsByClassName(a)},J=[],I=[":focus"],(P.qsa=c(d.querySelectorAll))&&(f(function(a){a.innerHTML="",a.querySelectorAll("[selected]").length||I.push("\\["+aa+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||I.push(":checked")}),f(function(a){a.innerHTML="",a.querySelectorAll("[i^='']").length&&I.push("[*^$]="+aa+"*(?:\"\"|'')"),a.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),I.push(",.*:")})),(P.matchesSelector=c(K=G.matchesSelector||G.mozMatchesSelector||G.webkitMatchesSelector||G.oMatchesSelector||G.msMatchesSelector))&&f(function(a){P.disconnectedMatch=K.call(a,"div"),K.call(a,"[s!='']:x"),J.push("!=",fa)}),I=new RegExp(I.join("|")),J=new RegExp(J.join("|")),L=c(G.contains)||G.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},M=G.compareDocumentPosition?function(a,b){var c;return a===b?(C=!0,0):(c=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b))?1&c||a.parentNode&&11===a.parentNode.nodeType?a===d||L(O,a)?-1:b===d||L(O,b)?1:0:4&c?-1:1:a.compareDocumentPosition?-1:1}:function(a,b){var c,e=0,f=a.parentNode,g=b.parentNode,i=[a],j=[b];if(a===b)return C=!0,0;if(!f||!g)return a===d?-1:b===d?1:f?-1:g?1:0;if(f===g)return h(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},C=!1,[0,0].sort(M),P.detectDuplicates=C,F):F},g.matches=function(a,b){return g(a,null,null,b)},g.matchesSelector=function(a,b){if((a.ownerDocument||a)!==F&&E(a),b=b.replace(ta,"='$1']"),P.matchesSelector&&!H&&(!J||!J.test(b))&&!I.test(b))try{var c=K.call(a,b);if(c||P.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(d){}return g(b,F,null,[a]).length>0},g.contains=function(a,b){return(a.ownerDocument||a)!==F&&E(a),L(a,b)},g.attr=function(a,b){var c;return(a.ownerDocument||a)!==F&&E(a),H||(b=b.toLowerCase()),(c=y.attrHandle[b])?c(a):H||P.attributes?a.getAttribute(b):((c=a.getAttributeNode(b))||a.getAttribute(b))&&a[b]===!0?b:c&&c.specified?c.value:null},g.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},g.uniqueSort=function(a){var b,c=[],d=1,e=0;if(C=!P.detectDuplicates,a.sort(M),C){for(;b=a[d];d++)b===a[d-1]&&(e=c.push(d));for(;e--;)a.splice(c[e],1)}return a},z=g.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=z(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=z(b);return c},y=g.selectors={cacheLength:50,createPseudo:e,match:ma,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ua,va),a[3]=(a[4]||a[5]||"").replace(ua,va),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||g.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&g.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return ma.CHILD.test(a[0])?null:(a[4]?a[2]=a[4]:c&&ka.test(c)&&(b=l(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(ua,va).toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=S[a+" "];return b||(b=new RegExp("(^|"+aa+")"+a+"("+aa+"|$)"))&&S(a,function(a){return b.test(a.className||typeof a.getAttribute!==V&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=g.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===Q&&j[1],m=j[0]===Q&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[Q,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===Q)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[Q,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,d=y.pseudos[a]||y.setFilters[a.toLowerCase()]||g.error("unsupported pseudo: "+a);return d[N]?d(b):d.length>1?(c=[a,a,"",b],y.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var e,f=d(a,b),g=f.length;g--;)e=_.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:e(function(a){var b=[],c=[],d=B(a.replace(ga,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return g(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||z(b)).indexOf(a)>-1}}),lang:e(function(a){return la.test(a||"")||g.error("unsupported lang: "+a),a=a.replace(ua,va).toLowerCase(),function(b){var c;do if(c=H?b.getAttribute("xml:lang")||b.getAttribute("lang"):b.lang)return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===G},focus:function(a){return a===F.activeElement&&(!F.hasFocus||F.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!y.pseudos.empty(a)},header:function(a){return ra.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[c<0?c+b:c]}),even:k(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=c<0?c+b:c;++d1?ia.unique(c):c),c.selector=(this.selector?this.selector+" ":"")+a,c},has:function(a){var b,c=ia(a,this),d=c.length;return this.filter(function(){for(b=0;b=0:ia.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sa.test(a)||"string"!=typeof a?ia(a,b||this.context):0;d-1:ia.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}return this.pushStack(f.length>1?ia.unique(f):f)},index:function(a){return a?"string"==typeof a?ia.inArray(this[0],ia(a)):ia.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?ia(a,b):ia.makeArray(a&&a.nodeType?[a]:a),d=ia.merge(this.get(),c);return this.pushStack(ia.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),ia.fn.andSelf=ia.fn.addBack,ia.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return ia.dir(a,"parentNode")},parentsUntil:function(a,b,c){return ia.dir(a,"parentNode",c)},next:function(a){return k(a,"nextSibling")},prev:function(a){return k(a,"previousSibling")},nextAll:function(a){return ia.dir(a,"nextSibling")},prevAll:function(a){return ia.dir(a,"previousSibling")},nextUntil:function(a,b,c){return ia.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return ia.dir(a,"previousSibling",c)},siblings:function(a){return ia.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return ia.sibling(a.firstChild)},contents:function(a){return ia.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:ia.merge([],a.childNodes)}},function(a,b){ia.fn[a]=function(c,d){var e=ia.map(this,b,c);return Pa.test(a)||(d=c),d&&"string"==typeof d&&(e=ia.filter(d,e)),e=this.length>1&&!Ta[a]?ia.unique(e):e,this.length>1&&Qa.test(a)&&(e=e.reverse()),this.pushStack(e)}}),ia.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?ia.find.matchesSelector(b[0],a)?[b[0]]:[]:ia.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!ia(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ua="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Va=/ jQuery\d+="(?:null|\d+)"/g,Wa=new RegExp("<(?:"+Ua+")[\\s/>]","i"),Xa=/^\s+/,Ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Za=/<([\w:]+)/,$a=/\s*$/g,gb={option:[1,""],legend:[1,"
      ","
      "],area:[1,"",""],param:[1,"",""],thead:[1,"","
      "],tr:[2,"","
      "],col:[2,"","
      "],td:[3,"","
      "],_default:ia.support.htmlSerialize?[0,"",""]:[1,"X
      ","
      "]},hb=m(W),ib=hb.appendChild(W.createElement("div"));gb.optgroup=gb.option,gb.tbody=gb.tfoot=gb.colgroup=gb.caption=gb.thead,gb.th=gb.td,ia.fn.extend({text:function(a){return ia.access(this,function(a){return a===b?ia.text(this):this.empty().append((this[0]&&this[0].ownerDocument||W).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(ia.isFunction(a))return this.each(function(b){ia(this).wrapAll(a.call(this,b))});if(this[0]){var b=ia(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return ia.isFunction(a)?this.each(function(b){ia(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ia(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ia.isFunction(a);return this.each(function(c){ia(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){ia.nodeName(this,"body")||ia(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||ia.filter(a,[c]).length>0)&&(b||1!==c.nodeType||ia.cleanData(t(c)),c.parentNode&&(b&&ia.contains(c.ownerDocument,c)&&q(t(c,"script")),c.parentNode.removeChild(c)));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&ia.cleanData(t(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&ia.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return ia.clone(this,a,b)})},html:function(a){return ia.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Va,""):b;if("string"==typeof a&&!ab.test(a)&&(ia.support.htmlSerialize||!Wa.test(a))&&(ia.support.leadingWhitespace||!Xa.test(a))&&!gb[(Za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ya,"<$1>");try{for(;d")?f=a.cloneNode(!0):(ib.innerHTML=a.outerHTML,ib.removeChild(f=ib.firstChild)),!(ia.support.noCloneEvent&&ia.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ia.isXMLDoc(a)))for(d=t(f),h=t(a),g=0;null!=(e=h[g]);++g)d[g]&&s(e,d[g]);if(b)if(c)for(h=h||t(a),d=d||t(f),g=0;null!=(e=h[g]);g++)r(e,d[g]);else r(a,f);return d=t(f,"script"),d.length>0&&q(d,!i&&t(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,n=m(b),o=[],p=0;p")+k[2],e=k[0];e--;)h=h.lastChild;if(!ia.support.leadingWhitespace&&Xa.test(f)&&o.push(b.createTextNode(Xa.exec(f)[0])),!ia.support.tbody)for(f="table"!==i||$a.test(f)?""!==k[1]||$a.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)ia.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(ia.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=n.lastChild}else o.push(b.createTextNode(f));for(h&&n.removeChild(h),ia.support.appendChecked||ia.grep(t(o,"input"),u),p=0;f=o[p++];)if((!d||ia.inArray(f,d)===-1)&&(g=ia.contains(f.ownerDocument,f),h=t(n.appendChild(f),"script"),g&&q(h),c))for(e=0;f=h[e++];)db.test(f.type||"")&&c.push(f);return h=null,n},cleanData:function(a,b){for(var c,d,e,f,g=0,h=ia.expando,i=ia.cache,j=ia.support.deleteExpando,k=ia.event.special;null!=(c=a[g]);g++)if((b||ia.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?ia.event.remove(c,d):ia.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==V?c.removeAttribute(h):c[h]=null,_.push(e))}}});var jb,kb,lb,mb=/alpha\([^)]*\)/i,nb=/opacity\s*=\s*([^)]*)/,ob=/^(top|right|bottom|left)$/,pb=/^(none|table(?!-c[ea]).+)/,qb=/^margin/,rb=new RegExp("^("+ja+")(.*)$","i"),sb=new RegExp("^("+ja+")(?!px)[a-z%]+$","i"),tb=new RegExp("^([+-])=("+ja+")","i"),ub={BODY:"block"},vb={position:"absolute",visibility:"hidden",display:"block"},wb={letterSpacing:0,fontWeight:400},xb=["Top","Right","Bottom","Left"],yb=["Webkit","O","Moz","ms"];ia.fn.extend({css:function(a,c){return ia.access(this,function(a,c,d){var e,f,g={},h=0;if(ia.isArray(c)){for(f=kb(a),e=c.length;h1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(a){var b="boolean"==typeof a;return this.each(function(){(b?a:w(this))?ia(this).show():ia(this).hide()})}}),ia.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ia.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=ia.camelCase(c),j=a.style;if(c=ia.cssProps[i]||(ia.cssProps[i]=v(j,i)),h=ia.cssHooks[c]||ia.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tb.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(ia.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||ia.cssNumber[i]||(d+="px"),ia.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=ia.camelCase(c);return c=ia.cssProps[i]||(ia.cssProps[i]=v(a.style,i)),h=ia.cssHooks[c]||ia.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lb(a,c,e)),"normal"===g&&c in wb&&(g=wb[c]),""===d||d?(f=parseFloat(g),d===!0||ia.isNumeric(f)?f||0:g):g},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),a.getComputedStyle?(kb=function(b){return a.getComputedStyle(b,null)},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||ia.contains(a.ownerDocument,a)||(i=ia.style(a,c)),sb.test(i)&&qb.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):W.documentElement.currentStyle&&(kb=function(a){return a.currentStyle},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sb.test(i)&&!ob.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),ia.each(["height","width"],function(a,b){ia.cssHooks[b]={get:function(a,c,d){if(c)return 0===a.offsetWidth&&pb.test(ia.css(a,"display"))?ia.swap(a,vb,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&kb(a);return y(a,c,d?z(a,b,d,ia.support.boxSizing&&"border-box"===ia.css(a,"boxSizing",!1,e),e):0)}}}),ia.support.opacity||(ia.cssHooks.opacity={get:function(a,b){return nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=ia.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===ia.trim(f.replace(mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mb.test(f)?f.replace(mb,e):f+" "+e)}}),ia(function(){ia.support.reliableMarginRight||(ia.cssHooks.marginRight={get:function(a,b){if(b)return ia.swap(a,{display:"inline-block"},lb,[a,"marginRight"])}}),!ia.support.pixelPosition&&ia.fn.position&&ia.each(["top","left"],function(a,b){ia.cssHooks[b]={get:function(a,c){if(c)return c=lb(a,b),sb.test(c)?ia(a).position()[b]+"px":c}}})}),ia.expr&&ia.expr.filters&&(ia.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!ia.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||ia.css(a,"display"))},ia.expr.filters.visible=function(a){return!ia.expr.filters.hidden(a)}),ia.each({margin:"",padding:"",border:"Width"},function(a,b){ia.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+xb[d]+b]=f[d]||f[d-2]||f[0];return e}},qb.test(a)||(ia.cssHooks[a+b].set=y)});var zb=/%20/g,Ab=/\[\]$/,Bb=/\r?\n/g,Cb=/^(?:submit|button|image|reset|file)$/i,Db=/^(?:input|select|textarea|keygen)/i;ia.fn.extend({serialize:function(){return ia.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ia.prop(this,"elements");return a?ia.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ia(this).is(":disabled")&&Db.test(this.nodeName)&&!Cb.test(a)&&(this.checked||!bb.test(a))}).map(function(a,b){var c=ia(this).val();return null==c?null:ia.isArray(c)?ia.map(c,function(a){return{name:b.name,value:a.replace(Bb,"\r\n")}}):{name:b.name,value:c.replace(Bb,"\r\n")}}).get()}}),ia.param=function(a,c){var d,e=[],f=function(a,b){b=ia.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=ia.ajaxSettings&&ia.ajaxSettings.traditional),ia.isArray(a)||a.jquery&&!ia.isPlainObject(a))ia.each(a,function(){f(this.name,this.value)});else for(d in a)D(d,a[d],c,f);return e.join("&").replace(zb,"+")},ia.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(a,b){ia.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),ia.fn.hover=function(a,b){return this.mouseenter(a).mouseleave(b||a)};var Eb,Fb,Gb=ia.now(),Hb=/\?/,Ib=/#.*$/,Jb=/([?&])_=[^&]*/,Kb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mb=/^(?:GET|HEAD)$/,Nb=/^\/\//,Ob=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pb=ia.fn.load,Qb={},Rb={},Sb="*/".concat("*");try{Fb=X.href}catch(Tb){Fb=W.createElement("a"),Fb.href="",Fb=Fb.href}Eb=Ob.exec(Fb.toLowerCase())||[],ia.fn.load=function(a,c,d){if("string"!=typeof a&&Pb)return Pb.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),ia.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&ia.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?ia("
      ").append(ia.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},ia.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){ia.fn[b]=function(a){return this.on(b,a)}}),ia.each(["get","post"],function(a,c){ia[c]=function(a,d,e,f){return ia.isFunction(d)&&(f=f||e,e=d,d=b),ia.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),ia.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fb,type:"GET",isLocal:Lb.test(Eb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sb,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":a.String,"text html":!0,"text json":ia.parseJSON,"text xml":ia.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?G(G(a,ia.ajaxSettings),b):G(ia.ajaxSettings,a)},ajaxPrefilter:E(Qb),ajaxTransport:E(Rb),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,d&&(t=H(m,w,d)),a>=200&&a<300||304===a?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(ia.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(ia.etag[g]=v)),204===a?(f=!0,x="nocontent"):304===a?(f=!0,x="notmodified"):(f=I(m,t),x=f.state,l=f.data,s=f.error,f=!s)):(s=x,!a&&x||(x="error",a<0&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--ia.active||ia.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=ia.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?ia(n):ia.event,p=ia.Deferred(),q=ia.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kb.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(u<2)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fb)+"").replace(Ib,"").replace(Nb,Eb[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=ia.trim(m.dataType||"*").toLowerCase().match(ka)||[""],null==m.crossDomain&&(e=Ob.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Eb[1]&&e[2]===Eb[2]&&(e[3]||("http:"===e[1]?80:443))==(Eb[3]||("http:"===Eb[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=ia.param(m.data,m.traditional)),F(Qb,m,c,w),2===u)return w;j=m.global,j&&0===ia.active++&&ia.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mb.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hb.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jb.test(g)?g.replace(Jb,"$1_="+Gb++):g+(Hb.test(g)?"&":"?")+"_="+Gb++)),m.ifModified&&(ia.lastModified[g]&&w.setRequestHeader("If-Modified-Since",ia.lastModified[g]),ia.etag[g]&&w.setRequestHeader("If-None-Match",ia.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sb+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=F(Rb,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(u<2))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getScript:function(a,c){return ia.get(a,b,c,"script")},getJSON:function(a,b,c){return ia.get(a,b,c,"json")}}),ia.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return ia.globalEval(a),a}}}),ia.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),ia.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=W.head||ia("head")[0]||W.documentElement;return{send:function(b,e){c=W.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Ub=[],Vb=/(=)\?(?=&|$)|\?\?/;ia.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Ub.pop()||ia.expando+"_"+Gb++;return this[a]=!0,a}}),ia.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vb.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vb.test(c.data)&&"data");if(i||"jsonp"===c.dataTypes[0])return f=c.jsonpCallback=ia.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vb,"$1"+f):c.jsonp!==!1&&(c.url+=(Hb.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||ia.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Ub.push(f)),h&&ia.isFunction(g)&&g(h[0]),h=g=b}),"script"});var Wb,Xb,Yb=0,Zb=a.ActiveXObject&&function(){var a;for(a in Wb)Wb[a](b,!0)};ia.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&J()||K()}:J,Xb=ia.ajaxSettings.xhr(),ia.support.cors=!!Xb&&"withCredentials"in Xb,Xb=ia.support.ajax=!!Xb,Xb&&ia.ajaxTransport(function(c){if(!c.crossDomain||ia.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=ia.noop,Zb&&delete Wb[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yb,Zb&&(Wb||(Wb={},ia(a).unload(Zb)),Wb[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+ja+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[P],ec={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=bc.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||(ia.cssNumber[a]?"":"px"),"px"!==d&&h){h=ia.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,ia.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};ia.Animation=ia.extend(N,{tweener:function(a,b){ia.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),ia.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},ia.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===ia.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),ia.nodeName(a[0],"html")||(c=a.offset()),c.top+=ia.css(a[0],"borderTopWidth",!0),c.left+=ia.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-ia.css(d,"marginTop",!0),left:b.left-c.left-ia.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||W.documentElement;a&&!ia.nodeName(a,"html")&&"static"===ia.css(a,"position");)a=a.offsetParent;return a||W.documentElement})}}),ia.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);ia.fn[a]=function(e){return ia.access(this,function(a,e,f){var g=S(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:void(g?g.scrollTo(d?ia(g).scrollLeft():f,d?f:ia(g).scrollTop()):a[e]=f)},a,e,arguments.length,null)}}),ia.each({Height:"height",Width:"width"},function(a,c){ia.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){ia.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return ia.access(this,function(c,d,e){var f;return ia.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?ia.css(c,d,h):ia.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=ia,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ia})}(window),$.extend($.Event.prototype,{stopEvent:function(){this.stopPropagation(),this.preventDefault()}}),jQuery&&(!function(a){a.fn.insets||(a.fn.insets=function(){var a=this.padding(),b=this.border();return{top:a.top,bottom:a.bottom+b.bottom+b.top,left:a.left,right:a.right+b.right+b.left}}),a.fn.bounds||(a.fn.bounds=function(a){var b={hasIgnoredBounds:!0};return a?(isNaN(a.x)||(b.left=a.x),isNaN(a.y)||(b.top=a.y),null!=a.width&&(b.width=a.width-(this.outerWidth(!0)-this.width()),b.width=b.width>=0?b.width:a.width),null!=a.height&&(b.height=a.height-(this.outerHeight(!0)-this.height()),b.height=b.height>=0?b.height:a.height),this.css(b),this):(b=this.position(),{x:b.left,y:b.top,width:this.outerWidth(),height:this.outerHeight()})})}(jQuery),BI.extend(jQuery.fn,{destroy:function(){this.remove(),BI.isIE()===!0&&(this[0].outerHTML="")},__textKeywordMarked__:function(a,b,c){if(!BI.isKey(b)||(a+"").length>100)return this.html(BI.htmlEncode(a));b+="",b=BI.toUpperCase(b);var d=(a||"")+"";for(c=(c||BI.makeFirstPY(a))+"",null!=c&&(c=BI.toUpperCase(c)),this.empty();;){var e=BI.toUpperCase(d).indexOf(b),f=null;if(null!=c&&(f=c.indexOf(b),f>=0&&(f%=a.length)),e>=0)this.append(BI.htmlEncode(d.substr(0,e))),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(e,b.length)))),d=d.substr(e+b.length),null!=c&&(c=c.substr(e+b.length));else{if(!(null!=f&&f>=0&&Math.floor(f/a.length)===Math.floor((f+b.length-1)/a.length))){this.append(BI.htmlEncode(d));break}this.append(BI.htmlEncode(d.substr(0,f))),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(f,b.length)))),null!=c&&(c=c.substr(f+b.length)),d=d.substr(f+b.length)}}return this},getDomHeight:function(a){var b=$(this).clone();b.appendTo($(a||"body"));var c=b.height();return b.remove(),c},hasVerticalScroll:function(){return this.height()>0&&this[0].clientWidth0&&this[0].clientHeightb.left+c||a.pageYb.top+d)},__hasZIndexMask__:function(a){return a&&null!=this.zIndexMask[a]},__buildZIndexMask__:function(a,b){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var c=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:b});return c.element.css({"z-index":a}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(c),a&&(this.zIndexMask[a]=c),c.element},__releaseZIndexMask__:function(a){if(a&&this.zIndexMask[a])return BI.remove(this.indexMask,this.zIndexMask[a]),void this.zIndexMask[a].destroy();this.indexMask=this.indexMask||[];var b=this.indexMask.pop();b&&b.destroy()}})),_.extend(BI,{$import:function(){function a(a,c){var d=$("head script, body script");$.each(d,function(c,d){d.src.indexOf(a)!=-1&&(b[a]=!0)});var e=$("head link");$.each(e,function(d,e){e.href.indexOf(a)!=-1&&c&&(b[a]=!1,$(e).remove())})}var b={};return function(c,d,e){if(a(c,e),b[c]!==!0)if("css"===d){var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.href=c;var g=document.getElementsByTagName("head")[0];g.appendChild(f),b[c]=!0}else $.ajax({url:c,dataType:"script",async:!1,cache:!0,complete:function(a,d){"success"==d&&(b[c]=!0)}})}}()}),Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||!function(){function a(a,b){for(var c=-1;++c=0;)c+=h[b],h[b]=Math.floor(c/a),c=c%a*f}function c(){for(var a=g,b="";--a>=0;)if(""!==b||0===a||0!==h[a]){var c=String(h[a]);""===b?b=c:b+="0000000".slice(0,7-c.length)+c}return b}function d(a,b,c){return 0===b?c:b%2===1?d(a,b-1,c*a):d(a*a,b/2,c)}function e(a){for(var b=0;a>=4096;)b+=12,a/=4096;for(;a>=2;)b+=1,a/=2;return b}var f,g,h;f=1e7,g=6,h=[0,0,0,0,0,0],Number.prototype.toFixed=function(f){var g,h,i,j,k,l,m,n;if(g=Number(f),g=g!==g?0:Math.floor(g),g<0||g>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(h=Number(this),h!==h)return"NaN";if(h<=-1e21||h>1e21)return String(h);if(i="",h<0&&(i="-",h=-h),j="0",h>1e-21)if(k=e(h*d(2,69,1))-69,l=k<0?h*d(2,-k,1):h/d(2,k,1),l*=4503599627370496,k=52-k,k>0){for(a(0,l),m=g;m>=7;)a(1e7,0),m-=7;for(a(d(10,m,1),0),m=k-1;m>=23;)b(1<<23),m-=23;b(1<0?(n=j.length,j=n<=g?i+"0.0000000000000000000".slice(0,g-n+2)+j:i+j.slice(0,n-g)+"."+j.slice(n-g)):j=i+j,j}}(),_.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}),BI.version="2.0",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(a,b){var c=this.options,d=BI.AbsoluteCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0),right:c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0),top:c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0),bottom:c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0),margin:"auto"}),d},resize:function(){},populate:function(a){BI.AbsoluteCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_center_adapt",BI.AbsoluteCenterLayout),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(a,b){var c=this.options,d=BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0),right:c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0),margin:"auto"}),c.vgap+c.tgap+(b.vgap||0)+(b.tgap||0)!==0&&d.element.css("top",c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)),c.vgap+c.bgap+(b.vgap||0)+(b.bgap||0)!==0&&d.element.css("bottom",c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_horizontal_adapt",BI.AbsoluteHorizontalLayout),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(a,b){var c=this.options,d=BI.AbsoluteVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:b.lgap,right:b.rgap,top:c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0),bottom:c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0),margin:"auto"}),c.hgap+c.lgap+(b.hgap||0)+(b.lgap||0)!==0&&d.element.css("left",c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)),c.hgap+c.rgap+(b.hgap||0)+(b.rgap||0)!==0&&d.element.css("right",c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_vertical_adapt",BI.AbsoluteVerticalLayout),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 a=this.options,b=this;return BI.CenterAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:a.horizontalAlign,columnSize:a.columnSize,scrollx:a.scrollx,items:a.items,ref:function(a){b.layout=a},hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.center_adapt",BI.CenterAdaptLayout),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 a=this,b=this.options;return BI.HorizontalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,items:b.items,scrollx:b.scrollx,ref:function(b){a.layout=b},hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.horizontal_adapt",BI.HorizontalAdaptLayout),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 a=this.options;BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this,arguments);var b=[];return"left"in a.items&&b.push({type:"bi.left",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items.left,hgap:a.lhgap,lgap:a.llgap,rgap:a.lrgap}}]}),"right"in a.items&&b.push({type:"bi.right",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items.right,textAlign:"right",hgap:a.rhgap,lgap:a.rlgap,rgap:a.rrgap}}]}),b},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){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 a=this.options,b=this;return BI.LeftVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.left",ref:function(a){b.layout=a},items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items,lgap:a.lgap,hgap:a.hgap,rgap:a.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){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 a=this.options,b=this;return BI.RightVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.right",ref:function(a){b.layout=a},items:[{el:{type:"bi.vertical_adapt",height:"100%",textAlign:"right",items:a.items,lgap:a.lgap,hgap:a.hgap,rgap:a.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.right_vertical_adapt",BI.RightVerticalAdaptLayout),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 a=this.options;BI.TableAdaptLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("
      ").css({position:"relative",display:"table",height:a.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:a.horizontalAlign===BI.HorizontalAlign.Center?"100%":"auto","white-space":"nowrap"}),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.width(e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",width:e,items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]<=1?e:e+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative",display:"table-cell","vertical-align":d.verticalAlign,margin:"0",padding:"0",height:"100%"}),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},appendFragment:function(a){this.$table.append(a),this.element.append(this.$table)},resize:function(){},populate:function(a){BI.TableAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table_adapt",BI.TableAdaptLayout),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 a=this,b=this.options;return BI.VerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,items:b.items,scrollx:b.scrollx,ref:function(b){a.layout=b},hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.vertical_adapt",BI.VerticalAdaptLayout),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(a,b){var c=this.options,d=BI.HorizontalAutoLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",margin:"0px auto"}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":(0===a?c.vgap:0)+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_auto",BI.HorizontalAutoLayout),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 a=this,b=this.left.element.width(),c=this.left.element.height();this.left.element.width(b).height(c).css("float","none"),BI.remove(this._children,function(b,c){c===a.container&&delete a._children[b]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.left]})},_addElement:function(a,b){var c=this.options;return this.left=BI.createWidget({type:"bi.vertical",items:[b],hgap:c.hgap,vgap:c.vgap,tgap:c.tgap,bgap:c.bgap,lgap:c.lgap,rgap:c.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]}),this.left},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_float",BI.FloatHorizontalLayout),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(a,b,c){var d=this.options,e=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return e.element.css({position:"relative","vertical-align":"middle"}),e.element.addClass("inline-center-adapt-item"),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&e.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&e.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&e.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&e.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),e},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("不能添加元素")},stroke:function(a){var b=this;BI.each(a,function(c,d){d&&b._addElement(c,d,a.length)})},populate:function(a){BI.InlineCenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_center_adapt",BI.InlineCenterAdaptLayout),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 a=this.options;this.element.css({whiteSpace:"nowrap",textAlign:a.textAlign}),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","vertical-align":"middle"}),d.element.addClass("inline-vertical-adapt-item"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.InlineVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_vertical_adapt",BI.InlineVerticalAdaptLayout),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(a,b){var c=this.options,d=BI.FlexCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0","margin-left":(0===a?c.hgap:0)+"px","margin-right":c.hgap+"px","margin-top":c.vgap+"px","margin-bottom":c.vgap+"px"}),d},resize:function(){},populate:function(a){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_center_adapt",BI.FlexCenterLayout),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 a=this,b=this.options;return{type:"bi.flex_vertical",ref:function(b){a.wrapper=b},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:b.verticalAlign,rowSize:b.rowSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},resize:function(){},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_horizontal_adapt",BI.FlexHorizontalCenter),BI.shortcut("bi.flex_horizontal_center_adapt",BI.FlexHorizontalCenter),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 a=this.options;this.element.addClass("v-"+a.verticalAlign).addClass("h-"+a.horizontalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.columnSize[a]>0&&d.element.width(c.columnSize[a]),"fill"===c.columnSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-center-adapt-layout",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var a=this,b=this.options;return{type:"bi.flex_horizontal",ref:function(b){a.wrapper=b},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,hgap:b.hgap,items:b.items}},resize:function(){},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_vertical_adapt",BI.FlexVerticalCenter),BI.shortcut("bi.flex_vertical_center_adapt",BI.FlexVerticalCenter),BI.FlexVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-layout",horizontalAlign:BI.HorizontalAlign.Left,verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrolly:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalLayout.superclass.render.apply(this,arguments);var a=this.options;this.element.addClass("h-"+a.horizontalAlign).addClass("v-"+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=BI.FlexVerticalLayout.superclass._addElement.apply(this,arguments),d=this.options;return c.element.css({position:"relative","flex-shrink":"0"}),d.rowSize[a]>0&&c.element.height(d.rowSize[a]),"fill"===d.rowSize[a]&&c.element.css("flex","1"),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&c.element.css({"margin-top":(0===a?d.vgap:0)+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&c.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&c.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&c.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},resize:function(){},populate:function(a){BI.FlexVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical",BI.FlexVerticalLayout),BI.FlexWrapperCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-center-adapt-layout clearfix",scrollable:!0})},render:function(){BI.FlexWrapperCenterLayout.superclass.render.apply(this,arguments),this.$wrapper=BI.Widget._renderEngine.createElement("
      ").addClass("flex-scrollable-center-adapt-layout-wrapper"),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","margin-left":(0===a?c.hgap:0)+"px","margin-right":c.hgap+"px","margin-top":c.vgap+"px","margin-bottom":c.vgap+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_center_adapt",BI.FlexWrapperCenterLayout),BI.FlexWrapperHorizontalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-center-adapt-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 a=this,b=this.options;return{type:"bi.flex_scrollable_vertical",ref:function(b){a.wrapper=b},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:b.verticalAlign,rowSize:b.rowSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_scrollable_horizontal_adapt",BI.FlexWrapperHorizontalCenter),BI.shortcut("bi.flex_scrollable_horizontal_center_adapt",BI.FlexWrapperHorizontalCenter),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 a=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("
      ").addClass("flex-scrollable-horizontal-layout-wrapper v-"+a.verticalAlign).addClass("h-"+a.horizontalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.columnSize[a]>0&&d.element.width(c.columnSize[a]),"fill"===c.columnSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_horizontal",BI.FlexWrapperHorizontalLayout),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 a=this,b=this.options;return{type:"bi.flex_scrollable_horizontal",ref:function(b){a.wrapper=b},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,items:b.items}},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_scrollable_vertical_adapt",BI.FlexWrapperVerticalCenter),BI.shortcut("bi.flex_scrollable_vertical_center_adapt",BI.FlexWrapperVerticalCenter),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 a=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("
      ").addClass("flex-scrollable-vertical-layout-wrapper h-"+a.horizontalAlign).addClass("v-"+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.rowSize[a]>0&&d.element.height(c.rowSize[a]),"fill"===c.rowSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":(0===a?c.vgap:0)+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_vertical",BI.FlexWrapperVerticalLayout),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(a,b){var c=this.options,d=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),e=0,f=0,g=0,h=0; return BI.isNotNull(b.left)&&(d.element.css({left:b.left}),e+=b.left),BI.isNotNull(b.right)&&(d.element.css({right:b.right}),f+=b.right),BI.isNotNull(b.top)&&(d.element.css({top:b.top}),g+=b.top),BI.isNotNull(b.bottom)&&(d.element.css({bottom:b.bottom}),h+=b.bottom),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d.element.css({position:"absolute"}),d},resize:function(){this.stroke(this.options.items)},stroke:function(a){this.options.items=a||[];var b=this;BI.each(a,function(a,c){if(c){if(!BI.isWidget(c)&&!c.el)throw new Error("el must be exist");b._addElement(a,c)}})},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute",BI.AbsoluteLayout),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(a,b){var c=this.options,d=BI.AdaptiveLayout.superclass._addElement.apply(this,arguments);d.element.css({position:"relative"});var e=0,f=0,g=0,h=0;return BI.isNotNull(b.left)&&d.element.css({"margin-left":b.left}),BI.isNotNull(b.right)&&d.element.css({"margin-right":b.right}),BI.isNotNull(b.top)&&d.element.css({"margin-top":b.top}),BI.isNotNull(b.bottom)&&d.element.css({"margin-bottom":b.bottom}),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.adaptive",BI.AdaptiveLayout),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(a){throw new Error("cannot be added")},stroke:function(a){var b,c=0,d=0,e=0,f=0;if("north"in a&&(b=a.north,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"north")){var g=BI.createWidget(b);this.addWidget(this.getName()+"north",g)}this.getWidgetByName(this.getName()+"north").element.height(b.height).css({position:"absolute",top:b.top||0,left:b.left||0,right:b.right||0,bottom:"initial"})}c=(b.height||0)+(b.top||0)+(b.bottom||0)}if("south"in a&&(b=a.south,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"south")){var g=BI.createWidget(b);this.addWidget(this.getName()+"south",g)}this.getWidgetByName(this.getName()+"south").element.height(b.height).css({position:"absolute",bottom:b.bottom||0,left:b.left||0,right:b.right||0,top:"initial"})}d=(b.height||0)+(b.top||0)+(b.bottom||0)}if("west"in a&&(b=a.west,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"west")){var g=BI.createWidget(b);this.addWidget(this.getName()+"west",g)}this.getWidgetByName(this.getName()+"west").element.width(b.width).css({position:"absolute",left:b.left||0,top:c,bottom:d,right:"initial"})}e=(b.width||0)+(b.left||0)+(b.right||0)}if("east"in a&&(b=a.east,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"east")){var g=BI.createWidget(b);this.addWidget(this.getName()+"east",g)}this.getWidgetByName(this.getName()+"east").element.width(b.width).css({position:"absolute",right:b.right||0,top:c,bottom:d,left:"initial"})}f=(b.width||0)+(b.left||0)+(b.right||0)}if("center"in a&&(b=a.center,null!=b)){if(!this.hasWidget(this.getName()+"center")){var g=BI.createWidget(b);this.addWidget(this.getName()+"center",g)}this.getWidgetByName(this.getName()+"center").element.css({position:"absolute",top:c,bottom:d,left:e,right:f})}},update:function(a){},populate:function(a){BI.BorderLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.border",BI.BorderLayout),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(a){var b=this,c=this.options;this.showIndex=void 0,BI.each(a,function(a,d){if(d){if(b.hasWidget(d.cardName))var e=b.getWidgetByName(d.cardName);else{var e=BI.createWidget(d);e.on(BI.Events.DESTROY,function(){var a=BI.findIndex(c.items,function(a,b){return b.cardName==d.cardName});a>-1&&c.items.splice(a,1)}),b.addWidget(d.cardName,e)}e.element.css({position:"absolute",top:"0",right:"0",bottom:"0",left:"0"}),e.setVisible(!1)}})},update:function(){},empty:function(){BI.CardLayout.superclass.empty.apply(this,arguments),this.options.items=[]},populate:function(a){BI.CardLayout.superclass.populate.apply(this,arguments),this._mount(),this.options.defaultShowName&&this.showCardByName(this.options.defaultShowName)},isCardExisted:function(a){return BI.some(this.options.items,function(b,c){return c.cardName==a&&c.el})},getCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");return this._children[a]},_deleteCardByName:function(a){delete this._children[a];var b=BI.findIndex(this.options.items,function(b,c){return c.cardName==a});b>-1&&this.options.items.splice(b,1)},deleteCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");var b=this._children[a];this._deleteCardByName(a),b&&b._destroy()},addCardByName:function(a,b){if(this.isCardExisted(a))throw new Error("cardName is already exist");var c=BI.createWidget(b,this);return c.element.css({position:"relative",top:"0",left:"0",width:"100%",height:"100%"}).appendTo(this.element),c.invisible(),this.addWidget(a,c),this.options.items.push({el:b,cardName:a}),c},showCardByName:function(a,b,c){var d=this,e=this.isCardExisted(a);null!=this.showIndex&&(this.lastShowIndex=this.showIndex),this.showIndex=a;var f=!1;BI.each(this.options.items,function(g,h){var i=d._children[h.cardName];i&&(a!=h.cardName?!f&&!e&&BI.Action&&b instanceof BI.Action?(b.actionBack(i),f=!0):i.invisible():BI.Action&&b instanceof BI.Action?b.actionPerformed(void 0,i,c):(i.visible(),c&&c()))})},showLastCard:function(){var a=this;this.showIndex=this.lastShowIndex,BI.each(this.options.items,function(b,c){a._children[c.cardName].setVisible(a.showIndex==b)})},setDefaultShowName:function(a){return this.options.defaultShowName=a,this},getDefaultShowName:function(){return this.options.defaultShowName},getAllCardNames:function(){return BI.map(this.options.items,function(a,b){return b.cardName})},getShowingCard:function(){if(BI.isKey(this.showIndex))return this.getWidgetByName(this.showIndex)},deleteAllCard:function(){var a=this;BI.each(this.getAllCardNames(),function(b,c){a.deleteCardByName(c)})},hideAllCard:function(){var a=this;BI.each(this.options.items,function(b,c){a._children[c.cardName].invisible()})},isAllCardHide:function(){var a=this,b=!0;return BI.some(this.options.items,function(c,d){if(a._children[d.cardName].isVisible())return b=!1,!1}),b},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._deleteCardByName(b)}}),BI.shortcut("bi.card",BI.CardLayout),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(a,b){var c=this.options,d=BI.DefaultLayout.superclass._addElement.apply(this,arguments);return c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.DefaultLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.default",BI.DefaultLayout),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(a){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=BI.makeArray(f),i={},j={};BI.each(h,function(a){h[a]=BI.makeArray(g)}),BI.each(a,function(a,b){return BI.isArray(b)?void BI.each(b,function(c,d){i[a]=(i[a]||0)+b.width,j[c]=(j[c]||0)+b.height,h[a][c]=d}):(i[b.row]=(i[b.row]||0)+b.width,j[b.column]=(j[b.column]||0)+b.height,void(h[b.row][b.column]=b))});for(var k=0;k0){var p=this.getWidgetByName(this.getName()+k+"_"+(m-1));p.element.css({right:100-o+"%"})}m==e.columns-1&&n.element.css({right:"0%"}),d(n,k,m),l+=h[k][m].width}for(var m=0;m0){var p=this.getWidgetByName(this.getName()+(k-1)+"_"+m);p.element.css({bottom:100-r+"%"})}k==e.rows-1&&n.element.css({bottom:"0%"}),q+=h[k][m].height}},update:function(){},populate:function(a){BI.DivisionLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.division",BI.DivisionLayout),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(a,b){var c=this.options,d=BI.FloatLeftLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"left"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),BI.isNotNull(b.bottom)&&d.element.css({bottom:b.bottom}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){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(a,b){var c=this.options,d=BI.FloatRightLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"right"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),BI.isNotNull(b.bottom)&&d.element.css({bottom:b.bottom}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":(0===a?c.hgap:0)+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.FloatRightLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right",BI.FloatRightLayout),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(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}for(var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=100/g,i=100/f,j=[],k=0;k").attr({cellspacing:0,cellpadding:0}).css({position:"relative","white-space":"nowrap",height:a.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:a.horizontalAlign===BI.HorizontalAlign.Center||a.horizontalAlign===BI.HorizontalAlign.Stretch?"100%":"auto","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=BI.Widget._renderEngine.createElement("
      "),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]<=1?e:e+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative","vertical-align":d.verticalAlign,margin:"0",padding:"0",border:"none"}),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},appendFragment:function(a){this.$tr.append(a),this.element.append(this.$table)},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){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(a,b){var c=this.options,d=BI.HorizontalCellLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"table-cell","vertical-align":"middle"}),c.hgap+c.lgap>0&&d.element.css({"margin-left":c.hgap+c.lgap+"px"}),c.hgap+c.rgap>0&&d.element.css({"margin-right":c.hgap+c.rgap+"px"}),c.vgap+c.tgap>0&&d.element.css({"margin-top":c.vgap+c.tgap+"px"}),c.vgap+c.bgap>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalCellLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_cell",BI.HorizontalCellLayout),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(a,b){var c=this.options,d=BI.InlineLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"inline-block","*display":"inline","*zoom":1}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.InlineLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline",BI.InlineLayout),BI.LatticeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LatticeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-lattice-layout clearfix"})},render:function(){BI.LatticeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.LatticeLayout.superclass._addElement.apply(this,arguments);if(c.columnSize&&c.columnSize[a])var e=c.columnSize[a]/BI.sum(c.columnSize)*100+"%";else var e=1/this.options.items.length*100+"%";return d.element.css({position:"relative","float":"left",width:e}),d},addItem:function(a){var b=BI.LatticeLayout.superclass.addItem.apply(this,arguments);return this.resize(),b},addItemAt:function(a){var b=BI.LatticeLayout.superclass.addItemAt.apply(this,arguments);return this.resize(),b},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.LatticeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.lattice",BI.LatticeLayout),BI.TableLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-layout",scrolly:!0,columnSize:[200,200,"fill"],rowSize:30,hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TableLayout.superclass.render.apply(this,arguments),this.rows=0,this.populate(this.options.items)},_addElement:function(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}var f,g,h=this.options,i=[],j=0,k=0;for(f=0;ff;g--){if(!BI.isNumber(h.columnSize[g]))throw new Error("item with fill can only be one");e(b[g],this.rows,g),i.push(BI.extend({top:0,bottom:0,right:h.columnSize[g]<=1?100*k+"%":k,width:h.columnSize[g]<=1?100*h.columnSize[g]+"%":h.columnSize[g]},b[g])),k+=h.columnSize[g]+(h.columnSize[g]<1?0:h.hgap)}f>=0&&f0&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":h.vgap}),l.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,l),l},resize:function(){},addItem:function(a){if(!BI.isArray(a))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},update:function(){},populate:function(a){BI.TableLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table",BI.TableLayout),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(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",top:(d.vgap||0)+(d.tgap||0)+c.vgap+c.tgap+"px",bottom:(d.bgap||0)+(d.vgap||0)+c.vgap+c.bgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].width+(a[e-1].lgap||0)+2*(a[e-1].hgap||0)+c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({left:100*d[e]+"%",width:100*f.width+"%"}):g.element.css({left:d[e]+(f.lgap||0)+(f.hgap||0)+c.hgap+c.lgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].width+(a[d+1].rgap||0)+2*(a[d+1].hgap||0)+c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({right:100*e[d]+"%",width:100*f.width+"%"}):g.element.css({right:e[d]+(f.rgap||0)+(f.hgap||0)+c.hgap+c.rgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0})},update:function(){var a;return BI.each(this._children,function(b,c){a=c.update()||a}),a},populate:function(a){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(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",left:(d.lgap||0)+(d.hgap||0)+c.hgap+c.lgap+"px",right:+(d.hgap||0)+(d.rgap||0)+c.hgap+c.rgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].height+(a[e-1].tgap||0)+2*(a[e-1].vgap||0)+c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({top:100*d[e]+"%",height:100*f.height+"%"}):g.element.css({top:d[e]+(f.vgap||0)+(f.tgap||0)+c.vgap+c.tgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].height+(a[d+1].bgap||0)+2*(a[d+1].vgap||0)+c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({bottom:100*e[d]+"%",height:100*f.height+"%"}):g.element.css({bottom:e[d]+(f.vgap||0)+(f.bgap||0)+c.vgap+c.bgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0})},update:function(){},populate:function(a){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout),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("
      ").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(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}for(var f=this.options,g=BI.createWidget({type:"bi.default",tagName:"tr"}),h=0;h=0;f--){for(var g=0;g=0;g--){for(var f=0;f0&&void 0!==arguments[0]?arguments[0]:"bi";return String(Math.random()+Math.random()).replace(N,a)}function g(){return"undefined"!=typeof navigator&&/(msie|trident)/i.test(navigator.userAgent.toLowerCase())}function h(){var a=0;if("undefined"==typeof navigator)return!1;var b=navigator.userAgent.toLowerCase(),c=b.match(/(?:msie\s([\w.]+))/),d=b.match(/(?:trident.*rv:([\w.]+))/);return a=c&&d&&c[1]&&d[1]?Math.max(1*c[1],1*d[1]):c&&c[1]?1*c[1]:d&&d[1]?1*d[1]:0}function i(a){return"[object Object]"===O.call(a)}function j(a){if(!P.test(a)){var b=a.split(".");return function(a){for(var c=0;c3&&void 0!==arguments[3]?arguments[3]:{},f=a;!f.$watch&&f.$vm&&(f=f.$vm),i(d)&&(e=d,d=d.handler),"string"==typeof d&&(d=f[d]),e=e||{},e.user=!0;var g=void 0;if(c.isFunction(b)||!(g=b.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g))||1===g.length&&!/\*/.test(b))return f.$watch(b,d,e),[];var h=[],j=g.slice(),k=!1,l=!1,m=function(b,c,f,h){k!==!0&&(j[b]=!0,q(j)&&(k=!0,d.call(a,c,f,h)),e&&e.sync?(k=!1,l=!1,j=g.slice()):l||(l=!0,Q(function(){k=!1,l=!1,j=g.slice()})))};return c.each(g,function(a,b){if(!c.has(Z,a)){if(/^[1-9a-zA-Z.]+(\*\*$|\*$)/.test(a)||"**"===a){var d=/\*\*$/.test(a);a=d?a.replace(".**",""):a.replace(".*","");var g=d?a:function(){var a={};return c.each(f.model,function(b,c){c in L||(a[c]=b)}),a};return void f.$watch(g,function(a,d,e){m(b,a,d,c.extend({index:b},e))},c.extend(e,{deep:d}))}if(/\*\*$|\*$/.test(a))throw new Error("not support");if(/\*/.test(a)){var h=a.split("."),i=function(){for(var a={root:f.model},b=(function(b,d){var e={};"*"===h[d]?c.each(a,function(a,b){c.each(a,function(a,c){b+c in L||(e[b+c]=a)})}):c.each(a,function(a,b){b+h[d]in L||(e[b+h[d]]=a[h[d]])}),a=e}),d=0,e=h.length;d3&&void 0!==arguments[3]?arguments[3]:{};i(d)&&(e=d,d=d.handler),"string"==typeof d&&(d=a[d]);var f=c.isFunction(b)?c.bind(b,a):c.bind(function(){return j("model."+b)(a)},a);return new da({get:f,listener:c.bind(d,a),last:f(),sync:e.sync,deep:e.deep,id:e.id})}function w(a,b){return function(){var c=a.apply(b,[].concat(Array.prototype.slice.call(arguments)));return b.$digest(),c}}function x(a,b){for(var c in b)a[c]=null==b[c]?d:w(b[c],a)}function y(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];c.each(b.reverse(),function(b){var d=o(b);for(var e in d)"function"==typeof d[e]&&(c.has(a,e)||(a[e]=w(d[e],a)))})}function z(a,b){function d(b){for(var c=a._parent;c;){if(c.childContext&&c.childContext.indexOf(b)>-1)return c.$watch(b,function(c,d,e){a._contextWatchers[b]&&(a.model[b]=c,a._contextWatchers[b].last=l(c),a.$digest())},{id:a._modelHashId+"-"+b}),{p:c,value:c.model[b]};c=c._parent}}var e=a._contextWatchers={};c.each(b,function(b){var f=d(b);f&&(a.model[b]=f.p?f.p.model[b]:void 0,e[b]=new da({id:f.p._modelHashId+"-"+b,get:function(){return a.model[b]},last:a.model[b],listener:c.bind(function(){f.p.model[b]=a.model[b],f.p.$digest()},f.p)}))})}function A(a,b,d,e){var f={id:b.id,cb:c.bind(b.listener,a,d,e,a)};b.sync===!0?a.syncListeners.push(f):a.asyncListeners.push(f)}function B(a){var b=!1;return c.each(a._stateWatchers,function(c,d){var e=c.get(),f=c.last;n(e,f)||(A(a,c,e,f),a.model[d]=e,b=!0,c.last=l(e))}),b}function C(a){var b=!1,d=[],e=[];return c.each(a._computedOrder,function(c){var f=a._computedWatchers[c];try{var g=f.get(),h=f.last;n(g,h)?e.push(c):(A(a,f,g,h),a.model[c]=g,b=!0,d.push(c),f.last=l(g))}catch(i){b=!0,d.push(c)}}),a._computedOrder=[].concat(e,d),b}function D(a){var b=!1;return c.each(a._contextWatchers,function(d,e){var f=d.get(),g=d.last;if(!n(f,g)){var h={id:d.id,cb:c.bind(d.listener,a,f,g,a)};a.contextListeners.push(h),a.model[e]=f,b=!0,d.last=l(f)}}),b}function E(a){for(var b=!0,c=!0,d=!0,e=ca;b&&e>0;e--)b=B(a);for(var f=ca;c&&f>0;f--)c=D(a);for(var g=ca;d&&g>0;g--)d=C(a)}function F(a){var b=[].concat(a.syncListeners||[]),d=[].concat(a.asyncListeners||[]),e=[].concat(a.contextListeners||[]);a.asyncListeners=[],a.syncListeners=[];var f=[].concat(a._watchers);c.each(f,function(e){if(e){var f=e.get(),g=e.last;if(!n(f,g)){var h={id:e.id,cb:c.bind(e.listener,a,f,g,a)};e.sync===!0?b.push(h):d.push(h),e.last=l(f)}}}),c.each(b,function(a){a.cb()}),Q(function(){c.each(e,function(a){a.cb()}),c.each(d,function(a){a.cb()})})}function G(){c.each(aa,function(a){a&&a.$digest&&a.$digest()})}function H(){return $}function I(){c.each(H(),function(a){a&&a.$digest&&a.$digest()})}function J(a){var b=m(fa,{state:function(){return a}}),c=new b({define:!0});return aa[c.getModelID()]=c,c.model}c="default"in c?c["default"]:c;var K=void 0,L={$accessors:K,$vbthis:K,$vbsetter:K,$vm:K},M=[];c.each(["slice","splice"],function(a){M[a]=Array.prototype[a]}),Array.prototype.splice=function(){this.__ref__=f();for(var a=arguments.length,b=Array(a),c=0;c=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),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 a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(BI.isIE()&&BI.getIEVersion()<10?" hack":""),height:30,width:30,hgap:5,vgap:2.5,items:[{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),b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:c}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=c,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 a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(a,b){b||(b={});var c=this.options,d=this.getTipType()||(this.isEnabled()?"success":"warning"),e="success"===d?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(e)&&(BI.Tooltips.show(a,this.getName(),e,d,this,b),c.action&&BI.Actions.runAction(c.action,"hover",c,this),BI.Actions.runGlobalAction("hover",c,this))},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover({belowMouse:a.belowMouse,container:a.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(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(c){b._e=c,BI.isNotNull(b.showTimeout)&&(clearTimeout(b.showTimeout),b.showTimeout=null),BI.isNull(b.hideTimeout)&&(b.hideTimeout=BI.delay(function(){BI.isNotNull(b.hideTimeout)&&b._hideTooltip()},500)),b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&(BI.isNotNull(b.hideTimeout)&&(clearTimeout(b.hideTimeout),b.hideTimeout=null),b._showToolTip(b._e||c,a))},500)}),this.element.on("mouseleave.title"+this.getName(),function(a){b._e=null,b._clearTimeOut(),b._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(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.Tooltips.remove(this.getName())}}),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var c=this._getShowText();BI.isKey(c)?this.setText(c):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.doRedMark(b.keyword),b.highLight&&this.doHighLight()},_getShowText:function(){var a=this.options;return BI.isFunction(a.text)?a.text():a.text},doRedMark:function(a){var b=this.options;b.keyword=a,this.text.element.__textKeywordMarked__(this._getShowText()||b.value,a,b.py)},unRedMark:function(){var a=this.options;a.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){return BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(a)?a:"",BI.isIE9Below()?void this.text.element.html(BI.htmlEncode(this._getShowText())):void(/\s/.test(a)?this.text.element[0].innerHTML=BI.htmlEncode(this._getShowText()):this.text.element[0].textContent=this._getShowText())}}),BI.shortcut("bi.text",BI.Text),BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-basic-button"+(a.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 a=this.options;a.selected===!0&&BI.nextTick(BI.bind(function(){this.setSelected(a.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),a.shadow&&this._createShadow(),a.level&&this.element.addClass("button-"+a.level)},_createShadow:function(){var a=this,b=this.options,c=function(){a.$mask||(a.$mask=BI.createWidget(BI.isObject(b.shadow)?b.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),a.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:a,items:[{el:a.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){a._hover||b.isShadowShowingOnSelected||(c(),a.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(d){a.element.__isMouseInBounds__(d)&&(!a.isEnabled()||a._hover||!b.isShadowShowingOnSelected&&a.isSelected()||(c(),a.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(b){a.element.__isMouseInBounds__(b)||a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())})},bindEvent:function(){function a(a){e.stopEvent&&a.stopEvent(),e.stopPropagation&&a.stopPropagation()}function b(b){if(a(b),!(!d.isEnabled()||d.isOnce()&&d.isSelected())){if(BI.isKey(e.bubble)||BI.isFunction(e.bubble)){if(BI.isNull(d.combo)){var f;BI.createWidget({type:"bi.absolute",element:d,items:[{el:{type:"bi.bubble_combo",trigger:"",ref:function(){d.combo=this},el:{type:"bi.layout",height:"100%"},popup:{type:"bi.text_bubble_bar_popup_view",text:c(),ref:function(){f=this},listeners:[{eventName:BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,action:function(a){d.combo.hideView(),a&&h.apply(d,arguments)}}]},listeners:[{eventName:BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,action:function(){f.populate(c())}}]},left:0,right:0,bottom:0,top:0}]})}return void(d.combo.isViewVisible()?d.combo.hideView():d.combo.showView())}h.apply(d,arguments)}}function c(){var a=d.options.bubble;return BI.isFunction(a)?a():a}var d=this,e=this.options,f=this.handle();if(f){f=f.element;var g=(e.trigger||"").split(",");BI.each(g,function(c,g){switch(g){case"mouseup":var h=!1;f.mousedown(function(){h=!0}),f.mouseup(function(c){h===!0&&b(c),h=!1,a(c)});break;case"mousedown":var h=!1,i=!1;f.mousedown(function(c){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){!BI.DOM.isExist(d)||f.__isMouseInBounds__(a)||h!==!0||i||d._trigger(),h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(d.isSelected()?i=!0:b(c),h=!0,a(c))}),f.mouseup(function(a){BI.DOM.isExist(d)&&h===!0&&i===!0&&b(a),h=!1,i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())});break;case"dblclick":f.dblclick(b);break;case"lclick":var j,h=!1;f.mousedown(function(b){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){j&&clearInterval(j),j=null,h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(!d.isEnabled()||d.isOnce()&&d.isSelected()||(j=setInterval(function(){d.isEnabled()&&d.doClick()},180),h=!0,a(b)))});break;default:(e.stopEvent||e.stopPropagation)&&f.mousedown(function(b){a(b)}),f.click(b)}});var h=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1})}},_trigger:function(a){var b=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())), +var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options;BI.isNumber(e.rowSize)&&(e.rowSize=BI.makeArray(e.items.length,1/e.items.length)),BI.isNumber(e.columnSize)&&(e.columnSize=BI.makeArray(e.items[0].length,1/e.items[0].length));for(var f=0;f=0;f--){for(var g=0;g=0;g--){for(var f=0;f0&&void 0!==arguments[0]?arguments[0]:"bi";return String(Math.random()+Math.random()).replace(N,a)}function g(){return"undefined"!=typeof navigator&&/(msie|trident)/i.test(navigator.userAgent.toLowerCase())}function h(){var a=0;if("undefined"==typeof navigator)return!1;var b=navigator.userAgent.toLowerCase(),c=b.match(/(?:msie\s([\w.]+))/),d=b.match(/(?:trident.*rv:([\w.]+))/);return a=c&&d&&c[1]&&d[1]?Math.max(1*c[1],1*d[1]):c&&c[1]?1*c[1]:d&&d[1]?1*d[1]:0}function i(a){return"[object Object]"===O.call(a)}function j(a){if(!P.test(a)){var b=a.split(".");return function(a){for(var c=0;c3&&void 0!==arguments[3]?arguments[3]:{},f=a;!f.$watch&&f.$vm&&(f=f.$vm),i(d)&&(e=d,d=d.handler),"string"==typeof d&&(d=f[d]),e=e||{},e.user=!0;var g=void 0;if(c.isFunction(b)||!(g=b.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g))||1===g.length&&!/\*/.test(b))return f.$watch(b,d,e),[];var h=[],j=g.slice(),k=!1,l=!1,m=function(b,c,f,h){k!==!0&&(j[b]=!0,q(j)&&(k=!0,d.call(a,c,f,h)),e&&e.sync?(k=!1,l=!1,j=g.slice()):l||(l=!0,Q(function(){k=!1,l=!1,j=g.slice()})))};return c.each(g,function(a,b){if(!c.has(Z,a)){if(/^[1-9a-zA-Z.]+(\*\*$|\*$)/.test(a)||"**"===a){var d=/\*\*$/.test(a);a=d?a.replace(".**",""):a.replace(".*","");var g=d?a:function(){var a={};return c.each(f.model,function(b,c){c in L||(a[c]=b)}),a};return void f.$watch(g,function(a,d,e){m(b,a,d,c.extend({index:b},e))},c.extend(e,{deep:d}))}if(/\*\*$|\*$/.test(a))throw new Error("not support");if(/\*/.test(a)){var h=a.split("."),i=function(){for(var a={root:f.model},b=(function(b,d){var e={};"*"===h[d]?c.each(a,function(a,b){c.each(a,function(a,c){b+c in L||(e[b+c]=a)})}):c.each(a,function(a,b){b+h[d]in L||(e[b+h[d]]=a[h[d]])}),a=e}),d=0,e=h.length;d3&&void 0!==arguments[3]?arguments[3]:{};i(d)&&(e=d,d=d.handler),"string"==typeof d&&(d=a[d]);var f=c.isFunction(b)?c.bind(b,a):c.bind(function(){return j("model."+b)(a)},a);return new da({get:f,listener:c.bind(d,a),last:f(),sync:e.sync,deep:e.deep,id:e.id})}function w(a,b){return function(){var c=a.apply(b,[].concat(Array.prototype.slice.call(arguments)));return b.$digest(),c}}function x(a,b){for(var c in b)a[c]=null==b[c]?d:w(b[c],a)}function y(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];c.each(b.reverse(),function(b){var d=o(b);for(var e in d)"function"==typeof d[e]&&(c.has(a,e)||(a[e]=w(d[e],a)))})}function z(a,b){function d(b){for(var c=a._parent;c;){if(c.childContext&&c.childContext.indexOf(b)>-1)return c.$watch(b,function(c,d,e){a._contextWatchers[b]&&(a.model[b]=c,a._contextWatchers[b].last=l(c),a.$digest())},{id:a._modelHashId+"-"+b}),{p:c,value:c.model[b]};c=c._parent}}var e=a._contextWatchers={};c.each(b,function(b){var f=d(b);f&&(a.model[b]=f.p?f.p.model[b]:void 0,e[b]=new da({id:f.p._modelHashId+"-"+b,get:function(){return a.model[b]},last:a.model[b],listener:c.bind(function(){f.p.model[b]=a.model[b],f.p.$digest()},f.p)}))})}function A(a,b,d,e){var f={id:b.id,cb:c.bind(b.listener,a,d,e,a)};b.sync===!0?a.syncListeners.push(f):a.asyncListeners.push(f)}function B(a){var b=!1;return c.each(a._stateWatchers,function(c,d){var e=c.get(),f=c.last;n(e,f)||(A(a,c,e,f),a.model[d]=e,b=!0,c.last=l(e))}),b}function C(a){var b=!1,d=[],e=[];return c.each(a._computedOrder,function(c){var f=a._computedWatchers[c];try{var g=f.get(),h=f.last;n(g,h)?e.push(c):(A(a,f,g,h),a.model[c]=g,b=!0,d.push(c),f.last=l(g))}catch(i){b=!0,d.push(c)}}),a._computedOrder=[].concat(e,d),b}function D(a){var b=!1;return c.each(a._contextWatchers,function(d,e){var f=d.get(),g=d.last;if(!n(f,g)){var h={id:d.id,cb:c.bind(d.listener,a,f,g,a)};a.contextListeners.push(h),a.model[e]=f,b=!0,d.last=l(f)}}),b}function E(a){for(var b=!0,c=!0,d=!0,e=ca;b&&e>0;e--)b=B(a);for(var f=ca;c&&f>0;f--)c=D(a);for(var g=ca;d&&g>0;g--)d=C(a)}function F(a){var b=[].concat(a.syncListeners||[]),d=[].concat(a.asyncListeners||[]),e=[].concat(a.contextListeners||[]);a.asyncListeners=[],a.syncListeners=[];var f=[].concat(a._watchers);c.each(f,function(e){if(e){var f=e.get(),g=e.last;if(!n(f,g)){var h={id:e.id,cb:c.bind(e.listener,a,f,g,a)};e.sync===!0?b.push(h):d.push(h),e.last=l(f)}}}),c.each(b,function(a){a.cb()}),Q(function(){c.each(e,function(a){a.cb()}),c.each(d,function(a){a.cb()})})}function G(){c.each(aa,function(a){a&&a.$digest&&a.$digest()})}function H(){return $}function I(){c.each(H(),function(a){a&&a.$digest&&a.$digest()})}function J(a){var b=m(fa,{state:function(){return a}}),c=new b({define:!0});return aa[c.getModelID()]=c,c.model}c="default"in c?c["default"]:c;var K=void 0,L={$accessors:K,$vbthis:K,$vbsetter:K,$vm:K},M=[];c.each(["slice","splice"],function(a){M[a]=Array.prototype[a]}),Array.prototype.splice=function(){this.__ref__=f();for(var a=arguments.length,b=Array(a),c=0;c=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),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 a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var a=this,b=this.options,c=BI.isIE(),d=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(c?" wave-loading hack":""),height:30,width:30,hgap:5,vgap:2.5,items:c?[]:[{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),b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:d}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=d,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 a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(a,b){b||(b={});var c=this.options,d=this.getTipType()||(this.isEnabled()?"success":"warning"),e="success"===d?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(e)&&(BI.Tooltips.show(a,this.getName(),e,d,this,b),c.action&&BI.Actions.runAction(c.action,"hover",c,this),BI.Actions.runGlobalAction("hover",c,this))},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover({belowMouse:a.belowMouse,container:a.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(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(c){b._e=c,BI.isNotNull(b.showTimeout)&&(clearTimeout(b.showTimeout),b.showTimeout=null),BI.isNull(b.hideTimeout)&&(b.hideTimeout=BI.delay(function(){BI.isNotNull(b.hideTimeout)&&b._hideTooltip()},500)),b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&(BI.isNotNull(b.hideTimeout)&&(clearTimeout(b.hideTimeout),b.hideTimeout=null),b._showToolTip(b._e||c,a))},500)}),this.element.on("mouseleave.title"+this.getName(),function(a){b._e=null,b._clearTimeOut(),b._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(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.Tooltips.remove(this.getName())}}),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var c=this._getShowText();BI.isKey(c)?this.setText(c):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.doRedMark(b.keyword),b.highLight&&this.doHighLight()},_getShowText:function(){var a=this.options;return BI.isFunction(a.text)?a.text():a.text},doRedMark:function(a){var b=this.options;b.keyword=a,this.text.element.__textKeywordMarked__(this._getShowText()||b.value,a,b.py)},unRedMark:function(){var a=this.options;a.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){return BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(a)?a:"",BI.isIE9Below()?void this.text.element.html(BI.htmlEncode(this._getShowText())):void(/\s/.test(a)?this.text.element[0].innerHTML=BI.htmlEncode(this._getShowText()):this.text.element[0].textContent=this._getShowText())}}),BI.shortcut("bi.text",BI.Text),BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-basic-button"+(a.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 a=this.options;a.selected===!0&&BI.nextTick(BI.bind(function(){this.setSelected(a.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),a.shadow&&this._createShadow(),a.level&&this.element.addClass("button-"+a.level)},_createShadow:function(){var a=this,b=this.options,c=function(){a.$mask||(a.$mask=BI.createWidget(BI.isObject(b.shadow)?b.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),a.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:a,items:[{el:a.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){a._hover||b.isShadowShowingOnSelected||(c(),a.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(d){a.element.__isMouseInBounds__(d)&&(!a.isEnabled()||a._hover||!b.isShadowShowingOnSelected&&a.isSelected()||(c(),a.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(b){a.element.__isMouseInBounds__(b)||a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())})},bindEvent:function(){function a(a){e.stopEvent&&a.stopEvent(),e.stopPropagation&&a.stopPropagation()}function b(b){if(a(b),!(!d.isEnabled()||d.isOnce()&&d.isSelected())){if(BI.isKey(e.bubble)||BI.isFunction(e.bubble)){if(BI.isNull(d.combo)){var f;BI.createWidget({type:"bi.absolute",element:d,items:[{el:{type:"bi.bubble_combo",trigger:"",ref:function(){d.combo=this},el:{type:"bi.layout",height:"100%"},popup:{type:"bi.text_bubble_bar_popup_view",text:c(),ref:function(){f=this},listeners:[{eventName:BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,action:function(a){d.combo.hideView(),a&&h.apply(d,arguments)}}]},listeners:[{eventName:BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,action:function(){f.populate(c())}}]},left:0,right:0,bottom:0,top:0}]})}return void(d.combo.isViewVisible()?d.combo.hideView():d.combo.showView())}h.apply(d,arguments)}}function c(){var a=d.options.bubble;return BI.isFunction(a)?a():a}var d=this,e=this.options,f=this.handle();if(f){f=f.element;var g=(e.trigger||"").split(",");BI.each(g,function(c,g){switch(g){case"mouseup":var h=!1;f.mousedown(function(){h=!0}),f.mouseup(function(c){h===!0&&b(c),h=!1,a(c)});break;case"mousedown":var h=!1,i=!1;f.mousedown(function(c){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){!BI.DOM.isExist(d)||f.__isMouseInBounds__(a)||h!==!0||i||d._trigger(),h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(d.isSelected()?i=!0:b(c),h=!0,a(c))}),f.mouseup(function(a){BI.DOM.isExist(d)&&h===!0&&i===!0&&b(a),h=!1,i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())});break;case"dblclick":f.dblclick(b);break;case"lclick":var j,h=!1;f.mousedown(function(b){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){j&&clearInterval(j),j=null,h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(!d.isEnabled()||d.isOnce()&&d.isSelected()||(j=setInterval(function(){d.isEnabled()&&d.doClick()},180),h=!0,a(b)))});break;default:(e.stopEvent||e.stopPropagation)&&f.mousedown(function(b){a(b)}),f.click(b)}});var h=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1})}},_trigger:function(a){var b=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())), this.isValid())){b.handler.call(this,this.getValue(),this,a);var c=this.getValue();this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,c,this,a),this.fireEvent(BI.BasicButton.EVENT_CHANGE,c,this),b.action&&BI.Actions.runAction(b.action,"click",b,this),BI.Actions.runGlobalAction("click",b,this)}},_doClick:function(a){this.isValid()&&this.beforeClick(a),this._trigger(a),this.isValid()&&this.doClick(a)},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(a){var b=this.options;b.selected=a,a?this.handle().element.addClass("active"):this.handle().element.removeClass("active"),b.shadow&&!b.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(a){this.options.text=a},getText:function(){return this.options.text},_setEnable:function(a){BI.BasicButton.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),a||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",BI.NodeButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.NodeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-node",open:!1})},_init:function(){BI.NodeButton.superclass._init.apply(this,arguments);var a=this;BI.nextTick(function(){a.setOpened(a.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(a){this.options.open=!!a},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))}}),BI.Tip=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Tip.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-tip",zIndex:BI.zIndex_tip})},_init:function(){BI.Tip.superclass._init.apply(this,arguments),this.element.css({zIndex:this.options.zIndex})}}),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 a=this.options,b={};BI.each(a.behaviors,function(a,c){b[a]=BI.BehaviorFactory.createBehavior(a,{rule:c})}),this.behaviors=b,this.populate(a.items),(BI.isKey(a.value)||BI.isNotEmptyArray(a.value))&&this.setValue(a.value)},_createBtns:function(a){this.options;return BI.createWidgets(BI.createItems(a,{type:"bi.text_button"}))},_btnsCreator:function(a){var b=this,c=Array.prototype.slice.call(arguments),d=this.options,e=this._createBtns(a);return c[0]=e,BI.each(this.behaviors,function(a,b){b.doBehavior.apply(b,c)}),BI.each(e,function(a,c){c.on(BI.Controller.EVENT_CHANGE,function(a,e,f){if(a===BI.Events.CLICK){switch(d.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:b.setValue(c.getValue());break;case BI.ButtonGroup.CHOOSE_TYPE_NONE:b.setValue([])}b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b.fireEvent(BI.ButtonGroup.EVENT_CHANGE,e,f)}else b.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),c.on(BI.Events.DESTROY,function(){BI.remove(b.buttons,c)})}),e},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:d})]})});return a},_packageSimpleItems:function(a){var b=this.options;return BI.map(b.items,function(b,c){return BI.stripEL(c)===c?a[b]:BI.extend({},c,{el:a[b]})})},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},_isSimpleLayout:function(){var a=this.options;return 1===a.layouts.length&&!BI.isArray(a.items[0])},doBehavior:function(){var a=Array.prototype.slice.call(arguments);a.unshift(this.buttons),BI.each(this.behaviors,function(b,c){c.doBehavior.apply(c,a)})},prependItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(b,this.buttons),this._isSimpleLayout()&&this.layouts&&this.layouts.prependItems?void this.layouts.prependItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.prependItems(this._packageLayout(a).items))},addItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(this.buttons,b),this._isSimpleLayout()&&this.layouts&&this.layouts.addItems?void this.layouts.addItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.addItems(this._packageLayout(a).items))},removeItemAt:function(a){BI.removeAt(this.buttons,a),this.layouts.removeItemAt(a)},removeItems:function(a){a=BI.isArray(a)?a:[a];var b=[];BI.each(this.buttons,function(c,d){BI.deepContains(a,d.getValue())&&b.push(c)}),BI.removeAt(this.buttons,b),this.layouts.removeItemAt(b)},populate:function(a){a=a||[],this.empty(),this.options.items=a,this.buttons=this._btnsCreator.apply(this,arguments),a=this._isSimpleLayout()?this._packageSimpleItems(this.buttons):this._packageItems(a,this._packageBtns(this.buttons)),this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1)})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue())}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},getAllButtons:function(){return this.buttons},getAllLeaves:function(){return this.buttons},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&c.isSelected()&&a.push(c)}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&!c.isSelected()&&a.push(c)}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.options.id===a)return b=d,!0}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=d,!0}),b},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),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(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!1):c.setSelected(!0)):void c.setNotSelectedValue(a)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setEnabledValue)?void c.setEnabledValue(a):void(BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1))})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!0):c.setSelected(!1)):void c.setValue(a)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getNotSelectedValue())):void(c.isEnabled()&&c.isSelected&&!c.isSelected()&&a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getValue())):void(c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue()))}),a},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getSelectedButtons())):void(c.isSelected&&c.isSelected()&&a.push(c))}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getNotSelectedButtons())):void(c.isSelected&&!c.isSelected()&&a.push(c))}),a},getAllLeaves:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getAllLeaves())):void(c.isEnabled()&&a.push(c))}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){var e=d.getValue();if(d.isEnabled()&&(e===a||BI.contains(e,a)))return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()){if(d.attr("id")===a)return b=d,!0;if(BI.isFunction(d.getNodeById)&&(b=d.getNodeById(a)))return!0}}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled())if(BI.isFunction(d.getNodeByValue)){if(b=d.getNodeByValue(a))return!0}else if(d.attr("value")===a)return b=d,!0}),b}}),BI.ButtonTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_tree",BI.ButtonTree),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 a=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(a.value)&&this.setSelectedValue(a.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:"
        "}),BI.createWidget({type:"bi.default",element:this.element,items:[this.tree]})},_selectTreeNode:function(a,b){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,b,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,b,this)},_configSetting:function(){function a(a,b,c){var d=c.checked,e=c.getCheckStatus();e.half===!0&&e.checked===!0&&(d=!1),l.nodes.checkNode(c,!d,!0,!0)}function b(a,b){var c=l._getParentValues(b);b.times=b.times||1;var d="id="+b.id+"×="+b.times++ +"&parentValues= "+_global.encodeURIComponent(BI.jsonEncode(c))+"&checkState="+_global.encodeURIComponent(BI.jsonEncode(b.getCheckStatus()));return"&"+d}function c(a,b){return b.isAjaxing?(BI.Msg.toast("Please Wait。","warning"),!1):(b.children||(b.times=1,f(b,"refresh")),!0)}function d(a,b,c,d){if(c.halfCheck=!1,d&&0!==d.length&&!/^[\s,\S]*<\/html>$/gi.test(d)&&!l._stop){var e=l.nodes,g=c.count||0;c.children.length>g?(c.count=c.children.length,BI.delay(function(){f(c)},n)):(e.updateNode(c),e.selectNode(c.children[0]))}}function e(a,b,c,d,e,f){l.nodes;BI.Msg.toast("Error!","warning")}function f(a,b){var c=l.nodes;"refresh"==b&&c.updateNode(a),c.reAsyncChildNodes(a,b,!0)}function g(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=l.nodes,e=d.getSelectedNodes();$.each(e,function(a,b){b.halfCheck=!1})}var f=b.getCheckStatus();f.half===!0&&f.checked===!0&&(b.checked=!1)}function h(a,b,c){l._selectTreeNode(b,c)}function i(a,b,c){c.halfCheck=!1}function j(a,b,c){}var k=this.options.paras,l=this,m={async:{enable:!0,url:b,autoParam:["id","name"],otherParam:BI.cjkEncodeDO(k)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:c,onAsyncSuccess:d,onAsyncError:e,beforeCheck:g,onCheck:h,onExpand:i,onCollapse:j,onClick:a}},n=100;return m},_getParentValues:function(a){if(!a.getParentNode())return[];var b=a.getParentNode(),c=this._getParentValues(b);return c=c.concat([this._getNodeValue(b)])},_getNodeValue:function(a){return null==a.value?BI.replaceAll(a.text.replace(/<[^>]+>/g,"")," "," "):a.value},_getHalfSelectedValues:function(a,b){var c=this,d=b.getCheckStatus();if(d.checked!==!1||d.half!==!1){if(BI.isNotEmptyArray(b.children)&&d.half===!0){var e=b.children;return void BI.each(e,function(b,d){c._getHalfSelectedValues(a,d)})}var f=b.parentValues||c._getParentValues(b),g=f.concat(this._getNodeValue(b));if(BI.isNotEmptyArray(b.children)||d.half===!1)return void this._buildTree(a,g);var h=BI.deepClone(this.options.paras.selectedValues),i=this._getTree(h,g);this._addTreeNode(a,f,this._getNodeValue(b),i)}},_getTree:function(a,b){var c=a;return BI.any(b,function(a,b){return null==c[b]||void(c=c[b])}),c},_addTreeNode:function(a,b,c,d){var e=a;BI.each(b,function(a,b){null==e[b]&&(e[b]={}),e=e[b]}),e[c]=d},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){null==c[b]&&(c[b]={}),c=c[b]})},_getSelectedValues:function(){function a(a){BI.each(a,function(a,d){var e=d.getCheckStatus();if(e.checked===!0||e.half===!0)if(e.half===!0)b._getHalfSelectedValues(c,d);else{var f=d.parentValues||b._getParentValues(d),g=f.concat([b._getNodeValue(d)]);b._buildTree(c,g)}})}var b=this,c={},d=this.nodes.getNodes();return a(d),c},_dealWidthNodes:function(a){var b=this.options,c=BI.Tree.arrayFormat(a);return BI.each(c,function(a,c){c.title=c.title||c.text||c.value,c.isParent=c.isParent||c.parent,BI.isKey(b.paras.keyword)?c.text=$("
        ").__textKeywordMarked__(c.text,b.paras.keyword,c.py).html():c.text=BI.htmlEncode(c.text+"")}),a},_loadMore:function(){var a=this,b=this.options;this.tip.setLoading();var c=BI.extend({},b.paras,{times:++this.times});b.itemsCreator(c,function(b){if(a._stop!==!0){var c=!!b.hasNext,d=b.items||[];c?a.tip.setLoaded():a.tip.setEnd(),d.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(d))}})},_initTree:function(a){var b=this,c=this.options;b.fireEvent(BI.Events.INIT),this.times=1;var d=this.tree;d.empty(),this.loading(),this.tip.setVisible(!1);var e=function(c){b._stop!==!0&&(b.nodes=$.fn.zTree.init(d.element,a,c))},f=BI.extend({},c.paras,{times:1});c.itemsCreator(f,function(a){if(b._stop!==!0){var c=!!a.hasNext,d=a.items||[];d.length>0&&e(b._dealWidthNodes(d)),b.setTipVisible(d.length<=0),b.loaded(),c?b.tip.setLoaded():b.tip.invisible(),1===f.times&&b.fireEvent(BI.Events.AFTERINIT)}})},initTree:function(a,b){var b=b||{async:{enable:!1},check:{enable:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=$.fn.zTree.init(this.tree.element,b,a)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._createTree(),this.start(),this._initTree(b)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){var a=this.nodes;return a.getCheckedNodes(!0).length>0},checkAll:function(a){function b(a){BI.each(a,function(a,c){c.halfCheck=!1,b(c.children)})}this.nodes&&(BI.each(this.nodes.getNodes(),function(a,c){c.halfCheck=!1,b(c.children)}),this.nodes.checkAllNodes(a))},expandAll:function(a){this.nodes&&this.nodes.expandAll(a)},setValue:function(a,b){this.checkAll(!1),this.updateValue(a,b),this.refresh()},setSelectedValue:function(a){this.options.paras.selectedValues=BI.deepClone(a||{})},updateValue:function(a,b){if(this.nodes){b||(b="value");var c=this.nodes;BI.each(a,function(a,d){var e=c.getNodesByParam(b,a,null);BI.each(e,function(a,b){BI.extend(b,{checked:!0},d),c.updateNode(b)})})}},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),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)},_configSetting:function(){function a(a,b,c){var d=$.fn.zTree.getZTreeObj(b),e=c.checked,f=c.getCheckStatus();f.half===!0&&f.checked===!0&&(e=!1),d.checkNode(c,!e,!0,!0)}function b(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=$.fn.zTree.getZTreeObj(a),e=d.getSelectedNodes();BI.each(e,function(a,b){b.halfCheck=!1})}var f=b.getCheckStatus();f.half===!0&&f.checked===!0&&(b.checked=!1)}function c(a,b){h._beforeExpandNode(a,b)}function d(a,b,c){h._selectTreeNode(b,c)}function e(a,b,c){c.halfCheck=!1}function f(a,b,c){c.halfCheck=!1}var g=this.options.paras,h=this,i={async:{enable:!1,otherParam:BI.cjkEncodeDO(g)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeCheck:b,onCheck:d,beforeExpand:c,onExpand:e,onCollapse:f,onClick:a}};return i},_selectTreeNode:function(a,b){var c=this,d=(this.options,BI.deepClone(b.parentValues||c._getParentValues(b))),e=this._getNodeValue(b);if(b.checked===!0);else{var f=b,g=this._getTree(this.options.paras.selectedValues,d);for(BI.isNotNull(g[e])&&delete g[e];null!=f&&BI.isEmpty(g);)d=d.slice(0,d.length-1),f=f.getParentNode(),null!=f&&(g=this._getTree(this.options.paras.selectedValues,d),e=this._getNodeValue(f),delete g[e])}BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b)),checkState:b.getCheckStatus()}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||setTimeout(function(){e.itemsCreator(g,h)},17)},_join:function(a,b){function c(a,b,f){BI.each(b,function(g,h){BI.isNull(f[g])?d._addTreeNode(e,a,g,h):BI.isEmpty(f[g])?d._addTreeNode(e,a,g,{}):c(a.concat([g]),b[g],f[g])})}var d=this,e={};return c([],a,b),c([],b,a),e},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.AsyncTree.superclass.hasChecked.apply(this,arguments)},_getJoinValue:function(){if(!this.nodes)return{};var a=this._getSelectedValues();return BI.isEmpty(a)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?a:this._join(a,this.options.paras.selectedValues)},getValue:function(){return this._getJoinValue()},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.async_tree",BI.AsyncTree),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 a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_selectTreeNode:function(a,b){var c=this,d=this.options,e=BI.deepClone(b.parentValues||c._getParentValues(b)),f=this._getNodeValue(b);if(b.checked===!0)this.options.paras.selectedValues=this._getJoinValue(),d.itemsCreator(BI.extend({},d.paras,{type:BI.TreeView.REQ_TYPE_ADJUST_DATA,curSelectedValue:f,parentValues:e}),function(a){c.options.paras.selectedValues=a,BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)});else{for(var g=this.options.paras.selectedValues,h=e.concat(f),i=0,j=h.length;i0?d._dealWidthNodes(g):[]),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},getValue:function(){return BI.deepClone(this.options.paras.selectedValues||{})},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.part_tree",BI.PartTree),BI.ListTreeView=BI.inherit(BI.TreeView,{_constants:{SPLIT:"<|>"},_defaultConfig:function(){return BI.extend(BI.ListTreeView.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ListTreeView.superclass._init.apply(this,arguments);var a=this.options;this.storeValue=a.value||{}},_configSetting:function(){function a(a,b,d){var e=$.fn.zTree.getZTreeObj(b),f=d.checked;c._checkValue(d,!f),e.checkNode(d,!f,!0,!0)}function b(a,b,d){c._selectTreeNode(b,d)}var c=(this.options.paras,this),d={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:b,onClick:a}};return d},_selectTreeNode:function(a,b){this._checkValue(b,b.checked),BI.ListTreeView.superclass._selectTreeNode.apply(this,arguments)},_transArrayToMap:function(a){var b=this,c={};return BI.each(a,function(a,d){var e=d.join(b._constants.SPLIT);c[e]=!0}),c},_transMapToArray:function(a){var b=this,c=[];return BI.each(a,function(a){var d=a.split(b._constants.SPLIT);c.push(d)}),c},_checkValue:function(a,b){var c=BI.concat(this._getParentValues(a),this._getNodeValue(a)).join(this._constants.SPLIT);b?this.storeValue[c]=!0:delete this.storeValue[c]},setSelectedValue:function(a){this.options.paras.selectedValues=a||[],this.storeValue=this._transArrayToMap(a)},getValue:function(){return this._transMapToArray(this.storeValue)}}),BI.shortcut("bi.list_tree_view",BI.ListTreeView),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(){function a(a,b){b.half=!1}function b(a,b,c){var d=$.fn.zTree.getZTreeObj(b),e=c.checked;f._checkValue(c,!e),d.checkNode(c,!e,!0,!0)}function c(a,b){f._beforeExpandNode(a,b)}function d(a,b,c){f._selectTreeNode(b,c)}var e=this.options.paras,f=this,g={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:d,beforeExpand:c,beforeCheck:a,onClick:b}};return g},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b))}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||setTimeout(function(){e.itemsCreator(g,h)},17)},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.ListAsyncTree.superclass.hasChecked.apply(this,arguments)},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.list_async_tree",BI.ListAsyncTree),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 a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_initTree:function(a,b){function c(b){d._stop!==!0&&(d.nodes=$.fn.zTree.init(f.element,a,b))}var d=this,e=this.options;this.times=1;var f=this.tree;f.empty(),d.tip.setVisible(!1),this.loading();var g=BI.extend({},e.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:this.times}),h=function(a){if(d._stop!==!0&&b==e.paras.keyword){var f=!!a.hasNext,g=a.items||[];e.paras.lastSearchValue=a.lastSearchValue,c(g.length>0?d._dealWidthNodes(g):[]),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.list_part_tree",BI.ListPartTree),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}),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 a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.CollectionView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&(this._calculateSizeAndPositionData(),this._populate())},mounted:function(){var a=this.options;0===a.scrollLeft&&0===a.scrollTop||(this.element.scrollTop(a.scrollTop),this.element.scrollLeft(a.scrollLeft))},_calculateSizeAndPositionData:function(){for(var a=this.options,b=[],c=new BI.SectionManager,d=0,e=0,f=0,g=a.items.length;f0&&h>0){if(f>=this.renderRange.minY&&h<=this.renderRange.maxY&&e>=this.renderRange.minX&&g<=this.renderRange.maxX)return;for(var i=this._cellRenderers(h-f,g-e,e,f),j=[],k={},l={},m={},n={},o=0,p=i.length;o=0?(q.width!==this.renderedCells[A]._width&&(this.renderedCells[A]._width=q.width,this.renderedCells[A].el.setWidth(q.width)),q.height!==this.renderedCells[A]._height&&(this.renderedCells[A]._height=q.height,this.renderedCells[A].el.setHeight(q.height)),this.renderedCells[A]._left!==q.x&&this.renderedCells[A].el.element.css("left",q.x+"px"), this.renderedCells[A]._top!==q.y&&this.renderedCells[A].el.element.css("top",q.y+"px"),j.push(z=this.renderedCells[A])):(z=BI.createWidget(BI.extend({type:"bi.label",width:q.width,height:q.height},b.items[q.index],{cls:(b.items[q.index].cls||"")+" container-cell"+(0===q.y?" first-row":"")+(0===q.x?" first-col":""),_left:q.x,_top:q.y})),j.push({el:z,left:q.x,top:q.y,_left:q.x,_top:q.y,_width:q.width,_height:q.height}));for(var B=0|s[q.y],C=0|s[q.y+q.height],D=B;D<=C;D++){var E=n[D];x(t,E),y(u,E),t[E]=Math.min(t[E],q.x),u[E]=Math.max(u[E],q.x+q.width)}for(var F=0|r[q.x],G=0|r[q.x+q.width],D=F;D<=G;D++){var H=m[D];x(v,H),y(w,H),v[H]=Math.min(v[H],q.y),w[H]=Math.max(w[H],q.y+q.height)}k[q.index]=[q.index,o],l[o]=z}var I={},J={},K=[];BI.each(k,function(b,c){a.renderedKeys[b]?I[b]=c:J[b]=c}),BI.each(this.renderedKeys,function(a,b){I[a]||J[a]||K.push(b[1])}),BI.each(K,function(b,c){a.renderedCells[c].el._destroy()});var L=[];BI.each(J,function(a,b){L.push(j[b[1]])}),this.container.addItems(L),this.container._children=l,this.container.attr("items",j),this.renderedCells=j,this.renderedKeys=k;var M=BI.min(t),N=BI.max(u),O=BI.max(v),P=BI.min(w);this.renderRange={minX:M,minY:O,maxX:N,maxY:P}}},_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(a){var b=this.options;if(this._reRange(),a&&a!==this.options.items&&(this.options.items=a,this._calculateSizeAndPositionData()),b.items.length>0){this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender();try{this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)}catch(c){}}},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"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(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.CollectionView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.collection_view",BI.CollectionView),BI.Combo=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Combo.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Combo.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,d))}),a.element.on("mouseenter."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.addClass(b.hoverClass)}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(b.logic,{items:[{el:this.combo}]})))),b.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(){function a(){b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&c.toggle===!0&&(b._hideView(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",b.combo),b.fireEvent(BI.Combo.EVENT_COLLAPSE)),b.popupView&&b.popupView.element.off("mouseenter."+b.getName()).off("mouseleave."+b.getName()),f=!1}var b=this,c=this.options,d=(this.options.trigger||"").split(","),e=function(a){c.stopEvent&&a.stopEvent(),c.stopPropagation&&a.stopPropagation()},f=!1;BI.each(d,function(d,g){switch(g){case"hover":b.element.on("mouseenter."+b.getName(),function(a){b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(b._popupView(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND))}),b.element.on("mouseleave."+b.getName(),function(c){b.popupView&&(b.popupView.element.on("mouseenter."+b.getName(),function(c){f=!0,b.popupView.element.on("mouseleave."+b.getName(),function(b){a()}),b.popupView.element.off("mouseenter."+b.getName())}),BI.defer(function(){f||a()},50))});break;case"click":var h=BI.debounce(function(a){b.combo.element.__isMouseInBounds__(a)&&b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(c.toggle?b._toggle():b._popupView(),b.isViewVisible()?(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND)):(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",b.combo),b.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});b.element.off(g+"."+b.getName()).on(g+"."+b.getName(),function(a){h(a),e(a)});break;case"click-hover":var h=BI.debounce(function(a){b.combo.element.__isMouseInBounds__(a)&&b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(b._popupView(),b.isViewVisible()&&(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});b.element.off("click."+b.getName()).on("click."+b.getName(),function(a){h(a),e(a)}),b.element.on("mouseleave."+b.getName(),function(c){b.popupView&&(b.popupView.element.on("mouseenter."+b.getName(),function(c){f=!0,b.popupView.element.on("mouseleave."+b.getName(),function(b){a()}),b.popupView.element.off("mouseenter."+b.getName())}),BI.defer(function(){f||a()},50))})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var a=this,b=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view",value:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a.combo.setValue(a.getValue()),a.fireEvent(BI.Combo.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){a.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(a){if(this.element.find(a.target).length>0||this.popupView&&this.popupView.element.find(a.target).length>0||"CodeMirror-cursor"===a.target.className||BI.Widget._renderEngine.createElement(a.target).closest(".CodeMirror-hints").length>0){var b=this.options.direction.split(",");return void((BI.contains(b,"innerLeft")||BI.contains(b,"innerRight"))&&(this.adjustWidth(),this.adjustHeight()))}var c=this.options.hideChecker.apply(this,[a]);c!==!1&&this._hideView()},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),this.options.destroyWhenHide===!0?(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(a){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(a),this.adjustHeight(a),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(a){var b=this.options;if(this.popupView&&b.isNeedAdjustWidth===!0){this.resetListWidth("");var c=this.popupView.element.outerWidth(),d=this.element.outerWidth()||b.width;c>d+80?d+=80:c>d&&(d=c),this.resetListWidth(d<100?100:d)}},adjustHeight:function(a){var b=this.options,c={};if(this.popupView){var d=this.popupView.isVisible();this.popupView.visible();var e=BI.isNotNull(a)?{element:{offset:function(){return{left:a.pageX,top:a.pageY}},bounds:function(){return{x:a.offsetX,y:a.offsetY,width:0,height:24}},outerWidth:function(){return 0},outerHeight:function(){return 24}}}:this.combo;switch(b.direction){case"bottom":case"bottom,right":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["bottom","top","right","left"],b.offsetStyle);break;case"top":case"top,right":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["top","bottom","right","left"],b.offsetStyle);break;case"left":case"left,bottom":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["left","right","bottom","top"],b.offsetStyle);break;case"right":case"right,bottom":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","bottom","top"],b.offsetStyle);break;case"top,left":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["top","bottom","left","right"],b.offsetStyle);break;case"bottom,left":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["bottom","top","left","right"],b.offsetStyle);break;case"left,top":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["left","right","top","bottom"],b.offsetStyle);break;case"right,top":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","top","bottom"],b.offsetStyle);break;case"right,innerRight":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","innerRight","innerLeft","bottom","top"],b.offsetStyle);break;case"right,innerLeft":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","innerLeft","innerRight","bottom","top"],b.offsetStyle);break;case"innerRight":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["innerRight","innerLeft","right","left","bottom","top"],b.offsetStyle);break;case"innerLeft":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["innerLeft","innerRight","left","right","bottom","top"],b.offsetStyle);break;case"top,custom":case"custom,top":c=BI.DOM.getTopAdaptPosition(e,this.popupView,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":c=BI.DOM.getBottomAdaptPosition(e,this.popupView,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight);break;case"left,custom":case"custom,left":c=BI.DOM.getLeftAdaptPosition(e,this.popupView,b.adjustXOffset||b.adjustLength),delete c.top,delete c.adaptHeight;break;case"custom,right":case"right,custom":c=BI.DOM.getRightAdaptPosition(e,this.popupView,b.adjustXOffset||b.adjustLength),delete c.top,delete c.adaptHeight}"adaptHeight"in c&&this.resetListHeight(c.adaptHeight),"left"in c&&this.popupView.element.css({left:c.left}),"top"in c&&this.popupView.element.css({top:c.top}),this.position=c,this.popupView.setVisible(d)}},resetListHeight:function(a){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(a)},resetListWidth:function(a){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(a)},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate.apply(this.combo,arguments)},_setEnable:function(a){BI.Combo.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.combo.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},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(a){this.isEnabled()&&this.combo.isEnabled()&&!this.isViewVisible()&&this._popupView(a)},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())}}),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),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 a=this,b=this.options;this._expanded=!!b.el.open,this._initExpander(),this._initPullDownAction(),this.expander.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Expander.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Expander.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.expander}]}),b.isDefaultInit&&this._assertPopupView(),this.expander.isOpened()===!0&&this._popupView()},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND))},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE))});break;case"click":d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.expander.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.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 a=this,b=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:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_CHANGE,c,d)}),this.popupView.setVisible(this.isExpanded()),BI.nextTick(function(){a.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(a){this.popupView&&this.popupView.populate.apply(this.popupView,arguments),this.expander.populate.apply(this.expander,arguments)},_setEnable:function(a){BI.Expander.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.expander.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},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(a){return this.expander.options.id===a?this.expander:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.expander.getValue()===a?this.expander:this.popupView&&this.popupView.getNodeByValue(a)},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),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(a){var b=this,c=this.options,d=c.children;if(BI.isEmpty(d))throw new Error("ComboGroup构造错误");BI.each(d,function(a,b){var d=BI.formatEL(b).el.children;b=BI.formatEL(b).el,BI.isEmpty(d)||(b.el=BI.clone(b),b.children=d,b.type="bi.combo_group",b.action=c.action,b.height=c.height,b.direction=c.direction,b.isDefaultInit=c.isDefaultInit,b.isNeedAdjustHeight=c.isNeedAdjustHeight,b.isNeedAdjustWidth=c.isNeedAdjustWidth,b.adjustLength=c.adjustLength,b.popup=c.popup)}),this.combo=BI.createWidget({type:"bi.combo",element:this,container:c.container,height:c.height,trigger:c.trigger,direction:c.direction,isDefaultInit:c.isDefaultInit,isNeedAdjustWidth:c.isNeedAdjustWidth,isNeedAdjustHeight:c.isNeedAdjustHeight,adjustLength:c.adjustLength,el:a,popup:BI.extend({},c.popup,{el:BI.extend({items:d},c.popup.el)})}),this.combo.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.ComboGroup.EVENT_CHANGE,d)})},getValue:function(){return this.combo.getValue()},setValue:function(a){this.combo.setValue(a)}}),BI.ComboGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.combo_group",BI.ComboGroup),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 a=this.options;this.populate(a.items),BI.isKey(a.value)&&this.setValue(a.value)},_packageBtns:function(a){for(var b=this.options,c=this.buttonMap={},d=b.layouts.length-1;d>0;d--)a=BI.map(a,function(a,e){var f=BI.stripEL(e);return BI.extend({},b.layouts[d],{items:[BI.extend({},b.layouts[d].el,{el:BI.extend({ref:function(a){BI.isKey(c[f.value])&&(c[f.value]=a)}},f)})]})});return a},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},addItems:function(a){this.layouts.addItems(a)},prependItems:function(a){this.layouts.prependItems(a)},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttonMap,function(b,c){c&&(a.deepContains(b)?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1))})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttonMap,function(b,c){c&&(!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttonMap,function(b,c){c&&c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},populate:function(a){a=a||[],this.options.items=a,a=this._packageBtns(a),this.layouts?this.layouts.populate(a):this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))}}),BI.VirtualGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.virtual_group",BI.VirtualGroup),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 a=this,b=this.options;this.prev.setLoading(),b.itemsCreator.apply(this,[{times:--this.times},function(){a.prev.setLoaded(),a.prependItems.apply(a,arguments)}])},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.Loader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.prev=!1,b.next=!1),b.prev!==!1&&(this.prev=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.prev)),this.prev.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._prevLoad()})),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}],value:b.value}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Loader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.prev,this.button_group,this.next)})))),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){b.isDefaultInit&&BI.isEmpty(b.items)&&this._populate()},this)),BI.isNotEmptyArray(b.items)&&this._populate(b.items)},hasPrev:function(){var a=this.options;return BI.isNumber(a.count)?this.count0&&f.push(c),BI.Maskers.show(a.getName()),a.popupView.populate.apply(a.popupView,f),b.isAutoSync&&b.adapter&&b.adapter.getValue&&a.popupView.setValue(b.adapter.getValue()),a.popupView.loaded&&a.popupView.loaded(),a.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(a){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(a){BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},getKeyword:function(){return this.editor.getValue()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var a=this.options;return a.isAutoSync&&a.adapter&&a.adapter.getValue?a.adapter.getValue():this.isSearching()?this.popupView.getValue():a.adapter&&a.adapter.getValue?a.adapter.getValue():BI.isNull(this.popupView)?a.popup.value:this.popupView.getValue()},populate:function(a,b,c){var d=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),d.isAutoSync&&d.adapter&&d.adapter.getValue&&this.popupView.setValue(d.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),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 a=this,b=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Switcher.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Switcher.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),b.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.switcher.isEnabled()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND))},function(){a.isEnabled()&&a.switcher.isEnabled()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.switcher.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.switcher.isEnabled()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.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 a=this,b=this.options;this._created||(this.popupView=BI.createWidget(b.popup,{type:"bi.button_group",element:b.adapter&&BI.Maskers.create(this.getName(),b.adapter,BI.extend({container:this},b.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_CHANGE,c,d)}),b.direction===BI.Direction.Custom||b.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){a.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var a=this,b=this.options;b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),BI.nextTick(function(){b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),a.element.removeClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var a=this,b=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),b.adapter?BI.Maskers.show(this.getName()):a.popupView.setVisible(!0),BI.nextTick(function(c){b.adapter?BI.Maskers.show(c):a.popupView.setVisible(!0),a.element.addClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(a){BI.Switcher.superclass._setEnable.apply(this,arguments),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.switcher.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},setAdapter:function(a){this.options.adapter=a,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(a){return this.switcher.attr("id")===a?this.switcher:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.switcher.getValue()===a?this.switcher:this.popupView&&this.popupView.getNodeByValue(a)},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Switcher.superclass.destroy.apply(this,arguments)}}),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),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(a){return BI.createWidget()}})},render:function(){var a=this,b=this.options;BI.isObject(b.tab)&&(this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.tab.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.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(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tab,this.layout)}))));var c=new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardCreator:function(c){var d=b.cardCreator.apply(a,arguments);return a.cardMap[c]=d,d},afterCardShow:function(b){a._deleteOtherCards(b),a.curr=b}});c.on(BI.ShowListener.EVENT_CHANGE,function(b){a.fireEvent(BI.Tab.EVENT_CHANGE,b,a)})},_deleteOtherCards:function(a){var b=this,c=this.options;c.single===!0&&BI.each(this.cardMap,function(c,d){c!==a+""&&(b.layout.deleteCardByName(c),delete b.cardMap[c])})},_assertCard:function(a){if(!this.layout.isCardExisted(a)){var b=this.options.cardCreator(a);this.cardMap[a]=b,this.layout.addCardByName(a,b)}},mounted:function(){var a=this.options;a.showIndex!==!1&&this.setSelect(a.showIndex)},setSelect:function(a){this.tab&&this.tab.setValue(a),this._assertCard(a),this.layout.showCardByName(a),this._deleteOtherCards(a),this.curr!==a&&(this.curr=a)},removeTab:function(a){var b=this;this.options;BI.any(this.cardMap,function(c,d){if(BI.isEqual(c,a+""))return b.layout.deleteCardByName(c),delete b.cardMap[c],!0})},getSelect:function(){return this.curr},getSelectedTab:function(){return this.layout.getShowingCard()},getTab:function(a){return this._assertCard(a),this.layout.getCardByName(a)},setValue:function(a){var b=this.layout.getShowingCard();b&&b.setValue(a)},getValue:function(){var a=this.layout.getShowingCard();if(a)return a.getValue()},populate:function(){var a=this.layout.getShowingCard();if(a)return a.populate&&a.populate.apply(a,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),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 a=this,b=this.options;this.ele=BI.createWidget(b.el),BI.createWidget(b.layout,{type:"bi.adaptive",element:this,items:[this.ele]}),this.ele.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.ele.setValue(a)},getValue:function(){return this.ele.getValue()},populate:function(){this.ele.populate.apply(this,arguments)}}),BI.shortcut("bi.el",BI.EL),BI.Msg=function(){var a,b,c,d=[];return{alert:function(a,b,c){this._show(!1,a,b,c)},confirm:function(a,b,c){this._show(!0,a,b,c)},prompt:function(a,b,c,d,e){},toast:function(a,b,c){b=b||{},c=c||BI.Widget._renderEngine.createElement("body");var e=b.level||"normal",f=!!BI.isNull(b.autoClose)||b.autoClose,g=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:e,autoClose:f,text:a,listeners:[{eventName:BI.Toast.EVENT_DESTORY,action:function(){BI.remove(d,g.element);var a=10;BI.each(d,function(b,c){c.css({top:a}),a+=c.outerHeight()+10})}}]}),h=10;BI.each(d,function(a,b){h+=b.outerHeight()+10}),BI.createWidget({type:"bi.absolute",element:c,items:[{el:g,left:"50%",top:h}]}),d.push(g.element),g.element.css({"margin-left":-1*g.element.outerWidth()/2}),g.element.removeClass("bi-message-leave").addClass("bi-message-enter"),f&&BI.delay(function(){g.element.removeClass("bi-message-enter").addClass("bi-message-leave"),g.destroy()},5e3)},_show:function(d,e,f,g){b=BI.Widget._renderEngine.createElement('
        ').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=BI.Widget._renderEngine.createElement('
        ').css({position:"absolute",zIndex:BI.zIndex_tip-1,top:0,left:0,right:0,bottom:0}).appendTo("body");var h=function(){a.destroy(),b.remove()},i=[];d===!0&&i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_Cancel"),level:"ignore",handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!1])}}}),i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_OK"),handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!0])}}});var j={element:c,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:e||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(){h(),BI.isFunction(g)&&g.apply(null,[!1])}},width:60}}},height:40},center:{el:{type:"bi.label",vgap:10,hgap:20,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",lgap:10,items:i},top:0,left:20,right:20,bottom:0}]},height:44}},width:450,height:200}]};a=BI.createWidget(j)}}}(),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 a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.GridView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&this._populate()},mounted:function(){var a=this.options;0===a.scrollLeft&&0===a.scrollTop||(this.element.scrollTop(a.scrollTop),this.element.scrollLeft(a.scrollLeft))},_getOverscanIndices:function(a,b,c,d){return{overscanStartIndex:Math.max(0,c-b),overscanStopIndex:Math.min(a-1,d+b)}},_calculateChildrenToRender:function(){var a=this,b=this.options,c=b.width,d=b.height,e=BI.clamp(b.scrollLeft,0,this._getMaxScrollLeft()),f=BI.clamp(b.scrollTop,0,this._getMaxScrollTop()),g=b.overscanColumnCount,h=b.overscanRowCount;if(d>0&&c>0){var i=this._columnSizeAndPositionManager.getVisibleCellRange(c,e),j=this._rowSizeAndPositionManager.getVisibleCellRange(d,f);if(BI.isEmpty(i)||BI.isEmpty(j))return;var k=this._columnSizeAndPositionManager.getOffsetAdjustment(c,e),l=this._rowSizeAndPositionManager.getOffsetAdjustment(d,f);this._renderedColumnStartIndex=i.start,this._renderedColumnStopIndex=i.stop,this._renderedRowStartIndex=j.start,this._renderedRowStopIndex=j.stop;var m=this._getOverscanIndices(this.columnCount,g,this._renderedColumnStartIndex,this._renderedColumnStopIndex),n=this._getOverscanIndices(this.rowCount,h,this._renderedRowStartIndex,this._renderedRowStopIndex),o=m.overscanStartIndex,p=m.overscanStopIndex,q=n.overscanStartIndex,r=n.overscanStopIndex,s=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(q),t=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(o),u=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(r),v=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(p),w=s.offset+l,x=t.offset+k,y=u.offset+l+u.size,z=v.offset+k+v.size;if(w>=this.renderRange.minY&&y<=this.renderRange.maxY&&x>=this.renderRange.minX&&z<=this.renderRange.maxX)return;for(var A=[],B={},C={},D=this._getMaxScrollLeft(),E=this._getMaxScrollTop(),F=0,G=0,H=0,I=q;I<=r;I++)for(var J=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(I),K=o;K<=p;K++){var L,M=I+"-"+K,N=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(K),O=this.renderedKeys[M]&&this.renderedKeys[M][2];O>=0?(N.size!==this.renderedCells[O]._width&&(this.renderedCells[O]._width=N.size,this.renderedCells[O].el.setWidth(N.size)),J.size!==this.renderedCells[O]._height&&(this.renderedCells[O]._height=J.size,this.renderedCells[O].el.setHeight(J.size)),this.renderedCells[O]._left!==N.offset+k&&this.renderedCells[O].el.element.css("left",N.offset+k+"px"),this.renderedCells[O]._top!==J.offset+l&&this.renderedCells[O].el.element.css("top",J.offset+l+"px"),A.push(L=this.renderedCells[O])):(L=BI.createWidget(BI.extend({type:"bi.label",width:N.size,height:J.size},b.items[I][K],{cls:(b.items[I][K].cls||"")+" grid-cell"+(0===I?" first-row":"")+(0===K?" first-col":""),_rowIndex:I,_columnIndex:K,_left:N.offset+k,_top:J.offset+l}),this),A.push({el:L,left:N.offset+k,top:J.offset+l,_left:N.offset+k,_top:J.offset+l,_width:N.size,_height:J.size})),D=Math.min(D,N.offset+k),F=Math.max(F,N.offset+k+N.size),E=Math.min(E,J.offset+l),G=Math.max(G,J.offset+l+J.size),B[M]=[I,K,H],C[H]=L,H++}var P={},Q={},R=[];BI.each(B,function(b,c){a.renderedKeys[b]?P[b]=c:Q[b]=c}),BI.each(this.renderedKeys,function(a,b){P[a]||Q[a]||R.push(b[2])}),BI.each(R,function(b,c){a.renderedCells[c].el._destroy()});var S=[];BI.each(Q,function(a,b){S.push(A[b[2]])}),this.container.addItems(S,this),this.container._children=C,this.container.attr("items",A),this.renderedCells=A,this.renderedKeys=B,this.renderRange={minX:D,minY:E,maxX:F,maxY:G}}},_getRealMaxScrollLeft:function(){var a=this.options,b=0;return BI.count(0,this.columnCount,function(c){b+=a.columnWidthGetter(c)}),Math.max(0,b-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(a){var b=this.options;this._reRange(),this.columnCount=0,this.rowCount=0,a&&a!==this.options.items&&(this.options.items=a),BI.isNumber(b.columnCount)?this.columnCount=b.columnCount:b.items.length>0&&(this.columnCount=b.items[0].length),BI.isNumber(b.rowCount)?this.rowCount=b.rowCount:this.rowCount=b.items.length,this.container.setWidth(this.columnCount*b.estimatedColumnSize),this.container.setHeight(this.rowCount*b.estimatedRowSize),this._columnSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.columnCount,b.columnWidthGetter,b.estimatedColumnSize),this._rowSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.rowCount,b.rowHeightGetter,b.estimatedRowSize),this._calculateChildrenToRender();try{this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)}catch(c){}},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getRealMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setColumnCount:function(a){this.options.columnCount=a},setRowCount:function(a){this.options.rowCount=a},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"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(a){this.options.estimatedColumnSize=a},setEstimatedRowSize:function(a){this.options.estimatedRowSize=a},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.GridView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_view",BI.GridView),BI.Popover=BI.inherit(BI.Widget,{_constant:{SIZE:{SMALL:"small",NORMAL:"normal",BIG:"big"},HEADER_HEIGHT:40},_defaultConfig:function(){return BI.extend(BI.Popover.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-popover bi-card",size:"normal",logic:{dynamic:!1},header:null,body:null,footer:null,closable:!0})},render:function(){var a=this,b=this.options;this.startX=0,this.startY=0,this.tracker=new BI.MouseMoveTracker(function(b,c){var d=(a._calculateSize(),BI.Widget._renderEngine.createElement("body").width()),e=BI.Widget._renderEngine.createElement("body").height();a.startX+=b,a.startY+=c,a.element.css({left:BI.clamp(a.startX,0,d-a.element.width())+"px",top:BI.clamp(a.startY,0,e-a.element.height())+"px"}),BI.Resizers._resize()},function(){a.tracker.releaseMouseMoves()},_global);var c=[{el:{type:"bi.htape",cls:"bi-message-title bi-header-background",ref:function(b){a.dragger=b},items:[{type:"bi.absolute",items:[{el:BI.isPlainObject(b.header)?BI.createWidget(b.header,{extraCls:"bi-font-bold"}):{type:"bi.label",cls:"bi-font-bold",height:this._constant.HEADER_HEIGHT,text:b.header,textAlign:"left"},left:20,top:0,right:0,bottom:0}]},{el:b.closable?{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){a.close()}}:{type:"bi.layout"},width:56}],height:this._constant.HEADER_HEIGHT},height:this._constant.HEADER_HEIGHT},{el:b.logic.dynamic?{type:"bi.vertical",scrolly:!1,cls:"popover-body",ref:function(){a.body=this},hgap:20,tgap:10,items:[{el:BI.createWidget(b.body)}]}:{type:"bi.absolute",items:[{el:BI.createWidget(b.body),left:20,top:10,right:20,bottom:0}]}}];b.footer&&c.push({el:{type:"bi.absolute",items:[{el:BI.createWidget(b.footer),left:20,top:0,right:20,bottom:0}],height:44},height:44});var d=this._calculateSize();return BI.extend({type:b.logic.dynamic?"bi.vertical":"bi.vtape",items:c,width:d.width},b.logic.dynamic?{type:"bi.vertical",scrolly:!1}:{type:"bi.vtape",height:d.height})},mounted:function(){var a=this,b=this.options;if(this.dragger.element.mousedown(function(b){var c=a.element.offset();a.startX=c.left,a.startY=c.top,a.tracker.captureMouseMoves(b)}),b.logic.dynamic){var c=this._calculateSize(),d=this.element.height(),e=BI.clamp(d,c.height,600)-(b.footer?84:44);this.body.element.height(e)}},_calculateSize:function(){var a=this.options,b={};if(BI.isNotNull(a.size))switch(a.size){case this._constant.SIZE.SMALL:b.width=450,b.height=200;break;case this._constant.SIZE.BIG:b.width=900,b.height=500;break;default:b.width=550,b.height=500}return{width:a.width||b.width,height:a.height||b.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(a){this.element.css({"z-index":a})},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.i18nText("BI-Basic_Sure")),BI.i18nText(BI.i18nText("BI-Basic_Cancel"))]})},beforeCreate:function(){var a=this,b=this.options;b.footer||(b.footer={type:"bi.right_vertical_adapt",lgap:10,items:[{type:"bi.button",text:this.options.btns[1],value:1,level:"ignore",handler:function(b){a.fireEvent(BI.Popover.EVENT_CANCEL,b),a.close(b)}},{type:"bi.button",text:this.options.btns[0],warningTitle:b.warningTitle,value:0,handler:function(b){a.fireEvent(BI.Popover.EVENT_CONFIRM,b),a.close(b)}}]})}}),BI.shortcut("bi.bar_popover",BI.BarPopover),BI.Popover.EVENT_CLOSE="EVENT_CLOSE",BI.Popover.EVENT_OPEN="EVENT_OPEN",BI.Popover.EVENT_CANCEL="EVENT_CANCEL",BI.Popover.EVENT_CONFIRM="EVENT_CONFIRM",BI.PopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PopupView.superclass._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 a=this,b=this.options,c=function(a){a.stopPropagation()},d=function(a){return a.stopEvent(),!1};this.element.css({"z-index":BI.zIndex_popup,"min-width":b.minWidth+"px","max-width":b.maxWidth+"px"}).bind({click:c}),this.element.bind("mousewheel",c),b.stopPropagation&&this.element.bind({mousedown:c,mouseup:c,mouseover:c}),b.stopEvent&&this.element.bind({mousedown:d,mouseup:d,mouseover:d}),this.tool=this._createTool(),this.tab=this._createTab(),this.view=this._createView(),this.toolbar=this._createToolBar(),this.view.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.PopupView.EVENT_CHANGE)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{scrolly:!1,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap,items:BI.LogicFactory.createLogicItemsByDirection(b.direction,BI.extend({cls:"list-view-outer bi-card list-view-shadow"},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tool,this.tab,this.view,this.toolbar)}))))}))))},_createView:function(){var a=this.options;return this.button_group=BI.createWidget(a.el,{type:"bi.button_group",value:a.value}),this.button_group.element.css({"min-height":a.minHeight+"px","padding-top":a.innerVGap+"px","padding-bottom":a.innerVGap+"px"}),this.button_group},_createTool:function(){var a=this.options;if(!1!==a.tool)return BI.createWidget(a.tool)},_createTab:function(){var a=this.options;if(0!==a.tabs.length)return BI.createWidget({type:"bi.center",cls:"list-view-tab",height:25,items:a.tabs,value:a.value})},_createToolBar:function(){var a=this.options;if(0!==a.buttons.length)return BI.createWidget({type:"bi.center",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.view},populate:function(a){this.view.populate.apply(this.view,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||24:0,c=this.tab?this.tab.attr("height")||24:0,d=(this.tool&&this.tool.attr("height")||24)*(this.tool&&this.tool.isVisible()?1:0),e=a-b-c-d-2*this.options.innerVGap;this.view.resetHeight?this.view.resetHeight(e):this.view.element.css({"max-height":e+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.view.setValue(a)},getValue:function(){return this.view.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView),BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.matcher=BI.createWidget(b.matcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:b.value}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),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(b.searcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:b.value}),this.searcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.matcher,this.spliter,this.searcher]})},startSearch:function(){},stopSearch:function(){},setValue:function(a){this.matcher.setValue(a),this.searcher.setValue(a)},getValue:function(){return this.matcher.getValue().concat(this.searcher.getValue())},populate:function(a,b,c){a||(a=[]),b||(b=[]),this.setTipVisible(a.length+b.length===0),this.spliter.setVisible(BI.isNotEmptyArray(b)&&BI.isNotEmptyArray(a)),this.matcher.populate(b,c),this.searcher.populate(a,c)},empty:function(){this.searcher.empty(),this.matcher.empty()},hasMatched:function(){return this.matcher.getAllButtons().length>0}}),BI.SearcherView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.searcher_view",BI.SearcherView),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 a=this,b=this.options;return{type:"bi.vertical",items:[BI.extend({type:"bi.vertical",scrolly:!1,ref:function(){a.container=this}},b.el)],element:this}},mounted:function(){var a=this,b=this.options;this._populate(),this.element.scroll(function(c){b.scrollTop=a.element.scrollTop(),a._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){a._calculateBlocksToRender()})},_renderMoreIf:function(){for(var a,b=this,c=this.options,d=this.element.height(),e=c.scrollTop+d+c.overscanHeight,f=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+c.blockSize||0,g=this.renderedIndex+1,h=function(){return b.container.element.height()};(a=h())e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.Pager.superclass.attr.apply(this,arguments),"curr"===a&&(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),BI.A=BI.inherit(BI.Text,{_defaultConfig:function(){var a=BI.A.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-a display-block",href:"",target:"_blank",el:null,tagName:"a"})},_init:function(){var a=this.options;BI.A.superclass._init.apply(this,arguments),this.element.attr({href:a.href,target:a.target}),a.el&&BI.createWidget(a.el,{element:this})}}),BI.shortcut("bi.a",BI.A),BI.LoadingBar=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.LoadingBar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-loading-bar bi-tips",height:30,handler:BI.emptyFn})},_init:function(){BI.LoadingBar.superclass._init.apply(this,arguments);var a=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(b){a.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 b=BI.createWidget({type:"bi.center_adapt",items:[this.loaded]}),c=BI.createWidget({type:"bi.center_adapt",items:[this.loading]});this.cardLayout=BI.createWidget({type:"bi.card",element:this,items:[{el:b,cardName:"loaded"},{el:c,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),BI.IconButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-icon-button horizon-center",iconWidth:null,iconHeight:null})},_init:function(){BI.IconButton.superclass._init.apply(this,arguments);var a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.ImageButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ImageButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-button",src:"",iconWidth:"100%",iconHeight:"100%"})},_init:function(){BI.ImageButton.superclass._init.apply(this,arguments);var a=this.options;this.image=BI.createWidget({type:"bi.img",width:a.iconWidth,height:a.iconHeight,src:a.src}),BI.isNumber(a.iconWidth)||BI.isNumber(a.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(a){BI.ImageButton.superclass.setWidth.apply(this,arguments),this.options.width=a},setHeight:function(a){BI.ImageButton.superclass.setHeight.apply(this,arguments),this.options.height=a},setImageWidth:function(a){this.image.setWidth(a)},setImageHeight:function(a){this.image.setHeight(a)},getImageWidth:function(){return this.image.element.width()},getImageHeight:function(){return this.image.element.height()},setSrc:function(a){this.options.src=a,this.image.setSrc(a)},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),BI.Button=BI.inherit(BI.BasicButton,{_defaultConfig:function(a){var b=BI.Button.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{baseCls:(b.baseCls||"")+" bi-button"+(BI.isIE()&&BI.isIE9Below()?" hack":""),minWidth:a.block===!0||a.clear===!0?0:80,height:24,shadow:a.clear!==!0,isShadowShowingOnSelected:!0,readonly:!0,iconCls:"",level:"common",block:!1,clear:!1,ghost:!1,textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:a.clear?0:10,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},_init:function(){BI.Button.superclass._init.apply(this,arguments);var a=this.options;!BI.isNumber(a.height)||a.clear||a.block?a.clear||a.block?this.element.css({lineHeight:a.height+"px"}):this.element.css({lineHeight:a.height-2+"px"}):this.element.css({height:a.height+"px",lineHeight:a.height-2+"px"}),BI.isKey(a.iconCls)?(this.icon=BI.createWidget({type:"bi.icon_label",cls:a.iconCls,width:18,height:a.height-2,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value,height:a.height-2}),BI.createWidget({type:"bi.center_adapt",element:this,hgap:a.hgap,vgap:a.vgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,element:this,text:a.text,value:a.value}),a.block===!0&&this.element.addClass("block"),a.clear===!0&&this.element.addClass("clear"),a.ghost===!0&&this.element.addClass("ghost"),a.minWidth>0&&this.element.css({"min-width":a.minWidth+"px"})},doClick:function(){BI.Button.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Button.EVENT_CHANGE,this)},setText:function(a){BI.Button.superclass.setText.apply(this,arguments),this.text.setText(a)},setValue:function(a){BI.Button.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},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",BI.TextButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-button",textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:0,lgap:0,rgap:0,text:"",py:""})},_init:function(){BI.TextButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,width:a.width,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.rgap,text:a.text,value:a.value,py:a.py,keyword:a.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(a){BI.TextButton.superclass.setText.apply(this,arguments),a=BI.isArray(a)?a.join(","):a,this.text.setText(a)},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.TextButton.superclass.setValue.apply(this,arguments),this.isReadOnly()||(a=BI.isArray(a)?a.join(","):a,this.text.setValue(a))}}),BI.TextButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_button",BI.TextButton),BI.BlankIconIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=(this._const,BI.createWidget({type:"bi.layout",width:a.blankWidth,height:a.height}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,forceNotSelected:!0,width:a.height,height:a.height}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,forceNotSelected:!0,width:a.height,height:a.height}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,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(a){BI.BlankIconIconTextItem.superclass.setSelected.apply(this,arguments),this.icon1.setSelected(a),this.icon2.setSelected(a)},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),BI.BlankIconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.layout",width:a.blankWidth},b,this.text,{type:"bi.layout",width:a.height})}))))},doClick:function(){BI.BlankIconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.BlankIconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_icon_item",BI.BlankIconTextIconItem),BI.BlankIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=(this._const,BI.createWidget({type:"bi.layout",width:a.blankWidth}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.icon,this.text)}))))},doClick:function(){BI.BlankIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_item",BI.BlankIconTextItem),BI.IconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.leftIconWrapperWidth,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.rightIconWrapperWidth,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.iconWrapperWidth||a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.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),BI.TextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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), -BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height,height:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"",root:!0,value:b.value,watermark:b.watermark,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,height:b.height-2*(b.vgap+b.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}}),this.watermark.element.bind("click",function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}));var c=[];this.watermark&&c.push({el:this.watermark,left:3,right:3,top:0,bottom:0}),c.push({el:this.editor,left:0,right:0,top:0,bottom:0});var d=[{el:{type:"bi.absolute",items:c},left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:d}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){a._checkError(),a.element.addClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){a._setErrorVisible(!1),a.element.removeClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){a.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){a.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(b){b.keyCode!==BI.KeyCode.TAB&&a.watermark&&a.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){a._checkWaterMark(),a._setErrorVisible(!1),a.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_ERROR,arguments),a._setErrorVisible(a.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){a._checkWaterMark();var b=a._setErrorVisible(!0);b&&b.element.fadeOut(100,function(){b.element.fadeIn(100)}),a.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){a.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){a.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){a.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){a.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){a.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){a.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){a.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM,arguments)}),this.element.click(function(a){return a.stopPropagation(),!1}),BI.isKey(this.options.value)||BI.isEmptyString(this.options.value)?(this._checkError(),this._checkWaterMark()):this._checkWaterMark()},_checkToolTip:function(){var a=this.options,b=a.errorText;BI.isFunction(b)&&(b=b(this.editor.getValue())),BI.isKey(b)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(b))},_checkError:function(){this._setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(a){this.options.errorText=a},getErrorText:function(){return this.options.errorText},_setErrorVisible:function(a){var b=this.options,c=b.errorText;if(BI.isFunction(c)&&(c=c(BI.trim(this.editor.getValue()))),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,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(a){this.editor.onKeyDown(a)},setValue:function(a){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(a),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),BI.MultifileEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var a=this,b=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:b.name,url:b.url,multiple:b.multiple,accept:b.accept,maxSize:b.maxSize,title:b.title}),this.file.on(BI.File.EVENT_CHANGE,function(){a.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments)}),this.file.on(BI.File.EVENT_ERROR,function(){a.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){a.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){a.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),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},render:function(){var a=this.options,b=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:10,top:4,bottom:8}]}),this.content.element.on("input propertychange",function(a){b._checkWaterMark(),b.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){b.isValid()&&(b._focus(),b.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),BI.Widget._renderEngine.createElement(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&(BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&this.setValue(a.value),BI.isNotNull(a.style)&&this.setStyle(a.style),this._checkWaterMark()},_checkWaterMark:function(){var a=this,b=this.options,c=this.getValue();BI.isNotEmptyString(c)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(b.watermark)&&(this.watermark?(this.watermark.setText(b.watermark),this.watermark.setValid(!b.invalid),this.watermark.setEnable(!b.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark cursor-default",textAlign:"left",height:20,text:b.watermark,invalid:b.invalid,disabled:b.disabled}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){a.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:4,top:4,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(a){this.content.element.val(a),this._checkWaterMark()},setStyle:function(a){this.style=a,this.element.css(a),this.content.element.css(BI.extend({},a,{color:a.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(a.backgroundColor)?BI.DOM.rgb2hex(a.backgroundColor):a.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(a){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)},_setEnable:function(a){BI.TextAreaEditor.superclass._setEnable.apply(this,[a]),this.content&&(this.content.element[0].disabled=!a)}}),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),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(b.text)?this.setText(b.text):BI.isKey(b.value)&&this.setText(b.value),b.highLight&&this.doHighLight()},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Html.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){BI.Html.superclass.setText.apply(this,arguments),this.options.text=a,this.text.element.html(a)}}),BI.shortcut("bi.html",BI.Html),BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"i",baseCls:(a.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),BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"iframe",baseCls:(a.baseCls||"")+" bi-iframe",src:"",name:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.frameborder="0",a.attributes.src=a.src,a.attributes.name=a.name,BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src},setName:function(a){this.options.name=a,this.element.attr("name",a)},getName:function(){return this.options.name}}),BI.shortcut("bi.iframe",BI.Iframe),BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"img",baseCls:(a.baseCls||"")+" bi-img display-block",src:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.src=a.src,BI.Img.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img),BI.ImageCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageCheckbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})}}),BI.ImageCheckbox.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_checkbox",BI.ImageCheckbox),BI.Checkbox=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-checkbox",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16},render:function(){var a=this,b=this.options;return{type:"bi.center_adapt",items:[{type:"bi.default",ref:function(b){a.checkbox=b},cls:"checkbox-content",width:b.iconWidth-2,height:b.iconHeight-2}]}},_setEnable:function(a){BI.Checkbox.superclass._setEnable.apply(this,arguments),a===!0?this.checkbox.element.removeClass("base-disabled disabled"):this.checkbox.element.addClass("base-disabled disabled")},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)},setSelected:function(a){BI.Checkbox.superclass.setSelected.apply(this,arguments),a?this.checkbox.element.addClass("bi-high-light-background"):this.checkbox.element.removeClass("bi-high-light-background")}}),BI.Checkbox.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox),function(document){var F=function(a){return function(b){var c=b.files||[b];return c.item||(c.item=a),c}}(function(a){return this[a]}),event={add:document.addEventListener?function(a,b,c){return a.addEventListener(b,c,!1),this}:function(a,b,c){return a.attachEvent("on"+b,c),this},del:document.removeEventListener?function(a,b,c){return a.removeEventListener(b,c,!1),this}:function(a,b,c){return a.detachEvent("on"+b,c),this},stop:function(a){return a?(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,a.preventDefault?a.preventDefault():a.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(a,b,c){return"--".concat(a,CRLF,'Content-Disposition: form-data; name="',b,'"; filename="',_global.encodeURIComponent(c.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,c.getAsBinary(),CRLF,"--",a,"--",CRLF)},isFunction=function(a){return"[object Function]"===toString.call(a)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(a,b,c,d){if(-1'),iframe=handler.iframe||(handler.iframe=document.createElement(''))}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(a){isFunction(handler.onerror)&&handler.onerror(rpe,a||_global.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loadedc.status||c.status>399?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void a.fireEvent(BI.File.EVENT_ERROR)):void a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url,c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d0&&b.fireEvent(BI.File.EVENT_CHANGE,{files:a.files}),c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){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(a){this.wrap&&this.wrap.upload(a); -},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(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?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||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=!1,c=null,d=!1,e=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),f=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){d=!1,b=e.ctrlKey||e.metaKey,c=e.keyCode,a.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(b){c=null,d&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,e(b.keyCode))}).on("input propertychange",function(b){var f=b.originalEvent;(BI.isNull(f.propertyName)||"value"===f.propertyName)&&(c=null,d=!0,a._keydown_=!0,e(c))}).click(function(a){a.stopPropagation(),f()}).mousedown(function(b){a.element.val(a.element.val())}).focus(function(b){a._focusDebounce()}).focusout(function(b){a._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(){function a(){if(b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()){var a=b._lastValidValue;b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM),b._lastValidValue!==a&&b.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){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)&&(this._pause!==!0||/(\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))),a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN),BI.isEndWithBlank(this.getValue())&&BI.trim(this.getValue())===BI.trim(this._lastValue||"")?(this._pause=!0,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.PAUSE,"",this),this.fireEvent(BI.Input.EVENT_PAUSE),this._defaultState()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===this._lastValue||""===BI.trim(this._lastValue)?this._valueChange():(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_STOP),this._valueChange())},_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 a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastChangedValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(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(a){this.element.val(a),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(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),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),BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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),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 a=this,b=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(b){a.radio=b},width:b.iconWidth,height:b.iconHeight}]}},_setEnable:function(a){BI.Radio.superclass._setEnable.apply(this,arguments),a===!0?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(a){BI.Radio.superclass.setSelected.apply(this,arguments),a?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),BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(a){var b=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{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 a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();return b.textAlign="left",BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:"bi.center_adapt",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,maxWidth:"100%"}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(b,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var a=this.options,b="right"===a.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",c=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:b,height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(c)}]}):void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})),void("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}))):(c.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(c,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(c,{maxWidth:"100%"})),void BI.createWidget({type:b,element:this,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(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}}),BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var a=this.options;return{type:"bi.html",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel),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 a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.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),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),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 a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var a=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+a.level,text:a.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(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),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 a=this,b=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+b.level);var c=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:c,mousedown:c,mouseup:c,mouseover:c,mouseenter:c,mouseleave:c,mousemove:c});var d="close-font";switch(b.level){case"success":d="toast-success-font";break;case"error":d="toast-error-font";break;case"warning":d="toast-warning-font";break;case"normal":default:d="toast-message-font"}var e=[{type:"bi.icon_label",cls:d+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,textHeight:16,textAlign:"left"},rgap:b.autoClose?this._const.hgap:0}],f=[36,""];b.autoClose===!1&&(e.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){a.destroy()},width:36}),f.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:e,vgap:7,columnSize:f})},setText:function(a){this.text.setText(a)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:18})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,height:a.height,textHeight:a.height-2,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{value:e.value},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])},value:c.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},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(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),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(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;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;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(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=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("")},makeDOMNodeMainBefore:function(a,b,c){a.push("
      • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
          "),c.push(d),c.push("
        ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={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"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0};return d},getTreeCheckedNodes:function(a,b,c,d){if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f=a.check.chkboxType,g=""===f.Y&&""===f.N;fullStyle="",b.chkDisabled===!0?fullStyle=d.DISABLED:b.halfCheck?fullStyle=d.PART:a.check.chkStyle==e.STYLE?fullStyle=b.check_Child_State<1?d.FULL:d.PART:fullStyle=b[c]?2===b.check_Child_State||b.check_Child_State===-1||g?d.FULL:d.PART:b.check_Child_State<1||g?d.FULL:d.PART;var h=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+fullStyle;return h=b.check_Focus&&b.chkDisabled!==!0?h+"_"+d.FOCUS:h,t.className.BUTTON+" "+d.DEFAULT+" "+h},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconCls,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconCls!==a&&(this.element.removeClass(b.iconCls).addClass(a),b.iconCls=a)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=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:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:b.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(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),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 a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconCls,once:b.once,iconWrapperWidth:b.iconWrapperWidth,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},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),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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,title:a.title||a.text,warningTitle:a.warningTitle,py:a.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(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 a=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:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var c=BI.createWidget({type:"bi.icon_label",width:24,cls:b.iconCls,iconWidth:b.iconWidth,iconHeight:b.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},{width:24,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},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(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,cls:"bi-list-item-none",id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.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(a){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=a?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),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),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 a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:24,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},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},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),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 a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.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),BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:b.text,value:b.value,ref:function(){a.text=this}},left:b.lgap,right:b.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(a){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(a)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=BI.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=BI.Date._MD.slice(0);i[1]=BI.isLeapYear(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay();var j=(7-BI.StartOfWeek+e.FDay)%7;e.PDay=i[0===b?11:b-1]-j+1,e.NDay=1;var k=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=j&&a=0?c%12:(12+c%12)%12;return{year:BI.getDate().getFullYear()+d,month:e+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[],e=BI.parseDateTime(b.min,"%Y-%X-%d"),f=BI.parseDateTime(b.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var b={};BI.checkDateVoid(c+a,1,1,BI.print(BI.getDate(e.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(f.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(b.disabled=!0),b.text=c+a,d.push(b)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=BI.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=BI.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(a){var b=BI.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?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),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(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),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(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),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 a=this,b=this.options;this.editor=BI.createWidget(b.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.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(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:""})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:b.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(b){a.trigger=b},width:b.width,height:b.height},b.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(b){a.colorPicker=b},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){c(),a._isRGBColor(a.colorPicker.getValue())||a.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){c(),a.combo.hideView()}}]},b.popup),stopPropagation:!0,width:230},value:b.value});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var a=this,b=this.options;this.colorEditor=BI.createWidget(b.editor,{type:b.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:b.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a._dealStoreColors(),a.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:b.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:b.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:b.editor});var c=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:c}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),c.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a._dealStoreColors(),a.more.hideView(),a.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:!b.disabled,ref:function(){a.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_setEnable:function(a){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!a)},_dealStoreColors:function(){var a=this.getValue(),b=this._getStoreColors(),c=new BI.Queue(8);c.fromArray(b),c.remove(a),c.unshift(a);var d=c.toArray();BI.Cache.setItem("colors",BI.array2String(d)),this.setStoreColors(d)},_digestStoreColors:function(a){var b=BI.map(a,function(a,b){return{value:b}});return BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),b},_getStoreColors:function(){var a=this,b=this.options,c=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(c,function(c,d){return!b.simple||a._isRGBColor(d)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},setStoreColors:function(a){BI.isArray(a)&&this.storeColors.populate([this._digestStoreColors(a)])},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},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),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 a=this,b=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:b.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(a){this.popup.setStoreColors(a)},setValue:function(a){this.popup.setValue(a)},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),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:b.container,value:b.value,width:b.width,height:b.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_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 a=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:a,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var a=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(b){a.changeIcon=b},iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(b){a.label=b},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var b=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:b,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?(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"===a?(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":a}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),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:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{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 a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:b.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),d(a.storeValue.r)&&d(a.storeValue.g)&&d(a.storeValue.b)&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[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()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#ffffff"),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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()?(a.lastColor=a.getValue(),a.setValue("transparent")):("transparent"===a.lastColor&&(a.lastColor=""),a.setValue(a.lastColor||"#ffffff")),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){""===a?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===a?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":a}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(a){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){if("transparent"===a)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:""});a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.storeValue={r:BI.isNull(b.r)?"":b.r,g:BI.isNull(b.r)?"":b.g,b:BI.isNull(b.r)?"":b.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),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){this.colorShow.element.css({"background-color":a});var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.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),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 a=this; -return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(b){a.colorWrapper=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(b){a.wheel=b}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(b){a.overlay=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.hMarker=b},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.slMarker=b},scrollable:!1,width:17,height:17}}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this.setValue(a.value)},_unpack:function(a){return 7===a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4===a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},_pack:function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},_setColor:function(a){var b=this._unpack(a);this.value!==a&&b&&(this.value=a,this.rgb=b,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(a){return this.hsl=a,this.rgb=this._HSLToRGB(a),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this._hueToRGB(b,c,d+.33333),this._hueToRGB(b,c,d),this._hueToRGB(b,c,d-.33333)]},_hueToRGB:function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},_RGBToHSL:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},_updateDisplay:function(){var a=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(a)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(a)*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(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var c=this._absolutePosition(a.offsetParent);b.x+=c.x,b.y+=c.y}return b},_widgetCoords:function(a){var b,c,d=a.target||a.srcElement,e=this.wheel.element[0];if("undefined"!=typeof a.offsetX){for(var f={x:a.offsetX,y:a.offsetY},g=d;g;)g.mouseX=f.x,g.mouseY=f.y,f.x+=g.offsetLeft,f.y+=g.offsetTop,g=g.offsetParent;for(var g=e,h={x:0,y:0};g;){if("undefined"!=typeof g.mouseX){b=g.mouseX-h.x,c=g.mouseY-h.y;break}h.x+=g.offsetLeft,h.y+=g.offsetTop,g=g.offsetParent}for(g=d;g;)g.mouseX=void 0,g.mouseY=void 0,g=g.offsetParent}else{var f=this._absolutePosition(e);b=(a.pageX||0)-f.x,c=(a.pageY||0)-f.y}return{x:b-this.constants.WIDTH/2,y:c-this.constants.WIDTH/2}},_doMouseMove:function(a){var b=this._widgetCoords(a);if(this.circleDrag){var c=Math.atan2(b.x,-b.y)/6.28;c<0&&(c+=1),this._setHSL([c,this.hsl[1],this.hsl[2]])}else{var d=Math.max(0,Math.min(1,-(b.x/this.constants.SQUARE)+.5)),e=Math.max(0,Math.min(1,-(b.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],d,e])}},doClick:function(a){var b=this._widgetCoords(a);return this.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>this.constants.SQUARE,this._doMouseMove(a),!1},setValue:function(a){this._setColor(a)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,container:b.container,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.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),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.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 a=this.options,b=this,c=[];return BI.each(a.buttons,function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:24,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:c}]})},_createView:function(){var a=this.options,b=BI.createWidget({type:"bi.button_group",items:[a.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return b.element.css("min-height",a.minHeight-44),b}}),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,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var a=this,b=this.options,c=BI.map(b.buttons,function(b,c){return BI.isWidget(c)?c:BI.extend({type:"bi.button",height:24,handler:function(b){a.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,b)}},c)});return{type:"bi.bubble_bar_popup_view",ref:function(){a.popup=this},el:{type:"bi.label",text:b.text,whiteSpace:"normal",textAlign:"left",ref:function(){a.text=this}},buttons:c}},populate:function(a){this.text.setText(a||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,value:b.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),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 a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconCls:b.iconCls,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,value:b.value}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),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 a=this.options,b="";BI.isKey(a.value)&&(b=this._digest(a.value,a.items)),this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b,disableSelected:!0,width:a.isShowDown?a.width-12:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight,selected:BI.isNotEmptyString(b)}),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(b)}),this.down.setVisible(a.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(a,b){var c="";return a=BI.isArray(a)?a[0]:a,BI.any(b,function(b,d){if(a===d.value)return c=d.iconCls,!0}),c},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c=this._digest(a,this.options.items);a=BI.isArray(a)?a[0]:a,BI.isNotEmptyString(c)?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:b.items,height:b.height,text:b.text,iconCls:b.iconCls,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth,title:b.title,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this.setValue(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:a.behaviors,value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a,b){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var c=this.options;a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:c.iconWrapperWidth,iconHeight:c.iconHeight,iconWidth:c.iconWidth}),this.popup.populate(a,b)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),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 a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,adjustLength:2,toggle:!1,ref:function(){a.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){a.trigger=this},items:b.items,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:b.value,items:b.items,ref:function(){a.popup=this,a.trigger.getSearcher().setAdapter(a.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:252},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){a.triggerBtn=this},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this._checkError(a.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.options.items=a,this.combo.populate(a)},setValue:function(a){this.combo.setValue(a),this._checkError(a)},getValue:function(){var a=this.combo.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo),BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var a=this,b=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){a.popup=this},items:BI.createItems(b.items,{type:"bi.single_select_item",textAlign:b.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,c,d)}}]}]}},mounted:function(){this.check()},populate:function(a,b,c){var d=BI.concat(a,b);BI.SearchTextValueComboPopup.superclass.populate.apply(this,d),d=BI.createItems(d,{type:"bi.single_select_item",height:24}),this.popup.populate(d,c)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup),BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value,b.items),value:b.value,height:b.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(a,c){var d=a.keyword,e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g,f)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(a){this.editor.setState(a)},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this._setState(this._digest(a,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),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,value:b.value,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this._checkError(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){ -this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),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 a=this,b=this.options;this._createValueMap();var c;BI.isNotNull(b.value)&&(c=this._digest(b.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:b.height,items:b.items,text:b.text,value:c}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,value:BI.isNull(c)?[]:[c],items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var b=a.combo.getValue()[0].value;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var b=a.combo.getValue()[0].childValue;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},_digest:function(a){return this.value=a,this.valueMap[a]},setValue:function(a){a=this._digest(a),this.combo.setValue([a]),this.trigger.setValue(a)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text,value:BI.isNull(a.value)?"":a.value.childValue||a.value.value})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a.childValue||a.value)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker,value:b.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(b.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:b.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]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.text.setStyle(a)},setValue:function(a){var b=this.options;this.editor.setValue(a),this._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(a.keyword)&&this.text.doRedMark(a.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text tip-text-style",textAlign:"left",height:b.height,text:b.text,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")},title:BI.isNotNull(b.tipText)?b.tipText:function(){var b="";return BI.isString(a.stateValue)&&(b=a.stateValue),BI.isArray(a.stateValue)&&1===a.stateValue.length&&(b=a.stateValue[0]),b},warningTitle:b.warningTitle,tipType:b.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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.options.disabled===!1&&(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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=a,BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text"))))},setTipType:function(a){this.text.options.tipType=a}}),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),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text",textAlign:"left",text:b.text,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")), -this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),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),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(c,{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(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.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:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded(),a.check()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.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(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{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(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 a=this,b=this.options;return[{type:"bi.label",text:b.text,height:b.height,value:b.value,hgap:b.hgap,ref:function(){a.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){a.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(a){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),a?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var a=this,b=this.options;return{type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.linear_segment_button",height:b.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){a.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.buttonGroup=this}}},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),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 a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(b.value)&&this.setValue(b.value)},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.allSelected=!!a,this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{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(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"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(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),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:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1),this.setPagerVisible(a>1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate(),this.setPagerVisible(this.options.pages>1)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),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 a=this.options;a.vertical,a.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 a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev column-pre-page-h-font"},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 direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev row-pre-page-h-font"},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 direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},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(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[86,110,0,24],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),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),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 a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:a.height,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:b.value,items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},_setEnable:function(a){BI.Segment.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(a){return a.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.selected===!0,d=!b.selected&&b.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())},selected:c,invisible:d}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)},invisible:c||!d}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:b.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(a){this.checkbox.setSelected(!!a)},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this.halfSelected=!!a,a===!0?(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(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(b),!b&&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),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(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};BI.isKey(f.id)||(f.id=BI.UUID()),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.mid_plus_group_node",e===a.length-1&&(g.type="bi.last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a,b){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a,b)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),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(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),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(){function a(a,b){return!1}function b(a,b){return b.isLeaf?{}:{color:"#999999"}}var c={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:b},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return c},_dealWidthNodes:function(a){a=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),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 a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate(),BI.isNotNull(b.value)&&this.setValue(b.value)},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},_digest:function(a){a||(a=[]);var b=this,c={},d=[];return BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),BI.makeObject(a.concat(d))},setValue:function(a){this.tree.setValue(this._digest(a))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,title:function(){return a.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:b.triggerWidth||b.height},width:b.triggerWidth||b.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:24})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(b){a.wrapper=b},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.iconWrapperWidth||b.height},{el:this.text,lgap:BI.isEmptyString(b.iconCls)?5:0},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a)},setIcon:function(a){var b=this.options;this.icon.setIcon(a);var c=this.wrapper.attr("items")[0],d=this.wrapper.attr("items")[1];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,d.lgap=5,this.wrapper.resize()):c.width!==(b.iconWrapperWidth||b.height)&&(c.width=b.iconWrapperWidth||b.height,d.lgap=0,this.wrapper.resize())},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),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 a=this.options,b=this._digist(a.value,a.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:b.text,iconCls:b.iconCls,height:a.height,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth})},_digist:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d,e=BI.Tree.transformToArrayFormat(b);return BI.any(e,function(b,c){if(BI.deepContains(a,c.value))return d={text:c.text||c.value,iconCls:c.iconCls},!0}),BI.isNotNull(d)?{text:d.text,iconCls:d.iconCls}:{text:c.text,iconCls:c.iconCls}},setValue:function(a){var b=this._digist(a,this.options.items);this.trigger.setText(b.text),this.trigger.setIcon(b.iconCls)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text,title:function(){return a.text.getText()},tipType:b.tipType,warningTitle:b.warningTitle,hgap:c.hgap,readonly:b.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setText:function(a){this.text.setText(a)},setTipType:function(a){this.text.options.tipType=a}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),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 a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height,readonly:a.readonly,text:this._digest(a.value,a.items),tipType:a.tipType,warningTitle:a.warningTitle})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},setTipType:function(a){this.trigger.setTipType(a)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),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 a=this.options,b=this._digest(a.text,a.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2,text:b.text,cls:b.cls})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?{cls:"",text:d.join(",")}:{cls:"bi-water-mark",text:c.text}},setValue:function(a){var b=this._digest(a,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(b.cls),this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:a.triggerWidth||a.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:a.triggerWidth||a.height}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:b.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(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:b.behaviors,min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=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===a._month?a.setValue({year:a.year.getValue()-1,month:12}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._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===a._month?a.setValue({year:a.year.getValue()+1,month:1}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:b.behaviors,min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:b.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.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 a=this.options,b=!(1===this._month&&this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(12===this._month&&this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=BI.parseInt(a.year),this._month=BI.parseInt(a.month),this.year.setValue(a.year),this.month.setValue(a.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),BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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(){a.setValue(a.year.getValue()-1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._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(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,behaviors:b.behaviors,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.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:{type:"bi.horizontal_float",width:50,items:[{el:this.year}]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:1});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.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(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.calendar,left:5,right:5},{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),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(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear();var c=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),d=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:[c,d]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();c.setEnable(!b.isFrontYear()),d.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;a=BI.parseInt(a);var c=BI.parseDateTime(b.min,"%Y-%X-%d"),d=BI.parseDateTime(b.max,"%Y-%X-%d");BI.checkDateVoid(a,1,1,BI.print(BI.getDate(c.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(d.getFullYear(),0,1),"%Y-%X-%d"))[0]?(a=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text", -textAlign:"right",text:a.text,value:a.value,height:b.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime={year:b.year,month:b.month},0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(b.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(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDatePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDatePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateCombo.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options,c=BI.getDate();this.storeValue=BI.isNotNull(b.value)?b.value:{year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:b.minDate,max:b.maxDate,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.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(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var d=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});d.on(BI.IconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()||a.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:d,top:0,right:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},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),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 a=this,b=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(){a.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(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.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(b){a.timeSelect=b}}]},height:50},{el:this.dateButton,height:30}]}),this.setValue(b.value)},setValue:function(a){var b,c=a;BI.isNull(c)?(b=BI.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}),this.timeSelect.setValue({hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()})):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.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),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text},{el:BI.createWidget(),width:a.height}]}),this.setValue(a.value)},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=BI.getDate(),b=BI.print(c,"%Y-%X-%d %H:%M:%S");else{var d=BI.getDate(c.year,c.month-1,c.day,c.hour,c.minute,c.second);b=BI.print(d,"%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.StaticDateTimePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime=BI.extend(a.selectedTime,{year:b.year,month:b.month,day:d}),0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.calendar.empty(),a.setValue(a.selectedTime),a.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(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.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(b.selectedTime)},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=BI.extend({},this.timeSelect.getValue(),a)},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){a=a||{},this._setDatePicker(a),this._setCalendar(a),this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_time_pane_card",BI.StaticDateTimePaneCard),BI.DynamicDateTimePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDateTimePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDateTimePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDateTimePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateTimePane.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateTimePane.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:b.stopPropagation,maxHeight:1e3,minWidth:140}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(a){this.downlistcombo.showView(a)},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},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),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 a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:a.value}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:36,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),BI.extend(a.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),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:36,disableSelected:!0,selected:this._digest(a.value)}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:24,forceNotSelected:!0});var c=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(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},_digest:function(a){var b=this.options;return a=BI.isArray(a)?a:[a],BI.any(a,function(a,c){return BI.contains(b.childValues,c)})},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(a){this.icon1.setSelected(this._digest(a))}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),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 a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options,c=this._createChildren(this.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!BI.contains(a.singleValues,d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.isDefaultInit=!0,c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5,maxHeight:378},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=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});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?1:0}},setValue:function(a){a=a||{},this.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT;var b=[],c=[];BI.isNotNull(a.year)&&(b.push(BI.DynamicDateCard.TYPE.YEAR),c.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))),BI.isNotNull(a.quarter)&&(b.push(BI.DynamicDateCard.TYPE.QUARTER),c.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))),BI.isNotNull(a.month)&&(b.push(BI.DynamicDateCard.TYPE.MONTH),c.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))),BI.isNotNull(a.week)&&(b.push(BI.DynamicDateCard.TYPE.WEEK),c.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,a.week))),BI.isNotNull(a.day)&&(b.push(BI.DynamicDateCard.TYPE.DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,a.day))),BI.isNotNull(a.workDay)&&(b.push(BI.DynamicDateCard.TYPE.WORK_DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,a.workDay))),this.checkgroup.setValue(b),this.workDayBox.setSelected(BI.isNotNull(a.workDay)),this.resultPane.populate(this._getParamJson(c,a.position))},getValue:function(){var a=this,b={},c=this.checkgroup.getValue(),d=this.resultPane.getAllButtons();if(0!==c.length&&BI.each(d,function(c,d){var e=d.getValue();switch(e.dateType){case BI.DynamicDateCard.TYPE.YEAR:b.year=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.QUARTER:b.quarter=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.MONTH:b.month=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.WEEK:b.week=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.DAY:b.day=0===e.offset?-e.value:e.value}BI.isNull(e.dateType)&&(b.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var e=d[0].getValue();b.workDay=0===e.offset?-e.value:e.value}return b}}),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}}),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 a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:b.minDate,max:b.maxDate,format:b.format,allowEdit:b.allowEdit,watermark:b.watermark,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.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:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},_defaultState:function(){},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(a){return BI.isNaturalNumber(a)},value:b.value,ref:function(){a.editor=this},errorText:function(a){return BI.isEmptyString(a)?BI.i18nText("BI-Basic_Please_Input_Content"):BI.i18nText("BI-Please_Input_Natural_Number")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:b.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(){a.offsetCombo=this},container:null,value:b.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var a="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:a=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:a=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:a=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:a=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:a=BI.i18nText("BI-Basic_Day");break;case BI.DynamicDateCard.TYPE.WORK_DAY:default:a=BI.i18nText("BI-Basic_Work_Day")}return a},setValue:function(a){a=a||{},a.value=a.value||0,a.offset=a.offset||0,this.editor.setValue(a.value),this.offsetCombo.setValue(a.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),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 a=this,b=this.options,c=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:c.buttonHeight-1,listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){a.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),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),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2]}}}a.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.getDate();e=BI.DynamicDateHelper.getCalculation(c);var f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[0,1,2],d=this._getFormatString().match(/%./g);BI.each(d,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":default:c[2]=a}});var e=BI.parseDateTime(a,this._getFormatString());BI.print(e,this._getFormatString())===a&&(a=BI.print(e,b.compareFormat),c=[0,1,2]);var f=a.match(/\d+/g),g=[];return BI.each(f,function(a){g[a]=f[c[a]]}),g.length===c.length&&2===g[0].length?BI.print(BI.parseDateTime(g.join("-"),b.compareFormat),b.compareFormat):g.join("-")},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,this._getFormatString()),this._const.compareFormat);return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,this._getFormatString()),c=BI.print(b,this._const.compareFormat);return b.getMonth()>=0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),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),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",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:b.minDate,max:b.maxDate,allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate(),hour:0,minute:0,second:0}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},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_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options,c=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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){a.timeSelect=this}},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a.timeSelect.setValue(),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();return{type:a,value:a===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), +BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height,height:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"",root:!0,value:b.value,watermark:b.watermark,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,height:b.height-2*(b.vgap+b.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}}),this.watermark.element.bind("click",function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}));var c=[];this.watermark&&c.push({el:this.watermark,left:3,right:3,top:0,bottom:0}),c.push({el:this.editor,left:0,right:0,top:0,bottom:0});var d=[{el:{type:"bi.absolute",items:c},left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:d}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){a._checkError(),a.element.addClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){a._setErrorVisible(!1),a.element.removeClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){a.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){a.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(b){b.keyCode!==BI.KeyCode.TAB&&a.watermark&&a.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){a._checkWaterMark(),a._setErrorVisible(!1),a.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_ERROR,arguments),a._setErrorVisible(a.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){a._checkWaterMark();var b=a._setErrorVisible(!0);b&&b.element.fadeOut(100,function(){b.element.fadeIn(100)}),a.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){a.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){a.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){a.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){a.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){a.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){a.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){a.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM,arguments)}),this.element.click(function(a){return a.stopPropagation(),!1}),BI.isKey(this.options.value)||BI.isEmptyString(this.options.value)?(this._checkError(),this._checkWaterMark()):this._checkWaterMark()},_checkToolTip:function(){var a=this.options,b=a.errorText;BI.isFunction(b)&&(b=b(this.editor.getValue())),BI.isKey(b)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(b))},_checkError:function(){this._setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(a){this.options.errorText=a},getErrorText:function(){return this.options.errorText},_setErrorVisible:function(a){var b=this.options,c=b.errorText;if(BI.isFunction(c)&&(c=c(BI.trim(this.editor.getValue()))),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,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(a){this.editor.onKeyDown(a)},setValue:function(a){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(a),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),BI.MultifileEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var a=this,b=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:b.name,url:b.url,multiple:b.multiple,accept:b.accept,maxSize:b.maxSize,title:b.title}),this.file.on(BI.File.EVENT_CHANGE,function(){a.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments)}),this.file.on(BI.File.EVENT_ERROR,function(){a.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){a.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){a.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),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},render:function(){var a=this.options,b=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:10,top:4,bottom:8}]}),this.content.element.on("input propertychange",function(a){b._checkWaterMark(),b.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){b.isValid()&&(b._focus(),b.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),BI.Widget._renderEngine.createElement(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&(BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&this.setValue(a.value),BI.isNotNull(a.style)&&this.setStyle(a.style),this._checkWaterMark()},_checkWaterMark:function(){var a=this,b=this.options,c=this.getValue();BI.isNotEmptyString(c)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(b.watermark)&&(this.watermark?(this.watermark.setText(b.watermark),this.watermark.setValid(!b.invalid),this.watermark.setEnable(!b.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark cursor-default",textAlign:"left",height:20,text:b.watermark,invalid:b.invalid,disabled:b.disabled}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){a.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:4,top:4,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(a){this.content.element.val(a),this._checkWaterMark()},setStyle:function(a){this.style=a,this.element.css(a),this.content.element.css(BI.extend({},a,{color:a.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(a.backgroundColor)?BI.DOM.rgb2hex(a.backgroundColor):a.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(a){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)},_setEnable:function(a){BI.TextAreaEditor.superclass._setEnable.apply(this,[a]),this.content&&(this.content.element[0].disabled=!a)}}),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),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(b.text)?this.setText(b.text):BI.isKey(b.value)&&this.setText(b.value),b.highLight&&this.doHighLight()},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Html.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){BI.Html.superclass.setText.apply(this,arguments),this.options.text=a,this.text.element.html(a)}}),BI.shortcut("bi.html",BI.Html),BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"i",baseCls:(a.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),BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"iframe",baseCls:(a.baseCls||"")+" bi-iframe",src:"",name:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.frameborder="0",a.attributes.src=a.src,a.attributes.name=a.name,BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src},setName:function(a){this.options.name=a,this.element.attr("name",a)},getName:function(){return this.options.name}}),BI.shortcut("bi.iframe",BI.Iframe),BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"img",baseCls:(a.baseCls||"")+" bi-img display-block",src:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.src=a.src,BI.Img.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img),BI.ImageCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageCheckbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})}}),BI.ImageCheckbox.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_checkbox",BI.ImageCheckbox),BI.Checkbox=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-checkbox",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16},render:function(){var a=this,b=this.options;return{type:"bi.center_adapt",items:[{type:"bi.default",ref:function(b){a.checkbox=b},cls:"checkbox-content",width:b.iconWidth-2,height:b.iconHeight-2}]}},_setEnable:function(a){BI.Checkbox.superclass._setEnable.apply(this,arguments),a===!0?this.checkbox.element.removeClass("base-disabled disabled"):this.checkbox.element.addClass("base-disabled disabled")},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)},setSelected:function(a){BI.Checkbox.superclass.setSelected.apply(this,arguments),a?this.checkbox.element.addClass("bi-high-light-background"):this.checkbox.element.removeClass("bi-high-light-background")}}),BI.Checkbox.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox),function(document){var F=function(a){return function(b){var c=b.files||[b];return c.item||(c.item=a),c}}(function(a){return this[a]}),event={add:document.addEventListener?function(a,b,c){return a.addEventListener(b,c,!1),this}:function(a,b,c){return a.attachEvent("on"+b,c),this},del:document.removeEventListener?function(a,b,c){return a.removeEventListener(b,c,!1),this}:function(a,b,c){return a.detachEvent("on"+b,c),this},stop:function(a){return a?(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,a.preventDefault?a.preventDefault():a.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(a,b,c){return"--".concat(a,CRLF,'Content-Disposition: form-data; name="',b,'"; filename="',_global.encodeURIComponent(c.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,c.getAsBinary(),CRLF,"--",a,"--",CRLF)},isFunction=function(a){return"[object Function]"===toString.call(a)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(a,b,c,d){if(-1'),iframe=handler.iframe||(handler.iframe=document.createElement(''))}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(a){isFunction(handler.onerror)&&handler.onerror(rpe,a||_global.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loadedd.status||d.status>399)return BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void a.fireEvent(BI.File.EVENT_ERROR);var b=BI.some(c.attach_array,function(b,c){if(c.errorCode)return BI.Msg.toast(c.errorMsg,{level:"error"}),a.fireEvent(BI.File.EVENT_ERROR,c),!0});!b&&a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url,c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d0&&b.fireEvent(BI.File.EVENT_CHANGE,{files:a.files}),c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){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(a){this.wrap&&this.wrap.upload(a)},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(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?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||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=!1,c=null,d=!1,e=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),f=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){d=!1,b=e.ctrlKey||e.metaKey,c=e.keyCode,a.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(b){c=null,d&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,e(b.keyCode))}).on("input propertychange",function(b){var f=b.originalEvent;(BI.isNull(f.propertyName)||"value"===f.propertyName)&&(d=!0,a._keydown_=!0,e(c),c=null)}).click(function(a){a.stopPropagation(),f()}).mousedown(function(b){a.element.val(a.element.val())}).focus(function(b){a._focusDebounce()}).focusout(function(b){a._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(){function a(){if(b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()){var a=b._lastValidValue;b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM),b._lastValidValue!==a&&b.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){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)&&(this._pause!==!0||/(\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))),a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN);var c=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()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===c||""===BI.trim(c)||(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 a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastChangedValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(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(a){this.element.val(a),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(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),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),BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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),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 a=this,b=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(b){a.radio=b},width:b.iconWidth,height:b.iconHeight}]}},_setEnable:function(a){BI.Radio.superclass._setEnable.apply(this,arguments),a===!0?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(a){BI.Radio.superclass.setSelected.apply(this,arguments),a?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),BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(a){var b=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{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 a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();return b.textAlign="left",BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:"bi.center_adapt",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,maxWidth:"100%"}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(b,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var a=this.options,b="right"===a.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",c=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:b,height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(c)}]}):void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})),void("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}))):(c.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(c,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(c,{maxWidth:"100%"})),void BI.createWidget({type:b,element:this,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(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}}),BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var a=this.options;return{type:"bi.html",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel),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 a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.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),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),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 a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var a=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+a.level,text:a.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(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),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 a=this,b=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+b.level);var c=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:c,mousedown:c,mouseup:c,mouseover:c,mouseenter:c,mouseleave:c,mousemove:c});var d="close-font";switch(b.level){case"success":d="toast-success-font";break;case"error":d="toast-error-font";break;case"warning":d="toast-warning-font";break;case"normal":default:d="toast-message-font"}var e=[{type:"bi.icon_label",cls:d+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,textHeight:16,textAlign:"left"},rgap:b.autoClose?this._const.hgap:0}],f=[36,""];b.autoClose===!1&&(e.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){a.destroy()},width:36}),f.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:e,vgap:7,columnSize:f})},setText:function(a){this.text.setText(a)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:18})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,height:a.height,textHeight:a.height-2,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{value:e.value},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])},value:c.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},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(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),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(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;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;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(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=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("
      • ")},makeDOMNodeMainBefore:function(a,b,c){a.push("
      • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
          "),c.push(d),c.push("
        ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={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"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0};return d},getTreeCheckedNodes:function(a,b,c,d){if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f=a.check.chkboxType,g=""===f.Y&&""===f.N;fullStyle="",b.chkDisabled===!0?fullStyle=d.DISABLED:b.halfCheck?fullStyle=d.PART:a.check.chkStyle==e.STYLE?fullStyle=b.check_Child_State<1?d.FULL:d.PART:fullStyle=b[c]?2===b.check_Child_State||b.check_Child_State===-1||g?d.FULL:d.PART:b.check_Child_State<1||g?d.FULL:d.PART;var h=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+fullStyle;return h=b.check_Focus&&b.chkDisabled!==!0?h+"_"+d.FOCUS:h,t.className.BUTTON+" "+d.DEFAULT+" "+h},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconCls,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconCls!==a&&(this.element.removeClass(b.iconCls).addClass(a),b.iconCls=a)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=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:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:b.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(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),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 a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconCls,once:b.once,iconWrapperWidth:b.iconWrapperWidth,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},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),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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,title:a.title||a.text,warningTitle:a.warningTitle,py:a.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(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 a=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:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var c=BI.createWidget({type:"bi.icon_label",width:24,cls:b.iconCls,iconWidth:b.iconWidth,iconHeight:b.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},{width:24,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},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(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,cls:"bi-list-item-none",id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.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(a){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=a?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),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),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 a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:24,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},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},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),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 a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.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),BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:b.text,value:b.value,ref:function(){a.text=this}},left:b.lgap,right:b.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(a){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(a)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=BI.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=BI.Date._MD.slice(0);i[1]=BI.isLeapYear(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay();var j=(7-BI.StartOfWeek+e.FDay)%7;e.PDay=i[0===b?11:b-1]-j+1,e.NDay=1;var k=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=j&&a=0?c%12:(12+c%12)%12;return{year:BI.getDate().getFullYear()+d,month:e+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[],e=BI.parseDateTime(b.min,"%Y-%X-%d"),f=BI.parseDateTime(b.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var b={};BI.checkDateVoid(c+a,1,1,BI.print(BI.getDate(e.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(f.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(b.disabled=!0),b.text=c+a,d.push(b)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=BI.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=BI.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(a){var b=BI.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?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),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(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),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(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),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 a=this,b=this.options;this.editor=BI.createWidget(b.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.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(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:""})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:b.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(b){a.trigger=b},width:b.width,height:b.height},b.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(b){a.colorPicker=b},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){c(),a._isRGBColor(a.colorPicker.getValue())||a.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){c(),a.combo.hideView()}}]},b.popup),stopPropagation:!0,width:230},value:b.value});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var a=this,b=this.options;this.colorEditor=BI.createWidget(b.editor,{type:b.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:b.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a._dealStoreColors(),a.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:b.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:b.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:b.editor});var c=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:c}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),c.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a._dealStoreColors(),a.more.hideView(),a.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:!b.disabled,ref:function(){a.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_setEnable:function(a){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!a)},_dealStoreColors:function(){var a=this.getValue(),b=this._getStoreColors(),c=new BI.Queue(8);c.fromArray(b),c.remove(a),c.unshift(a);var d=c.toArray();BI.Cache.setItem("colors",BI.array2String(d)),this.setStoreColors(d)},_digestStoreColors:function(a){var b=BI.map(a,function(a,b){return{value:b}});return BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),b},_getStoreColors:function(){var a=this,b=this.options,c=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(c,function(c,d){return!b.simple||a._isRGBColor(d)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},setStoreColors:function(a){BI.isArray(a)&&this.storeColors.populate([this._digestStoreColors(a)])},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},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),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 a=this,b=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:b.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(a){this.popup.setStoreColors(a)},setValue:function(a){this.popup.setValue(a)},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),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:b.container,value:b.value,width:b.width,height:b.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_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 a=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:a,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var a=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(b){a.changeIcon=b},iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(b){a.label=b},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var b=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:b,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?(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"===a?(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":a}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),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:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{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 a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:b.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),d(a.storeValue.r)&&d(a.storeValue.g)&&d(a.storeValue.b)&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[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()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#ffffff"),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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()?(a.lastColor=a.getValue(),a.setValue("transparent")):("transparent"===a.lastColor&&(a.lastColor=""),a.setValue(a.lastColor||"#ffffff")),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){""===a?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===a?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":a}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(a){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){if("transparent"===a)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:""});a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.storeValue={r:BI.isNull(b.r)?"":b.r,g:BI.isNull(b.r)?"":b.g,b:BI.isNull(b.r)?"":b.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),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){this.colorShow.element.css({"background-color":a});var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.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),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 a=this;return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(b){a.colorWrapper=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(b){a.wheel=b}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(b){a.overlay=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.hMarker=b},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.slMarker=b},scrollable:!1,width:17,height:17}}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this.setValue(a.value)},_unpack:function(a){return 7===a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4===a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},_pack:function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},_setColor:function(a){var b=this._unpack(a);this.value!==a&&b&&(this.value=a,this.rgb=b,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(a){return this.hsl=a,this.rgb=this._HSLToRGB(a),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this._hueToRGB(b,c,d+.33333),this._hueToRGB(b,c,d),this._hueToRGB(b,c,d-.33333)]},_hueToRGB:function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},_RGBToHSL:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},_updateDisplay:function(){var a=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(a)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(a)*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(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var c=this._absolutePosition(a.offsetParent);b.x+=c.x,b.y+=c.y}return b},_widgetCoords:function(a){var b,c,d=a.target||a.srcElement,e=this.wheel.element[0];if("undefined"!=typeof a.offsetX){for(var f={x:a.offsetX,y:a.offsetY},g=d;g;)g.mouseX=f.x,g.mouseY=f.y,f.x+=g.offsetLeft,f.y+=g.offsetTop,g=g.offsetParent;for(var g=e,h={x:0,y:0};g;){if("undefined"!=typeof g.mouseX){b=g.mouseX-h.x,c=g.mouseY-h.y;break}h.x+=g.offsetLeft,h.y+=g.offsetTop,g=g.offsetParent}for(g=d;g;)g.mouseX=void 0,g.mouseY=void 0,g=g.offsetParent}else{var f=this._absolutePosition(e);b=(a.pageX||0)-f.x,c=(a.pageY||0)-f.y}return{x:b-this.constants.WIDTH/2,y:c-this.constants.WIDTH/2}},_doMouseMove:function(a){var b=this._widgetCoords(a);if(this.circleDrag){var c=Math.atan2(b.x,-b.y)/6.28;c<0&&(c+=1),this._setHSL([c,this.hsl[1],this.hsl[2]])}else{var d=Math.max(0,Math.min(1,-(b.x/this.constants.SQUARE)+.5)),e=Math.max(0,Math.min(1,-(b.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],d,e])}},doClick:function(a){var b=this._widgetCoords(a);return this.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>this.constants.SQUARE,this._doMouseMove(a),!1},setValue:function(a){this._setColor(a)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,container:b.container,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.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),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.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 a=this.options,b=this,c=[];return BI.each(a.buttons,function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:24,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:c}]})},_createView:function(){var a=this.options,b=BI.createWidget({type:"bi.button_group",items:[a.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return b.element.css("min-height",a.minHeight-44),b}}),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,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var a=this,b=this.options,c=BI.map(b.buttons,function(b,c){return BI.isWidget(c)?c:BI.extend({type:"bi.button",height:24,handler:function(b){a.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,b)}},c)});return{type:"bi.bubble_bar_popup_view",ref:function(){a.popup=this},el:{type:"bi.label",text:b.text,whiteSpace:"normal",textAlign:"left",ref:function(){a.text=this}},buttons:c}},populate:function(a){this.text.setText(a||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,value:b.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),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 a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconCls:b.iconCls,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,value:b.value}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),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 a=this.options,b="";BI.isKey(a.value)&&(b=this._digest(a.value,a.items)),this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b,disableSelected:!0,width:a.isShowDown?a.width-12:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight,selected:BI.isNotEmptyString(b)}),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(b)}),this.down.setVisible(a.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(a,b){var c="";return a=BI.isArray(a)?a[0]:a,BI.any(b,function(b,d){if(a===d.value)return c=d.iconCls,!0}),c},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c=this._digest(a,this.options.items);a=BI.isArray(a)?a[0]:a,BI.isNotEmptyString(c)?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:b.items,height:b.height,text:b.text,iconCls:b.iconCls,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth,title:b.title,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this.setValue(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:a.behaviors,value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a,b){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var c=this.options;a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:c.iconWrapperWidth,iconHeight:c.iconHeight,iconWidth:c.iconWidth}),this.popup.populate(a,b)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),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 a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,adjustLength:2,toggle:!1,ref:function(){a.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){a.trigger=this},items:b.items,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:b.value,items:b.items,ref:function(){a.popup=this,a.trigger.getSearcher().setAdapter(a.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:252},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){a.triggerBtn=this},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this._checkError(a.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.options.items=a,this.combo.populate(a)},setValue:function(a){this.combo.setValue(a),this._checkError(a)},getValue:function(){var a=this.combo.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo),BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var a=this,b=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){a.popup=this},items:BI.createItems(b.items,{type:"bi.single_select_item",textAlign:b.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,c,d)}}]}]}},mounted:function(){this.check()},populate:function(a,b,c){var d=BI.concat(a,b);BI.SearchTextValueComboPopup.superclass.populate.apply(this,d),d=BI.createItems(d,{type:"bi.single_select_item",height:24}),this.popup.populate(d,c)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup),BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value,b.items),value:b.value,height:b.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(a,c){var d=a.keyword,e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g,f)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(a){this.editor.setState(a)},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this._setState(this._digest(a,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),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,value:b.value,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this._checkError(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a), +this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),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 a=this,b=this.options;this._createValueMap();var c;BI.isNotNull(b.value)&&(c=this._digest(b.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:b.height,items:b.items,text:b.text,value:c}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,value:BI.isNull(c)?[]:[c],items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var b=a.combo.getValue()[0].value;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var b=a.combo.getValue()[0].childValue;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},_digest:function(a){return this.value=a,this.valueMap[a]},setValue:function(a){a=this._digest(a),this.combo.setValue([a]),this.trigger.setValue(a)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text,value:BI.isNull(a.value)?"":a.value.childValue||a.value.value})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a.childValue||a.value)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker,value:b.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(b.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:b.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]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.text.setStyle(a)},setValue:function(a){var b=this.options;this.editor.setValue(a),this._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(a.keyword)&&this.text.doRedMark(a.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text tip-text-style",textAlign:"left",height:b.height,text:b.text,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")},title:BI.isNotNull(b.tipText)?b.tipText:function(){var b="";return BI.isString(a.stateValue)&&(b=a.stateValue),BI.isArray(a.stateValue)&&1===a.stateValue.length&&(b=a.stateValue[0]),b},warningTitle:b.warningTitle,tipType:b.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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.options.disabled===!1&&(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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=a,BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text"))))},setTipType:function(a){this.text.options.tipType=a}}),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),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text",textAlign:"left",text:b.text,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")), +this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),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),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(c,{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(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.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:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded(),a.check()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.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(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{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(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 a=this,b=this.options;return[{type:"bi.label",text:b.text,height:b.height,value:b.value,hgap:b.hgap,ref:function(){a.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){a.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(a){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),a?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var a=this,b=this.options;return{type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.linear_segment_button",height:b.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){a.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.buttonGroup=this}}},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),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 a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(b.value)&&this.setValue(b.value)},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.allSelected=!!a,this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{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(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"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(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),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:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1),this.setPagerVisible(a>1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate(),this.setPagerVisible(this.options.pages>1)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),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 a=this.options;a.vertical,a.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 a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev column-pre-page-h-font"},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 direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev row-pre-page-h-font"},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 direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},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(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[86,110,0,24],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),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),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 a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:a.height,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:b.value,items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},_setEnable:function(a){BI.Segment.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(a){return a.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.selected===!0,d=!b.selected&&b.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())},selected:c,invisible:d}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)},invisible:c||!d}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:b.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(a){this.checkbox.setSelected(!!a)},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this.halfSelected=!!a,a===!0?(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(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(b),!b&&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),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(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};BI.isKey(f.id)||(f.id=BI.UUID()),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.mid_plus_group_node",e===a.length-1&&(g.type="bi.last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a,b){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a,b)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),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(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),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(){function a(a,b){return!1}function b(a,b){return b.isLeaf?{}:{color:"#999999"}}var c={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:b},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return c},_dealWidthNodes:function(a){a=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),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 a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate(),BI.isNotNull(b.value)&&this.setValue(b.value)},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},_digest:function(a){a||(a=[]);var b=this,c={},d=[];return BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),BI.makeObject(a.concat(d))},setValue:function(a){this.tree.setValue(this._digest(a))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,title:function(){return a.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:b.triggerWidth||b.height},width:b.triggerWidth||b.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:24})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(b){a.wrapper=b},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.iconWrapperWidth||b.height},{el:this.text,lgap:BI.isEmptyString(b.iconCls)?5:0},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a)},setIcon:function(a){var b=this.options;this.icon.setIcon(a);var c=this.wrapper.attr("items")[0],d=this.wrapper.attr("items")[1];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,d.lgap=5,this.wrapper.resize()):c.width!==(b.iconWrapperWidth||b.height)&&(c.width=b.iconWrapperWidth||b.height,d.lgap=0,this.wrapper.resize())},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),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 a=this.options,b=this._digist(a.value,a.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:b.text,iconCls:b.iconCls,height:a.height,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth})},_digist:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d,e=BI.Tree.transformToArrayFormat(b);return BI.any(e,function(b,c){if(BI.deepContains(a,c.value))return d={text:c.text||c.value,iconCls:c.iconCls},!0}),BI.isNotNull(d)?{text:d.text,iconCls:d.iconCls}:{text:c.text,iconCls:c.iconCls}},setValue:function(a){var b=this._digist(a,this.options.items);this.trigger.setText(b.text),this.trigger.setIcon(b.iconCls)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text,title:function(){return a.text.getText()},tipType:b.tipType,warningTitle:b.warningTitle,hgap:c.hgap,readonly:b.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setText:function(a){this.text.setText(a)},setTipType:function(a){this.text.options.tipType=a}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),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 a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height,readonly:a.readonly,text:this._digest(a.value,a.items),tipType:a.tipType,warningTitle:a.warningTitle})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},setTipType:function(a){this.trigger.setTipType(a)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),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 a=this.options,b=this._digest(a.text,a.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2,text:b.text,cls:b.cls})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?{cls:"",text:d.join(",")}:{cls:"bi-water-mark",text:c.text}},setValue:function(a){var b=this._digest(a,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(b.cls),this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:a.triggerWidth||a.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:a.triggerWidth||a.height}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:b.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(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:b.behaviors,min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=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===a._month?a.setValue({year:a.year.getValue()-1,month:12}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._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===a._month?a.setValue({year:a.year.getValue()+1,month:1}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:b.behaviors,min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:b.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.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 a=this.options,b=!(1===this._month&&this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(12===this._month&&this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=BI.parseInt(a.year),this._month=BI.parseInt(a.month),this.year.setValue(a.year),this.month.setValue(a.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),BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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(){a.setValue(a.year.getValue()-1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._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(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,behaviors:b.behaviors,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.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:{type:"bi.horizontal_float",width:50,items:[{el:this.year}]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:1});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.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(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.calendar,left:5,right:5},{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),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(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear();var c=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),d=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:[c,d]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();c.setEnable(!b.isFrontYear()),d.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;a=BI.parseInt(a);var c=BI.parseDateTime(b.min,"%Y-%X-%d"),d=BI.parseDateTime(b.max,"%Y-%X-%d");BI.checkDateVoid(a,1,1,BI.print(BI.getDate(c.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(d.getFullYear(),0,1),"%Y-%X-%d"))[0]?(a=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime={year:b.year,month:b.month},0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(b.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(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDatePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDatePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateCombo.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options,c=BI.getDate();this.storeValue=BI.isNotNull(b.value)?b.value:{year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:b.minDate,max:b.maxDate,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.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(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var d=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});d.on(BI.IconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()||a.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:d,top:0,right:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},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),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 a=this,b=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(){a.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(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.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(b){a.timeSelect=b}}]},height:50},{el:this.dateButton,height:30}]}),this.setValue(b.value)},setValue:function(a){var b,c=a;BI.isNull(c)?(b=BI.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}),this.timeSelect.setValue({hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()})):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.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),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text},{el:BI.createWidget(),width:a.height}]}),this.setValue(a.value)},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=BI.getDate(),b=BI.print(c,"%Y-%X-%d %H:%M:%S");else{var d=BI.getDate(c.year,c.month-1,c.day,c.hour,c.minute,c.second);b=BI.print(d,"%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.StaticDateTimePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime=BI.extend(a.selectedTime,{year:b.year,month:b.month,day:d}),0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.calendar.empty(),a.setValue(a.selectedTime),a.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(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.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(b.selectedTime)},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=BI.extend({},this.timeSelect.getValue(),a)},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){a=a||{},this._setDatePicker(a),this._setCalendar(a),this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_time_pane_card",BI.StaticDateTimePaneCard),BI.DynamicDateTimePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDateTimePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDateTimePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDateTimePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateTimePane.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateTimePane.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:b.stopPropagation,maxHeight:1e3,minWidth:140}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(a){this.downlistcombo.showView(a)},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},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),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 a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:a.value}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:36,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),BI.extend(a.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),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:36,disableSelected:!0,selected:this._digest(a.value)}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:24,forceNotSelected:!0});var c=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(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},_digest:function(a){var b=this.options;return a=BI.isArray(a)?a:[a],BI.any(a,function(a,c){return BI.contains(b.childValues,c)})},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(a){this.icon1.setSelected(this._digest(a))}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),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 a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options,c=this._createChildren(this.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!BI.contains(a.singleValues,d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.isDefaultInit=!0,c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5,maxHeight:378},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=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});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?1:0}},setValue:function(a){a=a||{},this.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT;var b=[],c=[];BI.isNotNull(a.year)&&(b.push(BI.DynamicDateCard.TYPE.YEAR),c.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))),BI.isNotNull(a.quarter)&&(b.push(BI.DynamicDateCard.TYPE.QUARTER),c.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))),BI.isNotNull(a.month)&&(b.push(BI.DynamicDateCard.TYPE.MONTH),c.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))),BI.isNotNull(a.week)&&(b.push(BI.DynamicDateCard.TYPE.WEEK),c.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,a.week))),BI.isNotNull(a.day)&&(b.push(BI.DynamicDateCard.TYPE.DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,a.day))),BI.isNotNull(a.workDay)&&(b.push(BI.DynamicDateCard.TYPE.WORK_DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,a.workDay))),this.checkgroup.setValue(b),this.workDayBox.setSelected(BI.isNotNull(a.workDay)),this.resultPane.populate(this._getParamJson(c,a.position))},getValue:function(){var a=this,b={},c=this.checkgroup.getValue(),d=this.resultPane.getAllButtons();if(0!==c.length&&BI.each(d,function(c,d){var e=d.getValue();switch(e.dateType){case BI.DynamicDateCard.TYPE.YEAR:b.year=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.QUARTER:b.quarter=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.MONTH:b.month=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.WEEK:b.week=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.DAY:b.day=0===e.offset?-e.value:e.value}BI.isNull(e.dateType)&&(b.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var e=d[0].getValue();b.workDay=0===e.offset?-e.value:e.value}return b}}),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}}),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 a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:b.minDate,max:b.maxDate,format:b.format,allowEdit:b.allowEdit,watermark:b.watermark,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.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:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},_defaultState:function(){},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(a){return BI.isNaturalNumber(a)},value:b.value,ref:function(){a.editor=this},errorText:function(a){return BI.isEmptyString(a)?BI.i18nText("BI-Basic_Please_Input_Content"):BI.i18nText("BI-Please_Input_Natural_Number")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:b.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(){a.offsetCombo=this},container:null,value:b.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var a="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:a=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:a=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:a=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:a=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:a=BI.i18nText("BI-Basic_Day");break;case BI.DynamicDateCard.TYPE.WORK_DAY:default:a=BI.i18nText("BI-Basic_Work_Day")}return a},setValue:function(a){a=a||{},a.value=a.value||0,a.offset=a.offset||0,this.editor.setValue(a.value),this.offsetCombo.setValue(a.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),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 a=this,b=this.options,c=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:c.buttonHeight-1,listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){a.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),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),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2]}}}a.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.getDate();e=BI.DynamicDateHelper.getCalculation(c);var f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[0,1,2],d=this._getFormatString().match(/%./g);BI.each(d,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":default:c[2]=a}});var e=BI.parseDateTime(a,this._getFormatString());BI.print(e,this._getFormatString())===a&&(a=BI.print(e,b.compareFormat),c=[0,1,2]);var f=a.match(/\d+/g),g=[];return BI.each(f,function(a){g[a]=f[c[a]]}),g.length===c.length&&2===g[0].length?BI.print(BI.parseDateTime(g.join("-"),b.compareFormat),b.compareFormat):g.join("-")},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,this._getFormatString()),this._const.compareFormat);return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,this._getFormatString()),c=BI.print(b,this._const.compareFormat);return b.getMonth()>=0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),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),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",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:b.minDate,max:b.maxDate,allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate(),hour:0,minute:0,second:0}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},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_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options,c=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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){a.timeSelect=this}},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a.timeSelect.setValue(),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();return{type:a,value:a===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), BI.DynamicDateTimeSelect=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-select"},render:function(){var a=this;return{type:"bi.center_adapt",items:[{type:"bi.vertical_adapt",items:[{el:{type:"bi.number_editor",ref:function(){a.hour=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<24},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkHour(b),this.setValue(a._formatValueToDoubleDigit(b)),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.HOUR);this.setValue(b)}}],width:60,height:24}},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.minute=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkMinute(b),this.setValue(a._formatValueToDoubleDigit(b),BI.DynamicDateTimeSelect.MINUTE),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.MINUTE);this.setValue(b)}}],width:60,height:24},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.second=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkSecond(b),this.setValue(a._formatValueToDoubleDigit(b)),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}}],width:60,height:24}]}]}},_checkBorder:function(a){a=a||{},this._checkHour(a.hour),this._checkMinute(a.minute),this._checkSecond(a.second)},_checkHour:function(a){this.hour.setDownEnable(BI.parseInt(a)>0),this.hour.setUpEnable(BI.parseInt(a)<23)},_checkMinute:function(a){this.minute.setDownEnable(BI.parseInt(a)>0),this.minute.setUpEnable(BI.parseInt(a)<59)},_checkSecond:function(a){this.second.setDownEnable(BI.parseInt(a)>0),this.second.setUpEnable(BI.parseInt(a)<59)},_autoSwitch:function(a,b){var c=0,d=a+"";switch(b){case BI.DynamicDateTimeSelect.HOUR:c=2;break;case BI.DynamicDateTimeSelect.MINUTE:c=5}if(1===d.length&&BI.parseInt(d)>c&&(d="0"+d),2===d.length)switch(b){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 d},_formatValueToDoubleDigit:function(a){(BI.isNull(a)||BI.isEmptyString(a))&&(a=0);var b=BI.parseInt(a);return b<10&&(b="0"+b),b},_assertValue:function(a){return a=a||{},a.hour=this._formatValueToDoubleDigit(a.hour)||"00",a.minute=this._formatValueToDoubleDigit(a.minute)||"00",a.second=this._formatValueToDoubleDigit(a.second)||"00",a},getValue:function(){return{hour:BI.parseInt(this.hour.getValue()),minute:BI.parseInt(this.minute.getValue()),second:BI.parseInt(this.second.getValue())}},setValue:function(a){a=this._assertValue(a),this.hour.setValue(a.hour),this.minute.setValue(a.minute),this.second.setValue(a.second),this._checkBorder(a)}}),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}),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2],hour:0|d[3],minute:0|d[4],second:0|d[5]}}}a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.DynamicDateHelper.getCalculation(c),f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[],d=!1,e=this._getFormatString().match(/%./g);BI.each(e,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":c[2]=a;break;case"%S":d=!0}});var f=BI.parseDateTime(a,this._getFormatString());BI.print(f,this._getFormatString())===a&&(a=BI.print(f,b.compareFormat),c=[0,1,2]);var g=a.match(/\d+/g),h=[];BI.each(g.slice(0,3),function(a){h[a]=g[c[a]]});var i=g.slice(3);BI.each(i,function(a,b){BI.isNumeric(b)&&1===b.length&&(i[a]="0"+b)}),2!==i.length||d||i.push("00");var j=i.join(":"),k=h.slice(0,3).join("-");return BI.isNotEmptyString(j)&&(k+=" "+j),k},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S"),"%Y-%x-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S"),"%Y-%x-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S"),"%Y-%X-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d"),c=BI.print(b,"%Y-%X-%d");return b.getMonth()>0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue},isValid:function(){return this.editor.isValid()}}),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),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,hgap:1,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"close-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CHANGE),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.icon_label",cls:"search-font"},width:24},{el:a.editor},{el:this.clear,width:24}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:20})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,title:b.title,tipType:b.tipType,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:20})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.IntervalSlider=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""},render:function(){var a=this,b=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:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=a.valueOne,c=BI.parseFloat(this.getValue());a.valueOne=c;var d=a._getPercentByValue(c),e=BI.parseFloat(d.toFixed(1));a._setSliderOnePosition(e),a._setBlueTrack(),a._checkLabelPosition(b,a.valueTwo,a.valueOne,a.valueTwo),a.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:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=a.valueTwo,c=BI.parseFloat(this.getValue());a.valueTwo=c;var d=a._getPercentByValue(c),e=BI.parseFloat(d.toFixed(1));a._setSliderTwoPosition(e),a._setBlueTrack(),a._checkLabelPosition(a.valueOne,b,a.valueOne,a.valueTwo),a.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:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]}},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit);var g=this.valueOne,h=this.valueTwo;b?(this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f,this._checkLabelPosition(g,h,f,this.valueTwo)):(this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f,this._checkLabelPosition(g,h,this.valueOne,f)),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=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:a.EDITOR_R_GAP,height:a.SLIDER_HEIGHT},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=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:a.SLIDER_WIDTH_HALF,height:a.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(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_checkLabelPosition:function(a,b,c,d,e){if(a=BI.parseFloat(a),b=BI.parseFloat(b),c=BI.parseFloat(c),d=BI.parseFloat(d),a<=b&&c>d||a>=b&&c-1){d=b.split("e");var e=BI.size(d[0].split(".")[1]),f=BI.parseInt(d[1].substring(1));return e-f}return d=b.split("."),d.length>1?d[1].length:0},_assertValue:function(a){return a<=this.min?this.min:a>=this.max?this.max:a},_setEnable:function(a){BI.IntervalSlider.superclass._setEnable.apply(this,[a]),a?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(a){var b=BI.parseFloat(a.min),c=BI.parseFloat(a.max);!isNaN(b)&&!isNaN(c)&&c>=b&&(this.min=b,this.max=c,this.valueOne=b,this.valueTwo=c,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),c===b&&this._setDraggableEnable(!1)},setValue:function(a){var b=this.options,c=BI.parseFloat(a.min),d=BI.parseFloat(a.max);c=b.digit===!1?c:c.toFixed(b.digit),d=b.digit===!1?d:d.toFixed(b.digit),isNaN(c)||isNaN(d)||(this._checkValidation(c)&&(this.valueOne=this.valueOne<=this.valueTwo?c:d),this._checkValidation(d)&&(this.valueTwo=this.valueOne<=this.valueTwo?d:c),cthis.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(){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(this.valueOne),this.labelTwo.setValue(this.valueTwo),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider),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(a){for(var b="1",c=0;c0)var d=b;else{var d=a;c=0-c}for(var e=0;e=b.numDecimal.length?a.numDecimal.length:b.numDecimal.length}function d(a,b){for(var c=b-a.length,d=0;d=BI.parseInt(f.numDecimal))var i=(BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h);else{g--;var k=this._getMagnitude(h),i=(k+BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h)}var l=g+"."+j;return BI.parseFloat(l)},_accurateAddition:function(a,b){function c(a,b){for(var c=b-a.length,d=0;db)var e=d.numInteger.slice(0,d.numInteger.length-b),f=d.numInteger.slice(-b);else var e="0",f=c(d.numInteger,b);var g=e+"."+f+d.numDecimal;return BI.parseFloat(g)},accurateSubtraction:function(a,b){return a>=0&&b>=0?a>=b?this._accurateSubtraction(a,b):-this._accurateSubtraction(b,a):a>=0&&b<0?this._accurateAddition(a,-b):a<0&&b>=0?-this._accurateAddition(-a,b):a<0&&b<0?a>=b?this._accurateSubtraction(-b,-a):this._accurateSubtraction(-a,-b):void 0},accurateAddition:function(a,b){return a>=0&&b>=0?this._accurateAddition(a,b):a>=0&&b<0?this.accurateSubtraction(a,-b):a<0&&b>=0?this.accurateSubtraction(b,-a):a<0&&b<0?-this._accurateAddition(-a,-b):void 0},accurateMultiplication:function(a,b){return a>=0&&b>=0?this._accurateMultiplication(a,b):a>=0&&b<0?-this._accurateMultiplication(a,-b):a<0&&b>=0?-this._accurateMultiplication(-a,b):a<0&&b<0?this._accurateMultiplication(-a,-b):void 0},accurateDivisionTenExponent:function(a,b){return a>=0?this._accurateDivisionTenExponent(a,b):-this._accurateDivisionTenExponent(-a,b)}}),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:24})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger",value:b.value}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM))}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),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 a=this,b=this.options,c=[1,7,2,8,3,9,4,10,5,11,6,12],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),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:b.value}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){a=BI.parseInt(a),this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:24})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(""),this.editor.setValue(""),void this.editor.setTitle(""))},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),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 a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.multi_layer_down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:b.stopPropagation,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(a){this.downlistcombo.showView(a)},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},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),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 a=BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options,c=this._createPopupItems(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])){d=a.childValueMap[b];var e=a.fatherValueMap[b],f=(e+"").split("_");a.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE,d,f.length>1?f:e)}else a.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE,d,c);if(!BI.contains(a.singleValues,d)){var g=a.getValue(),h=[];BI.each(g,function(a,b){b.value!=d&&h.push(b)}),a.setValue(h)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createPopupItems:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5},c.el.childValues=[],BI.each(c.children,function(a,d){d=d.el?BI.extend(d.el,{children:d.children}):d;var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value),BI.isNotEmptyArray(d.children)&&(d.type="bi.down_list_group_item",b._createChildren(d),d.height=b.constants.height,d.iconCls2=b.constants.nextIcon,c.el.childValues=BI.concat(c.el.childValues,d.childValues))})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=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});c.push(g)}}),c},_createChildren:function(a){var b=this;a.childValues=[],BI.each(a.children,function(c,d){var e=BI.deepClone(a.value),f=BI.deepClone(d.value);d.type="bi.down_list_item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),a.childValues.push(d.value)})},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a1?g:f}else e.value=d;b.push(e)}),b}}),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),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})},render:function(){var a=this,b=this.options,c=b.itemsCreator===BI.emptyFn?this._getSyncConfig():this._getAsyncConfig();return b.allowEdit||b.itemsCreator!==BI.emptyFn?{type:"bi.absolute",items:[{el:c,left:0,right:0,top:0,bottom:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(b){a.triggerBtn=b},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}:c},_getBaseConfig:function(){var a=this,b=this.options;return{type:"bi.combo",container:b.container,adjustLength:2,ref:function(b){a.combo=b},popup:{el:{type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,itemsCreator:b.itemsCreator,items:b.items,ref:function(b){a.trigger&&a.trigger.getSearcher().setAdapter(b)},listeners:[{eventName:BI.MultiLayerSelectTreePopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:400,minHeight:240}}},_getSyncConfig:function(){var a=this.options,b=this._getBaseConfig();return b.el={type:"bi.single_tree_trigger",text:a.text,height:a.height,items:a.items,value:a.value},b},_getAsyncConfig:function(){var a=this,b=this.options,c=this._getBaseConfig();return BI.extend(c,{el:{type:"bi.multilayer_select_tree_trigger",allowEdit:b.allowEdit,cls:"multilayer-select-tree-trigger",ref:function(b){a.trigger=b},items:b.items,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_FOCUS)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BLUR)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING,action:function(){a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING)}}]},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}}]})},setValue:function(a){a=BI.isArray(a)?a:[a],this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(a){this.combo.populate(a)}}),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.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),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 a=this.options;BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.storeValue=a.value,this.initTree(this.options.items),this.check()},_formatItems:function(a,b,c){var d=this,e=this.options,f=e.keywordGetter();return BI.each(a,function(e,g){var h={};g.layer=b,BI.isKey(g.id)||(g.id=BI.UUID()),g.keyword=g.keyword||f,h.pNode=c,g.isParent===!0||g.parent===!0||BI.isNotEmptyArray(g.children)?(h.type="bi.multilayer_select_tree_mid_plus_group_node",e===a.length-1&&(h.type="bi.multilayer_select_tree_last_plus_group_node",h.isLastNode=!0),0!==e||c||(h.type="bi.multilayer_select_tree_first_plus_group_node"),0!==e||e!==a.length-1||c||(h.type="bi.multilayer_select_tree_plus_group_node"),BI.defaults(g,h),d._formatItems(g.children,b+1,g)):(h.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==e||c||(h.type="bi.multilayer_single_tree_first_tree_leaf_item"),e===a.length-1&&(h.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(g,h))}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options,d=!1;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,e){1===a.times&&!a.node&&BI.nextTick(function(){b.loading()}),c.itemsCreator(a,function(c){d=c.hasNext,1===a.times&&!a.node&&b._populate(c.items),e(b._formatItems(BI.Tree.transformToTreeFormat(c.items),a.node?a.node.layer+1:0,a.node)),b.setValue(b.storeValue),1===a.times&&!a.node&&BI.nextTick(function(){b.loaded()})})},value:c.value,el:{type:"bi.loader",isDefaultInit:c.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:c.chooseType,behaviors:c.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return d}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&(b.setValue(c),b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:c.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(a){this._populate(a),BI.isNull(a)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.options.chooseType===BI.Selection.None||(this.storeValue=a,this.tree.setValue(a))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),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:""})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator,keywordGetter:b.keywordGetter,value:b.value,scrollable:null}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-multi-layer-select-tree-trigger bi-border bi-focus-shadow",height:24,valueFormatter:function(a){return a},itemsCreator:BI.emptyFn},render:function(){var a=this,b=this.options,c={type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value),value:b.value,height:b.height,tipText:"",listeners:[{eventName:BI.StateEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS)}},{eventName:BI.StateEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_BLUR)}},{eventName:BI.StateEditor.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING)}}]},popup:{type:"bi.multilayer_select_tree_popup",itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},keywordGetter:function(){return a.editor.getValue()},cls:"bi-card"},onSearch:function(a,c){var d=a.keyword;if(b.itemsCreator===BI.emptyFn){var e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g.concat(f))}else c()},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]};return b.allowEdit?c:{type:"bi.absolute",items:[{el:c,left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}},_digest:function(a){return this.options.valueFormatter(a)},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this.editor.setState(this._digest(a[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.shortcut("bi.multilayer_select_tree_trigger",BI.MultiLayerSelectTreeTrigger),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSelectTreePlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_plus_group_node",BI.MultiLayerSelectTreePlusGroupNode),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})},render:function(){ var a=this,b=this.options,c=b.itemsCreator===BI.emptyFn?this._getSyncConfig():this._getAsyncConfig();return b.allowEdit||b.itemsCreator!==BI.emptyFn?{type:"bi.absolute",items:[{el:c,left:0,right:0,top:0,bottom:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(b){a.triggerBtn=b},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}:c},_getBaseConfig:function(){var a=this,b=this.options;return{type:"bi.combo",container:b.container,adjustLength:2,ref:function(b){a.combo=b},popup:{el:{type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,itemsCreator:b.itemsCreator,items:b.items,ref:function(b){a.trigger&&a.trigger.getSearcher().setAdapter(b)},listeners:[{eventName:BI.MultiLayerSingleTreePopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:400,minHeight:240}}},_getSyncConfig:function(){var a=this.options,b=this._getBaseConfig();return b.el={type:"bi.single_tree_trigger",text:a.text,height:a.height,items:a.items,value:a.value},b},_getAsyncConfig:function(){var a=this,b=this.options,c=this._getBaseConfig();return BI.extend(c,{el:{type:"bi.multilayer_single_tree_trigger",allowEdit:b.allowEdit,cls:"multilayer-single-tree-trigger",ref:function(b){a.trigger=b},items:b.items,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_FOCUS)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BLUR)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING,action:function(){a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING)}}]},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}}]})},setValue:function(a){a=BI.isArray(a)?a:[a],this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(a){this.combo.populate(a)}}),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.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),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 a=this.options;BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.storeValue=a.value,this.initTree(this.options.items),this.check()},_formatItems:function(a,b,c){var d=this,e=this.options,f=e.keywordGetter();return BI.each(a,function(e,g){var h={};g.layer=b,BI.isKey(g.id)||(g.id=BI.UUID()),g.keyword=g.keyword||f,h.pNode=c,g.isParent===!0||g.parent===!0||BI.isNotEmptyArray(g.children)?(h.type="bi.multilayer_single_tree_mid_plus_group_node",e===a.length-1&&(h.type="bi.multilayer_single_tree_last_plus_group_node",h.isLastNode=!0),0!==e||c||(h.type="bi.multilayer_single_tree_first_plus_group_node"),0!==e||e!==a.length-1||c||(h.type="bi.multilayer_single_tree_plus_group_node"),BI.defaults(g,h),d._formatItems(g.children,b+1,g)):(h.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==e||c||(h.type="bi.multilayer_single_tree_first_tree_leaf_item"),e===a.length-1&&(h.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(g,h))}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options,d=!1;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,itemsCreator:function(a,e){1===a.times&&!a.node&&BI.nextTick(function(){b.loading()}),c.itemsCreator(a,function(c){d=c.hasNext,1===a.times&&!a.node&&b._populate(c.items),e(b._formatItems(BI.Tree.transformToTreeFormat(c.items),a.node?a.node.layer+1:0,a.node)),b.setValue(b.storeValue),1===a.times&&!a.node&&BI.nextTick(function(){b.loaded()})})},el:{type:"bi.loader",isDefaultInit:c.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:c.chooseType,behaviors:c.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return d}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&(b.setValue(c),b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:c.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(a){this._populate(a),BI.isNull(a)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.options.chooseType===BI.Selection.None||(this.storeValue=a,this.tree.setValue(a))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),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:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator,keywordGetter:b.keywordGetter,value:b.value,scrollable:null}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-multi-layer-single-tree-trigger bi-border bi-focus-shadow",height:24,valueFormatter:function(a){return a},itemsCreator:BI.emptyFn},render:function(){var a=this,b=this.options,c={type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value),value:b.value,height:b.height,tipText:"",listeners:[{eventName:BI.StateEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS)}},{eventName:BI.StateEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_BLUR)}},{eventName:BI.StateEditor.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING)}}]},popup:{type:"bi.multilayer_single_tree_popup",itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},keywordGetter:function(){return a.editor.getValue()},cls:"bi-card"},onSearch:function(a,c){var d=a.keyword;if(b.itemsCreator===BI.emptyFn){var e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g.concat(f))}else c()},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]};return b.allowEdit?c:{type:"bi.absolute",items:[{el:c,left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}},_digest:function(a){return this.options.valueFormatter(a)},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this.editor.setState(this._digest(a[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.shortcut("bi.multilayer_single_tree_trigger",BI.MultiLayerSingleTreeTrigger),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.node=this._createNode();for(var b=[],c=a.pNode;c;)c.isLastNode&&b.push(c.layer),c=c.pNode;var d=[];BI.count(0,a.layer,function(c){d.push({type:"bi.layout",cls:BI.contains(b,c)?"":"base-line-conn-background",width:12,height:a.height})}),d.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(a.layer,12),items:[d]})},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(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)},_createNode:function(){var a=this,b=this.options;return BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,isLastNode:b.isLastNode,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.node=this._createNode();for(var b=[],c=a.pNode;c;)c.isLastNode&&b.push(c.layer),c=c.pNode;var d=[];BI.count(0,a.layer,function(c){d.push({type:"bi.layout",cls:BI.contains(b,c)?"":"base-line-conn-background",width:12,height:a.height})}),d.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(a.layer,12),items:[d]})},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(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)},_createNode:function(){var a=this,b=this.options;return BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.node=this._createNode();for(var b=[],c=a.pNode;c;)c.isLastNode&&b.push(c.layer),c=c.pNode;var d=[];BI.count(0,a.layer,function(c){d.push({type:"bi.layout",cls:BI.contains(b,c)?"":"base-line-conn-background",width:12,height:a.height})}),d.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(a.layer,12),items:[d]})},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(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)},_createNode:function(){var a=this,b=this.options;return BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.node=this._createNode();for(var b=[],c=a.pNode;c;)c.isLastNode&&b.push(c.layer),c=c.pNode;var d=[];BI.count(0,a.layer,function(c){d.push({type:"bi.layout",cls:BI.contains(b,c)?"":"base-line-conn-background",width:12,height:a.height})}),d.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(a.layer,12),items:[d]})},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(a){BI.MultiLayerSingleTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)},_createNode:function(){var a=this,b=this.options;return BI.createWidget({type:"bi.plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,isLastNode:b.isLastNode,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_plus_group_node",BI.MultiLayerSingleTreePlusGroupNode),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),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 a=this,b=this.options;this.storeValue=b.value||{},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),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(){b.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(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),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 a=this,b=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(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{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(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),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 a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=b.value||{},this._assertValue(this.storeValue),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:b.allowEdit,height:b.height,text:b.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})},value:this.storeValue}),this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue(""),a.fireEvent(BI.MultiSelectCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())}),a.fireEvent(BI.MultiSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()}),a.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().updateSelectedValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()}),a.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&(d.storeValue.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,c.storeValue.assist&&c.storeValue.assist.push(g[b]),delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,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),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 diff --git a/dist/bundle.js b/dist/bundle.js index 04ed26473..77a474ac7 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -21674,8 +21674,10 @@ BI.prepares.push(function () { }; var addResizeListener = function (element, fn) { - if (attachEvent) element.attachEvent("onresize", fn); - else { + if (attachEvent) { + element.attachEvent("onresize", fn); + fn(); + } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; createStyles(); @@ -38479,14 +38481,15 @@ BI.Pane = BI.inherit(BI.Widget, { loading: function () { var self = this, o = this.options; + var isIE = BI.isIE(); var loadingAnimation = BI.createWidget({ type: "bi.horizontal", - cls: "bi-loading-widget" + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""), + cls: "bi-loading-widget" + (isIE ? " wave-loading hack" : ""), height: 30, width: 30, hgap: 5, vgap: 2.5, - items: [{ + items: isIE ? [] : [{ type: "bi.layout", cls: "animate-rect rect1", height: 25, @@ -48277,9 +48280,13 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/** handler.attach_array.push(attachO); } } catch (e) { - if (isFunction(handler.onerror)) {handler.onerror(rpe, event || _global.event);} + if (isFunction(handler.onerror)) { + handler.onerror(rpe, event || _global.event); + } + } + if (isFunction(handler.onload)) { + handler.onload(rpe, {responseText: responseText}); } - if (isFunction(handler.onload)) {handler.onload(rpe, {responseText: responseText});} }, target = ["AjaxUpload", (new Date).getTime(), String(Math.random()).substring(2)].join("_"); try { // IE < 8 does not accept enctype attribute ... @@ -48490,7 +48497,14 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/** self.fireEvent(BI.File.EVENT_ERROR); return; } - self.fireEvent(BI.File.EVENT_UPLOADED); + var error = BI.some(_wrap.attach_array, function (index, attach) { + if (attach.errorCode) { + BI.Msg.toast(attach.errorMsg, {level: "error"}); + self.fireEvent(BI.File.EVENT_ERROR, attach); + return true; + } + }); + !error && self.fireEvent(BI.File.EVENT_UPLOADED); // enable again the submit button/element }, 1000); }; @@ -48696,10 +48710,10 @@ BI.Input = BI.inherit(BI.Single, { // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓) var originalEvent = e.originalEvent; if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { - keyCode = null; inputEventValid = true; self._keydown_ = true; _keydown(keyCode); + keyCode = null; } }) .click(function (e) { @@ -48804,18 +48818,20 @@ BI.Input = BI.inherit(BI.Single, { } this.fireEvent(BI.Input.EVENT_KEY_DOWN); - if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) { + // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 + var lastValue = this._lastValue; + if(BI.trim(this.getValue()) !== BI.trim(this._lastValue || "")){ + this._valueChange(); + } + if (BI.isEndWithBlank(this.getValue())) { this._pause = true; this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this); this.fireEvent(BI.Input.EVENT_PAUSE); this._defaultState(); } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && - BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { + BI.trim(this.getValue()) === "" && (lastValue !== null && BI.trim(lastValue) !== "")) { this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); this.fireEvent(BI.Input.EVENT_STOP); - this._valueChange(); - } else { - this._valueChange(); } }, diff --git a/dist/bundle.min.js b/dist/bundle.min.js index 668f3da0f..69003c3c3 100644 --- a/dist/bundle.min.js +++ b/dist/bundle.min.js @@ -1,29 +1,29 @@ -/*! fineui 2019-07-12 17:17:35 */ +/*! fineui 2019-07-17 10:06:48 */ function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),function(){function a(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function b(a,b,c,d){for(var e=-1,f=null==a?0:a.length;++e-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0:return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){ var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["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"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||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(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJCZGJMZMGXMPRYXKJNYMSGMZJYMKMFXMLDTGFBHCJHKYLPFMDXLQJJSMTQGZSJLQDLDGJYCALCMZCSDJLLNXDJFFFFJCZFMZFFPFKHKGDPSXKTACJDHHZDDCRRCFQYJKQCCWJDXHWJLYLLZGCFCQDSMLZPBJJPLSBCJGGDCKKDEZSQCCKJGCGKDJTJDLZYCXKLQSCGJCLTFPCQCZGWPJDQYZJJBYJHSJDZWGFSJGZKQCCZLLPSPKJGQJHZZLJPLGJGJJTHJJYJZCZMLZLYQBGJWMLJKXZDZNJQSYZMLJLLJKYWXMKJLHSKJGBMCLYYMKXJQLBMLLKMDXXKWYXYSLMLPSJQQJQXYXFJTJDXMXXLLCXQBSYJBGWYMBGGBCYXPJYGPEPFGDJGBHBNSQJYZJKJKHXQFGQZKFHYGKHDKLLSDJQXPQYKYBNQSXQNSZSWHBSXWHXWBZZXDMNSJBSBKBBZKLYLXGWXDRWYQZMYWSJQLCJXXJXKJEQXSCYETLZHLYYYSDZPAQYZCMTLSHTZCFYZYXYLJSDCJQAGYSLCQLYYYSHMRQQKLDXZSCSSSYDYCJYSFSJBFRSSZQSBXXPXJYSDRCKGJLGDKZJZBDKTCSYQPYHSTCLDJDHMXMCGXYZHJDDTMHLTXZXYLYMOHYJCLTYFBQQXPFBDFHHTKSQHZYYWCNXXCRWHOWGYJLEGWDQCWGFJYCSNTMYTOLBYGWQWESJPWNMLRYDZSZTXYQPZGCWXHNGPYXSHMYQJXZTDPPBFYHZHTJYFDZWKGKZBLDNTSXHQEEGZZYLZMMZYJZGXZXKHKSTXNXXWYLYAPSTHXDWHZYMPXAGKYDXBHNHXKDPJNMYHYLPMGOCSLNZHKXXLPZZLBMLSFBHHGYGYYGGBHSCYAQTYWLXTZQCEZYDQDQMMHTKLLSZHLSJZWFYHQSWSCWLQAZYNYTLSXTHAZNKZZSZZLAXXZWWCTGQQTDDYZTCCHYQZFLXPSLZYGPZSZNGLNDQTBDLXGTCTAJDKYWNSYZLJHHZZCWNYYZYWMHYCHHYXHJKZWSXHZYXLYSKQYSPSLYZWMYPPKBYGLKZHTYXAXQSYSHXASMCHKDSCRSWJPWXSGZJLWWSCHSJHSQNHCSEGNDAQTBAALZZMSSTDQJCJKTSCJAXPLGGXHHGXXZCXPDMMHLDGTYBYSJMXHMRCPXXJZCKZXSHMLQXXTTHXWZFKHCCZDYTCJYXQHLXDHYPJQXYLSYYDZOZJNYXQEZYSQYAYXWYPDGXDDXSPPYZNDLTWRHXYDXZZJHTCXMCZLHPYYYYMHZLLHNXMYLLLMDCPPXHMXDKYCYRDLTXJCHHZZXZLCCLYLNZSHZJZZLNNRLWHYQSNJHXYNTTTKYJPYCHHYEGKCTTWLGQRLGGTGTYGYHPYHYLQYQGCWYQKPYYYTTTTLHYHLLTYTTSPLKYZXGZWGPYDSSZZDQXSKCQNMJJZZBXYQMJRTFFBTKHZKBXLJJKDXJTLBWFZPPTKQTZTGPDGNTPJYFALQMKGXBDCLZFHZCLLLLADPMXDJHLCCLGYHDZFGYDDGCYYFGYDXKSSEBDHYKDKDKHNAXXYBPBYYHXZQGAFFQYJXDMLJCSQZLLPCHBSXGJYNDYBYQSPZWJLZKSDDTACTBXZDYZYPJZQSJNKKTKNJDJGYYPGTLFYQKASDNTCYHBLWDZHBBYDWJRYGKZYHEYYFJMSDTYFZJJHGCXPLXHLDWXXJKYTCYKSSSMTWCTTQZLPBSZDZWZXGZAGYKTYWXLHLSPBCLLOQMMZSSLCMBJCSZZKYDCZJGQQDSMCYTZQQLWZQZXSSFPTTFQMDDZDSHDTDWFHTDYZJYQJQKYPBDJYYXTLJHDRQXXXHAYDHRJLKLYTWHLLRLLRCXYLBWSRSZZSYMKZZHHKYHXKSMDSYDYCJPBZBSQLFCXXXNXKXWYWSDZYQOGGQMMYHCDZTTFJYYBGSTTTYBYKJDHKYXBELHTYPJQNFXFDYKZHQKZBYJTZBXHFDXKDASWTAWAJLDYJSFHBLDNNTNQJTJNCHXFJSRFWHZFMDRYJYJWZPDJKZYJYMPCYZNYNXFBYTFYFWYGDBNZZZDNYTXZEMMQBSQEHXFZMBMFLZZSRXYMJGSXWZJSPRYDJSJGXHJJGLJJYNZZJXHGXKYMLPYYYCXYTWQZSWHWLYRJLPXSLSXMFSWWKLCTNXNYNPSJSZHDZEPTXMYYWXYYSYWLXJQZQXZDCLEEELMCPJPCLWBXSQHFWWTFFJTNQJHJQDXHWLBYZNFJLALKYYJLDXHHYCSTYYWNRJYXYWTRMDRQHWQCMFJDYZMHMYYXJWMYZQZXTLMRSPWWCHAQBXYGZYPXYYRRCLMPYMGKSJSZYSRMYJSNXTPLNBAPPYPYLXYYZKYNLDZYJZCZNNLMZHHARQMPGWQTZMXXMLLHGDZXYHXKYXYCJMFFYYHJFSBSSQLXXNDYCANNMTCJCYPRRNYTYQNYYMBMSXNDLYLYSLJRLXYSXQMLLYZLZJJJKYZZCSFBZXXMSTBJGNXYZHLXNMCWSCYZYFZLXBRNNNYLBNRTGZQYSATSWRYHYJZMZDHZGZDWYBSSCSKXSYHYTXXGCQGXZZSHYXJSCRHMKKBXCZJYJYMKQHZJFNBHMQHYSNJNZYBKNQMCLGQHWLZNZSWXKHLJHYYBQLBFCDSXDLDSPFZPSKJYZWZXZDDXJSMMEGJSCSSMGCLXXKYYYLNYPWWWGYDKZJGGGZGGSYCKNJWNJPCXBJJTQTJWDSSPJXZXNZXUMELPXFSXTLLXCLJXJJLJZXCTPSWXLYDHLYQRWHSYCSQYYBYAYWJJJQFWQCQQCJQGXALDBZZYJGKGXPLTZYFXJLTPADKYQHPMATLCPDCKBMTXYBHKLENXDLEEGQDYMSAWHZMLJTWYGXLYQZLJEEYYBQQFFNLYXRDSCTGJGXYYNKLLYQKCCTLHJLQMKKZGCYYGLLLJDZGYDHZWXPYSJBZKDZGYZZHYWYFQYTYZSZYEZZLYMHJJHTSMQWYZLKYYWZCSRKQYTLTDXWCTYJKLWSQZWBDCQYNCJSRSZJLKCDCDTLZZZACQQZZDDXYPLXZBQJYLZLLLQDDZQJYJYJZYXNYYYNYJXKXDAZWYRDLJYYYRJLXLLDYXJCYWYWNQCCLDDNYYYNYCKCZHXXCCLGZQJGKWPPCQQJYSBZZXYJSQPXJPZBSBDSFNSFPZXHDWZTDWPPTFLZZBZDMYYPQJRSDZSQZSQXBDGCPZSWDWCSQZGMDHZXMWWFYBPDGPHTMJTHZSMMBGZMBZJCFZWFZBBZMQCFMBDMCJXLGPNJBBXGYHYYJGPTZGZMQBQTCGYXJXLWZKYDPDYMGCFTPFXYZTZXDZXTGKMTYBBCLBJASKYTSSQYYMSZXFJEWLXLLSZBQJJJAKLYLXLYCCTSXMCWFKKKBSXLLLLJYXTYLTJYYTDPJHNHNNKBYQNFQYYZBYYESSESSGDYHFHWTCJBSDZZTFDMXHCNJZYMQWSRYJDZJQPDQBBSTJGGFBKJBXTGQHNGWJXJGDLLTHZHHYYYYYYSXWTYYYCCBDBPYPZYCCZYJPZYWCBDLFWZCWJDXXHYHLHWZZXJTCZLCDPXUJCZZZLYXJJTXPHFXWPYWXZPTDZZBDZCYHJHMLXBQXSBYLRDTGJRRCTTTHYTCZWMXFYTWWZCWJWXJYWCSKYBZSCCTZQNHXNWXXKHKFHTSWOCCJYBCMPZZYKBNNZPBZHHZDLSYDDYTYFJPXYNGFXBYQXCBHXCPSXTYZDMKYSNXSXLHKMZXLYHDHKWHXXSSKQYHHCJYXGLHZXCSNHEKDTGZXQYPKDHEXTYKCNYMYYYPKQYYYKXZLTHJQTBYQHXBMYHSQCKWWYLLHCYYLNNEQXQWMCFBDCCMLJGGXDQKTLXKGNQCDGZJWYJJLYHHQTTTNWCHMXCXWHWSZJYDJCCDBQCDGDNYXZTHCQRXCBHZTQCBXWGQWYYBXHMBYMYQTYEXMQKYAQYRGYZSLFYKKQHYSSQYSHJGJCNXKZYCXSBXYXHYYLSTYCXQTHYSMGSCPMMGCCCCCMTZTASMGQZJHKLOSQYLSWTMXSYQKDZLJQQYPLSYCZTCQQPBBQJZCLPKHQZYYXXDTDDTSJCXFFLLCHQXMJLWCJCXTSPYCXNDTJSHJWXDQQJSKXYAMYLSJHMLALYKXCYYDMNMDQMXMCZNNCYBZKKYFLMCHCMLHXRCJJHSYLNMTJZGZGYWJXSRXCWJGJQHQZDQJDCJJZKJKGDZQGJJYJYLXZXXCDQHHHEYTMHLFSBDJSYYSHFYSTCZQLPBDRFRZTZYKYWHSZYQKWDQZRKMSYNBCRXQBJYFAZPZZEDZCJYWBCJWHYJBQSZYWRYSZPTDKZPFPBNZTKLQYHBBZPNPPTYZZYBQNYDCPJMMCYCQMCYFZZDCMNLFPBPLNGQJTBTTNJZPZBBZNJKLJQYLNBZQHKSJZNGGQSZZKYXSHPZSNBCGZKDDZQANZHJKDRTLZLSWJLJZLYWTJNDJZJHXYAYNCBGTZCSSQMNJPJYTYSWXZFKWJQTKHTZPLBHSNJZSYZBWZZZZLSYLSBJHDWWQPSLMMFBJDWAQYZTCJTBNNWZXQXCDSLQGDSDPDZHJTQQPSWLYYJZLGYXYZLCTCBJTKTYCZJTQKBSJLGMGZDMCSGPYNJZYQYYKNXRPWSZXMTNCSZZYXYBYHYZAXYWQCJTLLCKJJTJHGDXDXYQYZZBYWDLWQCGLZGJGQRQZCZSSBCRPCSKYDZNXJSQGXSSJMYDNSTZTPBDLTKZWXQWQTZEXNQCZGWEZKSSBYBRTSSSLCCGBPSZQSZLCCGLLLZXHZQTHCZMQGYZQZNMCOCSZJMMZSQPJYGQLJYJPPLDXRGZYXCCSXHSHGTZNLZWZKJCXTCFCJXLBMQBCZZWPQDNHXLJCTHYZLGYLNLSZZPCXDSCQQHJQKSXZPBAJYEMSMJTZDXLCJYRYYNWJBNGZZTMJXLTBSLYRZPYLSSCNXPHLLHYLLQQZQLXYMRSYCXZLMMCZLTZSDWTJJLLNZGGQXPFSKYGYGHBFZPDKMWGHCXMSGDXJMCJZDYCABXJDLNBCDQYGSKYDQTXDJJYXMSZQAZDZFSLQXYJSJZYLBTXXWXQQZBJZUFBBLYLWDSLJHXJYZJWTDJCZFQZQZZDZSXZZQLZCDZFJHYSPYMPQZMLPPLFFXJJNZZYLSJEYQZFPFZKSYWJJJHRDJZZXTXXGLGHYDXCSKYSWMMZCWYBAZBJKSHFHJCXMHFQHYXXYZFTSJYZFXYXPZLCHMZMBXHZZSXYFYMNCWDABAZLXKTCSHHXKXJJZJSTHYGXSXYYHHHJWXKZXSSBZZWHHHCWTZZZPJXSNXQQJGZYZYWLLCWXZFXXYXYHXMKYYSWSQMNLNAYCYSPMJKHWCQHYLAJJMZXHMMCNZHBHXCLXTJPLTXYJHDYYLTTXFSZHYXXSJBJYAYRSMXYPLCKDUYHLXRLNLLSTYZYYQYGYHHSCCSMZCTZQXKYQFPYYRPFFLKQUNTSZLLZMWWTCQQYZWTLLMLMPWMBZSSTZRBPDDTLQJJBXZCSRZQQYGWCSXFWZLXCCRSZDZMCYGGDZQSGTJSWLJMYMMZYHFBJDGYXCCPSHXNZCSBSJYJGJMPPWAFFYFNXHYZXZYLREMZGZCYZSSZDLLJCSQFNXZKPTXZGXJJGFMYYYSNBTYLBNLHPFZDCYFBMGQRRSSSZXYSGTZRNYDZZCDGPJAFJFZKNZBLCZSZPSGCYCJSZLMLRSZBZZLDLSLLYSXSQZQLYXZLSKKBRXBRBZCYCXZZZEEYFGKLZLYYHGZSGZLFJHGTGWKRAAJYZKZQTSSHJJXDCYZUYJLZYRZDQQHGJZXSSZBYKJPBFRTJXLLFQWJHYLQTYMBLPZDXTZYGBDHZZRBGXHWNJTJXLKSCFSMWLSDQYSJTXKZSCFWJLBXFTZLLJZLLQBLSQMQQCGCZFPBPHZCZJLPYYGGDTGWDCFCZQYYYQYSSCLXZSKLZZZGFFCQNWGLHQYZJJCZLQZZYJPJZZBPDCCMHJGXDQDGDLZQMFGPSYTSDYFWWDJZJYSXYYCZCYHZWPBYKXRYLYBHKJKSFXTZJMMCKHLLTNYYMSYXYZPYJQYCSYCWMTJJKQYRHLLQXPSGTLYYCLJSCPXJYZFNMLRGJJTYZBXYZMSJYJHHFZQMSYXRSZCWTLRTQZSSTKXGQKGSPTGCZNJSJCQCXHMXGGZTQYDJKZDLBZSXJLHYQGGGTHQSZPYHJHHGYYGKGGCWJZZYLCZLXQSFTGZSLLLMLJSKCTBLLZZSZMMNYTPZSXQHJCJYQXYZXZQZCPSHKZZYSXCDFGMWQRLLQXRFZTLYSTCTMJCXJJXHJNXTNRZTZFQYHQGLLGCXSZSJDJLJCYDSJTLNYXHSZXCGJZYQPYLFHDJSBPCCZHJJJQZJQDYBSSLLCMYTTMQTBHJQNNYGKYRQYQMZGCJKPDCGMYZHQLLSLLCLMHOLZGDYYFZSLJCQZLYLZQJESHNYLLJXGJXLYSYYYXNBZLJSSZCQQCJYLLZLTJYLLZLLBNYLGQCHXYYXOXCXQKYJXXXYKLXSXXYQXCYKQXQCSGYXXYQXYGYTQOHXHXPYXXXULCYEYCHZZCBWQBBWJQZSCSZSSLZYLKDESJZWMYMCYTSDSXXSCJPQQSQYLYYZYCMDJDZYWCBTJSYDJKCYDDJLBDJJSODZYSYXQQYXDHHGQQYQHDYXWGMMMAJDYBBBPPBCMUUPLJZSMTXERXJMHQNUTPJDCBSSMSSSTKJTSSMMTRCPLZSZMLQDSDMJMQPNQDXCFYNBFSDQXYXHYAYKQYDDLQYYYSSZBYDSLNTFQTZQPZMCHDHCZCWFDXTMYQSPHQYYXSRGJCWTJTZZQMGWJJTJHTQJBBHWZPXXHYQFXXQYWYYHYSCDYDHHQMNMTMWCPBSZPPZZGLMZFOLLCFWHMMSJZTTDHZZYFFYTZZGZYSKYJXQYJZQBHMBZZLYGHGFMSHPZFZSNCLPBQSNJXZSLXXFPMTYJYGBXLLDLXPZJYZJYHHZCYWHJYLSJEXFSZZYWXKZJLUYDTMLYMQJPWXYHXSKTQJEZRPXXZHHMHWQPWQLYJJQJJZSZCPHJLCHHNXJLQWZJHBMZYXBDHHYPZLHLHLGFWLCHYYTLHJXCJMSCPXSTKPNHQXSRTYXXTESYJCTLSSLSTDLLLWWYHDHRJZSFGXTSYCZYNYHTDHWJSLHTZDQDJZXXQHGYLTZPHCSQFCLNJTCLZPFSTPDYNYLGMJLLYCQHYSSHCHYLHQYQTMZYPBYWRFQYKQSYSLZDQJMPXYYSSRHZJNYWTQDFZBWWTWWRXCWHGYHXMKMYYYQMSMZHNGCEPMLQQMTCWCTMMPXJPJJHFXYYZSXZHTYBMSTSYJTTQQQYYLHYNPYQZLCYZHZWSMYLKFJXLWGXYPJYTYSYXYMZCKTTWLKSMZSYLMPWLZWXWQZSSAQSYXYRHSSNTSRAPXCPWCMGDXHXZDZYFJHGZTTSBJHGYZSZYSMYCLLLXBTYXHBBZJKSSDMALXHYCFYGMQYPJYCQXJLLLJGSLZGQLYCJCCZOTYXMTMTTLLWTGPXYMZMKLPSZZZXHKQYSXCTYJZYHXSHYXZKXLZWPSQPYHJWPJPWXQQYLXSDHMRSLZZYZWTTCYXYSZZSHBSCCSTPLWSSCJCHNLCGCHSSPHYLHFHHXJSXYLLNYLSZDHZXYLSXLWZYKCLDYAXZCMDDYSPJTQJZLNWQPSSSWCTSTSZLBLNXSMNYYMJQBQHRZWTYYDCHQLXKPZWBGQYBKFCMZWPZLLYYLSZYDWHXPSBCMLJBSCGBHXLQHYRLJXYSWXWXZSLDFHLSLYNJLZYFLYJYCDRJLFSYZFSLLCQYQFGJYHYXZLYLMSTDJCYHBZLLNWLXXYGYYHSMGDHXXHHLZZJZXCZZZCYQZFNGWPYLCPKPYYPMCLQKDGXZGGWQBDXZZKZFBXXLZXJTPJPTTBYTSZZDWSLCHZHSLTYXHQLHYXXXYYZYSWTXZKHLXZXZPYHGCHKCFSYHUTJRLXFJXPTZTWHPLYXFCRHXSHXKYXXYHZQDXQWULHYHMJTBFLKHTXCWHJFWJCFPQRYQXCYYYQYGRPYWSGSUNGWCHKZDXYFLXXHJJBYZWTSXXNCYJJYMSWZJQRMHXZWFQSYLZJZGBHYNSLBGTTCSYBYXXWXYHXYYXNSQYXMQYWRGYQLXBBZLJSYLPSYTJZYHYZAWLRORJMKSCZJXXXYXCHDYXRYXXJDTSQFXLYLTSFFYXLMTYJMJUYYYXLTZCSXQZQHZXLYYXZHDNBRXXXJCTYHLBRLMBRLLAXKYLLLJLYXXLYCRYLCJTGJCMTLZLLCYZZPZPCYAWHJJFYBDYYZSMPCKZDQYQPBPCJPDCYZMDPBCYYDYCNNPLMTMLRMFMMGWYZBSJGYGSMZQQQZTXMKQWGXLLPJGZBQCDJJJFPKJKCXBLJMSWMDTQJXLDLPPBXCWRCQFBFQJCZAHZGMYKPHYYHZYKNDKZMBPJYXPXYHLFPNYYGXJDBKXNXHJMZJXSTRSTLDXSKZYSYBZXJLXYSLBZYSLHXJPFXPQNBYLLJQKYGZMCYZZYMCCSLCLHZFWFWYXZMWSXTYNXJHPYYMCYSPMHYSMYDYSHQYZCHMJJMZCAAGCFJBBHPLYZYLXXSDJGXDHKXXTXXNBHRMLYJSLTXMRHNLXQJXYZLLYSWQGDLBJHDCGJYQYCMHWFMJYBMBYJYJWYMDPWHXQLDYGPDFXXBCGJSPCKRSSYZJMSLBZZJFLJJJLGXZGYXYXLSZQYXBEXYXHGCXBPLDYHWETTWWCJMBTXCHXYQXLLXFLYXLLJLSSFWDPZSMYJCLMWYTCZPCHQEKCQBWLCQYDPLQPPQZQFJQDJHYMMCXTXDRMJWRHXCJZYLQXDYYNHYYHRSLSRSYWWZJYMTLTLLGTQCJZYABTCKZCJYCCQLJZQXALMZYHYWLWDXZXQDLLQSHGPJFJLJHJABCQZDJGTKHSSTCYJLPSWZLXZXRWGLDLZRLZXTGSLLLLZLYXXWGDZYGBDPHZPBRLWSXQBPFDWOFMWHLYPCBJCCLDMBZPBZZLCYQXLDOMZBLZWPDWYYGDSTTHCSQSCCRSSSYSLFYBFNTYJSZDFNDPDHDZZMBBLSLCMYFFGTJJQWFTMTPJWFNLBZCMMJTGBDZLQLPYFHYYMJYLSDCHDZJWJCCTLJCLDTLJJCPDDSQDSSZYBNDBJLGGJZXSXNLYCYBJXQYCBYLZCFZPPGKCXZDZFZTJJFJSJXZBNZYJQTTYJYHTYCZHYMDJXTTMPXSPLZCDWSLSHXYPZGTFMLCJTYCBPMGDKWYCYZCDSZZYHFLYCTYGWHKJYYLSJCXGYWJCBLLCSNDDBTZBSCLYZCZZSSQDLLMQYYHFSLQLLXFTYHABXGWNYWYYPLLSDLDLLBJCYXJZMLHLJDXYYQYTDLLLBUGBFDFBBQJZZMDPJHGCLGMJJPGAEHHBWCQXAXHHHZCHXYPHJAXHLPHJPGPZJQCQZGJJZZUZDMQYYBZZPHYHYBWHAZYJHYKFGDPFQSDLZMLJXKXGALXZDAGLMDGXMWZQYXXDXXPFDMMSSYMPFMDMMKXKSYZYSHDZKXSYSMMZZZMSYDNZZCZXFPLSTMZDNMXCKJMZTYYMZMZZMSXHHDCZJEMXXKLJSTLWLSQLYJZLLZJSSDPPMHNLZJCZYHMXXHGZCJMDHXTKGRMXFWMCGMWKDTKSXQMMMFZZYDKMSCLCMPCGMHSPXQPZDSSLCXKYXTWLWJYAHZJGZQMCSNXYYMMPMLKJXMHLMLQMXCTKZMJQYSZJSYSZHSYJZJCDAJZYBSDQJZGWZQQXFKDMSDJLFWEHKZQKJPEYPZYSZCDWYJFFMZZYLTTDZZEFMZLBNPPLPLPEPSZALLTYLKCKQZKGENQLWAGYXYDPXLHSXQQWQCQXQCLHYXXMLYCCWLYMQYSKGCHLCJNSZKPYZKCQZQLJPDMDZHLASXLBYDWQLWDNBQCRYDDZTJYBKBWSZDXDTNPJDTCTQDFXQQMGNXECLTTBKPWSLCTYQLPWYZZKLPYGZCQQPLLKCCYLPQMZCZQCLJSLQZDJXLDDHPZQDLJJXZQDXYZQKZLJCYQDYJPPYPQYKJYRMPCBYMCXKLLZLLFQPYLLLMBSGLCYSSLRSYSQTMXYXZQZFDZUYSYZTFFMZZSMZQHZSSCCMLYXWTPZGXZJGZGSJSGKDDHTQGGZLLBJDZLCBCHYXYZHZFYWXYZYMSDBZZYJGTSMTFXQYXQSTDGSLNXDLRYZZLRYYLXQHTXSRTZNGZXBNQQZFMYKMZJBZYMKBPNLYZPBLMCNQYZZZSJZHJCTZKHYZZJRDYZHNPXGLFZTLKGJTCTSSYLLGZRZBBQZZKLPKLCZYSSUYXBJFPNJZZXCDWXZYJXZZDJJKGGRSRJKMSMZJLSJYWQSKYHQJSXPJZZZLSNSHRNYPZTWCHKLPSRZLZXYJQXQKYSJYCZTLQZYBBYBWZPQDWWYZCYTJCJXCKCWDKKZXSGKDZXWWYYJQYYTCYTDLLXWKCZKKLCCLZCQQDZLQLCSFQCHQHSFSMQZZLNBJJZBSJHTSZDYSJQJPDLZCDCWJKJZZLPYCGMZWDJJBSJQZSYZYHHXJPBJYDSSXDZNCGLQMBTSFSBPDZDLZNFGFJGFSMPXJQLMBLGQCYYXBQKDJJQYRFKZTJDHCZKLBSDZCFJTPLLJGXHYXZCSSZZXSTJYGKGCKGYOQXJPLZPBPGTGYJZGHZQZZLBJLSQFZGKQQJZGYCZBZQTLDXRJXBSXXPZXHYZYCLWDXJJHXMFDZPFZHQHQMQGKSLYHTYCGFRZGNQXCLPDLBZCSCZQLLJBLHBZCYPZZPPDYMZZSGYHCKCPZJGSLJLNSCDSLDLXBMSTLDDFJMKDJDHZLZXLSZQPQPGJLLYBDSZGQLBZLSLKYYHZTTNTJYQTZZPSZQZTLLJTYYLLQLLQYZQLBDZLSLYYZYMDFSZSNHLXZNCZQZPBWSKRFBSYZMTHBLGJPMCZZLSTLXSHTCSYZLZBLFEQHLXFLCJLYLJQCBZLZJHHSSTBRMHXZHJZCLXFNBGXGTQJCZTMSFZKJMSSNXLJKBHSJXNTNLZDNTLMSJXGZJYJCZXYJYJWRWWQNZTNFJSZPZSHZJFYRDJSFSZJZBJFZQZZHZLXFYSBZQLZSGYFTZDCSZXZJBQMSZKJRHYJZCKMJKHCHGTXKXQGLXPXFXTRTYLXJXHDTSJXHJZJXZWZLCQSBTXWXGXTXXHXFTSDKFJHZYJFJXRZSDLLLTQSQQZQWZXSYQTWGWBZCGZLLYZBCLMQQTZHZXZXLJFRMYZFLXYSQXXJKXRMQDZDMMYYBSQBHGZMWFWXGMXLZPYYTGZYCCDXYZXYWGSYJYZNBHPZJSQSYXSXRTFYZGRHZTXSZZTHCBFCLSYXZLZQMZLMPLMXZJXSFLBYZMYQHXJSXRXSQZZZSSLYFRCZJRCRXHHZXQYDYHXSJJHZCXZBTYNSYSXJBQLPXZQPYMLXZKYXLXCJLCYSXXZZLXDLLLJJYHZXGYJWKJRWYHCPSGNRZLFZWFZZNSXGXFLZSXZZZBFCSYJDBRJKRDHHGXJLJJTGXJXXSTJTJXLYXQFCSGSWMSBCTLQZZWLZZKXJMLTMJYHSDDBXGZHDLBMYJFRZFSGCLYJBPMLYSMSXLSZJQQHJZFXGFQFQBPXZGYYQXGZTCQWYLTLGWSGWHRLFSFGZJMGMGBGTJFSYZZGZYZAFLSSPMLPFLCWBJZCLJJMZLPJJLYMQDMYYYFBGYGYZMLYZDXQYXRQQQHSYYYQXYLJTYXFSFSLLGNQCYHYCWFHCCCFXPYLYPLLZYXXXXXKQHHXSHJZCFZSCZJXCPZWHHHHHAPYLQALPQAFYHXDYLUKMZQGGGDDESRNNZLTZGCHYPPYSQJJHCLLJTOLNJPZLJLHYMHEYDYDSQYCDDHGZUNDZCLZYZLLZNTNYZGSLHSLPJJBDGWXPCDUTJCKLKCLWKLLCASSTKZZDNQNTTLYYZSSYSSZZRYLJQKCQDHHCRXRZYDGRGCWCGZQFFFPPJFZYNAKRGYWYQPQXXFKJTSZZXSWZDDFBBXTBGTZKZNPZZPZXZPJSZBMQHKCYXYLDKLJNYPKYGHGDZJXXEAHPNZKZTZCMXCXMMJXNKSZQNMNLWBWWXJKYHCPSTMCSQTZJYXTPCTPDTNNPGLLLZSJLSPBLPLQHDTNJNLYYRSZFFJFQWDPHZDWMRZCCLODAXNSSNYZRESTYJWJYJDBCFXNMWTTBYLWSTSZGYBLJPXGLBOCLHPCBJLTMXZLJYLZXCLTPNCLCKXTPZJSWCYXSFYSZDKNTLBYJCYJLLSTGQCBXRYZXBXKLYLHZLQZLNZCXWJZLJZJNCJHXMNZZGJZZXTZJXYCYYCXXJYYXJJXSSSJSTSSTTPPGQTCSXWZDCSYFPTFBFHFBBLZJCLZZDBXGCXLQPXKFZFLSYLTUWBMQJHSZBMDDBCYSCCLDXYCDDQLYJJWMQLLCSGLJJSYFPYYCCYLTJANTJJPWYCMMGQYYSXDXQMZHSZXPFTWWZQSWQRFKJLZJQQYFBRXJHHFWJJZYQAZMYFRHCYYBYQWLPEXCCZSTYRLTTDMQLYKMBBGMYYJPRKZNPBSXYXBHYZDJDNGHPMFSGMWFZMFQMMBCMZZCJJLCNUXYQLMLRYGQZCYXZLWJGCJCGGMCJNFYZZJHYCPRRCMTZQZXHFQGTJXCCJEAQCRJYHPLQLSZDJRBCQHQDYRHYLYXJSYMHZYDWLDFRYHBPYDTSSCNWBXGLPZMLZZTQSSCPJMXXYCSJYTYCGHYCJWYRXXLFEMWJNMKLLSWTXHYYYNCMMCWJDQDJZGLLJWJRKHPZGGFLCCSCZMCBLTBHBQJXQDSPDJZZGHGLFQYWBZYZJLTSTDHQHCTCBCHFLQMPWDSHYYTQWCNZZJTLBYMBPDYYYXSQKXWYYFLXXNCWCXYPMAELYKKJMZZZBRXYYQJFLJPFHHHYTZZXSGQQMHSPGDZQWBWPJHZJDYSCQWZKTXXSQLZYYMYSDZGRXCKKUJLWPYSYSCSYZLRMLQSYLJXBCXTLWDQZPCYCYKPPPNSXFYZJJRCEMHSZMSXLXGLRWGCSTLRSXBZGBZGZTCPLUJLSLYLYMTXMTZPALZXPXJTJWTCYYZLBLXBZLQMYLXPGHDSLSSDMXMBDZZSXWHAMLCZCPJMCNHJYSNSYGCHSKQMZZQDLLKABLWJXSFMOCDXJRRLYQZKJMYBYQLYHETFJZFRFKSRYXFJTWDSXXSYSQJYSLYXWJHSNLXYYXHBHAWHHJZXWMYLJCSSLKYDZTXBZSYFDXGXZJKHSXXYBSSXDPYNZWRPTQZCZENYGCXQFJYKJBZMLJCMQQXUOXSLYXXLYLLJDZBTYMHPFSTTQQWLHOKYBLZZALZXQLHZWRRQHLSTMYPYXJJXMQSJFNBXYXYJXXYQYLTHYLQYFMLKLJTMLLHSZWKZHLJMLHLJKLJSTLQXYLMBHHLNLZXQJHXCFXXLHYHJJGBYZZKBXSCQDJQDSUJZYYHZHHMGSXCSYMXFEBCQWWRBPYYJQTYZCYQYQQZYHMWFFHGZFRJFCDPXNTQYZPDYKHJLFRZXPPXZDBBGZQSTLGDGYLCQMLCHHMFYWLZYXKJLYPQHSYWMQQGQZMLZJNSQXJQSYJYCBEHSXFSZPXZWFLLBCYYJDYTDTHWZSFJMQQYJLMQXXLLDTTKHHYBFPWTYYSQQWNQWLGWDEBZWCMYGCULKJXTMXMYJSXHYBRWFYMWFRXYQMXYSZTZZTFYKMLDHQDXWYYNLCRYJBLPSXCXYWLSPRRJWXHQYPHTYDNXHHMMYWYTZCSQMTSSCCDALWZTCPQPYJLLQZYJSWXMZZMMYLMXCLMXCZMXMZSQTZPPQQBLPGXQZHFLJJHYTJSRXWZXSCCDLXTYJDCQJXSLQYCLZXLZZXMXQRJMHRHZJBHMFLJLMLCLQNLDXZLLLPYPSYJYSXCQQDCMQJZZXHNPNXZMEKMXHYKYQLXSXTXJYYHWDCWDZHQYYBGYBCYSCFGPSJNZDYZZJZXRZRQJJYMCANYRJTLDPPYZBSTJKXXZYPFDWFGZZRPYMTNGXZQBYXNBUFNQKRJQZMJEGRZGYCLKXZDSKKNSXKCLJSPJYYZLQQJYBZSSQLLLKJXTBKTYLCCDDBLSPPFYLGYDTZJYQGGKQTTFZXBDKTYYHYBBFYTYYBCLPDYTGDHRYRNJSPTCSNYJQHKLLLZSLYDXXWBCJQSPXBPJZJCJDZFFXXBRMLAZHCSNDLBJDSZBLPRZTSWSBXBCLLXXLZDJZSJPYLYXXYFTFFFBHJJXGBYXJPMMMPSSJZJMTLYZJXSWXTYLEDQPJMYGQZJGDJLQJWJQLLSJGJGYGMSCLJJXDTYGJQJQJCJZCJGDZZSXQGSJGGCXHQXSNQLZZBXHSGZXCXYLJXYXYYDFQQJHJFXDHCTXJYRXYSQTJXYEFYYSSYYJXNCYZXFXMSYSZXYYSCHSHXZZZGZZZGFJDLTYLNPZGYJYZYYQZPBXQBDZTZCZYXXYHHSQXSHDHGQHJHGYWSZTMZMLHYXGEBTYLZKQWYTJZRCLEKYSTDBCYKQQSAYXCJXWWGSBHJYZYDHCSJKQCXSWXFLTYNYZPZCCZJQTZWJQDZZZQZLJJXLSBHPYXXPSXSHHEZTXFPTLQYZZXHYTXNCFZYYHXGNXMYWXTZSJPTHHGYMXMXQZXTSBCZYJYXXTYYZYPCQLMMSZMJZZLLZXGXZAAJZYXJMZXWDXZSXZDZXLEYJJZQBHZWZZZQTZPSXZTDSXJJJZNYAZPHXYYSRNQDTHZHYYKYJHDZXZLSWCLYBZYECWCYCRYLCXNHZYDZYDYJDFRJJHTRSQTXYXJRJHOJYNXELXSFSFJZGHPZSXZSZDZCQZBYYKLSGSJHCZSHDGQGXYZGXCHXZJWYQWGYHKSSEQZZNDZFKWYSSTCLZSTSYMCDHJXXYWEYXCZAYDMPXMDSXYBSQMJMZJMTZQLPJYQZCGQHXJHHLXXHLHDLDJQCLDWBSXFZZYYSCHTYTYYBHECXHYKGJPXHHYZJFXHWHBDZFYZBCAPNPGNYDMSXHMMMMAMYNBYJTMPXYYMCTHJBZYFCGTYHWPHFTWZZEZSBZEGPFMTSKFTYCMHFLLHGPZJXZJGZJYXZSBBQSCZZLZCCSTPGXMJSFTCCZJZDJXCYBZLFCJSYZFGSZLYBCWZZBYZDZYPSWYJZXZBDSYUXLZZBZFYGCZXBZHZFTPBGZGEJBSTGKDMFHYZZJHZLLZZGJQZLSFDJSSCBZGPDLFZFZSZYZYZSYGCXSNXXCHCZXTZZLJFZGQSQYXZJQDCCZTQCDXZJYQJQCHXZTDLGSCXZSYQJQTZWLQDQZTQCHQQJZYEZZZPBWKDJFCJPZTYPQYQTTYNLMBDKTJZPQZQZZFPZSBNJLGYJDXJDZZKZGQKXDLPZJTCJDQBXDJQJSTCKNXBXZMSLYJCQMTJQWWCJQNJNLLLHJCWQTBZQYDZCZPZZDZYDDCYZZZCCJTTJFZDPRRTZTJDCQTQZDTJNPLZBCLLCTZSXKJZQZPZLBZRBTJDCXFCZDBCCJJLTQQPLDCGZDBBZJCQDCJWYNLLZYZCCDWLLXWZLXRXNTQQCZXKQLSGDFQTDDGLRLAJJTKUYMKQLLTZYTDYYCZGJWYXDXFRSKSTQTENQMRKQZHHQKDLDAZFKYPBGGPZREBZZYKZZSPEGJXGYKQZZZSLYSYYYZWFQZYLZZLZHWCHKYPQGNPGBLPLRRJYXCCSYYHSFZFYBZYYTGZXYLXCZWXXZJZBLFFLGSKHYJZEYJHLPLLLLCZGXDRZELRHGKLZZYHZLYQSZZJZQLJZFLNBHGWLCZCFJYSPYXZLZLXGCCPZBLLCYBBBBUBBCBPCRNNZCZYRBFSRLDCGQYYQXYGMQZWTZYTYJXYFWTEHZZJYWLCCNTZYJJZDEDPZDZTSYQJHDYMBJNYJZLXTSSTPHNDJXXBYXQTZQDDTJTDYYTGWSCSZQFLSHLGLBCZPHDLYZJYCKWTYTYLBNYTSDSYCCTYSZYYEBHEXHQDTWNYGYCLXTSZYSTQMYGZAZCCSZZDSLZCLZRQXYYELJSBYMXSXZTEMBBLLYYLLYTDQYSHYMRQWKFKBFXNXSBYCHXBWJYHTQBPBSBWDZYLKGZSKYHXQZJXHXJXGNLJKZLYYCDXLFYFGHLJGJYBXQLYBXQPQGZTZPLNCYPXDJYQYDYMRBESJYYHKXXSTMXRCZZYWXYQYBMCLLYZHQYZWQXDBXBZWZMSLPDMYSKFMZKLZCYQYCZLQXFZZYDQZPZYGYJYZMZXDZFYFYTTQTZHGSPCZMLCCYTZXJCYTJMKSLPZHYSNZLLYTPZCTZZCKTXDHXXTQCYFKSMQCCYYAZHTJPCYLZLYJBJXTPNYLJYYNRXSYLMMNXJSMYBCSYSYLZYLXJJQYLDZLPQBFZZBLFNDXQKCZFYWHGQMRDSXYCYTXNQQJZYYPFZXDYZFPRXEJDGYQBXRCNFYYQPGHYJDYZXGRHTKYLNWDZNTSMPKLBTHBPYSZBZTJZSZZJTYYXZPHSSZZBZCZPTQFZMYFLYPYBBJQXZMXXDJMTSYSKKBJZXHJCKLPSMKYJZCXTMLJYXRZZQSLXXQPYZXMKYXXXJCLJPRMYYGADYSKQLSNDHYZKQXZYZTCGHZTLMLWZYBWSYCTBHJHJFCWZTXWYTKZLXQSHLYJZJXTMPLPYCGLTBZZTLZJCYJGDTCLKLPLLQPJMZPAPXYZLKKTKDZCZZBNZDYDYQZJYJGMCTXLTGXSZLMLHBGLKFWNWZHDXUHLFMKYSLGXDTWWFRJEJZTZHYDXYKSHWFZCQSHKTMQQHTZHYMJDJSKHXZJZBZZXYMPAGQMSTPXLSKLZYNWRTSQLSZBPSPSGZWYHTLKSSSWHZZLYYTNXJGMJSZSUFWNLSOZTXGXLSAMMLBWLDSZYLAKQCQCTMYCFJBSLXCLZZCLXXKSBZQCLHJPSQPLSXXCKSLNHPSFQQYTXYJZLQLDXZQJZDYYDJNZPTUZDSKJFSLJHYLZSQZLBTXYDGTQFDBYAZXDZHZJNHHQBYKNXJJQCZMLLJZKSPLDYCLBBLXKLELXJLBQYCXJXGCNLCQPLZLZYJTZLJGYZDZPLTQCSXFDMNYCXGBTJDCZNBGBQYQJWGKFHTNPYQZQGBKPBBYZMTJDYTBLSQMPSXTBNPDXKLEMYYCJYNZCTLDYKZZXDDXHQSHDGMZSJYCCTAYRZLPYLTLKXSLZCGGEXCLFXLKJRTLQJAQZNCMBYDKKCXGLCZJZXJHPTDJJMZQYKQSECQZDSHHADMLZFMMZBGNTJNNLGBYJBRBTMLBYJDZXLCJLPLDLPCQDHLXZLYCBLCXZZJADJLNZMMSSSMYBHBSQKBHRSXXJMXSDZNZPXLGBRHWGGFCXGMSKLLTSJYYCQLTSKYWYYHYWXBXQYWPYWYKQLSQPTNTKHQCWDQKTWPXXHCPTHTWUMSSYHBWCRWXHJMKMZNGWTMLKFGHKJYLSYYCXWHYECLQHKQHTTQKHFZLDXQWYZYYDESBPKYRZPJFYYZJCEQDZZDLATZBBFJLLCXDLMJSSXEGYGSJQXCWBXSSZPDYZCXDNYXPPZYDLYJCZPLTXLSXYZYRXCYYYDYLWWNZSAHJSYQYHGYWWAXTJZDAXYSRLTDPSSYYFNEJDXYZHLXLLLZQZSJNYQYQQXYJGHZGZCYJCHZLYCDSHWSHJZYJXCLLNXZJJYYXNFXMWFPYLCYLLABWDDHWDXJMCXZTZPMLQZHSFHZYNZTLLDYWLSLXHYMMYLMBWWKYXYADTXYLLDJPYBPWUXJMWMLLSAFDLLYFLBHHHBQQLTZJCQJLDJTFFKMMMBYTHYGDCQRDDWRQJXNBYSNWZDBYYTBJHPYBYTTJXAAHGQDQTMYSTQXKBTZPKJLZRBEQQSSMJJBDJOTGTBXPGBKTLHQXJJJCTHXQDWJLWRFWQGWSHCKRYSWGFTGYGBXSDWDWRFHWYTJJXXXJYZYSLPYYYPAYXHYDQKXSHXYXGSKQHYWFDDDPPLCJLQQEEWXKSYYKDYPLTJTHKJLTCYYHHJTTPLTZZCDLTHQKZXQYSTEEYWYYZYXXYYSTTJKLLPZMCYHQGXYHSRMBXPLLNQYDQHXSXXWGDQBSHYLLPJJJTHYJKYPPTHYYKTYEZYENMDSHLCRPQFDGFXZPSFTLJXXJBSWYYSKSFLXLPPLBBBLBSFXFYZBSJSSYLPBBFFFFSSCJDSTZSXZRYYSYFFSYZYZBJTBCTSBSDHRTJJBYTCXYJEYLXCBNEBJDSYXYKGSJZBXBYTFZWGENYHHTHZHHXFWGCSTBGXKLSXYWMTMBYXJSTZSCDYQRCYTWXZFHMYMCXLZNSDJTTTXRYCFYJSBSDYERXJLJXBBDEYNJGHXGCKGSCYMBLXJMSZNSKGXFBNBPTHFJAAFXYXFPXMYPQDTZCXZZPXRSYWZDLYBBKTYQPQJPZYPZJZNJPZJLZZFYSBTTSLMPTZRTDXQSJEHBZYLZDHLJSQMLHTXTJECXSLZZSPKTLZKQQYFSYGYWPCPQFHQHYTQXZKRSGTTSQCZLPTXCDYYZXSQZSLXLZMYCPCQBZYXHBSXLZDLTCDXTYLZJYYZPZYZLTXJSJXHLPMYTXCQRBLZSSFJZZTNJYTXMYJHLHPPLCYXQJQQKZZSCPZKSWALQSBLCCZJSXGWWWYGYKTJBBZTDKHXHKGTGPBKQYSLPXPJCKBMLLXDZSTBKLGGQKQLSBKKTFXRMDKBFTPZFRTBBRFERQGXYJPZSSTLBZTPSZQZSJDHLJQLZBPMSMMSXLQQNHKNBLRDDNXXDHDDJCYYGYLXGZLXSYGMQQGKHBPMXYXLYTQWLWGCPBMQXCYZYDRJBHTDJYHQSHTMJSBYPLWHLZFFNYPMHXXHPLTBQPFBJWQDBYGPNZTPFZJGSDDTQSHZEAWZZYLLTYYBWJKXXGHLFKXDJTMSZSQYNZGGSWQSPHTLSSKMCLZXYSZQZXNCJDQGZDLFNYKLJCJLLZLMZZNHYDSSHTHZZLZZBBHQZWWYCRZHLYQQJBEYFXXXWHSRXWQHWPSLMSSKZTTYGYQQWRSLALHMJTQJSMXQBJJZJXZYZKXBYQXBJXSHZTSFJLXMXZXFGHKZSZGGYLCLSARJYHSLLLMZXELGLXYDJYTLFBHBPNLYZFBBHPTGJKWETZHKJJXZXXGLLJLSTGSHJJYQLQZFKCGNNDJSSZFDBCTWWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ 19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=0,f=a.length;e14){var i=g.substring(0,1);for(b=0;b0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(c=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return BI.contains(this.array,a)},indexOf:function(a){return BI.contains(this.array,a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){BI.remove(this.array,a)},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(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;c0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},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(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);null!=b&&b.setRight(c||null),null!=c&&c.setLeft(b||null),this.children.splice(a,1)},removeAllChilds:function(){this.children=[]},addChild:function(a,b){var c=null;c=BI.isUndefined(b)?this.children.length-1:b-1,a.setParent(this),c>=0&&(this.getChild(c)&&this.getChild(c).setRight(a),a.setLeft(this.getChild(c))),BI.isUndefined(b)?this.children.push(a):this.children.splice(b,0,a)},equals:function(a){return this===a||this.id===a.id},clear:function(){this.parent=null,this.left=null,this.right=null,this.children=[]}},BI.extend(BI.Tree,{transformToArrayFormat:function(a,b){if(!a)return[];var c=[];if(BI.isArray(a))for(var d=0,e=a.length;d=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},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(){}}),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(a){this.element.append(a)},_mountChildren:function(){var a=this,b=BI.Widget._renderEngine.createFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.appendFragment(b)},_getChildName:function(a){return a+""},_addElement:function(a,b,c){var d,e=this;return this.hasWidget(this._getChildName(a))?d=this.getWidgetByName(this._getChildName(a)):(d=BI.createWidget(b,c),d.on(BI.Events.DESTROY,function(){BI.each(e._children,function(a,b){b===d&&(BI.remove(e._children,b),e.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),d)),d},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a,b){var c=this,d=this.options,e=BI.Widget._renderEngine.createFragment(),f=[];BI.each(a,function(a,g){var h=c._addElement(d.items.length,g,b);c._children[c._getChildName(d.items.length)]=h,d.items.push(g),f.push(h),e.appendChild(h.element[0])}),this._isMounted&&(this._getWrapper().append(e),BI.each(f,function(a,b){b._mount()}))},prependItems:function(a,b){var c=this;a=a||[];for(var d=BI.Widget._renderEngine.createFragment(),e=[],f=a.length-1;f>=0;f--){this._addItemAt(0,a[f]);var g=this._addElement(0,a[f],b);c._children[c._getChildName(0)]=g,this.options.items.unshift(a[f]),e.push(g),d.appendChild(g.element[0])}this._isMounted&&(this._getWrapper().prepend(d),BI.each(e,function(a,b){b._mount()}))},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=k._getOptions(a),b=k._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=k._getOptions(a),d=null==c.key?k._getChildName(b):c.key;return t[d]=k._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=a[b];if(BI.isNotNull(d)){var e=k._getOptions(d),f=null==e.key?k._getChildName(b):e.key;delete k._children[k._getChildName(f)],t[f]._destroy()}}}function g(a,b,c,d){a=k._getOptions(a),b=b&&k._getOptions(b);var e=BI.isKey(a.key)?a.key:k._getChildName(d);if(b&&t[b.key]){var f,g=BI.isKey(b.key)?b.key:k._getChildName(d);f=c?t[g].element.next():t[g].element,f.length>0?f.before(t[e].element):k._getWrapper().append(t[e].element)}else k._getWrapper().append(t[e].element)}function h(a,b,d,e){var f,g;for(f=d;f<=e;++f)a[f]&&c(a[f],b)&&(g=a[f]);return g}var i,j,k=this,l=0,m=0,n=a.length-1,o=a[0],p=a[n],q=b.length-1,r=b[0],s=b[q],t={};for(BI.each(a,function(a,b){b=k._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(t[c]=k._children[k._getChildName(a)])});l<=n&&m<=q;)if(BI.isNull(o))o=a[++l];else if(BI.isNull(p))p=a[--n];else if(c(o,r,l,m))j=this.patchItem(o,r,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],o=a[++l],r=b[++m];else if(c(p,s,n,q))j=this.patchItem(p,s,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],p=a[--n],s=b[--q];else if(c(o,s))j=this.patchItem(o,s,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],g(o,p,!0),o=a[++l],s=b[--q];else if(c(p,r))j=this.patchItem(p,r,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],g(p,o),p=a[--n],r=b[++m];else{var u=h(a,r,l,n);if(BI.isNull(u)){var v=d(r);g(v,o),r=b[++m]}else BI.each(a,function(b,d){d&&c(d,r)&&(j=k.patchItem(u,r,b)||j,t[null==u.key?k._getChildName(b):u.key]=k._children[k._getChildName(b)],a[b]=void 0,g(u,o))}),r=b[++m]}return l>n?(i=BI.isNull(b[q+1])?null:b[q+1],e(i,b,m,q)):m>q&&f(a,l,n),this._children={},BI.each(b,function(a,b){var c=k._getOptions(b),d=null==c.key?k._getChildName(a):c.key;t[d]._mount(),k._children[k._getChildName(a)]=t[d]}),j},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},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(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a,b,c={},d={},e={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(a&&a(b,d),e[b])for(var f=e[b].length-1;f>=0;f--)e[b][f](d);if(c[b])for(var g,f=c[b].length-1;f>=0;f--)if(g=c[b][f](d))return g;return d},config:function(c,d){a=c,b=d},configWidget:function(a,b){e[a]||(e[a]=[]),e[a].push(b)},registerWidget:function(a,b){c[a]||(c[a]=[]),c[a].length>0&&console.log("组件已经注册过了!"),c[a].push(b)},relieveWidget:function(a){delete c[a]},getObject:function(a,c){if(b&&b(a,c),d[a])for(var e,f=0,g=d[a].length;f0&&console.log("对象已经注册过了!"),d[a].push(b)},relieveObject:function(a){delete d[a]}})}(),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(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},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(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){function c(a,b){var c=a<0?(a*=-1,"-"):"",h="",i=a>0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;iBI.Widget._renderEngine.createElement("body").outerWidth()&&(l-=k.element.outerWidth()+15);var n=BI.Widget._renderEngine.createElement("body").outerHeight();return m+k.element.outerHeight()>n||j+k.element.outerHeight()>n?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.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"}}),_.extend(BI,{pushArray:function(a,b){for(var c=0;ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",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(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),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(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){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(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},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 a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.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 a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p 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%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?b.attachEvent("onresize",c):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
        ',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
        ").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",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(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),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(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){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(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},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 a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.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 a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p 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%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?(b.attachEvent("onresize",c),c()):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
        ',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
        ").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g0&&b-1 in a)))}function d(a){var b=xa[a]={};return ia.each(a.match(ka)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(ia.acceptData(a)){var f,g,h=ia.expando,i="string"==typeof c,j=a.nodeType,k=j?ia.cache:a,l=j?a[h]:a[h]&&h;if(l&&k[l]&&(e||k[l].data)||!i||d!==b)return l||(j?a[h]=l=_.pop()||ia.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=ia.noop)),"object"!=typeof c&&"function"!=typeof c||(e?k[l]=ia.extend(k[l],c):k[l].data=ia.extend(k[l].data,c)),f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[ia.camelCase(c)]=d),i?(g=f[c],null==g&&(g=f[ia.camelCase(c)])):g=f,g}}function f(a,b,c){if(ia.acceptData(a)){var d,e,f,g=a.nodeType,i=g?ia.cache:a,j=g?a[ia.expando]:ia.expando;if(i[j]){if(b&&(f=c?i[j]:i[j].data)){ia.isArray(b)?b=b.concat(ia.map(b,ia.camelCase)):b in f?b=[b]:(b=ia.camelCase(b),b=b in f?[b]:b.split(" "));for(d=0,e=b.length;d=0===c})}function m(a){var b=Ua.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function n(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function o(a){var b=a.getAttributeNode("type");return a.type=(b&&b.specified)+"/"+a.type,a}function p(a){var b=eb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function q(a,b){for(var c,d=0;null!=(c=a[d]);d++)ia._data(c,"globalEval",!b||ia._data(b[d],"globalEval"))}function r(a,b){if(1===b.nodeType&&ia.hasData(a)){var c,d,e,f=ia._data(a),g=ia._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jb[0].contentWindow||jb[0].contentDocument).document,b.write(""),b.close(),c=C(a,b),jb.detach()),ub[a]=c),c}function C(a,b){var c=ia(b.createElement(a)).appendTo(b.body),d=ia.css(c[0],"display");return c.remove(),d}function D(a,b,c,d){var e;if(ia.isArray(b))ia.each(b,function(b,e){c||Ab.test(a)?d(a,e):D(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==ia.type(b))d(a,b);else for(e in b)D(a+"["+e+"]",b[e],c,d)}function E(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(ka)||[];if(ia.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function F(a,b,c,d){function e(h){var i;return f[h]=!0,ia.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function G(a,c){var d,e,f=ia.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&ia.extend(!0,a,d),a}function H(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(h in k)h in d&&(c[k[h]]=d[h]);for(;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}if(g)return g!==j[0]&&j.unshift(g),d[g]}function I(a,b){var c,d,e,f,g={},h=0,i=a.dataTypes.slice(),j=i[0];if(a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i[1])for(e in a.converters)g[e.toLowerCase()]=a.converters[e];for(;d=i[++h];)if("*"!==d){if("*"!==j&&j!==d){if(e=g[j+" "+d]||g["* "+d],!e)for(c in g)if(f=c.split(" "),f[1]===d&&(e=g[j+" "+f[0]]||g["* "+f[0]])){e===!0?e=g[c]:g[c]!==!0&&(d=f[0],i.splice(h--,0,d));break}if(e!==!0)if(e&&a["throws"])b=e(b);else try{b=e(b)}catch(k){return{state:"parsererror",error:e?k:"No conversion from "+j+" to "+d}}}j=d}return{state:"success",data:b}}function J(){try{return new a.XMLHttpRequest}catch(b){}}function K(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function L(){return setTimeout(function(){$b=b}),$b=ia.now()}function M(a,b){ia.each(b,function(b,c){for(var d=(ec[b]||[]).concat(ec["*"]),e=0,f=d.length;e)[^>]*|#([\w-]*))$/,na=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,oa=/^[\],:{}\s]*$/,pa=/(?:^|:|,)(?:\s*\[)+/g,qa=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,ra=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,sa=/^-ms-/,ta=/-([\da-z])/gi,ua=function(a,b){return b.toUpperCase()},va=function(a){(W.addEventListener||"load"===a.type||"complete"===W.readyState)&&(wa(),ia.ready())},wa=function(){W.addEventListener?(W.removeEventListener("DOMContentLoaded",va,!1),a.removeEventListener("load",va,!1)):(W.detachEvent("onreadystatechange",va),a.detachEvent("onload",va))};ia.fn=ia.prototype={jquery:aa,constructor:ia,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ma.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof ia?c[0]:c,ia.merge(this,ia.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:W,!0)),na.test(e[1])&&ia.isPlainObject(c))for(e in c)ia.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=W.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=W,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):ia.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),ia.makeArray(a,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return da.call(this)},get:function(a){return null==a?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a){var b=ia.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return ia.each(this,a,b)},ready:function(a){return ia.ready.promise().done(a),this},slice:function(){return this.pushStack(da.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0||(T.resolveWith(W,[ia]),ia.fn.trigger&&ia(W).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===ia.type(a)},isArray:Array.isArray||function(a){return"array"===ia.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?$[fa.call(a)]||"object":typeof a},isPlainObject:function(a){if(!a||"object"!==ia.type(a)||a.nodeType||ia.isWindow(a))return!1;try{if(a.constructor&&!ga.call(a,"constructor")&&!ga.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||ga.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||W;var d=na.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=ia.buildFragment([a],b,e),e&&ia(e).remove(),ia.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=ia.trim(b),b&&oa.test(b.replace(qa,"@").replace(ra,"]").replace(pa,"")))?new Function("return "+b)():void ia.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||ia.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&ia.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(sa,"ms-").replace(ta,ua)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;f-1;)j.splice(d,1),c&&(d<=g&&g--,d<=h&&h--)}),this},has:function(a){return a?ia.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!j||f&&!k||(c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},ia.extend({Deferred:function(a){var b=[["resolve","done",ia.Callbacks("once memory"),"resolved"],["reject","fail",ia.Callbacks("once memory"),"rejected"],["notify","progress",ia.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return ia.Deferred(function(c){ia.each(b,function(b,f){var g=f[0],h=ia.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&ia.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?ia.extend(a,d):d}},e={};return d.pipe=d.then,ia.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=da.call(arguments),g=f.length,h=1!==g||a&&ia.isFunction(a.promise)?g:0,i=1===h?a:ia.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?da.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e
      • a",c=l.getElementsByTagName("*"),d=l.getElementsByTagName("a")[0],!c||!d||!c.length)return{};f=W.createElement("select"),h=f.appendChild(W.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b={getSetAttribute:"t"!==l.className,leadingWhitespace:3===l.firstChild.nodeType,tbody:!l.getElementsByTagName("tbody").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:!!e.value,optSelected:h.selected,enctype:!!W.createElement("form").enctype,html5Clone:"<:nav>"!==W.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===W.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=W.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=W.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;return l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip,ia(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=W.getElementsByTagName("body")[0];g&&(c=W.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="
        t
        ",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.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%;",b.boxSizing=4===l.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==g.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(W.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==V&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="
        ",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}();var ya=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,za=/([A-Z])/g;ia.extend({cache:{},expando:"jQuery"+(aa+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?ia.cache[a[ia.expando]]:a[ia.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&ia.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),ia.fn.extend({data:function(a,c){var d,e,f=this[0],h=0,i=null;if(a===b){if(this.length&&(i=ia.data(f),1===f.nodeType&&!ia._data(f,"parsedAttrs"))){for(d=f.attributes;h1,null,!0)},removeData:function(a){return this.each(function(){ia.removeData(this,a)})}}),ia.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=ia._data(a,b),c&&(!d||ia.isArray(c)?d=ia._data(a,b,ia.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=ia.queue(a,b),d=c.length,e=c.shift(),f=ia._queueHooks(a,b),g=function(){ia.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),f.cur=e,e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return ia._data(a,c)||ia._data(a,c,{empty:ia.Callbacks("once memory").add(function(){ia._removeData(a,b+"queue"),ia._removeData(a,c)})})}}),ia.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){ia.removeAttr(this,a)})},prop:function(a,b){return ia.access(this,ia.prop,a,b,arguments.length>1)},removeProp:function(a){return a=ia.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(ia.isFunction(a))return this.each(function(b){ia(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(ka)||[];g=0;)d=d.replace(" "+e+" "," ");c.className=a?ia.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return ia.isFunction(a)?this.each(function(c){ia(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=ia(this),h=b,i=a.match(ka)||[];e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else c!==V&&"boolean"!==c||(this.className&&ia._data(this,"__className__",this.className),this.className=this.className||a===!1?"":ia._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=ia.isFunction(a),this.each(function(c){var f,g=ia(this);1===this.nodeType&&(f=e?a.call(this,c,g.val()):a,null==f?f="":"number"==typeof f?f+="":ia.isArray(f)&&(f=ia.map(f,function(a){return null==a?"":a+""})),d=ia.valHooks[this.type]||ia.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=ia.valHooks[f.type]||ia.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Da,""):null==c?"":c)}}}),ia.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i=0}),c.length||(a.selectedIndex=-1),c}}},attr:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return typeof a.getAttribute===V?ia.prop(a,c,d):(f=1!==h||!ia.isXMLDoc(a),f&&(c=c.toLowerCase(),e=ia.attrHooks[c]||(Ga.test(c)?Ba:Aa)),d===b?e&&f&&"get"in e&&null!==(g=e.get(a,c))?g:(typeof a.getAttribute!==V&&(g=a.getAttribute(c)),null==g?b:g):null!==d?e&&f&&"set"in e&&(g=e.set(a,d,c))!==b?g:(a.setAttribute(c,d+""),d):void ia.removeAttr(a,c))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ka);if(f&&1===a.nodeType)for(;c=f[e++];)d=ia.propFix[c]||c,Ga.test(c)?!Ia&&Ha.test(c)?a[ia.camelCase("default-"+c)]=a[d]=!1:a[d]=!1:ia.attr(a,c,""),a.removeAttribute(Ia?c:d)},attrHooks:{type:{set:function(a,b){if(!ia.support.radioValue&&"radio"===b&&ia.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},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(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!ia.isXMLDoc(a),g&&(c=ia.propFix[c]||c,f=ia.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):Ea.test(a.nodeName)||Fa.test(a.nodeName)&&a.href?0:b}}}}),Ba={get:function(a,c){var d=ia.prop(a,c),e="boolean"==typeof d&&a.getAttribute(c),f="boolean"==typeof d?Ja&&Ia?null!=e:Ha.test(c)?a[ia.camelCase("default-"+c)]:!!e:a.getAttributeNode(c);return f&&f.value!==!1?c.toLowerCase():b},set:function(a,b,c){return b===!1?ia.removeAttr(a,c):Ja&&Ia||!Ha.test(c)?a.setAttribute(!Ia&&ia.propFix[c]||c,c):a[ia.camelCase("default-"+c)]=a[c]=!0,c}},Ja&&Ia||(ia.attrHooks.value={get:function(a,c){var d=a.getAttributeNode(c);return ia.nodeName(a,"input")?a.defaultValue:d&&d.specified?d.value:b},set:function(a,b,c){return ia.nodeName(a,"input")?void(a.defaultValue=b):Aa&&Aa.set(a,b,c)}}),Ia||(Aa=ia.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&("id"===c||"name"===c||"coords"===c?""!==d.value:d.specified)?d.value:b},set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},ia.attrHooks.contenteditable={get:Aa.get,set:function(a,b,c){Aa.set(a,""!==b&&b,c)}},ia.each(["width","height"],function(a,b){ia.attrHooks[b]=ia.extend(ia.attrHooks[b],{set:function(a,c){if(""===c)return a.setAttribute(b,"auto"),c}})})),ia.support.hrefNormalized||(ia.each(["href","src","width","height"],function(a,c){ia.attrHooks[c]=ia.extend(ia.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null==d?b:d}})}),ia.each(["href","src"],function(a,b){ia.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}})),ia.support.style||(ia.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),ia.support.optSelected||(ia.propHooks.selected=ia.extend(ia.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),ia.support.enctype||(ia.propFix.enctype="encoding"),ia.support.checkOn||ia.each(["radio","checkbox"],function(){ia.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),ia.each(["radio","checkbox"],function(){ia.valHooks[this]=ia.extend(ia.valHooks[this],{set:function(a,b){if(ia.isArray(b))return a.checked=ia.inArray(ia(a).val(),b)>=0}})});var Ka=/^(?:input|select|textarea)$/i,La=/^key/,Ma=/^(?:mouse|contextmenu)|click/,Na=/^(?:focusinfocus|focusoutblur)$/,Oa=/^([^.]*)(?:\.(.+)|)$/;ia.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=ia._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=ia.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof ia===V||a&&ia.event.triggered===a.type?b:ia.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(ka)||[""],i=c.length;i--;)g=Oa.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),k=ia.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=ia.event.special[o]||{},m=ia.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&ia.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),ia.event.global[o]=!0;a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ia.hasData(a)&&ia._data(a);if(q&&(k=q.events)){for(b=(b||"").match(ka)||[""],j=b.length;j--;)if(h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=ia.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||ia.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)ia.event.remove(a,n+b[j],c,d,!0);ia.isEmptyObject(k)&&(delete q.handle,ia._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||W],o=ga.call(c,"type")?c.type:c,p=ga.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||W,3!==e.nodeType&&8!==e.nodeType&&!Na.test(o+ia.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[ia.expando]?c:new ia.Event(o,"object"==typeof c&&c),c.isTrigger=!0,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:ia.makeArray(d,[c]),k=ia.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!ia.isWindow(e)){for(j=k.delegateType||o,Na.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||W)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(ia._data(i,"events")||{})[c.type]&&ia._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&ia.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(e.ownerDocument,d)===!1)&&("click"!==o||!ia.nodeName(e,"a"))&&ia.acceptData(e)&&h&&e[o]&&!ia.isWindow(e)){l=e[h],l&&(e[h]=null),ia.event.triggered=o;try{e[o]()}catch(q){}ia.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=ia.event.fix(a);var c,d,e,f,g,h=[],i=da.call(arguments),j=(ia._data(this,"events")||{})[a.type]||[],k=ia.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=ia.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(e.namespace)){a.handleObj=e,a.data=e.data;var l=(ia.event.special[e.origType]||{}).handle||e.handler;l.apply&&(d=l.apply(f.elem,i)),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation())}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;g=0:ia.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return iy.cacheLength&&delete a[b.shift()],a[c]=d}}function e(a){return a[N]=!0,a}function f(a){var b=F.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}}function g(a,b,c,d){var e,f,g,h,i,j,k,n,o,p;if((b?b.ownerDocument||b:O)!==F&&E(b),b=b||F,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(!H&&!d){if(e=pa.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&L(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return Z.apply(c,$.call(b.getElementsByTagName(a),0)),c;if((g=e[3])&&P.getByClassName&&b.getElementsByClassName)return Z.apply(c,$.call(b.getElementsByClassName(g),0)),c}if(P.qsa&&!I.test(a)){if(k=!0,n=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=l(a),(k=b.getAttribute("id"))?n=k.replace(sa,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=na.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return Z.apply(c,$.call(o.querySelectorAll(p),0)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return u(a.replace(ga,"$1"),b,c,d)}function h(a,b){var c=b&&a,d=c&&(~b.sourceIndex||W)-(~a.sourceIndex||W);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(a,b){var c,d,e,f,h,i,j,k=T[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=y.preFilter;h;){c&&!(d=ha.exec(h))||(d&&(h=h.slice(d[0].length)||h),i.push(e=[])),c=!1,(d=ja.exec(h))&&(c=d.shift(),e.push({value:c,type:d[0].replace(ga," ")}),h=h.slice(c.length));for(f in y.filter)!(d=ma[f].exec(h))||j[f]&&!(d=j[f](d))||(c=d.shift(),e.push({value:c,type:f,matches:d}),h=h.slice(c.length));if(!c)break}return b?h.length:h?g.error(a):T(a,i).slice(0)}function m(a){for(var b=0,c=a.length,d="";b1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h-1&&(e[j]=!(g[j]=l))}}else s=p(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):Z.apply(g,s)})}function r(a){for(var b,c,d,e=a.length,f=y.relative[a[0].type],g=f||y.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return _.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];h1&&o(k),h>1&&m(a.slice(0,h-1)).replace(ga,"$1"),c,h0,f=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],q=0,r="0",s=e&&[],t=null!=k,u=D,v=e||f&&y.find.TAG("*",k&&h.parentNode||h),w=Q+=null==u?1:Math.random()||.1;for(t&&(D=h!==F&&h,x=c);null!=(l=v[r]);r++){if(f&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(Q=w,x=++c)}d&&((l=!n&&l)&&q--,e&&s.push(l))}if(q+=r,d&&r!==q){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(q>0)for(;r--;)s[r]||o[r]||(o[r]=Y.call(j));o=p(o)}Z.apply(j,o),t&&!e&&o.length>0&&q+b.length>1&&g.uniqueSort(j)}return t&&(Q=w,D=u),s};return d?e(h):h}function t(a,b,c){for(var d=0,e=b.length;d2&&"ID"===(g=f[0]).type&&9===b.nodeType&&!H&&y.relative[f[1].type]){if(b=y.find.ID(g.matches[0].replace(ua,va),b)[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=ma.needsContext.test(a)?0:f.length;e--&&(g=f[e],!y.relative[h=g.type]);)if((i=y.find[h])&&(d=i(g.matches[0].replace(ua,va),na.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return Z.apply(c,$.call(d,0)),c;break}}return B(a,j)(d,b,H,c,na.test(a)),c}function v(){}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P={},Q=0,R=0,S=d(),T=d(),U=d(),V=typeof b,W=1<<31,X=[],Y=X.pop,Z=X.push,$=X.slice,_=X.indexOf||function(a){for(var b=0,c=this.length;b+~])"+aa+"*"),ka=new RegExp(fa),la=new RegExp("^"+ca+"$"),ma={ID:new RegExp("^#("+ba+")"),CLASS:new RegExp("^\\.("+ba+")"),NAME:new RegExp("^\\[name=['\"]?("+ba+")['\"]?\\]"),TAG:new RegExp("^("+ba.replace("w","w*")+")"),ATTR:new RegExp("^"+ea),PSEUDO:new RegExp("^"+fa),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+aa+"*(even|odd|(([+-]|)(\\d*)n|)"+aa+"*(?:([+-]|)"+aa+"*(\\d+)|))"+aa+"*\\)|)","i"),needsContext:new RegExp("^"+aa+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+aa+"*((?:-\\d)?\\d*)"+aa+"*\\)|)(?=[^-]|$)","i")},na=/[\x20\t\r\n\f]*[+~]/,oa=/^[^{]+\{\s*\[native code/,pa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,qa=/^(?:input|select|textarea|button)$/i,ra=/^h\d$/i,sa=/'|\\/g,ta=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,ua=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,va=function(a,b){var c="0x"+b-65536;return c!==c?b:c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320)};try{$.call(O.documentElement.childNodes,0)[0].nodeType}catch(wa){$=function(a){for(var b,c=[];b=this[a++];)c.push(b);return c}}A=g.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},E=g.setDocument=function(a){var d=a?a.ownerDocument||a:O;return d!==F&&9===d.nodeType&&d.documentElement?(F=d,G=d.documentElement,H=A(d),P.tagNameNoComments=f(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),P.attributes=f(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),P.getByClassName=f(function(a){return a.innerHTML="",!(!a.getElementsByClassName||!a.getElementsByClassName("e").length)&&(a.lastChild.className="e",2===a.getElementsByClassName("e").length)}),P.getByName=f(function(a){a.id=N+0,a.innerHTML="
        ",G.insertBefore(a,G.firstChild);var b=d.getElementsByName&&d.getElementsByName(N).length===2+d.getElementsByName(N+0).length;return P.getIdNotName=!d.getElementById(N),G.removeChild(a),b}),y.attrHandle=f(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==V&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},P.getIdNotName?(y.find.ID=function(a,b){if(typeof b.getElementById!==V&&!H){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){return a.getAttribute("id")===b}}):(y.find.ID=function(a,c){if(typeof c.getElementById!==V&&!H){var d=c.getElementById(a);return d?d.id===a||typeof d.getAttributeNode!==V&&d.getAttributeNode("id").value===a?[d]:b:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){var c=typeof a.getAttributeNode!==V&&a.getAttributeNode("id");return c&&c.value===b}}),y.find.TAG=P.tagNameNoComments?function(a,b){if(typeof b.getElementsByTagName!==V)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},y.find.NAME=P.getByName&&function(a,b){if(typeof b.getElementsByName!==V)return b.getElementsByName(name)},y.find.CLASS=P.getByClassName&&function(a,b){if(typeof b.getElementsByClassName!==V&&!H)return b.getElementsByClassName(a)},J=[],I=[":focus"],(P.qsa=c(d.querySelectorAll))&&(f(function(a){a.innerHTML="",a.querySelectorAll("[selected]").length||I.push("\\["+aa+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||I.push(":checked")}),f(function(a){a.innerHTML="",a.querySelectorAll("[i^='']").length&&I.push("[*^$]="+aa+"*(?:\"\"|'')"),a.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),I.push(",.*:")})),(P.matchesSelector=c(K=G.matchesSelector||G.mozMatchesSelector||G.webkitMatchesSelector||G.oMatchesSelector||G.msMatchesSelector))&&f(function(a){P.disconnectedMatch=K.call(a,"div"),K.call(a,"[s!='']:x"),J.push("!=",fa)}),I=new RegExp(I.join("|")),J=new RegExp(J.join("|")),L=c(G.contains)||G.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},M=G.compareDocumentPosition?function(a,b){var c;return a===b?(C=!0,0):(c=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b))?1&c||a.parentNode&&11===a.parentNode.nodeType?a===d||L(O,a)?-1:b===d||L(O,b)?1:0:4&c?-1:1:a.compareDocumentPosition?-1:1}:function(a,b){var c,e=0,f=a.parentNode,g=b.parentNode,i=[a],j=[b];if(a===b)return C=!0,0;if(!f||!g)return a===d?-1:b===d?1:f?-1:g?1:0;if(f===g)return h(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},C=!1,[0,0].sort(M),P.detectDuplicates=C,F):F},g.matches=function(a,b){return g(a,null,null,b)},g.matchesSelector=function(a,b){if((a.ownerDocument||a)!==F&&E(a),b=b.replace(ta,"='$1']"),P.matchesSelector&&!H&&(!J||!J.test(b))&&!I.test(b))try{var c=K.call(a,b);if(c||P.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(d){}return g(b,F,null,[a]).length>0},g.contains=function(a,b){return(a.ownerDocument||a)!==F&&E(a),L(a,b)},g.attr=function(a,b){var c;return(a.ownerDocument||a)!==F&&E(a),H||(b=b.toLowerCase()),(c=y.attrHandle[b])?c(a):H||P.attributes?a.getAttribute(b):((c=a.getAttributeNode(b))||a.getAttribute(b))&&a[b]===!0?b:c&&c.specified?c.value:null},g.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},g.uniqueSort=function(a){var b,c=[],d=1,e=0;if(C=!P.detectDuplicates,a.sort(M),C){for(;b=a[d];d++)b===a[d-1]&&(e=c.push(d));for(;e--;)a.splice(c[e],1)}return a},z=g.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=z(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=z(b);return c},y=g.selectors={cacheLength:50,createPseudo:e,match:ma,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ua,va),a[3]=(a[4]||a[5]||"").replace(ua,va),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||g.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&g.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return ma.CHILD.test(a[0])?null:(a[4]?a[2]=a[4]:c&&ka.test(c)&&(b=l(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(ua,va).toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=S[a+" "];return b||(b=new RegExp("(^|"+aa+")"+a+"("+aa+"|$)"))&&S(a,function(a){return b.test(a.className||typeof a.getAttribute!==V&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=g.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===Q&&j[1],m=j[0]===Q&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[Q,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===Q)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[Q,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,d=y.pseudos[a]||y.setFilters[a.toLowerCase()]||g.error("unsupported pseudo: "+a);return d[N]?d(b):d.length>1?(c=[a,a,"",b],y.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var e,f=d(a,b),g=f.length;g--;)e=_.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:e(function(a){var b=[],c=[],d=B(a.replace(ga,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return g(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||z(b)).indexOf(a)>-1}}),lang:e(function(a){return la.test(a||"")||g.error("unsupported lang: "+a),a=a.replace(ua,va).toLowerCase(),function(b){var c;do if(c=H?b.getAttribute("xml:lang")||b.getAttribute("lang"):b.lang)return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===G},focus:function(a){return a===F.activeElement&&(!F.hasFocus||F.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!y.pseudos.empty(a)},header:function(a){return ra.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[c<0?c+b:c]}),even:k(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=c<0?c+b:c;++d1?ia.unique(c):c),c.selector=(this.selector?this.selector+" ":"")+a,c},has:function(a){var b,c=ia(a,this),d=c.length;return this.filter(function(){for(b=0;b=0:ia.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sa.test(a)||"string"!=typeof a?ia(a,b||this.context):0;d-1:ia.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}return this.pushStack(f.length>1?ia.unique(f):f)},index:function(a){return a?"string"==typeof a?ia.inArray(this[0],ia(a)):ia.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?ia(a,b):ia.makeArray(a&&a.nodeType?[a]:a),d=ia.merge(this.get(),c);return this.pushStack(ia.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),ia.fn.andSelf=ia.fn.addBack,ia.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return ia.dir(a,"parentNode")},parentsUntil:function(a,b,c){return ia.dir(a,"parentNode",c)},next:function(a){return k(a,"nextSibling")},prev:function(a){return k(a,"previousSibling")},nextAll:function(a){return ia.dir(a,"nextSibling")},prevAll:function(a){return ia.dir(a,"previousSibling")},nextUntil:function(a,b,c){return ia.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return ia.dir(a,"previousSibling",c)},siblings:function(a){return ia.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return ia.sibling(a.firstChild)},contents:function(a){return ia.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:ia.merge([],a.childNodes)}},function(a,b){ia.fn[a]=function(c,d){var e=ia.map(this,b,c);return Pa.test(a)||(d=c),d&&"string"==typeof d&&(e=ia.filter(d,e)),e=this.length>1&&!Ta[a]?ia.unique(e):e,this.length>1&&Qa.test(a)&&(e=e.reverse()),this.pushStack(e)}}),ia.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?ia.find.matchesSelector(b[0],a)?[b[0]]:[]:ia.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!ia(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ua="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Va=/ jQuery\d+="(?:null|\d+)"/g,Wa=new RegExp("<(?:"+Ua+")[\\s/>]","i"),Xa=/^\s+/,Ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Za=/<([\w:]+)/,$a=/\s*$/g,gb={option:[1,""],legend:[1,"
        ","
        "],area:[1,"",""],param:[1,"",""],thead:[1,"","
        "],tr:[2,"","
        "],col:[2,"","
        "],td:[3,"","
        "],_default:ia.support.htmlSerialize?[0,"",""]:[1,"X
        ","
        "]},hb=m(W),ib=hb.appendChild(W.createElement("div"));gb.optgroup=gb.option,gb.tbody=gb.tfoot=gb.colgroup=gb.caption=gb.thead,gb.th=gb.td,ia.fn.extend({text:function(a){return ia.access(this,function(a){return a===b?ia.text(this):this.empty().append((this[0]&&this[0].ownerDocument||W).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(ia.isFunction(a))return this.each(function(b){ia(this).wrapAll(a.call(this,b))});if(this[0]){var b=ia(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return ia.isFunction(a)?this.each(function(b){ia(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ia(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ia.isFunction(a);return this.each(function(c){ia(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){ia.nodeName(this,"body")||ia(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||ia.filter(a,[c]).length>0)&&(b||1!==c.nodeType||ia.cleanData(t(c)),c.parentNode&&(b&&ia.contains(c.ownerDocument,c)&&q(t(c,"script")),c.parentNode.removeChild(c)));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&ia.cleanData(t(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&ia.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return ia.clone(this,a,b)})},html:function(a){return ia.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Va,""):b;if("string"==typeof a&&!ab.test(a)&&(ia.support.htmlSerialize||!Wa.test(a))&&(ia.support.leadingWhitespace||!Xa.test(a))&&!gb[(Za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ya,"<$1>");try{for(;d")?f=a.cloneNode(!0):(ib.innerHTML=a.outerHTML,ib.removeChild(f=ib.firstChild)),!(ia.support.noCloneEvent&&ia.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ia.isXMLDoc(a)))for(d=t(f),h=t(a),g=0;null!=(e=h[g]);++g)d[g]&&s(e,d[g]);if(b)if(c)for(h=h||t(a),d=d||t(f),g=0;null!=(e=h[g]);g++)r(e,d[g]);else r(a,f);return d=t(f,"script"),d.length>0&&q(d,!i&&t(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,n=m(b),o=[],p=0;p")+k[2],e=k[0];e--;)h=h.lastChild;if(!ia.support.leadingWhitespace&&Xa.test(f)&&o.push(b.createTextNode(Xa.exec(f)[0])),!ia.support.tbody)for(f="table"!==i||$a.test(f)?""!==k[1]||$a.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)ia.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(ia.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=n.lastChild}else o.push(b.createTextNode(f));for(h&&n.removeChild(h),ia.support.appendChecked||ia.grep(t(o,"input"),u),p=0;f=o[p++];)if((!d||ia.inArray(f,d)===-1)&&(g=ia.contains(f.ownerDocument,f),h=t(n.appendChild(f),"script"),g&&q(h),c))for(e=0;f=h[e++];)db.test(f.type||"")&&c.push(f);return h=null,n},cleanData:function(a,b){for(var c,d,e,f,g=0,h=ia.expando,i=ia.cache,j=ia.support.deleteExpando,k=ia.event.special;null!=(c=a[g]);g++)if((b||ia.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?ia.event.remove(c,d):ia.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==V?c.removeAttribute(h):c[h]=null,_.push(e))}}});var jb,kb,lb,mb=/alpha\([^)]*\)/i,nb=/opacity\s*=\s*([^)]*)/,ob=/^(top|right|bottom|left)$/,pb=/^(none|table(?!-c[ea]).+)/,qb=/^margin/,rb=new RegExp("^("+ja+")(.*)$","i"),sb=new RegExp("^("+ja+")(?!px)[a-z%]+$","i"),tb=new RegExp("^([+-])=("+ja+")","i"),ub={BODY:"block"},vb={position:"absolute",visibility:"hidden",display:"block"},wb={letterSpacing:0,fontWeight:400},xb=["Top","Right","Bottom","Left"],yb=["Webkit","O","Moz","ms"];ia.fn.extend({css:function(a,c){return ia.access(this,function(a,c,d){var e,f,g={},h=0;if(ia.isArray(c)){for(f=kb(a),e=c.length;h1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(a){var b="boolean"==typeof a;return this.each(function(){(b?a:w(this))?ia(this).show():ia(this).hide()})}}),ia.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ia.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=ia.camelCase(c),j=a.style;if(c=ia.cssProps[i]||(ia.cssProps[i]=v(j,i)),h=ia.cssHooks[c]||ia.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tb.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(ia.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||ia.cssNumber[i]||(d+="px"),ia.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=ia.camelCase(c);return c=ia.cssProps[i]||(ia.cssProps[i]=v(a.style,i)),h=ia.cssHooks[c]||ia.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lb(a,c,e)),"normal"===g&&c in wb&&(g=wb[c]),""===d||d?(f=parseFloat(g),d===!0||ia.isNumeric(f)?f||0:g):g},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),a.getComputedStyle?(kb=function(b){return a.getComputedStyle(b,null)},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||ia.contains(a.ownerDocument,a)||(i=ia.style(a,c)),sb.test(i)&&qb.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):W.documentElement.currentStyle&&(kb=function(a){return a.currentStyle},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sb.test(i)&&!ob.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),ia.each(["height","width"],function(a,b){ia.cssHooks[b]={get:function(a,c,d){if(c)return 0===a.offsetWidth&&pb.test(ia.css(a,"display"))?ia.swap(a,vb,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&kb(a);return y(a,c,d?z(a,b,d,ia.support.boxSizing&&"border-box"===ia.css(a,"boxSizing",!1,e),e):0)}}}),ia.support.opacity||(ia.cssHooks.opacity={get:function(a,b){return nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=ia.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===ia.trim(f.replace(mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mb.test(f)?f.replace(mb,e):f+" "+e)}}),ia(function(){ia.support.reliableMarginRight||(ia.cssHooks.marginRight={get:function(a,b){if(b)return ia.swap(a,{display:"inline-block"},lb,[a,"marginRight"])}}),!ia.support.pixelPosition&&ia.fn.position&&ia.each(["top","left"],function(a,b){ia.cssHooks[b]={get:function(a,c){if(c)return c=lb(a,b),sb.test(c)?ia(a).position()[b]+"px":c}}})}),ia.expr&&ia.expr.filters&&(ia.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!ia.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||ia.css(a,"display"))},ia.expr.filters.visible=function(a){return!ia.expr.filters.hidden(a)}),ia.each({margin:"",padding:"",border:"Width"},function(a,b){ia.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+xb[d]+b]=f[d]||f[d-2]||f[0];return e}},qb.test(a)||(ia.cssHooks[a+b].set=y)});var zb=/%20/g,Ab=/\[\]$/,Bb=/\r?\n/g,Cb=/^(?:submit|button|image|reset|file)$/i,Db=/^(?:input|select|textarea|keygen)/i;ia.fn.extend({serialize:function(){return ia.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ia.prop(this,"elements");return a?ia.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ia(this).is(":disabled")&&Db.test(this.nodeName)&&!Cb.test(a)&&(this.checked||!bb.test(a))}).map(function(a,b){var c=ia(this).val();return null==c?null:ia.isArray(c)?ia.map(c,function(a){return{name:b.name,value:a.replace(Bb,"\r\n")}}):{name:b.name,value:c.replace(Bb,"\r\n")}}).get()}}),ia.param=function(a,c){var d,e=[],f=function(a,b){b=ia.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=ia.ajaxSettings&&ia.ajaxSettings.traditional),ia.isArray(a)||a.jquery&&!ia.isPlainObject(a))ia.each(a,function(){f(this.name,this.value)});else for(d in a)D(d,a[d],c,f);return e.join("&").replace(zb,"+")},ia.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(a,b){ia.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),ia.fn.hover=function(a,b){return this.mouseenter(a).mouseleave(b||a)};var Eb,Fb,Gb=ia.now(),Hb=/\?/,Ib=/#.*$/,Jb=/([?&])_=[^&]*/,Kb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mb=/^(?:GET|HEAD)$/,Nb=/^\/\//,Ob=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pb=ia.fn.load,Qb={},Rb={},Sb="*/".concat("*");try{Fb=X.href}catch(Tb){Fb=W.createElement("a"),Fb.href="",Fb=Fb.href}Eb=Ob.exec(Fb.toLowerCase())||[],ia.fn.load=function(a,c,d){if("string"!=typeof a&&Pb)return Pb.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),ia.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&ia.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?ia("
        ").append(ia.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},ia.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){ia.fn[b]=function(a){return this.on(b,a)}}),ia.each(["get","post"],function(a,c){ia[c]=function(a,d,e,f){return ia.isFunction(d)&&(f=f||e,e=d,d=b),ia.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),ia.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fb,type:"GET",isLocal:Lb.test(Eb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sb,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":a.String,"text html":!0,"text json":ia.parseJSON,"text xml":ia.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?G(G(a,ia.ajaxSettings),b):G(ia.ajaxSettings,a)},ajaxPrefilter:E(Qb),ajaxTransport:E(Rb),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,d&&(t=H(m,w,d)),a>=200&&a<300||304===a?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(ia.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(ia.etag[g]=v)),204===a?(f=!0,x="nocontent"):304===a?(f=!0,x="notmodified"):(f=I(m,t),x=f.state,l=f.data,s=f.error,f=!s)):(s=x,!a&&x||(x="error",a<0&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--ia.active||ia.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=ia.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?ia(n):ia.event,p=ia.Deferred(),q=ia.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kb.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(u<2)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fb)+"").replace(Ib,"").replace(Nb,Eb[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=ia.trim(m.dataType||"*").toLowerCase().match(ka)||[""],null==m.crossDomain&&(e=Ob.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Eb[1]&&e[2]===Eb[2]&&(e[3]||("http:"===e[1]?80:443))==(Eb[3]||("http:"===Eb[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=ia.param(m.data,m.traditional)),F(Qb,m,c,w),2===u)return w;j=m.global,j&&0===ia.active++&&ia.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mb.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hb.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jb.test(g)?g.replace(Jb,"$1_="+Gb++):g+(Hb.test(g)?"&":"?")+"_="+Gb++)),m.ifModified&&(ia.lastModified[g]&&w.setRequestHeader("If-Modified-Since",ia.lastModified[g]),ia.etag[g]&&w.setRequestHeader("If-None-Match",ia.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sb+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=F(Rb,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(u<2))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getScript:function(a,c){return ia.get(a,b,c,"script")},getJSON:function(a,b,c){return ia.get(a,b,c,"json")}}),ia.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return ia.globalEval(a),a}}}),ia.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),ia.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=W.head||ia("head")[0]||W.documentElement;return{send:function(b,e){c=W.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Ub=[],Vb=/(=)\?(?=&|$)|\?\?/;ia.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Ub.pop()||ia.expando+"_"+Gb++;return this[a]=!0,a}}),ia.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vb.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vb.test(c.data)&&"data");if(i||"jsonp"===c.dataTypes[0])return f=c.jsonpCallback=ia.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vb,"$1"+f):c.jsonp!==!1&&(c.url+=(Hb.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||ia.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Ub.push(f)),h&&ia.isFunction(g)&&g(h[0]),h=g=b}),"script"});var Wb,Xb,Yb=0,Zb=a.ActiveXObject&&function(){var a;for(a in Wb)Wb[a](b,!0)};ia.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&J()||K()}:J,Xb=ia.ajaxSettings.xhr(),ia.support.cors=!!Xb&&"withCredentials"in Xb,Xb=ia.support.ajax=!!Xb,Xb&&ia.ajaxTransport(function(c){if(!c.crossDomain||ia.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=ia.noop,Zb&&delete Wb[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yb,Zb&&(Wb||(Wb={},ia(a).unload(Zb)),Wb[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+ja+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[P],ec={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=bc.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||(ia.cssNumber[a]?"":"px"),"px"!==d&&h){h=ia.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,ia.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};ia.Animation=ia.extend(N,{tweener:function(a,b){ia.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),ia.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},ia.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===ia.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),ia.nodeName(a[0],"html")||(c=a.offset()),c.top+=ia.css(a[0],"borderTopWidth",!0),c.left+=ia.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-ia.css(d,"marginTop",!0),left:b.left-c.left-ia.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||W.documentElement;a&&!ia.nodeName(a,"html")&&"static"===ia.css(a,"position");)a=a.offsetParent;return a||W.documentElement})}}),ia.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);ia.fn[a]=function(e){return ia.access(this,function(a,e,f){var g=S(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:void(g?g.scrollTo(d?ia(g).scrollLeft():f,d?f:ia(g).scrollTop()):a[e]=f)},a,e,arguments.length,null)}}),ia.each({Height:"height",Width:"width"},function(a,c){ia.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){ia.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return ia.access(this,function(c,d,e){var f;return ia.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?ia.css(c,d,h):ia.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=ia,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ia})}(window),$.extend($.Event.prototype,{stopEvent:function(){this.stopPropagation(),this.preventDefault()}}),jQuery&&(!function(a){a.fn.insets||(a.fn.insets=function(){var a=this.padding(),b=this.border();return{top:a.top,bottom:a.bottom+b.bottom+b.top,left:a.left,right:a.right+b.right+b.left}}),a.fn.bounds||(a.fn.bounds=function(a){var b={hasIgnoredBounds:!0};return a?(isNaN(a.x)||(b.left=a.x),isNaN(a.y)||(b.top=a.y),null!=a.width&&(b.width=a.width-(this.outerWidth(!0)-this.width()),b.width=b.width>=0?b.width:a.width),null!=a.height&&(b.height=a.height-(this.outerHeight(!0)-this.height()),b.height=b.height>=0?b.height:a.height),this.css(b),this):(b=this.position(),{x:b.left,y:b.top,width:this.outerWidth(),height:this.outerHeight()})})}(jQuery),BI.extend(jQuery.fn,{destroy:function(){this.remove(),BI.isIE()===!0&&(this[0].outerHTML="")},__textKeywordMarked__:function(a,b,c){if(!BI.isKey(b)||(a+"").length>100)return this.html(BI.htmlEncode(a));b+="",b=BI.toUpperCase(b);var d=(a||"")+"";for(c=(c||BI.makeFirstPY(a))+"",null!=c&&(c=BI.toUpperCase(c)),this.empty();;){var e=BI.toUpperCase(d).indexOf(b),f=null;if(null!=c&&(f=c.indexOf(b),f>=0&&(f%=a.length)),e>=0)this.append(BI.htmlEncode(d.substr(0,e))),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(e,b.length)))),d=d.substr(e+b.length),null!=c&&(c=c.substr(e+b.length));else{if(!(null!=f&&f>=0&&Math.floor(f/a.length)===Math.floor((f+b.length-1)/a.length))){this.append(BI.htmlEncode(d));break}this.append(BI.htmlEncode(d.substr(0,f))),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(f,b.length)))),null!=c&&(c=c.substr(f+b.length)),d=d.substr(f+b.length)}}return this},getDomHeight:function(a){var b=$(this).clone();b.appendTo($(a||"body"));var c=b.height();return b.remove(),c},hasVerticalScroll:function(){return this.height()>0&&this[0].clientWidth0&&this[0].clientHeightb.left+c||a.pageYb.top+d)},__hasZIndexMask__:function(a){return a&&null!=this.zIndexMask[a]},__buildZIndexMask__:function(a,b){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var c=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:b});return c.element.css({"z-index":a}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(c),a&&(this.zIndexMask[a]=c),c.element},__releaseZIndexMask__:function(a){if(a&&this.zIndexMask[a])return BI.remove(this.indexMask,this.zIndexMask[a]),void this.zIndexMask[a].destroy();this.indexMask=this.indexMask||[];var b=this.indexMask.pop();b&&b.destroy()}})),_.extend(BI,{$import:function(){function a(a,c){var d=$("head script, body script");$.each(d,function(c,d){d.src.indexOf(a)!=-1&&(b[a]=!0)});var e=$("head link");$.each(e,function(d,e){e.href.indexOf(a)!=-1&&c&&(b[a]=!1,$(e).remove())})}var b={};return function(c,d,e){if(a(c,e),b[c]!==!0)if("css"===d){var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.href=c;var g=document.getElementsByTagName("head")[0];g.appendChild(f),b[c]=!0}else $.ajax({url:c,dataType:"script",async:!1,cache:!0,complete:function(a,d){"success"==d&&(b[c]=!0)}})}}()}),Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||!function(){function a(a,b){for(var c=-1;++c=0;)c+=h[b],h[b]=Math.floor(c/a),c=c%a*f}function c(){for(var a=g,b="";--a>=0;)if(""!==b||0===a||0!==h[a]){var c=String(h[a]);""===b?b=c:b+="0000000".slice(0,7-c.length)+c}return b}function d(a,b,c){return 0===b?c:b%2===1?d(a,b-1,c*a):d(a*a,b/2,c)}function e(a){for(var b=0;a>=4096;)b+=12,a/=4096;for(;a>=2;)b+=1,a/=2;return b}var f,g,h;f=1e7,g=6,h=[0,0,0,0,0,0],Number.prototype.toFixed=function(f){var g,h,i,j,k,l,m,n;if(g=Number(f),g=g!==g?0:Math.floor(g),g<0||g>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(h=Number(this),h!==h)return"NaN";if(h<=-1e21||h>1e21)return String(h);if(i="",h<0&&(i="-",h=-h),j="0",h>1e-21)if(k=e(h*d(2,69,1))-69,l=k<0?h*d(2,-k,1):h/d(2,k,1),l*=4503599627370496,k=52-k,k>0){for(a(0,l),m=g;m>=7;)a(1e7,0),m-=7;for(a(d(10,m,1),0),m=k-1;m>=23;)b(1<<23),m-=23;b(1<0?(n=j.length,j=n<=g?i+"0.0000000000000000000".slice(0,g-n+2)+j:i+j.slice(0,n-g)+"."+j.slice(n-g)):j=i+j,j}}(),_.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}),BI.version="2.0",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(a,b){var c=this.options,d=BI.AbsoluteCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0),right:c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0),top:c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0),bottom:c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0),margin:"auto"}),d},resize:function(){},populate:function(a){BI.AbsoluteCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_center_adapt",BI.AbsoluteCenterLayout),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(a,b){var c=this.options,d=BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0),right:c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0),margin:"auto"}),c.vgap+c.tgap+(b.vgap||0)+(b.tgap||0)!==0&&d.element.css("top",c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)),c.vgap+c.bgap+(b.vgap||0)+(b.bgap||0)!==0&&d.element.css("bottom",c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_horizontal_adapt",BI.AbsoluteHorizontalLayout),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(a,b){var c=this.options,d=BI.AbsoluteVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:b.lgap,right:b.rgap,top:c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0),bottom:c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0),margin:"auto"}),c.hgap+c.lgap+(b.hgap||0)+(b.lgap||0)!==0&&d.element.css("left",c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)),c.hgap+c.rgap+(b.hgap||0)+(b.rgap||0)!==0&&d.element.css("right",c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_vertical_adapt",BI.AbsoluteVerticalLayout),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 a=this.options,b=this;return BI.CenterAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:a.horizontalAlign,columnSize:a.columnSize,scrollx:a.scrollx,items:a.items,ref:function(a){b.layout=a},hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.center_adapt",BI.CenterAdaptLayout),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 a=this,b=this.options;return BI.HorizontalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,items:b.items,scrollx:b.scrollx,ref:function(b){a.layout=b},hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.horizontal_adapt",BI.HorizontalAdaptLayout),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 a=this.options;BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this,arguments);var b=[];return"left"in a.items&&b.push({type:"bi.left",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items.left,hgap:a.lhgap,lgap:a.llgap,rgap:a.lrgap}}]}),"right"in a.items&&b.push({type:"bi.right",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items.right,textAlign:"right",hgap:a.rhgap,lgap:a.rlgap,rgap:a.rrgap}}]}),b},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){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 a=this.options,b=this;return BI.LeftVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.left",ref:function(a){b.layout=a},items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items,lgap:a.lgap,hgap:a.hgap,rgap:a.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){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 a=this.options,b=this;return BI.RightVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.right",ref:function(a){b.layout=a},items:[{el:{type:"bi.vertical_adapt",height:"100%",textAlign:"right",items:a.items,lgap:a.lgap,hgap:a.hgap,rgap:a.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.right_vertical_adapt",BI.RightVerticalAdaptLayout),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 a=this.options;BI.TableAdaptLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("
        ").css({position:"relative",display:"table",height:a.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:a.horizontalAlign===BI.HorizontalAlign.Center?"100%":"auto","white-space":"nowrap"}),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.width(e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",width:e,items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]<=1?e:e+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative",display:"table-cell","vertical-align":d.verticalAlign,margin:"0",padding:"0",height:"100%"}),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},appendFragment:function(a){this.$table.append(a),this.element.append(this.$table)},resize:function(){},populate:function(a){BI.TableAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table_adapt",BI.TableAdaptLayout),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 a=this,b=this.options;return BI.VerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,items:b.items,scrollx:b.scrollx,ref:function(b){a.layout=b},hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.vertical_adapt",BI.VerticalAdaptLayout),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(a,b){var c=this.options,d=BI.HorizontalAutoLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",margin:"0px auto"}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":(0===a?c.vgap:0)+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_auto",BI.HorizontalAutoLayout),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 a=this,b=this.left.element.width(),c=this.left.element.height();this.left.element.width(b).height(c).css("float","none"),BI.remove(this._children,function(b,c){c===a.container&&delete a._children[b]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.left]})},_addElement:function(a,b){var c=this.options;return this.left=BI.createWidget({type:"bi.vertical",items:[b],hgap:c.hgap,vgap:c.vgap,tgap:c.tgap,bgap:c.bgap,lgap:c.lgap,rgap:c.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]}),this.left},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_float",BI.FloatHorizontalLayout),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(a,b,c){var d=this.options,e=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return e.element.css({position:"relative","vertical-align":"middle"}),e.element.addClass("inline-center-adapt-item"),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&e.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&e.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&e.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&e.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),e},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("不能添加元素")},stroke:function(a){var b=this;BI.each(a,function(c,d){d&&b._addElement(c,d,a.length)})},populate:function(a){BI.InlineCenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_center_adapt",BI.InlineCenterAdaptLayout),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 a=this.options;this.element.css({whiteSpace:"nowrap",textAlign:a.textAlign}),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","vertical-align":"middle"}),d.element.addClass("inline-vertical-adapt-item"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.InlineVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_vertical_adapt",BI.InlineVerticalAdaptLayout),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(a,b){var c=this.options,d=BI.FlexCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0","margin-left":(0===a?c.hgap:0)+"px","margin-right":c.hgap+"px","margin-top":c.vgap+"px","margin-bottom":c.vgap+"px"}),d},resize:function(){},populate:function(a){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_center_adapt",BI.FlexCenterLayout),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 a=this,b=this.options;return{type:"bi.flex_vertical",ref:function(b){a.wrapper=b},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:b.verticalAlign,rowSize:b.rowSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},resize:function(){},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_horizontal_adapt",BI.FlexHorizontalCenter),BI.shortcut("bi.flex_horizontal_center_adapt",BI.FlexHorizontalCenter),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 a=this.options;this.element.addClass("v-"+a.verticalAlign).addClass("h-"+a.horizontalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.columnSize[a]>0&&d.element.width(c.columnSize[a]),"fill"===c.columnSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-center-adapt-layout",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var a=this,b=this.options;return{type:"bi.flex_horizontal",ref:function(b){a.wrapper=b},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,hgap:b.hgap,items:b.items}},resize:function(){},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_vertical_adapt",BI.FlexVerticalCenter),BI.shortcut("bi.flex_vertical_center_adapt",BI.FlexVerticalCenter),BI.FlexVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-layout",horizontalAlign:BI.HorizontalAlign.Left,verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrolly:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalLayout.superclass.render.apply(this,arguments);var a=this.options;this.element.addClass("h-"+a.horizontalAlign).addClass("v-"+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=BI.FlexVerticalLayout.superclass._addElement.apply(this,arguments),d=this.options;return c.element.css({position:"relative","flex-shrink":"0"}),d.rowSize[a]>0&&c.element.height(d.rowSize[a]),"fill"===d.rowSize[a]&&c.element.css("flex","1"),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&c.element.css({"margin-top":(0===a?d.vgap:0)+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&c.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&c.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&c.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},resize:function(){},populate:function(a){BI.FlexVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical",BI.FlexVerticalLayout),BI.FlexWrapperCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-center-adapt-layout clearfix",scrollable:!0})},render:function(){BI.FlexWrapperCenterLayout.superclass.render.apply(this,arguments),this.$wrapper=BI.Widget._renderEngine.createElement("
        ").addClass("flex-scrollable-center-adapt-layout-wrapper"),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","margin-left":(0===a?c.hgap:0)+"px","margin-right":c.hgap+"px","margin-top":c.vgap+"px","margin-bottom":c.vgap+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_center_adapt",BI.FlexWrapperCenterLayout),BI.FlexWrapperHorizontalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-center-adapt-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 a=this,b=this.options;return{type:"bi.flex_scrollable_vertical",ref:function(b){a.wrapper=b},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:b.verticalAlign,rowSize:b.rowSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_scrollable_horizontal_adapt",BI.FlexWrapperHorizontalCenter),BI.shortcut("bi.flex_scrollable_horizontal_center_adapt",BI.FlexWrapperHorizontalCenter),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 a=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("
        ").addClass("flex-scrollable-horizontal-layout-wrapper v-"+a.verticalAlign).addClass("h-"+a.horizontalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.columnSize[a]>0&&d.element.width(c.columnSize[a]),"fill"===c.columnSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_horizontal",BI.FlexWrapperHorizontalLayout),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 a=this,b=this.options;return{type:"bi.flex_scrollable_horizontal",ref:function(b){a.wrapper=b},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,items:b.items}},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_scrollable_vertical_adapt",BI.FlexWrapperVerticalCenter),BI.shortcut("bi.flex_scrollable_vertical_center_adapt",BI.FlexWrapperVerticalCenter),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 a=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("
        ").addClass("flex-scrollable-vertical-layout-wrapper h-"+a.horizontalAlign).addClass("v-"+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.rowSize[a]>0&&d.element.height(c.rowSize[a]),"fill"===c.rowSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":(0===a?c.vgap:0)+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_vertical",BI.FlexWrapperVerticalLayout),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(a,b){var c=this.options,d=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),e=0,f=0,g=0,h=0; return BI.isNotNull(b.left)&&(d.element.css({left:b.left}),e+=b.left),BI.isNotNull(b.right)&&(d.element.css({right:b.right}),f+=b.right),BI.isNotNull(b.top)&&(d.element.css({top:b.top}),g+=b.top),BI.isNotNull(b.bottom)&&(d.element.css({bottom:b.bottom}),h+=b.bottom),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d.element.css({position:"absolute"}),d},resize:function(){this.stroke(this.options.items)},stroke:function(a){this.options.items=a||[];var b=this;BI.each(a,function(a,c){if(c){if(!BI.isWidget(c)&&!c.el)throw new Error("el must be exist");b._addElement(a,c)}})},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute",BI.AbsoluteLayout),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(a,b){var c=this.options,d=BI.AdaptiveLayout.superclass._addElement.apply(this,arguments);d.element.css({position:"relative"});var e=0,f=0,g=0,h=0;return BI.isNotNull(b.left)&&d.element.css({"margin-left":b.left}),BI.isNotNull(b.right)&&d.element.css({"margin-right":b.right}),BI.isNotNull(b.top)&&d.element.css({"margin-top":b.top}),BI.isNotNull(b.bottom)&&d.element.css({"margin-bottom":b.bottom}),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.adaptive",BI.AdaptiveLayout),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(a){throw new Error("cannot be added")},stroke:function(a){var b,c=0,d=0,e=0,f=0;if("north"in a&&(b=a.north,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"north")){var g=BI.createWidget(b);this.addWidget(this.getName()+"north",g)}this.getWidgetByName(this.getName()+"north").element.height(b.height).css({position:"absolute",top:b.top||0,left:b.left||0,right:b.right||0,bottom:"initial"})}c=(b.height||0)+(b.top||0)+(b.bottom||0)}if("south"in a&&(b=a.south,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"south")){var g=BI.createWidget(b);this.addWidget(this.getName()+"south",g)}this.getWidgetByName(this.getName()+"south").element.height(b.height).css({position:"absolute",bottom:b.bottom||0,left:b.left||0,right:b.right||0,top:"initial"})}d=(b.height||0)+(b.top||0)+(b.bottom||0)}if("west"in a&&(b=a.west,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"west")){var g=BI.createWidget(b);this.addWidget(this.getName()+"west",g)}this.getWidgetByName(this.getName()+"west").element.width(b.width).css({position:"absolute",left:b.left||0,top:c,bottom:d,right:"initial"})}e=(b.width||0)+(b.left||0)+(b.right||0)}if("east"in a&&(b=a.east,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"east")){var g=BI.createWidget(b);this.addWidget(this.getName()+"east",g)}this.getWidgetByName(this.getName()+"east").element.width(b.width).css({position:"absolute",right:b.right||0,top:c,bottom:d,left:"initial"})}f=(b.width||0)+(b.left||0)+(b.right||0)}if("center"in a&&(b=a.center,null!=b)){if(!this.hasWidget(this.getName()+"center")){var g=BI.createWidget(b);this.addWidget(this.getName()+"center",g)}this.getWidgetByName(this.getName()+"center").element.css({position:"absolute",top:c,bottom:d,left:e,right:f})}},update:function(a){},populate:function(a){BI.BorderLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.border",BI.BorderLayout),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(a){var b=this,c=this.options;this.showIndex=void 0,BI.each(a,function(a,d){if(d){if(b.hasWidget(d.cardName))var e=b.getWidgetByName(d.cardName);else{var e=BI.createWidget(d);e.on(BI.Events.DESTROY,function(){var a=BI.findIndex(c.items,function(a,b){return b.cardName==d.cardName});a>-1&&c.items.splice(a,1)}),b.addWidget(d.cardName,e)}e.element.css({position:"absolute",top:"0",right:"0",bottom:"0",left:"0"}),e.setVisible(!1)}})},update:function(){},empty:function(){BI.CardLayout.superclass.empty.apply(this,arguments),this.options.items=[]},populate:function(a){BI.CardLayout.superclass.populate.apply(this,arguments),this._mount(),this.options.defaultShowName&&this.showCardByName(this.options.defaultShowName)},isCardExisted:function(a){return BI.some(this.options.items,function(b,c){return c.cardName==a&&c.el})},getCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");return this._children[a]},_deleteCardByName:function(a){delete this._children[a];var b=BI.findIndex(this.options.items,function(b,c){return c.cardName==a});b>-1&&this.options.items.splice(b,1)},deleteCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");var b=this._children[a];this._deleteCardByName(a),b&&b._destroy()},addCardByName:function(a,b){if(this.isCardExisted(a))throw new Error("cardName is already exist");var c=BI.createWidget(b,this);return c.element.css({position:"relative",top:"0",left:"0",width:"100%",height:"100%"}).appendTo(this.element),c.invisible(),this.addWidget(a,c),this.options.items.push({el:b,cardName:a}),c},showCardByName:function(a,b,c){var d=this,e=this.isCardExisted(a);null!=this.showIndex&&(this.lastShowIndex=this.showIndex),this.showIndex=a;var f=!1;BI.each(this.options.items,function(g,h){var i=d._children[h.cardName];i&&(a!=h.cardName?!f&&!e&&BI.Action&&b instanceof BI.Action?(b.actionBack(i),f=!0):i.invisible():BI.Action&&b instanceof BI.Action?b.actionPerformed(void 0,i,c):(i.visible(),c&&c()))})},showLastCard:function(){var a=this;this.showIndex=this.lastShowIndex,BI.each(this.options.items,function(b,c){a._children[c.cardName].setVisible(a.showIndex==b)})},setDefaultShowName:function(a){return this.options.defaultShowName=a,this},getDefaultShowName:function(){return this.options.defaultShowName},getAllCardNames:function(){return BI.map(this.options.items,function(a,b){return b.cardName})},getShowingCard:function(){if(BI.isKey(this.showIndex))return this.getWidgetByName(this.showIndex)},deleteAllCard:function(){var a=this;BI.each(this.getAllCardNames(),function(b,c){a.deleteCardByName(c)})},hideAllCard:function(){var a=this;BI.each(this.options.items,function(b,c){a._children[c.cardName].invisible()})},isAllCardHide:function(){var a=this,b=!0;return BI.some(this.options.items,function(c,d){if(a._children[d.cardName].isVisible())return b=!1,!1}),b},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._deleteCardByName(b)}}),BI.shortcut("bi.card",BI.CardLayout),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(a,b){var c=this.options,d=BI.DefaultLayout.superclass._addElement.apply(this,arguments);return c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.DefaultLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.default",BI.DefaultLayout),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(a){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=BI.makeArray(f),i={},j={};BI.each(h,function(a){h[a]=BI.makeArray(g)}),BI.each(a,function(a,b){return BI.isArray(b)?void BI.each(b,function(c,d){i[a]=(i[a]||0)+b.width,j[c]=(j[c]||0)+b.height,h[a][c]=d}):(i[b.row]=(i[b.row]||0)+b.width,j[b.column]=(j[b.column]||0)+b.height,void(h[b.row][b.column]=b))});for(var k=0;k0){var p=this.getWidgetByName(this.getName()+k+"_"+(m-1));p.element.css({right:100-o+"%"})}m==e.columns-1&&n.element.css({right:"0%"}),d(n,k,m),l+=h[k][m].width}for(var m=0;m0){var p=this.getWidgetByName(this.getName()+(k-1)+"_"+m);p.element.css({bottom:100-r+"%"})}k==e.rows-1&&n.element.css({bottom:"0%"}),q+=h[k][m].height}},update:function(){},populate:function(a){BI.DivisionLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.division",BI.DivisionLayout),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(a,b){var c=this.options,d=BI.FloatLeftLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"left"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),BI.isNotNull(b.bottom)&&d.element.css({bottom:b.bottom}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){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(a,b){var c=this.options,d=BI.FloatRightLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"right"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),BI.isNotNull(b.bottom)&&d.element.css({bottom:b.bottom}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":(0===a?c.hgap:0)+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.FloatRightLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right",BI.FloatRightLayout),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(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}for(var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=100/g,i=100/f,j=[],k=0;k").attr({cellspacing:0,cellpadding:0}).css({position:"relative","white-space":"nowrap",height:a.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:a.horizontalAlign===BI.HorizontalAlign.Center||a.horizontalAlign===BI.HorizontalAlign.Stretch?"100%":"auto","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=BI.Widget._renderEngine.createElement("
        "),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]<=1?e:e+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative","vertical-align":d.verticalAlign,margin:"0",padding:"0",border:"none"}),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},appendFragment:function(a){this.$tr.append(a),this.element.append(this.$table)},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){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(a,b){var c=this.options,d=BI.HorizontalCellLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"table-cell","vertical-align":"middle"}),c.hgap+c.lgap>0&&d.element.css({"margin-left":c.hgap+c.lgap+"px"}),c.hgap+c.rgap>0&&d.element.css({"margin-right":c.hgap+c.rgap+"px"}),c.vgap+c.tgap>0&&d.element.css({"margin-top":c.vgap+c.tgap+"px"}),c.vgap+c.bgap>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalCellLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_cell",BI.HorizontalCellLayout),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(a,b){var c=this.options,d=BI.InlineLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"inline-block","*display":"inline","*zoom":1}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.InlineLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline",BI.InlineLayout),BI.LatticeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LatticeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-lattice-layout clearfix"})},render:function(){BI.LatticeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.LatticeLayout.superclass._addElement.apply(this,arguments);if(c.columnSize&&c.columnSize[a])var e=c.columnSize[a]/BI.sum(c.columnSize)*100+"%";else var e=1/this.options.items.length*100+"%";return d.element.css({position:"relative","float":"left",width:e}),d},addItem:function(a){var b=BI.LatticeLayout.superclass.addItem.apply(this,arguments);return this.resize(),b},addItemAt:function(a){var b=BI.LatticeLayout.superclass.addItemAt.apply(this,arguments);return this.resize(),b},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.LatticeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.lattice",BI.LatticeLayout),BI.TableLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-layout",scrolly:!0,columnSize:[200,200,"fill"],rowSize:30,hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TableLayout.superclass.render.apply(this,arguments),this.rows=0,this.populate(this.options.items)},_addElement:function(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}var f,g,h=this.options,i=[],j=0,k=0;for(f=0;ff;g--){if(!BI.isNumber(h.columnSize[g]))throw new Error("item with fill can only be one");e(b[g],this.rows,g),i.push(BI.extend({top:0,bottom:0,right:h.columnSize[g]<=1?100*k+"%":k,width:h.columnSize[g]<=1?100*h.columnSize[g]+"%":h.columnSize[g]},b[g])),k+=h.columnSize[g]+(h.columnSize[g]<1?0:h.hgap)}f>=0&&f0&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":h.vgap}),l.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,l),l},resize:function(){},addItem:function(a){if(!BI.isArray(a))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},update:function(){},populate:function(a){BI.TableLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table",BI.TableLayout),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(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",top:(d.vgap||0)+(d.tgap||0)+c.vgap+c.tgap+"px",bottom:(d.bgap||0)+(d.vgap||0)+c.vgap+c.bgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].width+(a[e-1].lgap||0)+2*(a[e-1].hgap||0)+c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({left:100*d[e]+"%",width:100*f.width+"%"}):g.element.css({left:d[e]+(f.lgap||0)+(f.hgap||0)+c.hgap+c.lgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].width+(a[d+1].rgap||0)+2*(a[d+1].hgap||0)+c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({right:100*e[d]+"%",width:100*f.width+"%"}):g.element.css({right:e[d]+(f.rgap||0)+(f.hgap||0)+c.hgap+c.rgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0})},update:function(){var a;return BI.each(this._children,function(b,c){a=c.update()||a}),a},populate:function(a){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(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",left:(d.lgap||0)+(d.hgap||0)+c.hgap+c.lgap+"px",right:+(d.hgap||0)+(d.rgap||0)+c.hgap+c.rgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].height+(a[e-1].tgap||0)+2*(a[e-1].vgap||0)+c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({top:100*d[e]+"%",height:100*f.height+"%"}):g.element.css({top:d[e]+(f.vgap||0)+(f.tgap||0)+c.vgap+c.tgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].height+(a[d+1].bgap||0)+2*(a[d+1].vgap||0)+c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({bottom:100*e[d]+"%",height:100*f.height+"%"}):g.element.css({bottom:e[d]+(f.vgap||0)+(f.bgap||0)+c.vgap+c.bgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0})},update:function(){},populate:function(a){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout),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("
        ").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(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}for(var f=this.options,g=BI.createWidget({type:"bi.default",tagName:"tr"}),h=0;h=0;f--){for(var g=0;g=0;g--){for(var f=0;f-1)return a.splice(c,1)}}function i(a){if(!X.test(a)){var b=a.split(".");return function(a){for(var c=0;cva&&qa[d].watcher.id>a.id;)d--;qa.splice(d+1,0,{watcher:a,options:b})}else qa.push({watcher:a,options:b});ta||(ta=!0,Y(v))}}function x(a){ya.clear(),y(a,ya)}function y(a,b){var c=void 0,d=void 0,e=_.isArray(a);if(e||_.isObject(a)){if(a.__ob__){var f=a.__ob__.dep.id;if(b.has(f))return;b.add(f)}if(e)for(c=a.length;c--;)y(a[c],b);else for(d=_.keys(a),c=d.length;c--;)y(a[d[c]],b)}}function z(a){for(var b="",c=0,d=a.length;c 0 Then","\t\t["+a+'] = [$vbsetter](Me, [$accessors],"'+a+'")',"\tEnd If","\tOn Error Goto 0","\tEnd Property"));for(a in c)f[a]||(f[a]=!0,e.push("\tPublic ["+a+"]"));e.push("\tPublic [hasOwnProperty]"),e.push("End Class");var g=e.join("\r\n"),h=ja[g];h||(h=d("VBClass"),window.parseVB("Class "+h+g),window.parseVB(["Function "+h+"Factory(acc, vbm)","\tDim o","\tSet o = (New "+h+")(acc, vbm)","\tSet "+h+"Factory = o","End Function"].join("\r\n")),ja[g]=h);var i=window[h+"Factory"](b,ka);return i}}var la,ma=ga,na=_.keys(da),oa={shouldConvert:!0},pa=function(){function a(b){if(_classCallCheck(this,a),this.value=b,this.dep=new aa,this.vmCount=0,_.isArray(b)){var c=S?m:n;c(b,da,na),this.model=this.observeArray(b)}else this.model=this.walk(b);V?this.model.__ob__=this:l(this.model,"__ob__",this)}return a.prototype.walk=function(a){return q(a,this)},a.prototype.observeArray=function(a){for(var b=0,c=a.length;b=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),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 a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(BI.isIE()&&BI.getIEVersion()<10?" hack":""),height:30,width:30,hgap:5,vgap:2.5,items:[{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),b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:c}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=c,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 a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(a,b){b||(b={});var c=this.options,d=this.getTipType()||(this.isEnabled()?"success":"warning"),e="success"===d?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(e)&&(BI.Tooltips.show(a,this.getName(),e,d,this,b),c.action&&BI.Actions.runAction(c.action,"hover",c,this),BI.Actions.runGlobalAction("hover",c,this))},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover({belowMouse:a.belowMouse,container:a.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(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(c){b._e=c,BI.isNotNull(b.showTimeout)&&(clearTimeout(b.showTimeout),b.showTimeout=null),BI.isNull(b.hideTimeout)&&(b.hideTimeout=BI.delay(function(){BI.isNotNull(b.hideTimeout)&&b._hideTooltip()},500)),b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&(BI.isNotNull(b.hideTimeout)&&(clearTimeout(b.hideTimeout),b.hideTimeout=null),b._showToolTip(b._e||c,a))},500)}),this.element.on("mouseleave.title"+this.getName(),function(a){b._e=null,b._clearTimeOut(),b._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(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.Tooltips.remove(this.getName())}}),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var c=this._getShowText();BI.isKey(c)?this.setText(c):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.doRedMark(b.keyword),b.highLight&&this.doHighLight()},_getShowText:function(){var a=this.options;return BI.isFunction(a.text)?a.text():a.text},doRedMark:function(a){var b=this.options;b.keyword=a,this.text.element.__textKeywordMarked__(this._getShowText()||b.value,a,b.py)},unRedMark:function(){var a=this.options;a.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){return BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(a)?a:"",BI.isIE9Below()?void this.text.element.html(BI.htmlEncode(this._getShowText())):void(/\s/.test(a)?this.text.element[0].innerHTML=BI.htmlEncode(this._getShowText()):this.text.element[0].textContent=this._getShowText()); +var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options;BI.isNumber(e.rowSize)&&(e.rowSize=BI.makeArray(e.items.length,1/e.items.length)),BI.isNumber(e.columnSize)&&(e.columnSize=BI.makeArray(e.items[0].length,1/e.items[0].length));for(var f=0;f=0;f--){for(var g=0;g=0;g--){for(var f=0;f-1)return a.splice(c,1)}}function i(a){if(!X.test(a)){var b=a.split(".");return function(a){for(var c=0;cva&&qa[d].watcher.id>a.id;)d--;qa.splice(d+1,0,{watcher:a,options:b})}else qa.push({watcher:a,options:b});ta||(ta=!0,Y(v))}}function x(a){ya.clear(),y(a,ya)}function y(a,b){var c=void 0,d=void 0,e=_.isArray(a);if(e||_.isObject(a)){if(a.__ob__){var f=a.__ob__.dep.id;if(b.has(f))return;b.add(f)}if(e)for(c=a.length;c--;)y(a[c],b);else for(d=_.keys(a),c=d.length;c--;)y(a[d[c]],b)}}function z(a){for(var b="",c=0,d=a.length;c 0 Then","\t\t["+a+'] = [$vbsetter](Me, [$accessors],"'+a+'")',"\tEnd If","\tOn Error Goto 0","\tEnd Property"));for(a in c)f[a]||(f[a]=!0,e.push("\tPublic ["+a+"]"));e.push("\tPublic [hasOwnProperty]"),e.push("End Class");var g=e.join("\r\n"),h=ja[g];h||(h=d("VBClass"),window.parseVB("Class "+h+g),window.parseVB(["Function "+h+"Factory(acc, vbm)","\tDim o","\tSet o = (New "+h+")(acc, vbm)","\tSet "+h+"Factory = o","End Function"].join("\r\n")),ja[g]=h);var i=window[h+"Factory"](b,ka);return i}}var la,ma=ga,na=_.keys(da),oa={shouldConvert:!0},pa=function(){function a(b){if(_classCallCheck(this,a),this.value=b,this.dep=new aa,this.vmCount=0,_.isArray(b)){var c=S?m:n;c(b,da,na),this.model=this.observeArray(b)}else this.model=this.walk(b);V?this.model.__ob__=this:l(this.model,"__ob__",this)}return a.prototype.walk=function(a){return q(a,this)},a.prototype.observeArray=function(a){for(var b=0,c=a.length;b=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),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 a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var a=this,b=this.options,c=BI.isIE(),d=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(c?" wave-loading hack":""),height:30,width:30,hgap:5,vgap:2.5,items:c?[]:[{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),b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:d}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=d,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 a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(a,b){b||(b={});var c=this.options,d=this.getTipType()||(this.isEnabled()?"success":"warning"),e="success"===d?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(e)&&(BI.Tooltips.show(a,this.getName(),e,d,this,b),c.action&&BI.Actions.runAction(c.action,"hover",c,this),BI.Actions.runGlobalAction("hover",c,this))},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover({belowMouse:a.belowMouse,container:a.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(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(c){b._e=c,BI.isNotNull(b.showTimeout)&&(clearTimeout(b.showTimeout),b.showTimeout=null),BI.isNull(b.hideTimeout)&&(b.hideTimeout=BI.delay(function(){BI.isNotNull(b.hideTimeout)&&b._hideTooltip()},500)),b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&(BI.isNotNull(b.hideTimeout)&&(clearTimeout(b.hideTimeout),b.hideTimeout=null),b._showToolTip(b._e||c,a))},500)}),this.element.on("mouseleave.title"+this.getName(),function(a){b._e=null,b._clearTimeOut(),b._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(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.Tooltips.remove(this.getName())}}),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var c=this._getShowText();BI.isKey(c)?this.setText(c):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.doRedMark(b.keyword),b.highLight&&this.doHighLight()},_getShowText:function(){var a=this.options;return BI.isFunction(a.text)?a.text():a.text},doRedMark:function(a){var b=this.options;b.keyword=a,this.text.element.__textKeywordMarked__(this._getShowText()||b.value,a,b.py)},unRedMark:function(){var a=this.options;a.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){return BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(a)?a:"",BI.isIE9Below()?void this.text.element.html(BI.htmlEncode(this._getShowText())):void(/\s/.test(a)?this.text.element[0].innerHTML=BI.htmlEncode(this._getShowText()):this.text.element[0].textContent=this._getShowText()); }}),BI.shortcut("bi.text",BI.Text),BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-basic-button"+(a.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 a=this.options;a.selected===!0&&BI.nextTick(BI.bind(function(){this.setSelected(a.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),a.shadow&&this._createShadow(),a.level&&this.element.addClass("button-"+a.level)},_createShadow:function(){var a=this,b=this.options,c=function(){a.$mask||(a.$mask=BI.createWidget(BI.isObject(b.shadow)?b.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),a.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:a,items:[{el:a.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){a._hover||b.isShadowShowingOnSelected||(c(),a.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(d){a.element.__isMouseInBounds__(d)&&(!a.isEnabled()||a._hover||!b.isShadowShowingOnSelected&&a.isSelected()||(c(),a.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(b){a.element.__isMouseInBounds__(b)||a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())})},bindEvent:function(){function a(a){e.stopEvent&&a.stopEvent(),e.stopPropagation&&a.stopPropagation()}function b(b){if(a(b),!(!d.isEnabled()||d.isOnce()&&d.isSelected())){if(BI.isKey(e.bubble)||BI.isFunction(e.bubble)){if(BI.isNull(d.combo)){var f;BI.createWidget({type:"bi.absolute",element:d,items:[{el:{type:"bi.bubble_combo",trigger:"",ref:function(){d.combo=this},el:{type:"bi.layout",height:"100%"},popup:{type:"bi.text_bubble_bar_popup_view",text:c(),ref:function(){f=this},listeners:[{eventName:BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,action:function(a){d.combo.hideView(),a&&h.apply(d,arguments)}}]},listeners:[{eventName:BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,action:function(){f.populate(c())}}]},left:0,right:0,bottom:0,top:0}]})}return void(d.combo.isViewVisible()?d.combo.hideView():d.combo.showView())}h.apply(d,arguments)}}function c(){var a=d.options.bubble;return BI.isFunction(a)?a():a}var d=this,e=this.options,f=this.handle();if(f){f=f.element;var g=(e.trigger||"").split(",");BI.each(g,function(c,g){switch(g){case"mouseup":var h=!1;f.mousedown(function(){h=!0}),f.mouseup(function(c){h===!0&&b(c),h=!1,a(c)});break;case"mousedown":var h=!1,i=!1;f.mousedown(function(c){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){!BI.DOM.isExist(d)||f.__isMouseInBounds__(a)||h!==!0||i||d._trigger(),h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(d.isSelected()?i=!0:b(c),h=!0,a(c))}),f.mouseup(function(a){BI.DOM.isExist(d)&&h===!0&&i===!0&&b(a),h=!1,i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())});break;case"dblclick":f.dblclick(b);break;case"lclick":var j,h=!1;f.mousedown(function(b){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){j&&clearInterval(j),j=null,h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(!d.isEnabled()||d.isOnce()&&d.isSelected()||(j=setInterval(function(){d.isEnabled()&&d.doClick()},180),h=!0,a(b)))});break;default:(e.stopEvent||e.stopPropagation)&&f.mousedown(function(b){a(b)}),f.click(b)}});var h=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1})}},_trigger:function(a){var b=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())),this.isValid())){b.handler.call(this,this.getValue(),this,a);var c=this.getValue();this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,c,this,a),this.fireEvent(BI.BasicButton.EVENT_CHANGE,c,this),b.action&&BI.Actions.runAction(b.action,"click",b,this),BI.Actions.runGlobalAction("click",b,this)}},_doClick:function(a){this.isValid()&&this.beforeClick(a),this._trigger(a),this.isValid()&&this.doClick(a)},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(a){var b=this.options;b.selected=a,a?this.handle().element.addClass("active"):this.handle().element.removeClass("active"),b.shadow&&!b.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(a){this.options.text=a},getText:function(){return this.options.text},_setEnable:function(a){BI.BasicButton.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),a||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",BI.NodeButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.NodeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-node",open:!1})},_init:function(){BI.NodeButton.superclass._init.apply(this,arguments);var a=this;BI.nextTick(function(){a.setOpened(a.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(a){this.options.open=!!a},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))}}),BI.Tip=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Tip.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-tip",zIndex:BI.zIndex_tip})},_init:function(){BI.Tip.superclass._init.apply(this,arguments),this.element.css({zIndex:this.options.zIndex})}}),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 a=this.options,b={};BI.each(a.behaviors,function(a,c){b[a]=BI.BehaviorFactory.createBehavior(a,{rule:c})}),this.behaviors=b,this.populate(a.items),(BI.isKey(a.value)||BI.isNotEmptyArray(a.value))&&this.setValue(a.value)},_createBtns:function(a){this.options;return BI.createWidgets(BI.createItems(a,{type:"bi.text_button"}))},_btnsCreator:function(a){var b=this,c=Array.prototype.slice.call(arguments),d=this.options,e=this._createBtns(a);return c[0]=e,BI.each(this.behaviors,function(a,b){b.doBehavior.apply(b,c)}),BI.each(e,function(a,c){c.on(BI.Controller.EVENT_CHANGE,function(a,e,f){if(a===BI.Events.CLICK){switch(d.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:b.setValue(c.getValue());break;case BI.ButtonGroup.CHOOSE_TYPE_NONE:b.setValue([])}b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b.fireEvent(BI.ButtonGroup.EVENT_CHANGE,e,f)}else b.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),c.on(BI.Events.DESTROY,function(){BI.remove(b.buttons,c)})}),e},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:d})]})});return a},_packageSimpleItems:function(a){var b=this.options;return BI.map(b.items,function(b,c){return BI.stripEL(c)===c?a[b]:BI.extend({},c,{el:a[b]})})},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},_isSimpleLayout:function(){var a=this.options;return 1===a.layouts.length&&!BI.isArray(a.items[0])},doBehavior:function(){var a=Array.prototype.slice.call(arguments);a.unshift(this.buttons),BI.each(this.behaviors,function(b,c){c.doBehavior.apply(c,a)})},prependItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(b,this.buttons),this._isSimpleLayout()&&this.layouts&&this.layouts.prependItems?void this.layouts.prependItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.prependItems(this._packageLayout(a).items))},addItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(this.buttons,b),this._isSimpleLayout()&&this.layouts&&this.layouts.addItems?void this.layouts.addItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.addItems(this._packageLayout(a).items))},removeItemAt:function(a){BI.removeAt(this.buttons,a),this.layouts.removeItemAt(a)},removeItems:function(a){a=BI.isArray(a)?a:[a];var b=[];BI.each(this.buttons,function(c,d){BI.deepContains(a,d.getValue())&&b.push(c)}),BI.removeAt(this.buttons,b),this.layouts.removeItemAt(b)},populate:function(a){a=a||[],this.empty(),this.options.items=a,this.buttons=this._btnsCreator.apply(this,arguments),a=this._isSimpleLayout()?this._packageSimpleItems(this.buttons):this._packageItems(a,this._packageBtns(this.buttons)),this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1)})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue())}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},getAllButtons:function(){return this.buttons},getAllLeaves:function(){return this.buttons},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&c.isSelected()&&a.push(c)}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&!c.isSelected()&&a.push(c)}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.options.id===a)return b=d,!0}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=d,!0}),b},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),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(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!1):c.setSelected(!0)):void c.setNotSelectedValue(a)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setEnabledValue)?void c.setEnabledValue(a):void(BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1))})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!0):c.setSelected(!1)):void c.setValue(a)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getNotSelectedValue())):void(c.isEnabled()&&c.isSelected&&!c.isSelected()&&a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getValue())):void(c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue()))}),a},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getSelectedButtons())):void(c.isSelected&&c.isSelected()&&a.push(c))}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getNotSelectedButtons())):void(c.isSelected&&!c.isSelected()&&a.push(c))}),a},getAllLeaves:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getAllLeaves())):void(c.isEnabled()&&a.push(c))}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){var e=d.getValue();if(d.isEnabled()&&(e===a||BI.contains(e,a)))return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()){if(d.attr("id")===a)return b=d,!0;if(BI.isFunction(d.getNodeById)&&(b=d.getNodeById(a)))return!0}}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled())if(BI.isFunction(d.getNodeByValue)){if(b=d.getNodeByValue(a))return!0}else if(d.attr("value")===a)return b=d,!0}),b}}),BI.ButtonTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_tree",BI.ButtonTree),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 a=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(a.value)&&this.setSelectedValue(a.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:"
          "}),BI.createWidget({type:"bi.default",element:this.element,items:[this.tree]})},_selectTreeNode:function(a,b){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,b,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,b,this)},_configSetting:function(){function a(a,b,c){var d=c.checked,e=c.getCheckStatus();e.half===!0&&e.checked===!0&&(d=!1),l.nodes.checkNode(c,!d,!0,!0)}function b(a,b){var c=l._getParentValues(b);b.times=b.times||1;var d="id="+b.id+"×="+b.times++ +"&parentValues= "+_global.encodeURIComponent(BI.jsonEncode(c))+"&checkState="+_global.encodeURIComponent(BI.jsonEncode(b.getCheckStatus()));return"&"+d}function c(a,b){return b.isAjaxing?(BI.Msg.toast("Please Wait。","warning"),!1):(b.children||(b.times=1,f(b,"refresh")),!0)}function d(a,b,c,d){if(c.halfCheck=!1,d&&0!==d.length&&!/^[\s,\S]*<\/html>$/gi.test(d)&&!l._stop){var e=l.nodes,g=c.count||0;c.children.length>g?(c.count=c.children.length,BI.delay(function(){f(c)},n)):(e.updateNode(c),e.selectNode(c.children[0]))}}function e(a,b,c,d,e,f){l.nodes;BI.Msg.toast("Error!","warning")}function f(a,b){var c=l.nodes;"refresh"==b&&c.updateNode(a),c.reAsyncChildNodes(a,b,!0)}function g(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=l.nodes,e=d.getSelectedNodes();$.each(e,function(a,b){b.halfCheck=!1})}var f=b.getCheckStatus();f.half===!0&&f.checked===!0&&(b.checked=!1)}function h(a,b,c){l._selectTreeNode(b,c)}function i(a,b,c){c.halfCheck=!1}function j(a,b,c){}var k=this.options.paras,l=this,m={async:{enable:!0,url:b,autoParam:["id","name"],otherParam:BI.cjkEncodeDO(k)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:c,onAsyncSuccess:d,onAsyncError:e,beforeCheck:g,onCheck:h,onExpand:i,onCollapse:j,onClick:a}},n=100;return m},_getParentValues:function(a){if(!a.getParentNode())return[];var b=a.getParentNode(),c=this._getParentValues(b);return c=c.concat([this._getNodeValue(b)])},_getNodeValue:function(a){return null==a.value?BI.replaceAll(a.text.replace(/<[^>]+>/g,"")," "," "):a.value},_getHalfSelectedValues:function(a,b){var c=this,d=b.getCheckStatus();if(d.checked!==!1||d.half!==!1){if(BI.isNotEmptyArray(b.children)&&d.half===!0){var e=b.children;return void BI.each(e,function(b,d){c._getHalfSelectedValues(a,d)})}var f=b.parentValues||c._getParentValues(b),g=f.concat(this._getNodeValue(b));if(BI.isNotEmptyArray(b.children)||d.half===!1)return void this._buildTree(a,g);var h=BI.deepClone(this.options.paras.selectedValues),i=this._getTree(h,g);this._addTreeNode(a,f,this._getNodeValue(b),i)}},_getTree:function(a,b){var c=a;return BI.any(b,function(a,b){return null==c[b]||void(c=c[b])}),c},_addTreeNode:function(a,b,c,d){var e=a;BI.each(b,function(a,b){null==e[b]&&(e[b]={}),e=e[b]}),e[c]=d},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){null==c[b]&&(c[b]={}),c=c[b]})},_getSelectedValues:function(){function a(a){BI.each(a,function(a,d){var e=d.getCheckStatus();if(e.checked===!0||e.half===!0)if(e.half===!0)b._getHalfSelectedValues(c,d);else{var f=d.parentValues||b._getParentValues(d),g=f.concat([b._getNodeValue(d)]);b._buildTree(c,g)}})}var b=this,c={},d=this.nodes.getNodes();return a(d),c},_dealWidthNodes:function(a){var b=this.options,c=BI.Tree.arrayFormat(a);return BI.each(c,function(a,c){c.title=c.title||c.text||c.value,c.isParent=c.isParent||c.parent,BI.isKey(b.paras.keyword)?c.text=$("
          ").__textKeywordMarked__(c.text,b.paras.keyword,c.py).html():c.text=BI.htmlEncode(c.text+"")}),a},_loadMore:function(){var a=this,b=this.options;this.tip.setLoading();var c=BI.extend({},b.paras,{times:++this.times});b.itemsCreator(c,function(b){if(a._stop!==!0){var c=!!b.hasNext,d=b.items||[];c?a.tip.setLoaded():a.tip.setEnd(),d.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(d))}})},_initTree:function(a){var b=this,c=this.options;b.fireEvent(BI.Events.INIT),this.times=1;var d=this.tree;d.empty(),this.loading(),this.tip.setVisible(!1);var e=function(c){b._stop!==!0&&(b.nodes=$.fn.zTree.init(d.element,a,c))},f=BI.extend({},c.paras,{times:1});c.itemsCreator(f,function(a){if(b._stop!==!0){var c=!!a.hasNext,d=a.items||[];d.length>0&&e(b._dealWidthNodes(d)),b.setTipVisible(d.length<=0),b.loaded(),c?b.tip.setLoaded():b.tip.invisible(),1===f.times&&b.fireEvent(BI.Events.AFTERINIT)}})},initTree:function(a,b){var b=b||{async:{enable:!1},check:{enable:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=$.fn.zTree.init(this.tree.element,b,a)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._createTree(),this.start(),this._initTree(b)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){var a=this.nodes;return a.getCheckedNodes(!0).length>0},checkAll:function(a){function b(a){BI.each(a,function(a,c){c.halfCheck=!1,b(c.children)})}this.nodes&&(BI.each(this.nodes.getNodes(),function(a,c){c.halfCheck=!1,b(c.children)}),this.nodes.checkAllNodes(a))},expandAll:function(a){this.nodes&&this.nodes.expandAll(a)},setValue:function(a,b){this.checkAll(!1),this.updateValue(a,b),this.refresh()},setSelectedValue:function(a){this.options.paras.selectedValues=BI.deepClone(a||{})},updateValue:function(a,b){if(this.nodes){b||(b="value");var c=this.nodes;BI.each(a,function(a,d){var e=c.getNodesByParam(b,a,null);BI.each(e,function(a,b){BI.extend(b,{checked:!0},d),c.updateNode(b)})})}},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),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)},_configSetting:function(){function a(a,b,c){var d=$.fn.zTree.getZTreeObj(b),e=c.checked,f=c.getCheckStatus();f.half===!0&&f.checked===!0&&(e=!1),d.checkNode(c,!e,!0,!0)}function b(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=$.fn.zTree.getZTreeObj(a),e=d.getSelectedNodes();BI.each(e,function(a,b){b.halfCheck=!1})}var f=b.getCheckStatus();f.half===!0&&f.checked===!0&&(b.checked=!1)}function c(a,b){h._beforeExpandNode(a,b)}function d(a,b,c){h._selectTreeNode(b,c)}function e(a,b,c){c.halfCheck=!1}function f(a,b,c){c.halfCheck=!1}var g=this.options.paras,h=this,i={async:{enable:!1,otherParam:BI.cjkEncodeDO(g)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeCheck:b,onCheck:d,beforeExpand:c,onExpand:e,onCollapse:f,onClick:a}};return i},_selectTreeNode:function(a,b){var c=this,d=(this.options,BI.deepClone(b.parentValues||c._getParentValues(b))),e=this._getNodeValue(b);if(b.checked===!0);else{var f=b,g=this._getTree(this.options.paras.selectedValues,d);for(BI.isNotNull(g[e])&&delete g[e];null!=f&&BI.isEmpty(g);)d=d.slice(0,d.length-1),f=f.getParentNode(),null!=f&&(g=this._getTree(this.options.paras.selectedValues,d),e=this._getNodeValue(f),delete g[e])}BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b)),checkState:b.getCheckStatus()}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||setTimeout(function(){e.itemsCreator(g,h)},17)},_join:function(a,b){function c(a,b,f){BI.each(b,function(g,h){BI.isNull(f[g])?d._addTreeNode(e,a,g,h):BI.isEmpty(f[g])?d._addTreeNode(e,a,g,{}):c(a.concat([g]),b[g],f[g])})}var d=this,e={};return c([],a,b),c([],b,a),e},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.AsyncTree.superclass.hasChecked.apply(this,arguments)},_getJoinValue:function(){if(!this.nodes)return{};var a=this._getSelectedValues();return BI.isEmpty(a)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?a:this._join(a,this.options.paras.selectedValues)},getValue:function(){return this._getJoinValue()},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.async_tree",BI.AsyncTree),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 a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_selectTreeNode:function(a,b){var c=this,d=this.options,e=BI.deepClone(b.parentValues||c._getParentValues(b)),f=this._getNodeValue(b);if(b.checked===!0)this.options.paras.selectedValues=this._getJoinValue(),d.itemsCreator(BI.extend({},d.paras,{type:BI.TreeView.REQ_TYPE_ADJUST_DATA,curSelectedValue:f,parentValues:e}),function(a){c.options.paras.selectedValues=a,BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)});else{for(var g=this.options.paras.selectedValues,h=e.concat(f),i=0,j=h.length;i0?d._dealWidthNodes(g):[]),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},getValue:function(){return BI.deepClone(this.options.paras.selectedValues||{})},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.part_tree",BI.PartTree),BI.ListTreeView=BI.inherit(BI.TreeView,{_constants:{SPLIT:"<|>"},_defaultConfig:function(){return BI.extend(BI.ListTreeView.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ListTreeView.superclass._init.apply(this,arguments);var a=this.options;this.storeValue=a.value||{}},_configSetting:function(){function a(a,b,d){var e=$.fn.zTree.getZTreeObj(b),f=d.checked;c._checkValue(d,!f),e.checkNode(d,!f,!0,!0)}function b(a,b,d){c._selectTreeNode(b,d)}var c=(this.options.paras,this),d={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:b,onClick:a}};return d},_selectTreeNode:function(a,b){this._checkValue(b,b.checked),BI.ListTreeView.superclass._selectTreeNode.apply(this,arguments)},_transArrayToMap:function(a){var b=this,c={};return BI.each(a,function(a,d){var e=d.join(b._constants.SPLIT);c[e]=!0}),c},_transMapToArray:function(a){var b=this,c=[];return BI.each(a,function(a){var d=a.split(b._constants.SPLIT);c.push(d)}),c},_checkValue:function(a,b){var c=BI.concat(this._getParentValues(a),this._getNodeValue(a)).join(this._constants.SPLIT);b?this.storeValue[c]=!0:delete this.storeValue[c]},setSelectedValue:function(a){this.options.paras.selectedValues=a||[],this.storeValue=this._transArrayToMap(a)},getValue:function(){return this._transMapToArray(this.storeValue)}}),BI.shortcut("bi.list_tree_view",BI.ListTreeView),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(){function a(a,b){b.half=!1}function b(a,b,c){var d=$.fn.zTree.getZTreeObj(b),e=c.checked;f._checkValue(c,!e),d.checkNode(c,!e,!0,!0)}function c(a,b){f._beforeExpandNode(a,b)}function d(a,b,c){f._selectTreeNode(b,c)}var e=this.options.paras,f=this,g={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:d,beforeExpand:c,beforeCheck:a,onClick:b}};return g},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b))}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||setTimeout(function(){e.itemsCreator(g,h)},17)},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.ListAsyncTree.superclass.hasChecked.apply(this,arguments)},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.list_async_tree",BI.ListAsyncTree),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 a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_initTree:function(a,b){function c(b){d._stop!==!0&&(d.nodes=$.fn.zTree.init(f.element,a,b))}var d=this,e=this.options;this.times=1;var f=this.tree;f.empty(),d.tip.setVisible(!1),this.loading();var g=BI.extend({},e.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:this.times}),h=function(a){if(d._stop!==!0&&b==e.paras.keyword){var f=!!a.hasNext,g=a.items||[];e.paras.lastSearchValue=a.lastSearchValue,c(g.length>0?d._dealWidthNodes(g):[]), d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.list_part_tree",BI.ListPartTree),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}),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 a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.CollectionView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&(this._calculateSizeAndPositionData(),this._populate())},mounted:function(){var a=this.options;0===a.scrollLeft&&0===a.scrollTop||(this.element.scrollTop(a.scrollTop),this.element.scrollLeft(a.scrollLeft))},_calculateSizeAndPositionData:function(){for(var a=this.options,b=[],c=new BI.SectionManager,d=0,e=0,f=0,g=a.items.length;f0&&h>0){if(f>=this.renderRange.minY&&h<=this.renderRange.maxY&&e>=this.renderRange.minX&&g<=this.renderRange.maxX)return;for(var i=this._cellRenderers(h-f,g-e,e,f),j=[],k={},l={},m={},n={},o=0,p=i.length;o=0?(q.width!==this.renderedCells[A]._width&&(this.renderedCells[A]._width=q.width,this.renderedCells[A].el.setWidth(q.width)),q.height!==this.renderedCells[A]._height&&(this.renderedCells[A]._height=q.height,this.renderedCells[A].el.setHeight(q.height)),this.renderedCells[A]._left!==q.x&&this.renderedCells[A].el.element.css("left",q.x+"px"),this.renderedCells[A]._top!==q.y&&this.renderedCells[A].el.element.css("top",q.y+"px"),j.push(z=this.renderedCells[A])):(z=BI.createWidget(BI.extend({type:"bi.label",width:q.width,height:q.height},b.items[q.index],{cls:(b.items[q.index].cls||"")+" container-cell"+(0===q.y?" first-row":"")+(0===q.x?" first-col":""),_left:q.x,_top:q.y})),j.push({el:z,left:q.x,top:q.y,_left:q.x,_top:q.y,_width:q.width,_height:q.height}));for(var B=0|s[q.y],C=0|s[q.y+q.height],D=B;D<=C;D++){var E=n[D];x(t,E),y(u,E),t[E]=Math.min(t[E],q.x),u[E]=Math.max(u[E],q.x+q.width)}for(var F=0|r[q.x],G=0|r[q.x+q.width],D=F;D<=G;D++){var H=m[D];x(v,H),y(w,H),v[H]=Math.min(v[H],q.y),w[H]=Math.max(w[H],q.y+q.height)}k[q.index]=[q.index,o],l[o]=z}var I={},J={},K=[];BI.each(k,function(b,c){a.renderedKeys[b]?I[b]=c:J[b]=c}),BI.each(this.renderedKeys,function(a,b){I[a]||J[a]||K.push(b[1])}),BI.each(K,function(b,c){a.renderedCells[c].el._destroy()});var L=[];BI.each(J,function(a,b){L.push(j[b[1]])}),this.container.addItems(L),this.container._children=l,this.container.attr("items",j),this.renderedCells=j,this.renderedKeys=k;var M=BI.min(t),N=BI.max(u),O=BI.max(v),P=BI.min(w);this.renderRange={minX:M,minY:O,maxX:N,maxY:P}}},_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(a){var b=this.options;if(this._reRange(),a&&a!==this.options.items&&(this.options.items=a,this._calculateSizeAndPositionData()),b.items.length>0){this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender();try{this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)}catch(c){}}},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"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(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.CollectionView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.collection_view",BI.CollectionView),BI.Combo=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Combo.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Combo.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,d))}),a.element.on("mouseenter."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.addClass(b.hoverClass)}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(b.logic,{items:[{el:this.combo}]})))),b.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(){function a(){b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&c.toggle===!0&&(b._hideView(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",b.combo),b.fireEvent(BI.Combo.EVENT_COLLAPSE)),b.popupView&&b.popupView.element.off("mouseenter."+b.getName()).off("mouseleave."+b.getName()),f=!1}var b=this,c=this.options,d=(this.options.trigger||"").split(","),e=function(a){c.stopEvent&&a.stopEvent(),c.stopPropagation&&a.stopPropagation()},f=!1;BI.each(d,function(d,g){switch(g){case"hover":b.element.on("mouseenter."+b.getName(),function(a){b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(b._popupView(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND))}),b.element.on("mouseleave."+b.getName(),function(c){b.popupView&&(b.popupView.element.on("mouseenter."+b.getName(),function(c){f=!0,b.popupView.element.on("mouseleave."+b.getName(),function(b){a()}),b.popupView.element.off("mouseenter."+b.getName())}),BI.defer(function(){f||a()},50))});break;case"click":var h=BI.debounce(function(a){b.combo.element.__isMouseInBounds__(a)&&b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(c.toggle?b._toggle():b._popupView(),b.isViewVisible()?(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND)):(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",b.combo),b.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});b.element.off(g+"."+b.getName()).on(g+"."+b.getName(),function(a){h(a),e(a)});break;case"click-hover":var h=BI.debounce(function(a){b.combo.element.__isMouseInBounds__(a)&&b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(b._popupView(),b.isViewVisible()&&(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});b.element.off("click."+b.getName()).on("click."+b.getName(),function(a){h(a),e(a)}),b.element.on("mouseleave."+b.getName(),function(c){b.popupView&&(b.popupView.element.on("mouseenter."+b.getName(),function(c){f=!0,b.popupView.element.on("mouseleave."+b.getName(),function(b){a()}),b.popupView.element.off("mouseenter."+b.getName())}),BI.defer(function(){f||a()},50))})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var a=this,b=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view",value:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a.combo.setValue(a.getValue()),a.fireEvent(BI.Combo.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){a.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(a){if(this.element.find(a.target).length>0||this.popupView&&this.popupView.element.find(a.target).length>0||"CodeMirror-cursor"===a.target.className||BI.Widget._renderEngine.createElement(a.target).closest(".CodeMirror-hints").length>0){var b=this.options.direction.split(",");return void((BI.contains(b,"innerLeft")||BI.contains(b,"innerRight"))&&(this.adjustWidth(),this.adjustHeight()))}var c=this.options.hideChecker.apply(this,[a]);c!==!1&&this._hideView()},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),this.options.destroyWhenHide===!0?(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(a){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(a),this.adjustHeight(a),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(a){var b=this.options;if(this.popupView&&b.isNeedAdjustWidth===!0){this.resetListWidth("");var c=this.popupView.element.outerWidth(),d=this.element.outerWidth()||b.width;c>d+80?d+=80:c>d&&(d=c),this.resetListWidth(d<100?100:d)}},adjustHeight:function(a){var b=this.options,c={};if(this.popupView){var d=this.popupView.isVisible();this.popupView.visible();var e=BI.isNotNull(a)?{element:{offset:function(){return{left:a.pageX,top:a.pageY}},bounds:function(){return{x:a.offsetX,y:a.offsetY,width:0,height:24}},outerWidth:function(){return 0},outerHeight:function(){return 24}}}:this.combo;switch(b.direction){case"bottom":case"bottom,right":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["bottom","top","right","left"],b.offsetStyle);break;case"top":case"top,right":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["top","bottom","right","left"],b.offsetStyle);break;case"left":case"left,bottom":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["left","right","bottom","top"],b.offsetStyle);break;case"right":case"right,bottom":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","bottom","top"],b.offsetStyle);break;case"top,left":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["top","bottom","left","right"],b.offsetStyle);break;case"bottom,left":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["bottom","top","left","right"],b.offsetStyle);break;case"left,top":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["left","right","top","bottom"],b.offsetStyle);break;case"right,top":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","top","bottom"],b.offsetStyle);break;case"right,innerRight":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","innerRight","innerLeft","bottom","top"],b.offsetStyle);break;case"right,innerLeft":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","innerLeft","innerRight","bottom","top"],b.offsetStyle);break;case"innerRight":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["innerRight","innerLeft","right","left","bottom","top"],b.offsetStyle);break;case"innerLeft":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["innerLeft","innerRight","left","right","bottom","top"],b.offsetStyle);break;case"top,custom":case"custom,top":c=BI.DOM.getTopAdaptPosition(e,this.popupView,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":c=BI.DOM.getBottomAdaptPosition(e,this.popupView,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight);break;case"left,custom":case"custom,left":c=BI.DOM.getLeftAdaptPosition(e,this.popupView,b.adjustXOffset||b.adjustLength),delete c.top,delete c.adaptHeight;break;case"custom,right":case"right,custom":c=BI.DOM.getRightAdaptPosition(e,this.popupView,b.adjustXOffset||b.adjustLength),delete c.top,delete c.adaptHeight}"adaptHeight"in c&&this.resetListHeight(c.adaptHeight),"left"in c&&this.popupView.element.css({left:c.left}),"top"in c&&this.popupView.element.css({top:c.top}),this.position=c,this.popupView.setVisible(d)}},resetListHeight:function(a){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(a)},resetListWidth:function(a){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(a)},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate.apply(this.combo,arguments)},_setEnable:function(a){BI.Combo.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.combo.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},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(a){this.isEnabled()&&this.combo.isEnabled()&&!this.isViewVisible()&&this._popupView(a)},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())}}),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),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 a=this,b=this.options;this._expanded=!!b.el.open,this._initExpander(),this._initPullDownAction(),this.expander.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Expander.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Expander.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.expander}]}),b.isDefaultInit&&this._assertPopupView(),this.expander.isOpened()===!0&&this._popupView()},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND))},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE))});break;case"click":d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.expander.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.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 a=this,b=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:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_CHANGE,c,d)}),this.popupView.setVisible(this.isExpanded()),BI.nextTick(function(){a.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(a){this.popupView&&this.popupView.populate.apply(this.popupView,arguments),this.expander.populate.apply(this.expander,arguments)},_setEnable:function(a){BI.Expander.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.expander.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},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(a){return this.expander.options.id===a?this.expander:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.expander.getValue()===a?this.expander:this.popupView&&this.popupView.getNodeByValue(a)},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),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(a){var b=this,c=this.options,d=c.children;if(BI.isEmpty(d))throw new Error("ComboGroup构造错误");BI.each(d,function(a,b){var d=BI.formatEL(b).el.children;b=BI.formatEL(b).el,BI.isEmpty(d)||(b.el=BI.clone(b),b.children=d,b.type="bi.combo_group",b.action=c.action,b.height=c.height,b.direction=c.direction,b.isDefaultInit=c.isDefaultInit,b.isNeedAdjustHeight=c.isNeedAdjustHeight,b.isNeedAdjustWidth=c.isNeedAdjustWidth,b.adjustLength=c.adjustLength,b.popup=c.popup)}),this.combo=BI.createWidget({type:"bi.combo",element:this,container:c.container,height:c.height,trigger:c.trigger,direction:c.direction,isDefaultInit:c.isDefaultInit,isNeedAdjustWidth:c.isNeedAdjustWidth,isNeedAdjustHeight:c.isNeedAdjustHeight,adjustLength:c.adjustLength,el:a,popup:BI.extend({},c.popup,{el:BI.extend({items:d},c.popup.el)})}),this.combo.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.ComboGroup.EVENT_CHANGE,d)})},getValue:function(){return this.combo.getValue()},setValue:function(a){this.combo.setValue(a)}}),BI.ComboGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.combo_group",BI.ComboGroup),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 a=this.options;this.populate(a.items),BI.isKey(a.value)&&this.setValue(a.value)},_packageBtns:function(a){for(var b=this.options,c=this.buttonMap={},d=b.layouts.length-1;d>0;d--)a=BI.map(a,function(a,e){var f=BI.stripEL(e);return BI.extend({},b.layouts[d],{items:[BI.extend({},b.layouts[d].el,{el:BI.extend({ref:function(a){BI.isKey(c[f.value])&&(c[f.value]=a)}},f)})]})});return a},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},addItems:function(a){this.layouts.addItems(a)},prependItems:function(a){this.layouts.prependItems(a)},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttonMap,function(b,c){c&&(a.deepContains(b)?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1))})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttonMap,function(b,c){c&&(!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttonMap,function(b,c){c&&c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},populate:function(a){a=a||[],this.options.items=a,a=this._packageBtns(a),this.layouts?this.layouts.populate(a):this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))}}),BI.VirtualGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.virtual_group",BI.VirtualGroup),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 a=this,b=this.options;this.prev.setLoading(),b.itemsCreator.apply(this,[{times:--this.times},function(){a.prev.setLoaded(),a.prependItems.apply(a,arguments)}])},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.Loader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.prev=!1,b.next=!1),b.prev!==!1&&(this.prev=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.prev)),this.prev.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._prevLoad()})),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}],value:b.value}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Loader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.prev,this.button_group,this.next)})))),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){b.isDefaultInit&&BI.isEmpty(b.items)&&this._populate()},this)),BI.isNotEmptyArray(b.items)&&this._populate(b.items)},hasPrev:function(){var a=this.options;return BI.isNumber(a.count)?this.count0&&f.push(c),BI.Maskers.show(a.getName()),a.popupView.populate.apply(a.popupView,f),b.isAutoSync&&b.adapter&&b.adapter.getValue&&a.popupView.setValue(b.adapter.getValue()),a.popupView.loaded&&a.popupView.loaded(),a.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(a){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(a){BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},getKeyword:function(){return this.editor.getValue()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var a=this.options;return a.isAutoSync&&a.adapter&&a.adapter.getValue?a.adapter.getValue():this.isSearching()?this.popupView.getValue():a.adapter&&a.adapter.getValue?a.adapter.getValue():BI.isNull(this.popupView)?a.popup.value:this.popupView.getValue()},populate:function(a,b,c){var d=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),d.isAutoSync&&d.adapter&&d.adapter.getValue&&this.popupView.setValue(d.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),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 a=this,b=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Switcher.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Switcher.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),b.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.switcher.isEnabled()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND))},function(){a.isEnabled()&&a.switcher.isEnabled()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.switcher.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.switcher.isEnabled()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.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 a=this,b=this.options;this._created||(this.popupView=BI.createWidget(b.popup,{type:"bi.button_group",element:b.adapter&&BI.Maskers.create(this.getName(),b.adapter,BI.extend({container:this},b.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_CHANGE,c,d)}),b.direction===BI.Direction.Custom||b.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){a.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var a=this,b=this.options;b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),BI.nextTick(function(){b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),a.element.removeClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var a=this,b=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),b.adapter?BI.Maskers.show(this.getName()):a.popupView.setVisible(!0),BI.nextTick(function(c){b.adapter?BI.Maskers.show(c):a.popupView.setVisible(!0),a.element.addClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(a){BI.Switcher.superclass._setEnable.apply(this,arguments),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.switcher.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},setAdapter:function(a){this.options.adapter=a,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(a){return this.switcher.attr("id")===a?this.switcher:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.switcher.getValue()===a?this.switcher:this.popupView&&this.popupView.getNodeByValue(a)},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Switcher.superclass.destroy.apply(this,arguments)}}),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),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(a){return BI.createWidget()}})},render:function(){var a=this,b=this.options;BI.isObject(b.tab)&&(this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.tab.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.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(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tab,this.layout)}))));var c=new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardCreator:function(c){var d=b.cardCreator.apply(a,arguments);return a.cardMap[c]=d,d},afterCardShow:function(b){a._deleteOtherCards(b),a.curr=b}});c.on(BI.ShowListener.EVENT_CHANGE,function(b){a.fireEvent(BI.Tab.EVENT_CHANGE,b,a)})},_deleteOtherCards:function(a){var b=this,c=this.options;c.single===!0&&BI.each(this.cardMap,function(c,d){c!==a+""&&(b.layout.deleteCardByName(c),delete b.cardMap[c])})},_assertCard:function(a){if(!this.layout.isCardExisted(a)){var b=this.options.cardCreator(a);this.cardMap[a]=b,this.layout.addCardByName(a,b)}},mounted:function(){var a=this.options;a.showIndex!==!1&&this.setSelect(a.showIndex)},setSelect:function(a){this.tab&&this.tab.setValue(a),this._assertCard(a),this.layout.showCardByName(a),this._deleteOtherCards(a),this.curr!==a&&(this.curr=a)},removeTab:function(a){var b=this;this.options;BI.any(this.cardMap,function(c,d){if(BI.isEqual(c,a+""))return b.layout.deleteCardByName(c),delete b.cardMap[c],!0})},getSelect:function(){return this.curr},getSelectedTab:function(){return this.layout.getShowingCard()},getTab:function(a){return this._assertCard(a),this.layout.getCardByName(a)},setValue:function(a){var b=this.layout.getShowingCard();b&&b.setValue(a)},getValue:function(){var a=this.layout.getShowingCard();if(a)return a.getValue()},populate:function(){var a=this.layout.getShowingCard();if(a)return a.populate&&a.populate.apply(a,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),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 a=this,b=this.options;this.ele=BI.createWidget(b.el),BI.createWidget(b.layout,{type:"bi.adaptive",element:this,items:[this.ele]}),this.ele.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.ele.setValue(a)},getValue:function(){return this.ele.getValue()},populate:function(){this.ele.populate.apply(this,arguments)}}),BI.shortcut("bi.el",BI.EL),BI.Msg=function(){var a,b,c,d=[];return{alert:function(a,b,c){this._show(!1,a,b,c)},confirm:function(a,b,c){this._show(!0,a,b,c)},prompt:function(a,b,c,d,e){},toast:function(a,b,c){b=b||{},c=c||BI.Widget._renderEngine.createElement("body");var e=b.level||"normal",f=!!BI.isNull(b.autoClose)||b.autoClose,g=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:e,autoClose:f,text:a,listeners:[{eventName:BI.Toast.EVENT_DESTORY,action:function(){BI.remove(d,g.element);var a=10;BI.each(d,function(b,c){c.css({top:a}),a+=c.outerHeight()+10})}}]}),h=10;BI.each(d,function(a,b){h+=b.outerHeight()+10}),BI.createWidget({type:"bi.absolute",element:c,items:[{el:g,left:"50%",top:h}]}),d.push(g.element),g.element.css({"margin-left":-1*g.element.outerWidth()/2}),g.element.removeClass("bi-message-leave").addClass("bi-message-enter"),f&&BI.delay(function(){g.element.removeClass("bi-message-enter").addClass("bi-message-leave"),g.destroy()},5e3)},_show:function(d,e,f,g){b=BI.Widget._renderEngine.createElement('
          ').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=BI.Widget._renderEngine.createElement('
          ').css({position:"absolute",zIndex:BI.zIndex_tip-1,top:0,left:0,right:0,bottom:0}).appendTo("body");var h=function(){a.destroy(),b.remove()},i=[];d===!0&&i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_Cancel"),level:"ignore",handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!1])}}}),i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_OK"),handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!0])}}});var j={element:c,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:e||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(){h(),BI.isFunction(g)&&g.apply(null,[!1])}},width:60}}},height:40},center:{el:{type:"bi.label",vgap:10,hgap:20,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",lgap:10,items:i},top:0,left:20,right:20,bottom:0}]},height:44}},width:450,height:200}]};a=BI.createWidget(j)}}}(),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 a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.GridView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&this._populate()},mounted:function(){var a=this.options;0===a.scrollLeft&&0===a.scrollTop||(this.element.scrollTop(a.scrollTop),this.element.scrollLeft(a.scrollLeft))},_getOverscanIndices:function(a,b,c,d){return{overscanStartIndex:Math.max(0,c-b),overscanStopIndex:Math.min(a-1,d+b)}},_calculateChildrenToRender:function(){var a=this,b=this.options,c=b.width,d=b.height,e=BI.clamp(b.scrollLeft,0,this._getMaxScrollLeft()),f=BI.clamp(b.scrollTop,0,this._getMaxScrollTop()),g=b.overscanColumnCount,h=b.overscanRowCount;if(d>0&&c>0){var i=this._columnSizeAndPositionManager.getVisibleCellRange(c,e),j=this._rowSizeAndPositionManager.getVisibleCellRange(d,f);if(BI.isEmpty(i)||BI.isEmpty(j))return;var k=this._columnSizeAndPositionManager.getOffsetAdjustment(c,e),l=this._rowSizeAndPositionManager.getOffsetAdjustment(d,f);this._renderedColumnStartIndex=i.start,this._renderedColumnStopIndex=i.stop,this._renderedRowStartIndex=j.start,this._renderedRowStopIndex=j.stop;var m=this._getOverscanIndices(this.columnCount,g,this._renderedColumnStartIndex,this._renderedColumnStopIndex),n=this._getOverscanIndices(this.rowCount,h,this._renderedRowStartIndex,this._renderedRowStopIndex),o=m.overscanStartIndex,p=m.overscanStopIndex,q=n.overscanStartIndex,r=n.overscanStopIndex,s=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(q),t=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(o),u=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(r),v=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(p),w=s.offset+l,x=t.offset+k,y=u.offset+l+u.size,z=v.offset+k+v.size;if(w>=this.renderRange.minY&&y<=this.renderRange.maxY&&x>=this.renderRange.minX&&z<=this.renderRange.maxX)return;for(var A=[],B={},C={},D=this._getMaxScrollLeft(),E=this._getMaxScrollTop(),F=0,G=0,H=0,I=q;I<=r;I++)for(var J=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(I),K=o;K<=p;K++){var L,M=I+"-"+K,N=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(K),O=this.renderedKeys[M]&&this.renderedKeys[M][2];O>=0?(N.size!==this.renderedCells[O]._width&&(this.renderedCells[O]._width=N.size,this.renderedCells[O].el.setWidth(N.size)),J.size!==this.renderedCells[O]._height&&(this.renderedCells[O]._height=J.size,this.renderedCells[O].el.setHeight(J.size)),this.renderedCells[O]._left!==N.offset+k&&this.renderedCells[O].el.element.css("left",N.offset+k+"px"),this.renderedCells[O]._top!==J.offset+l&&this.renderedCells[O].el.element.css("top",J.offset+l+"px"),A.push(L=this.renderedCells[O])):(L=BI.createWidget(BI.extend({type:"bi.label",width:N.size,height:J.size},b.items[I][K],{cls:(b.items[I][K].cls||"")+" grid-cell"+(0===I?" first-row":"")+(0===K?" first-col":""),_rowIndex:I,_columnIndex:K,_left:N.offset+k,_top:J.offset+l}),this),A.push({el:L,left:N.offset+k,top:J.offset+l,_left:N.offset+k,_top:J.offset+l,_width:N.size,_height:J.size})),D=Math.min(D,N.offset+k),F=Math.max(F,N.offset+k+N.size),E=Math.min(E,J.offset+l),G=Math.max(G,J.offset+l+J.size),B[M]=[I,K,H],C[H]=L,H++}var P={},Q={},R=[];BI.each(B,function(b,c){a.renderedKeys[b]?P[b]=c:Q[b]=c}),BI.each(this.renderedKeys,function(a,b){P[a]||Q[a]||R.push(b[2])}),BI.each(R,function(b,c){a.renderedCells[c].el._destroy()});var S=[];BI.each(Q,function(a,b){S.push(A[b[2]])}),this.container.addItems(S,this),this.container._children=C,this.container.attr("items",A),this.renderedCells=A,this.renderedKeys=B,this.renderRange={minX:D,minY:E,maxX:F,maxY:G}}},_getRealMaxScrollLeft:function(){var a=this.options,b=0;return BI.count(0,this.columnCount,function(c){b+=a.columnWidthGetter(c)}),Math.max(0,b-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(a){var b=this.options;this._reRange(),this.columnCount=0,this.rowCount=0,a&&a!==this.options.items&&(this.options.items=a),BI.isNumber(b.columnCount)?this.columnCount=b.columnCount:b.items.length>0&&(this.columnCount=b.items[0].length),BI.isNumber(b.rowCount)?this.rowCount=b.rowCount:this.rowCount=b.items.length,this.container.setWidth(this.columnCount*b.estimatedColumnSize),this.container.setHeight(this.rowCount*b.estimatedRowSize),this._columnSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.columnCount,b.columnWidthGetter,b.estimatedColumnSize),this._rowSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.rowCount,b.rowHeightGetter,b.estimatedRowSize),this._calculateChildrenToRender();try{this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)}catch(c){}},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getRealMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setColumnCount:function(a){this.options.columnCount=a},setRowCount:function(a){this.options.rowCount=a},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"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(a){this.options.estimatedColumnSize=a},setEstimatedRowSize:function(a){this.options.estimatedRowSize=a},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.GridView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_view",BI.GridView),BI.Popover=BI.inherit(BI.Widget,{_constant:{SIZE:{SMALL:"small",NORMAL:"normal",BIG:"big"},HEADER_HEIGHT:40},_defaultConfig:function(){return BI.extend(BI.Popover.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-popover bi-card",size:"normal",logic:{dynamic:!1},header:null,body:null,footer:null,closable:!0})},render:function(){var a=this,b=this.options;this.startX=0,this.startY=0,this.tracker=new BI.MouseMoveTracker(function(b,c){var d=(a._calculateSize(),BI.Widget._renderEngine.createElement("body").width()),e=BI.Widget._renderEngine.createElement("body").height();a.startX+=b,a.startY+=c,a.element.css({left:BI.clamp(a.startX,0,d-a.element.width())+"px",top:BI.clamp(a.startY,0,e-a.element.height())+"px"}),BI.Resizers._resize()},function(){a.tracker.releaseMouseMoves()},_global);var c=[{el:{type:"bi.htape",cls:"bi-message-title bi-header-background",ref:function(b){a.dragger=b},items:[{type:"bi.absolute",items:[{el:BI.isPlainObject(b.header)?BI.createWidget(b.header,{extraCls:"bi-font-bold"}):{type:"bi.label",cls:"bi-font-bold",height:this._constant.HEADER_HEIGHT,text:b.header,textAlign:"left"},left:20,top:0,right:0,bottom:0}]},{el:b.closable?{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){a.close()}}:{type:"bi.layout"},width:56}],height:this._constant.HEADER_HEIGHT},height:this._constant.HEADER_HEIGHT},{el:b.logic.dynamic?{type:"bi.vertical",scrolly:!1,cls:"popover-body",ref:function(){a.body=this},hgap:20,tgap:10,items:[{el:BI.createWidget(b.body)}]}:{type:"bi.absolute",items:[{el:BI.createWidget(b.body),left:20,top:10,right:20,bottom:0}]}}];b.footer&&c.push({el:{type:"bi.absolute",items:[{el:BI.createWidget(b.footer),left:20,top:0,right:20,bottom:0}],height:44},height:44});var d=this._calculateSize();return BI.extend({type:b.logic.dynamic?"bi.vertical":"bi.vtape",items:c,width:d.width},b.logic.dynamic?{type:"bi.vertical",scrolly:!1}:{type:"bi.vtape",height:d.height})},mounted:function(){var a=this,b=this.options;if(this.dragger.element.mousedown(function(b){var c=a.element.offset();a.startX=c.left,a.startY=c.top,a.tracker.captureMouseMoves(b)}),b.logic.dynamic){var c=this._calculateSize(),d=this.element.height(),e=BI.clamp(d,c.height,600)-(b.footer?84:44);this.body.element.height(e)}},_calculateSize:function(){var a=this.options,b={};if(BI.isNotNull(a.size))switch(a.size){case this._constant.SIZE.SMALL:b.width=450,b.height=200;break;case this._constant.SIZE.BIG:b.width=900,b.height=500;break;default:b.width=550,b.height=500}return{width:a.width||b.width,height:a.height||b.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(a){this.element.css({"z-index":a})},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.i18nText("BI-Basic_Sure")),BI.i18nText(BI.i18nText("BI-Basic_Cancel"))]})},beforeCreate:function(){var a=this,b=this.options;b.footer||(b.footer={type:"bi.right_vertical_adapt", lgap:10,items:[{type:"bi.button",text:this.options.btns[1],value:1,level:"ignore",handler:function(b){a.fireEvent(BI.Popover.EVENT_CANCEL,b),a.close(b)}},{type:"bi.button",text:this.options.btns[0],warningTitle:b.warningTitle,value:0,handler:function(b){a.fireEvent(BI.Popover.EVENT_CONFIRM,b),a.close(b)}}]})}}),BI.shortcut("bi.bar_popover",BI.BarPopover),BI.Popover.EVENT_CLOSE="EVENT_CLOSE",BI.Popover.EVENT_OPEN="EVENT_OPEN",BI.Popover.EVENT_CANCEL="EVENT_CANCEL",BI.Popover.EVENT_CONFIRM="EVENT_CONFIRM",BI.PopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PopupView.superclass._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 a=this,b=this.options,c=function(a){a.stopPropagation()},d=function(a){return a.stopEvent(),!1};this.element.css({"z-index":BI.zIndex_popup,"min-width":b.minWidth+"px","max-width":b.maxWidth+"px"}).bind({click:c}),this.element.bind("mousewheel",c),b.stopPropagation&&this.element.bind({mousedown:c,mouseup:c,mouseover:c}),b.stopEvent&&this.element.bind({mousedown:d,mouseup:d,mouseover:d}),this.tool=this._createTool(),this.tab=this._createTab(),this.view=this._createView(),this.toolbar=this._createToolBar(),this.view.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.PopupView.EVENT_CHANGE)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{scrolly:!1,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap,items:BI.LogicFactory.createLogicItemsByDirection(b.direction,BI.extend({cls:"list-view-outer bi-card list-view-shadow"},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tool,this.tab,this.view,this.toolbar)}))))}))))},_createView:function(){var a=this.options;return this.button_group=BI.createWidget(a.el,{type:"bi.button_group",value:a.value}),this.button_group.element.css({"min-height":a.minHeight+"px","padding-top":a.innerVGap+"px","padding-bottom":a.innerVGap+"px"}),this.button_group},_createTool:function(){var a=this.options;if(!1!==a.tool)return BI.createWidget(a.tool)},_createTab:function(){var a=this.options;if(0!==a.tabs.length)return BI.createWidget({type:"bi.center",cls:"list-view-tab",height:25,items:a.tabs,value:a.value})},_createToolBar:function(){var a=this.options;if(0!==a.buttons.length)return BI.createWidget({type:"bi.center",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.view},populate:function(a){this.view.populate.apply(this.view,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||24:0,c=this.tab?this.tab.attr("height")||24:0,d=(this.tool&&this.tool.attr("height")||24)*(this.tool&&this.tool.isVisible()?1:0),e=a-b-c-d-2*this.options.innerVGap;this.view.resetHeight?this.view.resetHeight(e):this.view.element.css({"max-height":e+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.view.setValue(a)},getValue:function(){return this.view.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView),BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.matcher=BI.createWidget(b.matcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:b.value}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),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(b.searcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:b.value}),this.searcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.matcher,this.spliter,this.searcher]})},startSearch:function(){},stopSearch:function(){},setValue:function(a){this.matcher.setValue(a),this.searcher.setValue(a)},getValue:function(){return this.matcher.getValue().concat(this.searcher.getValue())},populate:function(a,b,c){a||(a=[]),b||(b=[]),this.setTipVisible(a.length+b.length===0),this.spliter.setVisible(BI.isNotEmptyArray(b)&&BI.isNotEmptyArray(a)),this.matcher.populate(b,c),this.searcher.populate(a,c)},empty:function(){this.searcher.empty(),this.matcher.empty()},hasMatched:function(){return this.matcher.getAllButtons().length>0}}),BI.SearcherView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.searcher_view",BI.SearcherView),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 a=this,b=this.options;return{type:"bi.vertical",items:[BI.extend({type:"bi.vertical",scrolly:!1,ref:function(){a.container=this}},b.el)],element:this}},mounted:function(){var a=this,b=this.options;this._populate(),this.element.scroll(function(c){b.scrollTop=a.element.scrollTop(),a._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){a._calculateBlocksToRender()})},_renderMoreIf:function(){for(var a,b=this,c=this.options,d=this.element.height(),e=c.scrollTop+d+c.overscanHeight,f=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+c.blockSize||0,g=this.renderedIndex+1,h=function(){return b.container.element.height()};(a=h())e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.Pager.superclass.attr.apply(this,arguments),"curr"===a&&(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),BI.A=BI.inherit(BI.Text,{_defaultConfig:function(){var a=BI.A.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-a display-block",href:"",target:"_blank",el:null,tagName:"a"})},_init:function(){var a=this.options;BI.A.superclass._init.apply(this,arguments),this.element.attr({href:a.href,target:a.target}),a.el&&BI.createWidget(a.el,{element:this})}}),BI.shortcut("bi.a",BI.A),BI.LoadingBar=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.LoadingBar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-loading-bar bi-tips",height:30,handler:BI.emptyFn})},_init:function(){BI.LoadingBar.superclass._init.apply(this,arguments);var a=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(b){a.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 b=BI.createWidget({type:"bi.center_adapt",items:[this.loaded]}),c=BI.createWidget({type:"bi.center_adapt",items:[this.loading]});this.cardLayout=BI.createWidget({type:"bi.card",element:this,items:[{el:b,cardName:"loaded"},{el:c,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),BI.IconButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-icon-button horizon-center",iconWidth:null,iconHeight:null})},_init:function(){BI.IconButton.superclass._init.apply(this,arguments);var a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.ImageButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ImageButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-button",src:"",iconWidth:"100%",iconHeight:"100%"})},_init:function(){BI.ImageButton.superclass._init.apply(this,arguments);var a=this.options;this.image=BI.createWidget({type:"bi.img",width:a.iconWidth,height:a.iconHeight,src:a.src}),BI.isNumber(a.iconWidth)||BI.isNumber(a.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(a){BI.ImageButton.superclass.setWidth.apply(this,arguments),this.options.width=a},setHeight:function(a){BI.ImageButton.superclass.setHeight.apply(this,arguments),this.options.height=a},setImageWidth:function(a){this.image.setWidth(a)},setImageHeight:function(a){this.image.setHeight(a)},getImageWidth:function(){return this.image.element.width()},getImageHeight:function(){return this.image.element.height()},setSrc:function(a){this.options.src=a,this.image.setSrc(a)},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),BI.Button=BI.inherit(BI.BasicButton,{_defaultConfig:function(a){var b=BI.Button.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{baseCls:(b.baseCls||"")+" bi-button"+(BI.isIE()&&BI.isIE9Below()?" hack":""),minWidth:a.block===!0||a.clear===!0?0:80,height:24,shadow:a.clear!==!0,isShadowShowingOnSelected:!0,readonly:!0,iconCls:"",level:"common",block:!1,clear:!1,ghost:!1,textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:a.clear?0:10,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},_init:function(){BI.Button.superclass._init.apply(this,arguments);var a=this.options;!BI.isNumber(a.height)||a.clear||a.block?a.clear||a.block?this.element.css({lineHeight:a.height+"px"}):this.element.css({lineHeight:a.height-2+"px"}):this.element.css({height:a.height+"px",lineHeight:a.height-2+"px"}),BI.isKey(a.iconCls)?(this.icon=BI.createWidget({type:"bi.icon_label",cls:a.iconCls,width:18,height:a.height-2,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value,height:a.height-2}),BI.createWidget({type:"bi.center_adapt",element:this,hgap:a.hgap,vgap:a.vgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,element:this,text:a.text,value:a.value}),a.block===!0&&this.element.addClass("block"),a.clear===!0&&this.element.addClass("clear"),a.ghost===!0&&this.element.addClass("ghost"),a.minWidth>0&&this.element.css({"min-width":a.minWidth+"px"})},doClick:function(){BI.Button.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Button.EVENT_CHANGE,this)},setText:function(a){BI.Button.superclass.setText.apply(this,arguments),this.text.setText(a)},setValue:function(a){BI.Button.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},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",BI.TextButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-button",textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:0,lgap:0,rgap:0,text:"",py:""})},_init:function(){BI.TextButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,width:a.width,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.rgap,text:a.text,value:a.value,py:a.py,keyword:a.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(a){BI.TextButton.superclass.setText.apply(this,arguments),a=BI.isArray(a)?a.join(","):a,this.text.setText(a)},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.TextButton.superclass.setValue.apply(this,arguments),this.isReadOnly()||(a=BI.isArray(a)?a.join(","):a,this.text.setValue(a))}}),BI.TextButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_button",BI.TextButton),BI.BlankIconIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=(this._const,BI.createWidget({type:"bi.layout",width:a.blankWidth,height:a.height}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,forceNotSelected:!0,width:a.height,height:a.height}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,forceNotSelected:!0,width:a.height,height:a.height}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,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(a){BI.BlankIconIconTextItem.superclass.setSelected.apply(this,arguments),this.icon1.setSelected(a),this.icon2.setSelected(a)},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),BI.BlankIconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.layout",width:a.blankWidth},b,this.text,{type:"bi.layout",width:a.height})}))))},doClick:function(){BI.BlankIconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.BlankIconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_icon_item",BI.BlankIconTextIconItem),BI.BlankIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=(this._const,BI.createWidget({type:"bi.layout",width:a.blankWidth}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.icon,this.text)}))))},doClick:function(){BI.BlankIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_item",BI.BlankIconTextItem),BI.IconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.leftIconWrapperWidth,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.rightIconWrapperWidth,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.iconWrapperWidth||a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend(a.logic,{ items:BI.LogicFactory.createLogicItemsByDirection(a.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),BI.TextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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),BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height,height:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"",root:!0,value:b.value,watermark:b.watermark,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,height:b.height-2*(b.vgap+b.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}}),this.watermark.element.bind("click",function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}));var c=[];this.watermark&&c.push({el:this.watermark,left:3,right:3,top:0,bottom:0}),c.push({el:this.editor,left:0,right:0,top:0,bottom:0});var d=[{el:{type:"bi.absolute",items:c},left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:d}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){a._checkError(),a.element.addClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){a._setErrorVisible(!1),a.element.removeClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){a.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){a.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(b){b.keyCode!==BI.KeyCode.TAB&&a.watermark&&a.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){a._checkWaterMark(),a._setErrorVisible(!1),a.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_ERROR,arguments),a._setErrorVisible(a.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){a._checkWaterMark();var b=a._setErrorVisible(!0);b&&b.element.fadeOut(100,function(){b.element.fadeIn(100)}),a.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){a.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){a.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){a.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){a.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){a.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){a.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){a.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM,arguments)}),this.element.click(function(a){return a.stopPropagation(),!1}),BI.isKey(this.options.value)||BI.isEmptyString(this.options.value)?(this._checkError(),this._checkWaterMark()):this._checkWaterMark()},_checkToolTip:function(){var a=this.options,b=a.errorText;BI.isFunction(b)&&(b=b(this.editor.getValue())),BI.isKey(b)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(b))},_checkError:function(){this._setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(a){this.options.errorText=a},getErrorText:function(){return this.options.errorText},_setErrorVisible:function(a){var b=this.options,c=b.errorText;if(BI.isFunction(c)&&(c=c(BI.trim(this.editor.getValue()))),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,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(a){this.editor.onKeyDown(a)},setValue:function(a){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(a),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),BI.MultifileEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var a=this,b=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:b.name,url:b.url,multiple:b.multiple,accept:b.accept,maxSize:b.maxSize,title:b.title}),this.file.on(BI.File.EVENT_CHANGE,function(){a.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments)}),this.file.on(BI.File.EVENT_ERROR,function(){a.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){a.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){a.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),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},render:function(){var a=this.options,b=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:10,top:4,bottom:8}]}),this.content.element.on("input propertychange",function(a){b._checkWaterMark(),b.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){b.isValid()&&(b._focus(),b.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),BI.Widget._renderEngine.createElement(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&(BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&this.setValue(a.value),BI.isNotNull(a.style)&&this.setStyle(a.style),this._checkWaterMark()},_checkWaterMark:function(){var a=this,b=this.options,c=this.getValue();BI.isNotEmptyString(c)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(b.watermark)&&(this.watermark?(this.watermark.setText(b.watermark),this.watermark.setValid(!b.invalid),this.watermark.setEnable(!b.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark cursor-default",textAlign:"left",height:20,text:b.watermark,invalid:b.invalid,disabled:b.disabled}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){a.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:4,top:4,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(a){this.content.element.val(a),this._checkWaterMark()},setStyle:function(a){this.style=a,this.element.css(a),this.content.element.css(BI.extend({},a,{color:a.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(a.backgroundColor)?BI.DOM.rgb2hex(a.backgroundColor):a.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(a){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)},_setEnable:function(a){BI.TextAreaEditor.superclass._setEnable.apply(this,[a]),this.content&&(this.content.element[0].disabled=!a)}}),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),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(b.text)?this.setText(b.text):BI.isKey(b.value)&&this.setText(b.value),b.highLight&&this.doHighLight()},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Html.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){BI.Html.superclass.setText.apply(this,arguments),this.options.text=a,this.text.element.html(a)}}),BI.shortcut("bi.html",BI.Html),BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"i",baseCls:(a.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),BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"iframe",baseCls:(a.baseCls||"")+" bi-iframe",src:"",name:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.frameborder="0",a.attributes.src=a.src,a.attributes.name=a.name,BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src},setName:function(a){this.options.name=a,this.element.attr("name",a)},getName:function(){return this.options.name}}),BI.shortcut("bi.iframe",BI.Iframe),BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"img",baseCls:(a.baseCls||"")+" bi-img display-block",src:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.src=a.src,BI.Img.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img),BI.ImageCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageCheckbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})}}),BI.ImageCheckbox.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_checkbox",BI.ImageCheckbox),BI.Checkbox=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-checkbox",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16},render:function(){var a=this,b=this.options;return{type:"bi.center_adapt",items:[{type:"bi.default",ref:function(b){a.checkbox=b},cls:"checkbox-content",width:b.iconWidth-2,height:b.iconHeight-2}]}},_setEnable:function(a){BI.Checkbox.superclass._setEnable.apply(this,arguments),a===!0?this.checkbox.element.removeClass("base-disabled disabled"):this.checkbox.element.addClass("base-disabled disabled")},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)},setSelected:function(a){BI.Checkbox.superclass.setSelected.apply(this,arguments),a?this.checkbox.element.addClass("bi-high-light-background"):this.checkbox.element.removeClass("bi-high-light-background")}}),BI.Checkbox.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox),function(document){var F=function(a){return function(b){var c=b.files||[b];return c.item||(c.item=a),c}}(function(a){return this[a]}),event={add:document.addEventListener?function(a,b,c){return a.addEventListener(b,c,!1),this}:function(a,b,c){return a.attachEvent("on"+b,c),this},del:document.removeEventListener?function(a,b,c){return a.removeEventListener(b,c,!1),this}:function(a,b,c){return a.detachEvent("on"+b,c),this},stop:function(a){return a?(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,a.preventDefault?a.preventDefault():a.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(a,b,c){return"--".concat(a,CRLF,'Content-Disposition: form-data; name="',b,'"; filename="',_global.encodeURIComponent(c.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,c.getAsBinary(),CRLF,"--",a,"--",CRLF)},isFunction=function(a){return"[object Function]"===toString.call(a)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(a,b,c,d){if(-1'),iframe=handler.iframe||(handler.iframe=document.createElement(''))}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(a){isFunction(handler.onerror)&&handler.onerror(rpe,a||_global.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loadedc.status||c.status>399?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void a.fireEvent(BI.File.EVENT_ERROR)):void a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url,c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d0&&b.fireEvent(BI.File.EVENT_CHANGE,{files:a.files}),c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){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(a){this.wrap&&this.wrap.upload(a)},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(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?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||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=!1,c=null,d=!1,e=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),f=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){d=!1,b=e.ctrlKey||e.metaKey,c=e.keyCode,a.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(b){c=null,d&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,e(b.keyCode))}).on("input propertychange",function(b){var f=b.originalEvent;(BI.isNull(f.propertyName)||"value"===f.propertyName)&&(c=null,d=!0,a._keydown_=!0,e(c))}).click(function(a){a.stopPropagation(),f()}).mousedown(function(b){a.element.val(a.element.val())}).focus(function(b){a._focusDebounce()}).focusout(function(b){a._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(){function a(){if(b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()){var a=b._lastValidValue;b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM),b._lastValidValue!==a&&b.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){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)&&(this._pause!==!0||/(\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))),a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN),BI.isEndWithBlank(this.getValue())&&BI.trim(this.getValue())===BI.trim(this._lastValue||"")?(this._pause=!0,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.PAUSE,"",this),this.fireEvent(BI.Input.EVENT_PAUSE),this._defaultState()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===this._lastValue||""===BI.trim(this._lastValue)?this._valueChange():(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_STOP),this._valueChange())},_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 a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastChangedValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(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(a){this.element.val(a),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(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),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),BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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),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 a=this,b=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(b){a.radio=b},width:b.iconWidth,height:b.iconHeight}]}},_setEnable:function(a){BI.Radio.superclass._setEnable.apply(this,arguments),a===!0?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(a){BI.Radio.superclass.setSelected.apply(this,arguments),a?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),BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(a){var b=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{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 a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();return b.textAlign="left",BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:"bi.center_adapt",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,maxWidth:"100%"}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(b,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var a=this.options,b="right"===a.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",c=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:b,height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(c)}]}):void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})),void("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}))):(c.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(c,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(c,{maxWidth:"100%"})),void BI.createWidget({type:b,element:this,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(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}}),BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var a=this.options;return{type:"bi.html",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel),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 a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.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),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),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 a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var a=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+a.level,text:a.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(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),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 a=this,b=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+b.level);var c=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:c,mousedown:c,mouseup:c,mouseover:c,mouseenter:c,mouseleave:c,mousemove:c});var d="close-font";switch(b.level){case"success":d="toast-success-font";break;case"error":d="toast-error-font";break;case"warning":d="toast-warning-font";break;case"normal":default:d="toast-message-font"}var e=[{type:"bi.icon_label",cls:d+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,textHeight:16,textAlign:"left"},rgap:b.autoClose?this._const.hgap:0}],f=[36,""];b.autoClose===!1&&(e.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){a.destroy()},width:36}),f.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:e,vgap:7,columnSize:f})},setText:function(a){this.text.setText(a)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:18})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,height:a.height,textHeight:a.height-2,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{value:e.value},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])},value:c.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},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(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),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(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[], -zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;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;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(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=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("")},makeDOMNodeMainBefore:function(a,b,c){a.push("
        • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
            "),c.push(d),c.push("
          ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={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"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0};return d},getTreeCheckedNodes:function(a,b,c,d){ -if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f=a.check.chkboxType,g=""===f.Y&&""===f.N;fullStyle="",b.chkDisabled===!0?fullStyle=d.DISABLED:b.halfCheck?fullStyle=d.PART:a.check.chkStyle==e.STYLE?fullStyle=b.check_Child_State<1?d.FULL:d.PART:fullStyle=b[c]?2===b.check_Child_State||b.check_Child_State===-1||g?d.FULL:d.PART:b.check_Child_State<1||g?d.FULL:d.PART;var h=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+fullStyle;return h=b.check_Focus&&b.chkDisabled!==!0?h+"_"+d.FOCUS:h,t.className.BUTTON+" "+d.DEFAULT+" "+h},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconCls,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconCls!==a&&(this.element.removeClass(b.iconCls).addClass(a),b.iconCls=a)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=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:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:b.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(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),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 a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconCls,once:b.once,iconWrapperWidth:b.iconWrapperWidth,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},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),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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,title:a.title||a.text,warningTitle:a.warningTitle,py:a.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(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 a=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:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var c=BI.createWidget({type:"bi.icon_label",width:24,cls:b.iconCls,iconWidth:b.iconWidth,iconHeight:b.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},{width:24,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},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(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,cls:"bi-list-item-none",id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.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(a){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=a?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),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),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 a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:24,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},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},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({ -type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),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 a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.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),BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:b.text,value:b.value,ref:function(){a.text=this}},left:b.lgap,right:b.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(a){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(a)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=BI.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=BI.Date._MD.slice(0);i[1]=BI.isLeapYear(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay();var j=(7-BI.StartOfWeek+e.FDay)%7;e.PDay=i[0===b?11:b-1]-j+1,e.NDay=1;var k=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=j&&a=0?c%12:(12+c%12)%12;return{year:BI.getDate().getFullYear()+d,month:e+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[],e=BI.parseDateTime(b.min,"%Y-%X-%d"),f=BI.parseDateTime(b.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var b={};BI.checkDateVoid(c+a,1,1,BI.print(BI.getDate(e.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(f.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(b.disabled=!0),b.text=c+a,d.push(b)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=BI.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=BI.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(a){var b=BI.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?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),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(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),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(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),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 a=this,b=this.options;this.editor=BI.createWidget(b.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.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(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:""})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:b.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(b){a.trigger=b},width:b.width,height:b.height},b.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(b){a.colorPicker=b},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){c(),a._isRGBColor(a.colorPicker.getValue())||a.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){c(),a.combo.hideView()}}]},b.popup),stopPropagation:!0,width:230},value:b.value});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var a=this,b=this.options;this.colorEditor=BI.createWidget(b.editor,{type:b.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:b.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a._dealStoreColors(),a.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:b.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:b.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:b.editor});var c=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:c}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),c.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a._dealStoreColors(),a.more.hideView(),a.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:!b.disabled,ref:function(){a.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_setEnable:function(a){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!a)},_dealStoreColors:function(){var a=this.getValue(),b=this._getStoreColors(),c=new BI.Queue(8);c.fromArray(b),c.remove(a),c.unshift(a);var d=c.toArray();BI.Cache.setItem("colors",BI.array2String(d)),this.setStoreColors(d)},_digestStoreColors:function(a){var b=BI.map(a,function(a,b){return{value:b}});return BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),b},_getStoreColors:function(){var a=this,b=this.options,c=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(c,function(c,d){return!b.simple||a._isRGBColor(d)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},setStoreColors:function(a){BI.isArray(a)&&this.storeColors.populate([this._digestStoreColors(a)])},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},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),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 a=this,b=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:b.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(a){this.popup.setStoreColors(a)},setValue:function(a){this.popup.setValue(a)},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),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:b.container,value:b.value,width:b.width,height:b.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_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 a=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:a,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var a=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(b){a.changeIcon=b},iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(b){a.label=b},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var b=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:b,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?(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"===a?(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":a}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),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:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{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 a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:b.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),d(a.storeValue.r)&&d(a.storeValue.g)&&d(a.storeValue.b)&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[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()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#ffffff"),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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()?(a.lastColor=a.getValue(),a.setValue("transparent")):("transparent"===a.lastColor&&(a.lastColor=""),a.setValue(a.lastColor||"#ffffff")),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){""===a?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===a?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":a}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(a){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){if("transparent"===a)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:""});a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.storeValue={r:BI.isNull(b.r)?"":b.r,g:BI.isNull(b.r)?"":b.g,b:BI.isNull(b.r)?"":b.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),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){this.colorShow.element.css({"background-color":a});var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.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),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 a=this;return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(b){a.colorWrapper=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(b){a.wheel=b}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(b){a.overlay=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.hMarker=b},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.slMarker=b},scrollable:!1,width:17,height:17}}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this.setValue(a.value)},_unpack:function(a){return 7===a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4===a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},_pack:function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},_setColor:function(a){var b=this._unpack(a);this.value!==a&&b&&(this.value=a,this.rgb=b,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(a){return this.hsl=a,this.rgb=this._HSLToRGB(a),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this._hueToRGB(b,c,d+.33333),this._hueToRGB(b,c,d),this._hueToRGB(b,c,d-.33333)]},_hueToRGB:function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},_RGBToHSL:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},_updateDisplay:function(){var a=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(a)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(a)*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(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var c=this._absolutePosition(a.offsetParent);b.x+=c.x,b.y+=c.y}return b},_widgetCoords:function(a){var b,c,d=a.target||a.srcElement,e=this.wheel.element[0];if("undefined"!=typeof a.offsetX){for(var f={x:a.offsetX,y:a.offsetY},g=d;g;)g.mouseX=f.x,g.mouseY=f.y,f.x+=g.offsetLeft,f.y+=g.offsetTop,g=g.offsetParent;for(var g=e,h={x:0,y:0};g;){if("undefined"!=typeof g.mouseX){b=g.mouseX-h.x,c=g.mouseY-h.y;break}h.x+=g.offsetLeft,h.y+=g.offsetTop,g=g.offsetParent}for(g=d;g;)g.mouseX=void 0,g.mouseY=void 0,g=g.offsetParent}else{var f=this._absolutePosition(e);b=(a.pageX||0)-f.x,c=(a.pageY||0)-f.y}return{x:b-this.constants.WIDTH/2,y:c-this.constants.WIDTH/2}},_doMouseMove:function(a){var b=this._widgetCoords(a);if(this.circleDrag){var c=Math.atan2(b.x,-b.y)/6.28;c<0&&(c+=1),this._setHSL([c,this.hsl[1],this.hsl[2]])}else{var d=Math.max(0,Math.min(1,-(b.x/this.constants.SQUARE)+.5)),e=Math.max(0,Math.min(1,-(b.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],d,e])}},doClick:function(a){var b=this._widgetCoords(a);return this.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>this.constants.SQUARE,this._doMouseMove(a),!1},setValue:function(a){this._setColor(a)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,container:b.container,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.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),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.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 a=this.options,b=this,c=[];return BI.each(a.buttons,function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:24,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:c}]})},_createView:function(){var a=this.options,b=BI.createWidget({type:"bi.button_group",items:[a.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return b.element.css("min-height",a.minHeight-44),b}}),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,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var a=this,b=this.options,c=BI.map(b.buttons,function(b,c){return BI.isWidget(c)?c:BI.extend({type:"bi.button",height:24,handler:function(b){a.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,b)}},c)});return{type:"bi.bubble_bar_popup_view",ref:function(){a.popup=this},el:{type:"bi.label",text:b.text,whiteSpace:"normal",textAlign:"left",ref:function(){a.text=this}},buttons:c}},populate:function(a){this.text.setText(a||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,value:b.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),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 a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconCls:b.iconCls,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,value:b.value}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),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 a=this.options,b="";BI.isKey(a.value)&&(b=this._digest(a.value,a.items)),this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b,disableSelected:!0,width:a.isShowDown?a.width-12:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight,selected:BI.isNotEmptyString(b)}),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(b)}),this.down.setVisible(a.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(a,b){var c="";return a=BI.isArray(a)?a[0]:a,BI.any(b,function(b,d){if(a===d.value)return c=d.iconCls,!0}),c},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c=this._digest(a,this.options.items);a=BI.isArray(a)?a[0]:a,BI.isNotEmptyString(c)?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:b.items,height:b.height,text:b.text,iconCls:b.iconCls,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth,title:b.title,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this.setValue(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:a.behaviors,value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a,b){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var c=this.options;a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:c.iconWrapperWidth,iconHeight:c.iconHeight,iconWidth:c.iconWidth}),this.popup.populate(a,b)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),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 a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,adjustLength:2,toggle:!1,ref:function(){a.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){a.trigger=this},items:b.items,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:b.value,items:b.items,ref:function(){a.popup=this,a.trigger.getSearcher().setAdapter(a.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:252},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){a.triggerBtn=this},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this._checkError(a.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.options.items=a,this.combo.populate(a)},setValue:function(a){this.combo.setValue(a),this._checkError(a)},getValue:function(){var a=this.combo.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo),BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var a=this,b=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){a.popup=this},items:BI.createItems(b.items,{type:"bi.single_select_item",textAlign:b.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,c,d)}}]}]}},mounted:function(){this.check()},populate:function(a,b,c){var d=BI.concat(a,b);BI.SearchTextValueComboPopup.superclass.populate.apply(this,d),d=BI.createItems(d,{type:"bi.single_select_item",height:24}),this.popup.populate(d,c)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup),BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value,b.items),value:b.value,height:b.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(a,c){var d=a.keyword,e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g,f)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(a){this.editor.setState(a)},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this._setState(this._digest(a,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),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options; -this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,value:b.value,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this._checkError(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),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 a=this,b=this.options;this._createValueMap();var c;BI.isNotNull(b.value)&&(c=this._digest(b.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:b.height,items:b.items,text:b.text,value:c}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,value:BI.isNull(c)?[]:[c],items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var b=a.combo.getValue()[0].value;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var b=a.combo.getValue()[0].childValue;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},_digest:function(a){return this.value=a,this.valueMap[a]},setValue:function(a){a=this._digest(a),this.combo.setValue([a]),this.trigger.setValue(a)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text,value:BI.isNull(a.value)?"":a.value.childValue||a.value.value})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a.childValue||a.value)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker,value:b.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(b.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:b.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]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.text.setStyle(a)},setValue:function(a){var b=this.options;this.editor.setValue(a),this._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(a.keyword)&&this.text.doRedMark(a.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text tip-text-style",textAlign:"left",height:b.height,text:b.text,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")},title:BI.isNotNull(b.tipText)?b.tipText:function(){var b="";return BI.isString(a.stateValue)&&(b=a.stateValue),BI.isArray(a.stateValue)&&1===a.stateValue.length&&(b=a.stateValue[0]),b},warningTitle:b.warningTitle,tipType:b.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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.options.disabled===!1&&(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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=a,BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text"))))},setTipType:function(a){this.text.options.tipType=a}}),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),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker, -quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text",textAlign:"left",text:b.text,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),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),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(c,{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(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.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:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded(),a.check()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.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(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{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(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 a=this,b=this.options;return[{type:"bi.label",text:b.text,height:b.height,value:b.value,hgap:b.hgap,ref:function(){a.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){a.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(a){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),a?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var a=this,b=this.options;return{type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.linear_segment_button",height:b.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){a.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.buttonGroup=this}}},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),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 a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(b.value)&&this.setValue(b.value)},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.allSelected=!!a,this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{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(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"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(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),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:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1),this.setPagerVisible(a>1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate(),this.setPagerVisible(this.options.pages>1)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),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 a=this.options;a.vertical,a.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 a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev column-pre-page-h-font"},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 direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev row-pre-page-h-font"},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 direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage, -lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},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(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[86,110,0,24],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),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),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 a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:a.height,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:b.value,items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},_setEnable:function(a){BI.Segment.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(a){return a.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.selected===!0,d=!b.selected&&b.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())},selected:c,invisible:d}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)},invisible:c||!d}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:b.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(a){this.checkbox.setSelected(!!a)},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this.halfSelected=!!a,a===!0?(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(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(b),!b&&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),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(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};BI.isKey(f.id)||(f.id=BI.UUID()),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.mid_plus_group_node",e===a.length-1&&(g.type="bi.last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a,b){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a,b)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),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(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),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(){function a(a,b){return!1}function b(a,b){return b.isLeaf?{}:{color:"#999999"}}var c={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:b},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return c},_dealWidthNodes:function(a){a=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),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 a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate(),BI.isNotNull(b.value)&&this.setValue(b.value)},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},_digest:function(a){a||(a=[]);var b=this,c={},d=[];return BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),BI.makeObject(a.concat(d))},setValue:function(a){this.tree.setValue(this._digest(a))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,title:function(){return a.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:b.triggerWidth||b.height},width:b.triggerWidth||b.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:24})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(b){a.wrapper=b},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.iconWrapperWidth||b.height},{el:this.text,lgap:BI.isEmptyString(b.iconCls)?5:0},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a)},setIcon:function(a){var b=this.options;this.icon.setIcon(a);var c=this.wrapper.attr("items")[0],d=this.wrapper.attr("items")[1];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,d.lgap=5,this.wrapper.resize()):c.width!==(b.iconWrapperWidth||b.height)&&(c.width=b.iconWrapperWidth||b.height,d.lgap=0,this.wrapper.resize())},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),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 a=this.options,b=this._digist(a.value,a.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:b.text,iconCls:b.iconCls,height:a.height,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth})},_digist:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d,e=BI.Tree.transformToArrayFormat(b);return BI.any(e,function(b,c){if(BI.deepContains(a,c.value))return d={text:c.text||c.value,iconCls:c.iconCls},!0}),BI.isNotNull(d)?{text:d.text,iconCls:d.iconCls}:{text:c.text,iconCls:c.iconCls}},setValue:function(a){var b=this._digist(a,this.options.items);this.trigger.setText(b.text),this.trigger.setIcon(b.iconCls)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text,title:function(){return a.text.getText()},tipType:b.tipType,warningTitle:b.warningTitle,hgap:c.hgap,readonly:b.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setText:function(a){this.text.setText(a)},setTipType:function(a){this.text.options.tipType=a}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),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 a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height,readonly:a.readonly,text:this._digest(a.value,a.items),tipType:a.tipType,warningTitle:a.warningTitle})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},setTipType:function(a){this.trigger.setTipType(a)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),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 a=this.options,b=this._digest(a.text,a.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2,text:b.text,cls:b.cls})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?{cls:"",text:d.join(",")}:{cls:"bi-water-mark",text:c.text}},setValue:function(a){var b=this._digest(a,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(b.cls),this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:a.triggerWidth||a.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:a.triggerWidth||a.height}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:b.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(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:b.behaviors,min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=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===a._month?a.setValue({year:a.year.getValue()-1,month:12}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._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===a._month?a.setValue({year:a.year.getValue()+1,month:1}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:b.behaviors,min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:b.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.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 a=this.options,b=!(1===this._month&&this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(12===this._month&&this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=BI.parseInt(a.year),this._month=BI.parseInt(a.month),this.year.setValue(a.year),this.month.setValue(a.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),BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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(){a.setValue(a.year.getValue()-1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._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(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,behaviors:b.behaviors,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.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:{type:"bi.horizontal_float",width:50,items:[{el:this.year}]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({ +appendChild(form),form.submit();return handler},xhr=null,sendFile}(Object.prototype.toString),sendFiles=function(a,b,c,d){var e=a.files.length,f=a.onload,g=a.onloadstart;for(a.current=0,a.total=0,a.sent=0;a.currentd.status||d.status>399)return BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void a.fireEvent(BI.File.EVENT_ERROR);var b=BI.some(c.attach_array,function(b,c){if(c.errorCode)return BI.Msg.toast(c.errorMsg,{level:"error"}),a.fireEvent(BI.File.EVENT_ERROR,c),!0});!b&&a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url,c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d0&&b.fireEvent(BI.File.EVENT_CHANGE,{files:a.files}),c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){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(a){this.wrap&&this.wrap.upload(a)},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(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?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||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=!1,c=null,d=!1,e=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),f=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){d=!1,b=e.ctrlKey||e.metaKey,c=e.keyCode,a.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(b){c=null,d&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,e(b.keyCode))}).on("input propertychange",function(b){var f=b.originalEvent;(BI.isNull(f.propertyName)||"value"===f.propertyName)&&(d=!0,a._keydown_=!0,e(c),c=null)}).click(function(a){a.stopPropagation(),f()}).mousedown(function(b){a.element.val(a.element.val())}).focus(function(b){a._focusDebounce()}).focusout(function(b){a._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(){function a(){if(b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()){var a=b._lastValidValue;b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM),b._lastValidValue!==a&&b.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){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)&&(this._pause!==!0||/(\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))),a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN);var c=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()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===c||""===BI.trim(c)||(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 a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastChangedValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(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(a){this.element.val(a),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(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),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),BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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),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 a=this,b=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(b){a.radio=b},width:b.iconWidth,height:b.iconHeight}]}},_setEnable:function(a){BI.Radio.superclass._setEnable.apply(this,arguments),a===!0?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(a){BI.Radio.superclass.setSelected.apply(this,arguments),a?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),BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(a){var b=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{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 a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();return b.textAlign="left",BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:"bi.center_adapt",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,maxWidth:"100%"}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(b,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var a=this.options,b="right"===a.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",c=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:b,height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(c)}]}):void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})),void("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}))):(c.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(c,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(c,{maxWidth:"100%"})),void BI.createWidget({type:b,element:this,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(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}}),BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var a=this.options;return{type:"bi.html",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel),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 a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.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),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),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 a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var a=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+a.level,text:a.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(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),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 a=this,b=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+b.level);var c=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:c,mousedown:c,mouseup:c,mouseover:c,mouseenter:c,mouseleave:c,mousemove:c});var d="close-font";switch(b.level){case"success":d="toast-success-font";break;case"error":d="toast-error-font";break;case"warning":d="toast-warning-font";break;case"normal":default:d="toast-message-font"}var e=[{type:"bi.icon_label",cls:d+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,textHeight:16,textAlign:"left"},rgap:b.autoClose?this._const.hgap:0}],f=[36,""];b.autoClose===!1&&(e.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){a.destroy()},width:36}),f.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:e,vgap:7,columnSize:f})},setText:function(a){this.text.setText(a)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:18})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,height:a.height,textHeight:a.height-2,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{value:e.value},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])},value:c.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},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(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),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(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent], +caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;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;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(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=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("
        • ")},makeDOMNodeMainBefore:function(a,b,c){a.push("
        • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
            "),c.push(d),c.push("
          ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={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"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0 +};return d},getTreeCheckedNodes:function(a,b,c,d){if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f=a.check.chkboxType,g=""===f.Y&&""===f.N;fullStyle="",b.chkDisabled===!0?fullStyle=d.DISABLED:b.halfCheck?fullStyle=d.PART:a.check.chkStyle==e.STYLE?fullStyle=b.check_Child_State<1?d.FULL:d.PART:fullStyle=b[c]?2===b.check_Child_State||b.check_Child_State===-1||g?d.FULL:d.PART:b.check_Child_State<1||g?d.FULL:d.PART;var h=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+fullStyle;return h=b.check_Focus&&b.chkDisabled!==!0?h+"_"+d.FOCUS:h,t.className.BUTTON+" "+d.DEFAULT+" "+h},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconCls,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconCls!==a&&(this.element.removeClass(b.iconCls).addClass(a),b.iconCls=a)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=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:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:b.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(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),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 a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconCls,once:b.once,iconWrapperWidth:b.iconWrapperWidth,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},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),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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,title:a.title||a.text,warningTitle:a.warningTitle,py:a.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(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 a=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:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var c=BI.createWidget({type:"bi.icon_label",width:24,cls:b.iconCls,iconWidth:b.iconWidth,iconHeight:b.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},{width:24,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},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(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,cls:"bi-list-item-none",id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.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(a){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=a?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),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),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 a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:24,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},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},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({ +type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),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 a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.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),BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:b.text,value:b.value,ref:function(){a.text=this}},left:b.lgap,right:b.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(a){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(a)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=BI.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=BI.Date._MD.slice(0);i[1]=BI.isLeapYear(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay();var j=(7-BI.StartOfWeek+e.FDay)%7;e.PDay=i[0===b?11:b-1]-j+1,e.NDay=1;var k=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=j&&a=0?c%12:(12+c%12)%12;return{year:BI.getDate().getFullYear()+d,month:e+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[],e=BI.parseDateTime(b.min,"%Y-%X-%d"),f=BI.parseDateTime(b.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var b={};BI.checkDateVoid(c+a,1,1,BI.print(BI.getDate(e.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(f.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(b.disabled=!0),b.text=c+a,d.push(b)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=BI.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=BI.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(a){var b=BI.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?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),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(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),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(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),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 a=this,b=this.options;this.editor=BI.createWidget(b.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.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(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:""})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:b.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(b){a.trigger=b},width:b.width,height:b.height},b.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(b){a.colorPicker=b},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){c(),a._isRGBColor(a.colorPicker.getValue())||a.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){c(),a.combo.hideView()}}]},b.popup),stopPropagation:!0,width:230},value:b.value});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var a=this,b=this.options;this.colorEditor=BI.createWidget(b.editor,{type:b.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:b.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a._dealStoreColors(),a.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:b.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:b.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:b.editor});var c=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:c}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),c.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a._dealStoreColors(),a.more.hideView(),a.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:!b.disabled,ref:function(){a.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_setEnable:function(a){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!a)},_dealStoreColors:function(){var a=this.getValue(),b=this._getStoreColors(),c=new BI.Queue(8);c.fromArray(b),c.remove(a),c.unshift(a);var d=c.toArray();BI.Cache.setItem("colors",BI.array2String(d)),this.setStoreColors(d)},_digestStoreColors:function(a){var b=BI.map(a,function(a,b){return{value:b}});return BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),b},_getStoreColors:function(){var a=this,b=this.options,c=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(c,function(c,d){return!b.simple||a._isRGBColor(d)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},setStoreColors:function(a){BI.isArray(a)&&this.storeColors.populate([this._digestStoreColors(a)])},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},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),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 a=this,b=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:b.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(a){this.popup.setStoreColors(a)},setValue:function(a){this.popup.setValue(a)},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),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:b.container,value:b.value,width:b.width,height:b.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_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 a=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:a,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var a=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(b){a.changeIcon=b},iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(b){a.label=b},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var b=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:b,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?(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"===a?(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":a}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),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:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{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 a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:b.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),d(a.storeValue.r)&&d(a.storeValue.g)&&d(a.storeValue.b)&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[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()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#ffffff"),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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()?(a.lastColor=a.getValue(),a.setValue("transparent")):("transparent"===a.lastColor&&(a.lastColor=""),a.setValue(a.lastColor||"#ffffff")),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){""===a?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===a?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":a}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(a){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){if("transparent"===a)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:""});a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.storeValue={r:BI.isNull(b.r)?"":b.r,g:BI.isNull(b.r)?"":b.g,b:BI.isNull(b.r)?"":b.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),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){this.colorShow.element.css({"background-color":a});var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.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),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 a=this;return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(b){a.colorWrapper=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(b){a.wheel=b}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(b){a.overlay=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.hMarker=b},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.slMarker=b},scrollable:!1,width:17,height:17}}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this.setValue(a.value)},_unpack:function(a){return 7===a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4===a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},_pack:function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},_setColor:function(a){var b=this._unpack(a);this.value!==a&&b&&(this.value=a,this.rgb=b,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(a){return this.hsl=a,this.rgb=this._HSLToRGB(a),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this._hueToRGB(b,c,d+.33333),this._hueToRGB(b,c,d),this._hueToRGB(b,c,d-.33333)]},_hueToRGB:function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},_RGBToHSL:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},_updateDisplay:function(){var a=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(a)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(a)*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(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var c=this._absolutePosition(a.offsetParent);b.x+=c.x,b.y+=c.y}return b},_widgetCoords:function(a){var b,c,d=a.target||a.srcElement,e=this.wheel.element[0];if("undefined"!=typeof a.offsetX){for(var f={x:a.offsetX,y:a.offsetY},g=d;g;)g.mouseX=f.x,g.mouseY=f.y,f.x+=g.offsetLeft,f.y+=g.offsetTop,g=g.offsetParent;for(var g=e,h={x:0,y:0};g;){if("undefined"!=typeof g.mouseX){b=g.mouseX-h.x,c=g.mouseY-h.y;break}h.x+=g.offsetLeft,h.y+=g.offsetTop,g=g.offsetParent}for(g=d;g;)g.mouseX=void 0,g.mouseY=void 0,g=g.offsetParent}else{var f=this._absolutePosition(e);b=(a.pageX||0)-f.x,c=(a.pageY||0)-f.y}return{x:b-this.constants.WIDTH/2,y:c-this.constants.WIDTH/2}},_doMouseMove:function(a){var b=this._widgetCoords(a);if(this.circleDrag){var c=Math.atan2(b.x,-b.y)/6.28;c<0&&(c+=1),this._setHSL([c,this.hsl[1],this.hsl[2]])}else{var d=Math.max(0,Math.min(1,-(b.x/this.constants.SQUARE)+.5)),e=Math.max(0,Math.min(1,-(b.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],d,e])}},doClick:function(a){var b=this._widgetCoords(a);return this.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>this.constants.SQUARE,this._doMouseMove(a),!1},setValue:function(a){this._setColor(a)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,container:b.container,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.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),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.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 a=this.options,b=this,c=[];return BI.each(a.buttons,function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:24,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:c}]})},_createView:function(){var a=this.options,b=BI.createWidget({type:"bi.button_group",items:[a.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return b.element.css("min-height",a.minHeight-44),b}}),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,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var a=this,b=this.options,c=BI.map(b.buttons,function(b,c){return BI.isWidget(c)?c:BI.extend({type:"bi.button",height:24,handler:function(b){a.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,b)}},c)});return{type:"bi.bubble_bar_popup_view",ref:function(){a.popup=this},el:{type:"bi.label",text:b.text,whiteSpace:"normal",textAlign:"left",ref:function(){a.text=this}},buttons:c}},populate:function(a){this.text.setText(a||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,value:b.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),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 a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconCls:b.iconCls,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,value:b.value}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),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 a=this.options,b="";BI.isKey(a.value)&&(b=this._digest(a.value,a.items)),this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b,disableSelected:!0,width:a.isShowDown?a.width-12:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight,selected:BI.isNotEmptyString(b)}),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(b)}),this.down.setVisible(a.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(a,b){var c="";return a=BI.isArray(a)?a[0]:a,BI.any(b,function(b,d){if(a===d.value)return c=d.iconCls,!0}),c},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c=this._digest(a,this.options.items);a=BI.isArray(a)?a[0]:a,BI.isNotEmptyString(c)?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:b.items,height:b.height,text:b.text,iconCls:b.iconCls,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth,title:b.title,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this.setValue(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:a.behaviors,value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a,b){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var c=this.options;a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:c.iconWrapperWidth,iconHeight:c.iconHeight,iconWidth:c.iconWidth}),this.popup.populate(a,b)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),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 a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,adjustLength:2,toggle:!1,ref:function(){a.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){a.trigger=this},items:b.items,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:b.value,items:b.items,ref:function(){a.popup=this,a.trigger.getSearcher().setAdapter(a.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:252},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){a.triggerBtn=this},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this._checkError(a.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.options.items=a,this.combo.populate(a)},setValue:function(a){this.combo.setValue(a),this._checkError(a)},getValue:function(){var a=this.combo.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo),BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var a=this,b=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){a.popup=this},items:BI.createItems(b.items,{type:"bi.single_select_item",textAlign:b.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,c,d)}}]}]}},mounted:function(){this.check()},populate:function(a,b,c){var d=BI.concat(a,b);BI.SearchTextValueComboPopup.superclass.populate.apply(this,d),d=BI.createItems(d,{type:"bi.single_select_item",height:24}),this.popup.populate(d,c)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup),BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value,b.items),value:b.value,height:b.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(a,c){var d=a.keyword,e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g,f)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(a){this.editor.setState(a)},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this._setState(this._digest(a,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),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments); +var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,value:b.value,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this._checkError(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),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 a=this,b=this.options;this._createValueMap();var c;BI.isNotNull(b.value)&&(c=this._digest(b.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:b.height,items:b.items,text:b.text,value:c}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,value:BI.isNull(c)?[]:[c],items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var b=a.combo.getValue()[0].value;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var b=a.combo.getValue()[0].childValue;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},_digest:function(a){return this.value=a,this.valueMap[a]},setValue:function(a){a=this._digest(a),this.combo.setValue([a]),this.trigger.setValue(a)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text,value:BI.isNull(a.value)?"":a.value.childValue||a.value.value})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a.childValue||a.value)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker,value:b.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(b.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:b.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]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.text.setStyle(a)},setValue:function(a){var b=this.options;this.editor.setValue(a),this._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(a.keyword)&&this.text.doRedMark(a.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text tip-text-style",textAlign:"left",height:b.height,text:b.text,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")},title:BI.isNotNull(b.tipText)?b.tipText:function(){var b="";return BI.isString(a.stateValue)&&(b=a.stateValue),BI.isArray(a.stateValue)&&1===a.stateValue.length&&(b=a.stateValue[0]),b},warningTitle:b.warningTitle,tipType:b.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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.options.disabled===!1&&(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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=a,BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text"))))},setTipType:function(a){this.text.options.tipType=a}}),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),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value, +validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text",textAlign:"left",text:b.text,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),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),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(c,{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(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.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:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded(),a.check()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.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(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{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(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 a=this,b=this.options;return[{type:"bi.label",text:b.text,height:b.height,value:b.value,hgap:b.hgap,ref:function(){a.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){a.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(a){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),a?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var a=this,b=this.options;return{type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.linear_segment_button",height:b.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){a.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.buttonGroup=this}}},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),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 a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(b.value)&&this.setValue(b.value)},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.allSelected=!!a,this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{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(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"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(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),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:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1),this.setPagerVisible(a>1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate(),this.setPagerVisible(this.options.pages>1)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),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 a=this.options;a.vertical,a.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 a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev column-pre-page-h-font"},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 direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev row-pre-page-h-font"},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 direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev, +hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},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(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[86,110,0,24],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),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),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 a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:a.height,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:b.value,items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},_setEnable:function(a){BI.Segment.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(a){return a.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.selected===!0,d=!b.selected&&b.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())},selected:c,invisible:d}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)},invisible:c||!d}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:b.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(a){this.checkbox.setSelected(!!a)},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this.halfSelected=!!a,a===!0?(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(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(b),!b&&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),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(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};BI.isKey(f.id)||(f.id=BI.UUID()),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.mid_plus_group_node",e===a.length-1&&(g.type="bi.last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a,b){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a,b)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),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(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),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(){function a(a,b){return!1}function b(a,b){return b.isLeaf?{}:{color:"#999999"}}var c={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:b},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return c},_dealWidthNodes:function(a){a=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),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 a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate(),BI.isNotNull(b.value)&&this.setValue(b.value)},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},_digest:function(a){a||(a=[]);var b=this,c={},d=[];return BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),BI.makeObject(a.concat(d))},setValue:function(a){this.tree.setValue(this._digest(a))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,title:function(){return a.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:b.triggerWidth||b.height},width:b.triggerWidth||b.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:24})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(b){a.wrapper=b},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.iconWrapperWidth||b.height},{el:this.text,lgap:BI.isEmptyString(b.iconCls)?5:0},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a)},setIcon:function(a){var b=this.options;this.icon.setIcon(a);var c=this.wrapper.attr("items")[0],d=this.wrapper.attr("items")[1];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,d.lgap=5,this.wrapper.resize()):c.width!==(b.iconWrapperWidth||b.height)&&(c.width=b.iconWrapperWidth||b.height,d.lgap=0,this.wrapper.resize())},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),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 a=this.options,b=this._digist(a.value,a.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:b.text,iconCls:b.iconCls,height:a.height,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth})},_digist:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d,e=BI.Tree.transformToArrayFormat(b);return BI.any(e,function(b,c){if(BI.deepContains(a,c.value))return d={text:c.text||c.value,iconCls:c.iconCls},!0}),BI.isNotNull(d)?{text:d.text,iconCls:d.iconCls}:{text:c.text,iconCls:c.iconCls}},setValue:function(a){var b=this._digist(a,this.options.items);this.trigger.setText(b.text),this.trigger.setIcon(b.iconCls)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text,title:function(){return a.text.getText()},tipType:b.tipType,warningTitle:b.warningTitle,hgap:c.hgap,readonly:b.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setText:function(a){this.text.setText(a)},setTipType:function(a){this.text.options.tipType=a}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),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 a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height,readonly:a.readonly,text:this._digest(a.value,a.items),tipType:a.tipType,warningTitle:a.warningTitle})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},setTipType:function(a){this.trigger.setTipType(a)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),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 a=this.options,b=this._digest(a.text,a.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2,text:b.text,cls:b.cls})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?{cls:"",text:d.join(",")}:{cls:"bi-water-mark",text:c.text}},setValue:function(a){var b=this._digest(a,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(b.cls),this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:a.triggerWidth||a.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:a.triggerWidth||a.height}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:b.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(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:b.behaviors,min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=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===a._month?a.setValue({year:a.year.getValue()-1,month:12}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._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===a._month?a.setValue({year:a.year.getValue()+1,month:1}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:b.behaviors,min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:b.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.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 a=this.options,b=!(1===this._month&&this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(12===this._month&&this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=BI.parseInt(a.year),this._month=BI.parseInt(a.month),this.year.setValue(a.year),this.month.setValue(a.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),BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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(){a.setValue(a.year.getValue()-1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._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(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,behaviors:b.behaviors,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.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:{type:"bi.horizontal_float",width:50,items:[{el:this.year}]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({ type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:1});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.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(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.calendar,left:5,right:5},{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),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(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear();var c=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),d=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:[c,d]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();c.setEnable(!b.isFrontYear()),d.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;a=BI.parseInt(a);var c=BI.parseDateTime(b.min,"%Y-%X-%d"),d=BI.parseDateTime(b.max,"%Y-%X-%d");BI.checkDateVoid(a,1,1,BI.print(BI.getDate(c.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(d.getFullYear(),0,1),"%Y-%X-%d"))[0]?(a=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime={year:b.year,month:b.month},0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(b.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(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDatePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDatePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateCombo.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options,c=BI.getDate();this.storeValue=BI.isNotNull(b.value)?b.value:{year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:b.minDate,max:b.maxDate,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.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(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var d=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});d.on(BI.IconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()||a.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:d,top:0,right:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},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),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 a=this,b=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(){a.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(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.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(b){a.timeSelect=b}}]},height:50},{el:this.dateButton,height:30}]}),this.setValue(b.value)},setValue:function(a){var b,c=a;BI.isNull(c)?(b=BI.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}),this.timeSelect.setValue({hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()})):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.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),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text},{el:BI.createWidget(),width:a.height}]}),this.setValue(a.value)},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=BI.getDate(),b=BI.print(c,"%Y-%X-%d %H:%M:%S");else{var d=BI.getDate(c.year,c.month-1,c.day,c.hour,c.minute,c.second);b=BI.print(d,"%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.StaticDateTimePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime=BI.extend(a.selectedTime,{year:b.year,month:b.month,day:d}),0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.calendar.empty(),a.setValue(a.selectedTime),a.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(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.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(b.selectedTime)},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=BI.extend({},this.timeSelect.getValue(),a)},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){a=a||{},this._setDatePicker(a),this._setCalendar(a),this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_time_pane_card",BI.StaticDateTimePaneCard),BI.DynamicDateTimePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDateTimePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDateTimePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDateTimePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateTimePane.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateTimePane.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:b.stopPropagation,maxHeight:1e3,minWidth:140}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(a){this.downlistcombo.showView(a)},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},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),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 a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:a.value}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:36,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),BI.extend(a.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),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:36,disableSelected:!0,selected:this._digest(a.value)}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:24,forceNotSelected:!0});var c=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(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},_digest:function(a){var b=this.options;return a=BI.isArray(a)?a:[a],BI.any(a,function(a,c){return BI.contains(b.childValues,c)})},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(a){this.icon1.setSelected(this._digest(a))}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),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 a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options,c=this._createChildren(this.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!BI.contains(a.singleValues,d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.isDefaultInit=!0,c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5,maxHeight:378},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=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});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?1:0}},setValue:function(a){a=a||{},this.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT;var b=[],c=[];BI.isNotNull(a.year)&&(b.push(BI.DynamicDateCard.TYPE.YEAR),c.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))),BI.isNotNull(a.quarter)&&(b.push(BI.DynamicDateCard.TYPE.QUARTER),c.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))),BI.isNotNull(a.month)&&(b.push(BI.DynamicDateCard.TYPE.MONTH),c.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))),BI.isNotNull(a.week)&&(b.push(BI.DynamicDateCard.TYPE.WEEK),c.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,a.week))),BI.isNotNull(a.day)&&(b.push(BI.DynamicDateCard.TYPE.DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,a.day))),BI.isNotNull(a.workDay)&&(b.push(BI.DynamicDateCard.TYPE.WORK_DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,a.workDay))),this.checkgroup.setValue(b),this.workDayBox.setSelected(BI.isNotNull(a.workDay)),this.resultPane.populate(this._getParamJson(c,a.position))},getValue:function(){var a=this,b={},c=this.checkgroup.getValue(),d=this.resultPane.getAllButtons();if(0!==c.length&&BI.each(d,function(c,d){var e=d.getValue();switch(e.dateType){case BI.DynamicDateCard.TYPE.YEAR:b.year=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.QUARTER:b.quarter=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.MONTH:b.month=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.WEEK:b.week=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.DAY:b.day=0===e.offset?-e.value:e.value}BI.isNull(e.dateType)&&(b.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var e=d[0].getValue();b.workDay=0===e.offset?-e.value:e.value}return b}}),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}}),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 a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:b.minDate,max:b.maxDate,format:b.format,allowEdit:b.allowEdit,watermark:b.watermark,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.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:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},_defaultState:function(){},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(a){return BI.isNaturalNumber(a)},value:b.value,ref:function(){a.editor=this},errorText:function(a){return BI.isEmptyString(a)?BI.i18nText("BI-Basic_Please_Input_Content"):BI.i18nText("BI-Please_Input_Natural_Number")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:b.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(){a.offsetCombo=this},container:null,value:b.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var a="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:a=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:a=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:a=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:a=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:a=BI.i18nText("BI-Basic_Day");break;case BI.DynamicDateCard.TYPE.WORK_DAY:default:a=BI.i18nText("BI-Basic_Work_Day")}return a},setValue:function(a){a=a||{},a.value=a.value||0,a.offset=a.offset||0,this.editor.setValue(a.value),this.offsetCombo.setValue(a.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),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 a=this,b=this.options,c=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:c.buttonHeight-1,listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){a.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),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),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2]}}}a.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.getDate();e=BI.DynamicDateHelper.getCalculation(c);var f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[0,1,2],d=this._getFormatString().match(/%./g);BI.each(d,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":default:c[2]=a}});var e=BI.parseDateTime(a,this._getFormatString());BI.print(e,this._getFormatString())===a&&(a=BI.print(e,b.compareFormat),c=[0,1,2]);var f=a.match(/\d+/g),g=[];return BI.each(f,function(a){g[a]=f[c[a]]}),g.length===c.length&&2===g[0].length?BI.print(BI.parseDateTime(g.join("-"),b.compareFormat),b.compareFormat):g.join("-")},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,this._getFormatString()),this._const.compareFormat);return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,this._getFormatString()),c=BI.print(b,this._const.compareFormat);return b.getMonth()>=0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),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),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",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:b.minDate,max:b.maxDate,allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate(),hour:0,minute:0,second:0}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},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_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options,c=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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){a.timeSelect=this}},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a.timeSelect.setValue(),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();return{type:a,value:a===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),BI.DynamicDateTimeSelect=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-select"},render:function(){var a=this;return{type:"bi.center_adapt",items:[{type:"bi.vertical_adapt",items:[{el:{type:"bi.number_editor",ref:function(){a.hour=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<24},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkHour(b),this.setValue(a._formatValueToDoubleDigit(b)),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.HOUR);this.setValue(b)}}],width:60,height:24}},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.minute=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkMinute(b),this.setValue(a._formatValueToDoubleDigit(b),BI.DynamicDateTimeSelect.MINUTE),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.MINUTE);this.setValue(b)}}],width:60,height:24},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.second=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkSecond(b),this.setValue(a._formatValueToDoubleDigit(b)),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}}],width:60,height:24}]}]}},_checkBorder:function(a){a=a||{},this._checkHour(a.hour),this._checkMinute(a.minute),this._checkSecond(a.second)},_checkHour:function(a){this.hour.setDownEnable(BI.parseInt(a)>0),this.hour.setUpEnable(BI.parseInt(a)<23)},_checkMinute:function(a){this.minute.setDownEnable(BI.parseInt(a)>0),this.minute.setUpEnable(BI.parseInt(a)<59)},_checkSecond:function(a){this.second.setDownEnable(BI.parseInt(a)>0),this.second.setUpEnable(BI.parseInt(a)<59)},_autoSwitch:function(a,b){var c=0,d=a+"";switch(b){case BI.DynamicDateTimeSelect.HOUR:c=2;break;case BI.DynamicDateTimeSelect.MINUTE:c=5}if(1===d.length&&BI.parseInt(d)>c&&(d="0"+d),2===d.length)switch(b){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 d},_formatValueToDoubleDigit:function(a){(BI.isNull(a)||BI.isEmptyString(a))&&(a=0);var b=BI.parseInt(a);return b<10&&(b="0"+b),b},_assertValue:function(a){return a=a||{},a.hour=this._formatValueToDoubleDigit(a.hour)||"00",a.minute=this._formatValueToDoubleDigit(a.minute)||"00",a.second=this._formatValueToDoubleDigit(a.second)||"00",a},getValue:function(){return{hour:BI.parseInt(this.hour.getValue()),minute:BI.parseInt(this.minute.getValue()),second:BI.parseInt(this.second.getValue())}},setValue:function(a){a=this._assertValue(a),this.hour.setValue(a.hour),this.minute.setValue(a.minute),this.second.setValue(a.second),this._checkBorder(a)}}),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}),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2],hour:0|d[3],minute:0|d[4],second:0|d[5]}}}a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.DynamicDateHelper.getCalculation(c),f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[],d=!1,e=this._getFormatString().match(/%./g);BI.each(e,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":c[2]=a;break;case"%S":d=!0}});var f=BI.parseDateTime(a,this._getFormatString());BI.print(f,this._getFormatString())===a&&(a=BI.print(f,b.compareFormat),c=[0,1,2]);var g=a.match(/\d+/g),h=[];BI.each(g.slice(0,3),function(a){h[a]=g[c[a]]});var i=g.slice(3);BI.each(i,function(a,b){BI.isNumeric(b)&&1===b.length&&(i[a]="0"+b)}),2!==i.length||d||i.push("00");var j=i.join(":"),k=h.slice(0,3).join("-");return BI.isNotEmptyString(j)&&(k+=" "+j),k},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S"),"%Y-%x-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S"),"%Y-%x-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S"),"%Y-%X-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d"),c=BI.print(b,"%Y-%X-%d");return b.getMonth()>0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue},isValid:function(){return this.editor.isValid()}}),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),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,hgap:1,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"close-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CHANGE),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.icon_label",cls:"search-font"},width:24},{el:a.editor},{el:this.clear,width:24}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:20})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,title:b.title,tipType:b.tipType,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:20})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.IntervalSlider=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""},render:function(){var a=this,b=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:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=a.valueOne,c=BI.parseFloat(this.getValue());a.valueOne=c;var d=a._getPercentByValue(c),e=BI.parseFloat(d.toFixed(1));a._setSliderOnePosition(e),a._setBlueTrack(),a._checkLabelPosition(b,a.valueTwo,a.valueOne,a.valueTwo),a.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:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=a.valueTwo,c=BI.parseFloat(this.getValue());a.valueTwo=c;var d=a._getPercentByValue(c),e=BI.parseFloat(d.toFixed(1));a._setSliderTwoPosition(e),a._setBlueTrack(),a._checkLabelPosition(a.valueOne,b,a.valueOne,a.valueTwo),a.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:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]}},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit);var g=this.valueOne,h=this.valueTwo;b?(this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f,this._checkLabelPosition(g,h,f,this.valueTwo)):(this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f,this._checkLabelPosition(g,h,this.valueOne,f)),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=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:a.EDITOR_R_GAP,height:a.SLIDER_HEIGHT},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=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:a.SLIDER_WIDTH_HALF,height:a.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(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_checkLabelPosition:function(a,b,c,d,e){if(a=BI.parseFloat(a),b=BI.parseFloat(b),c=BI.parseFloat(c),d=BI.parseFloat(d),a<=b&&c>d||a>=b&&c>>0;if(0===e)return-1;var f=0|b;if(f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);c>>0;if(0===e)return-1;for(b=e-1,arguments.length>1&&(b=Number(arguments[1]),b!=b?b=0:0!=b&&b!=1/0&&b!=-(1/0)&&(b=(b>0||-1)*Math.floor(Math.abs(b)))),c=b>=0?Math.min(b,e-1):e-Math.abs(b);c>=0;c--)if(c in d&&d[c]===a)return c;return-1}),_global.console=_global.console||function(){var a={};return a.log=a.warn=a.debug=a.info=a.error=a.time=a.dir=a.profile=a.clear=a.exception=a.trace=a.assert=function(){},a}(),_global.localStorage||(_global.localStorage={items:{},setItem:function(a,b){BI.Cache.addCookie(a,b)},getItem:function(a){return BI.Cache.getCookie(a)},removeItem:function(a){BI.Cache.deleteCookie(a)},key:function(){},clear:function(){this.items={}}}),Object.keys||(Object.keys=function(a){if(a!==Object(a))throw new TypeError("Object.keys called on a non-object");var b,c,d={__ob__:b,$accessors:b,$vbthis:b,$vbsetter:b},e=[];for(c in a)c in d||Object.prototype.hasOwnProperty.call(a,c)&&e.push(c);return e}),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="".__proto__===String.prototype?function(a){return a.__proto__}:function(a){return a.constructor.prototype}),Date.now||(Date.now=function(){return(new Date).valueOf()}),"undefined"!=typeof Set&&Set.toString().match(/native code/)||(Set=function(){this.set={}},Set.prototype.has=function(a){return void 0!==this.set[a]},Set.prototype.add=function(a){this.set[a]=1},Set.prototype.clear=function(){this.set={}}),!function(a){var b=a.navigator.userAgent.toLowerCase(),c=/msie/;if(c.test(b)){var d=Array.prototype.sort;Array.prototype.sort=function(a){if(a&&"function"==typeof a){if(this.length<2)return this;for(var b,c=0,e=c+1,f=this.length,g=!1,h=0;c0,g===!0&&(b=this[c],this[c]=this[e],this[e]=b);return this}return d.call(this)}}}(window);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),function(){function a(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function b(a,b,c,d){for(var e=-1,f=null==a?0:a.length;++e-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0: return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["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"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime(); }})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||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(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJCZGJMZMGXMPRYXKJNYMSGMZJYMKMFXMLDTGFBHCJHKYLPFMDXLQJJSMTQGZSJLQDLDGJYCALCMZCSDJLLNXDJFFFFJCZFMZFFPFKHKGDPSXKTACJDHHZDDCRRCFQYJKQCCWJDXHWJLYLLZGCFCQDSMLZPBJJPLSBCJGGDCKKDEZSQCCKJGCGKDJTJDLZYCXKLQSCGJCLTFPCQCZGWPJDQYZJJBYJHSJDZWGFSJGZKQCCZLLPSPKJGQJHZZLJPLGJGJJTHJJYJZCZMLZLYQBGJWMLJKXZDZNJQSYZMLJLLJKYWXMKJLHSKJGBMCLYYMKXJQLBMLLKMDXXKWYXYSLMLPSJQQJQXYXFJTJDXMXXLLCXQBSYJBGWYMBGGBCYXPJYGPEPFGDJGBHBNSQJYZJKJKHXQFGQZKFHYGKHDKLLSDJQXPQYKYBNQSXQNSZSWHBSXWHXWBZZXDMNSJBSBKBBZKLYLXGWXDRWYQZMYWSJQLCJXXJXKJEQXSCYETLZHLYYYSDZPAQYZCMTLSHTZCFYZYXYLJSDCJQAGYSLCQLYYYSHMRQQKLDXZSCSSSYDYCJYSFSJBFRSSZQSBXXPXJYSDRCKGJLGDKZJZBDKTCSYQPYHSTCLDJDHMXMCGXYZHJDDTMHLTXZXYLYMOHYJCLTYFBQQXPFBDFHHTKSQHZYYWCNXXCRWHOWGYJLEGWDQCWGFJYCSNTMYTOLBYGWQWESJPWNMLRYDZSZTXYQPZGCWXHNGPYXSHMYQJXZTDPPBFYHZHTJYFDZWKGKZBLDNTSXHQEEGZZYLZMMZYJZGXZXKHKSTXNXXWYLYAPSTHXDWHZYMPXAGKYDXBHNHXKDPJNMYHYLPMGOCSLNZHKXXLPZZLBMLSFBHHGYGYYGGBHSCYAQTYWLXTZQCEZYDQDQMMHTKLLSZHLSJZWFYHQSWSCWLQAZYNYTLSXTHAZNKZZSZZLAXXZWWCTGQQTDDYZTCCHYQZFLXPSLZYGPZSZNGLNDQTBDLXGTCTAJDKYWNSYZLJHHZZCWNYYZYWMHYCHHYXHJKZWSXHZYXLYSKQYSPSLYZWMYPPKBYGLKZHTYXAXQSYSHXASMCHKDSCRSWJPWXSGZJLWWSCHSJHSQNHCSEGNDAQTBAALZZMSSTDQJCJKTSCJAXPLGGXHHGXXZCXPDMMHLDGTYBYSJMXHMRCPXXJZCKZXSHMLQXXTTHXWZFKHCCZDYTCJYXQHLXDHYPJQXYLSYYDZOZJNYXQEZYSQYAYXWYPDGXDDXSPPYZNDLTWRHXYDXZZJHTCXMCZLHPYYYYMHZLLHNXMYLLLMDCPPXHMXDKYCYRDLTXJCHHZZXZLCCLYLNZSHZJZZLNNRLWHYQSNJHXYNTTTKYJPYCHHYEGKCTTWLGQRLGGTGTYGYHPYHYLQYQGCWYQKPYYYTTTTLHYHLLTYTTSPLKYZXGZWGPYDSSZZDQXSKCQNMJJZZBXYQMJRTFFBTKHZKBXLJJKDXJTLBWFZPPTKQTZTGPDGNTPJYFALQMKGXBDCLZFHZCLLLLADPMXDJHLCCLGYHDZFGYDDGCYYFGYDXKSSEBDHYKDKDKHNAXXYBPBYYHXZQGAFFQYJXDMLJCSQZLLPCHBSXGJYNDYBYQSPZWJLZKSDDTACTBXZDYZYPJZQSJNKKTKNJDJGYYPGTLFYQKASDNTCYHBLWDZHBBYDWJRYGKZYHEYYFJMSDTYFZJJHGCXPLXHLDWXXJKYTCYKSSSMTWCTTQZLPBSZDZWZXGZAGYKTYWXLHLSPBCLLOQMMZSSLCMBJCSZZKYDCZJGQQDSMCYTZQQLWZQZXSSFPTTFQMDDZDSHDTDWFHTDYZJYQJQKYPBDJYYXTLJHDRQXXXHAYDHRJLKLYTWHLLRLLRCXYLBWSRSZZSYMKZZHHKYHXKSMDSYDYCJPBZBSQLFCXXXNXKXWYWSDZYQOGGQMMYHCDZTTFJYYBGSTTTYBYKJDHKYXBELHTYPJQNFXFDYKZHQKZBYJTZBXHFDXKDASWTAWAJLDYJSFHBLDNNTNQJTJNCHXFJSRFWHZFMDRYJYJWZPDJKZYJYMPCYZNYNXFBYTFYFWYGDBNZZZDNYTXZEMMQBSQEHXFZMBMFLZZSRXYMJGSXWZJSPRYDJSJGXHJJGLJJYNZZJXHGXKYMLPYYYCXYTWQZSWHWLYRJLPXSLSXMFSWWKLCTNXNYNPSJSZHDZEPTXMYYWXYYSYWLXJQZQXZDCLEEELMCPJPCLWBXSQHFWWTFFJTNQJHJQDXHWLBYZNFJLALKYYJLDXHHYCSTYYWNRJYXYWTRMDRQHWQCMFJDYZMHMYYXJWMYZQZXTLMRSPWWCHAQBXYGZYPXYYRRCLMPYMGKSJSZYSRMYJSNXTPLNBAPPYPYLXYYZKYNLDZYJZCZNNLMZHHARQMPGWQTZMXXMLLHGDZXYHXKYXYCJMFFYYHJFSBSSQLXXNDYCANNMTCJCYPRRNYTYQNYYMBMSXNDLYLYSLJRLXYSXQMLLYZLZJJJKYZZCSFBZXXMSTBJGNXYZHLXNMCWSCYZYFZLXBRNNNYLBNRTGZQYSATSWRYHYJZMZDHZGZDWYBSSCSKXSYHYTXXGCQGXZZSHYXJSCRHMKKBXCZJYJYMKQHZJFNBHMQHYSNJNZYBKNQMCLGQHWLZNZSWXKHLJHYYBQLBFCDSXDLDSPFZPSKJYZWZXZDDXJSMMEGJSCSSMGCLXXKYYYLNYPWWWGYDKZJGGGZGGSYCKNJWNJPCXBJJTQTJWDSSPJXZXNZXUMELPXFSXTLLXCLJXJJLJZXCTPSWXLYDHLYQRWHSYCSQYYBYAYWJJJQFWQCQQCJQGXALDBZZYJGKGXPLTZYFXJLTPADKYQHPMATLCPDCKBMTXYBHKLENXDLEEGQDYMSAWHZMLJTWYGXLYQZLJEEYYBQQFFNLYXRDSCTGJGXYYNKLLYQKCCTLHJLQMKKZGCYYGLLLJDZGYDHZWXPYSJBZKDZGYZZHYWYFQYTYZSZYEZZLYMHJJHTSMQWYZLKYYWZCSRKQYTLTDXWCTYJKLWSQZWBDCQYNCJSRSZJLKCDCDTLZZZACQQZZDDXYPLXZBQJYLZLLLQDDZQJYJYJZYXNYYYNYJXKXDAZWYRDLJYYYRJLXLLDYXJCYWYWNQCCLDDNYYYNYCKCZHXXCCLGZQJGKWPPCQQJYSBZZXYJSQPXJPZBSBDSFNSFPZXHDWZTDWPPTFLZZBZDMYYPQJRSDZSQZSQXBDGCPZSWDWCSQZGMDHZXMWWFYBPDGPHTMJTHZSMMBGZMBZJCFZWFZBBZMQCFMBDMCJXLGPNJBBXGYHYYJGPTZGZMQBQTCGYXJXLWZKYDPDYMGCFTPFXYZTZXDZXTGKMTYBBCLBJASKYTSSQYYMSZXFJEWLXLLSZBQJJJAKLYLXLYCCTSXMCWFKKKBSXLLLLJYXTYLTJYYTDPJHNHNNKBYQNFQYYZBYYESSESSGDYHFHWTCJBSDZZTFDMXHCNJZYMQWSRYJDZJQPDQBBSTJGGFBKJBXTGQHNGWJXJGDLLTHZHHYYYYYYSXWTYYYCCBDBPYPZYCCZYJPZYWCBDLFWZCWJDXXHYHLHWZZXJTCZLCDPXUJCZZZLYXJJTXPHFXWPYWXZPTDZZBDZCYHJHMLXBQXSBYLRDTGJRRCTTTHYTCZWMXFYTWWZCWJWXJYWCSKYBZSCCTZQNHXNWXXKHKFHTSWOCCJYBCMPZZYKBNNZPBZHHZDLSYDDYTYFJPXYNGFXBYQXCBHXCPSXTYZDMKYSNXSXLHKMZXLYHDHKWHXXSSKQYHHCJYXGLHZXCSNHEKDTGZXQYPKDHEXTYKCNYMYYYPKQYYYKXZLTHJQTBYQHXBMYHSQCKWWYLLHCYYLNNEQXQWMCFBDCCMLJGGXDQKTLXKGNQCDGZJWYJJLYHHQTTTNWCHMXCXWHWSZJYDJCCDBQCDGDNYXZTHCQRXCBHZTQCBXWGQWYYBXHMBYMYQTYEXMQKYAQYRGYZSLFYKKQHYSSQYSHJGJCNXKZYCXSBXYXHYYLSTYCXQTHYSMGSCPMMGCCCCCMTZTASMGQZJHKLOSQYLSWTMXSYQKDZLJQQYPLSYCZTCQQPBBQJZCLPKHQZYYXXDTDDTSJCXFFLLCHQXMJLWCJCXTSPYCXNDTJSHJWXDQQJSKXYAMYLSJHMLALYKXCYYDMNMDQMXMCZNNCYBZKKYFLMCHCMLHXRCJJHSYLNMTJZGZGYWJXSRXCWJGJQHQZDQJDCJJZKJKGDZQGJJYJYLXZXXCDQHHHEYTMHLFSBDJSYYSHFYSTCZQLPBDRFRZTZYKYWHSZYQKWDQZRKMSYNBCRXQBJYFAZPZZEDZCJYWBCJWHYJBQSZYWRYSZPTDKZPFPBNZTKLQYHBBZPNPPTYZZYBQNYDCPJMMCYCQMCYFZZDCMNLFPBPLNGQJTBTTNJZPZBBZNJKLJQYLNBZQHKSJZNGGQSZZKYXSHPZSNBCGZKDDZQANZHJKDRTLZLSWJLJZLYWTJNDJZJHXYAYNCBGTZCSSQMNJPJYTYSWXZFKWJQTKHTZPLBHSNJZSYZBWZZZZLSYLSBJHDWWQPSLMMFBJDWAQYZTCJTBNNWZXQXCDSLQGDSDPDZHJTQQPSWLYYJZLGYXYZLCTCBJTKTYCZJTQKBSJLGMGZDMCSGPYNJZYQYYKNXRPWSZXMTNCSZZYXYBYHYZAXYWQCJTLLCKJJTJHGDXDXYQYZZBYWDLWQCGLZGJGQRQZCZSSBCRPCSKYDZNXJSQGXSSJMYDNSTZTPBDLTKZWXQWQTZEXNQCZGWEZKSSBYBRTSSSLCCGBPSZQSZLCCGLLLZXHZQTHCZMQGYZQZNMCOCSZJMMZSQPJYGQLJYJPPLDXRGZYXCCSXHSHGTZNLZWZKJCXTCFCJXLBMQBCZZWPQDNHXLJCTHYZLGYLNLSZZPCXDSCQQHJQKSXZPBAJYEMSMJTZDXLCJYRYYNWJBNGZZTMJXLTBSLYRZPYLSSCNXPHLLHYLLQQZQLXYMRSYCXZLMMCZLTZSDWTJJLLNZGGQXPFSKYGYGHBFZPDKMWGHCXMSGDXJMCJZDYCABXJDLNBCDQYGSKYDQTXDJJYXMSZQAZDZFSLQXYJSJZYLBTXXWXQQZBJZUFBBLYLWDSLJHXJYZJWTDJCZFQZQZZDZSXZZQLZCDZFJHYSPYMPQZMLPPLFFXJJNZZYLSJEYQZFPFZKSYWJJJHRDJZZXTXXGLGHYDXCSKYSWMMZCWYBAZBJKSHFHJCXMHFQHYXXYZFTSJYZFXYXPZLCHMZMBXHZZSXYFYMNCWDABAZLXKTCSHHXKXJJZJSTHYGXSXYYHHHJWXKZXSSBZZWHHHCWTZZZPJXSNXQQJGZYZYWLLCWXZFXXYXYHXMKYYSWSQMNLNAYCYSPMJKHWCQHYLAJJMZXHMMCNZHBHXCLXTJPLTXYJHDYYLTTXFSZHYXXSJBJYAYRSMXYPLCKDUYHLXRLNLLSTYZYYQYGYHHSCCSMZCTZQXKYQFPYYRPFFLKQUNTSZLLZMWWTCQQYZWTLLMLMPWMBZSSTZRBPDDTLQJJBXZCSRZQQYGWCSXFWZLXCCRSZDZMCYGGDZQSGTJSWLJMYMMZYHFBJDGYXCCPSHXNZCSBSJYJGJMPPWAFFYFNXHYZXZYLREMZGZCYZSSZDLLJCSQFNXZKPTXZGXJJGFMYYYSNBTYLBNLHPFZDCYFBMGQRRSSSZXYSGTZRNYDZZCDGPJAFJFZKNZBLCZSZPSGCYCJSZLMLRSZBZZLDLSLLYSXSQZQLYXZLSKKBRXBRBZCYCXZZZEEYFGKLZLYYHGZSGZLFJHGTGWKRAAJYZKZQTSSHJJXDCYZUYJLZYRZDQQHGJZXSSZBYKJPBFRTJXLLFQWJHYLQTYMBLPZDXTZYGBDHZZRBGXHWNJTJXLKSCFSMWLSDQYSJTXKZSCFWJLBXFTZLLJZLLQBLSQMQQCGCZFPBPHZCZJLPYYGGDTGWDCFCZQYYYQYSSCLXZSKLZZZGFFCQNWGLHQYZJJCZLQZZYJPJZZBPDCCMHJGXDQDGDLZQMFGPSYTSDYFWWDJZJYSXYYCZCYHZWPBYKXRYLYBHKJKSFXTZJMMCKHLLTNYYMSYXYZPYJQYCSYCWMTJJKQYRHLLQXPSGTLYYCLJSCPXJYZFNMLRGJJTYZBXYZMSJYJHHFZQMSYXRSZCWTLRTQZSSTKXGQKGSPTGCZNJSJCQCXHMXGGZTQYDJKZDLBZSXJLHYQGGGTHQSZPYHJHHGYYGKGGCWJZZYLCZLXQSFTGZSLLLMLJSKCTBLLZZSZMMNYTPZSXQHJCJYQXYZXZQZCPSHKZZYSXCDFGMWQRLLQXRFZTLYSTCTMJCXJJXHJNXTNRZTZFQYHQGLLGCXSZSJDJLJCYDSJTLNYXHSZXCGJZYQPYLFHDJSBPCCZHJJJQZJQDYBSSLLCMYTTMQTBHJQNNYGKYRQYQMZGCJKPDCGMYZHQLLSLLCLMHOLZGDYYFZSLJCQZLYLZQJESHNYLLJXGJXLYSYYYXNBZLJSSZCQQCJYLLZLTJYLLZLLBNYLGQCHXYYXOXCXQKYJXXXYKLXSXXYQXCYKQXQCSGYXXYQXYGYTQOHXHXPYXXXULCYEYCHZZCBWQBBWJQZSCSZSSLZYLKDESJZWMYMCYTSDSXXSCJPQQSQYLYYZYCMDJDZYWCBTJSYDJKCYDDJLBDJJSODZYSYXQQYXDHHGQQYQHDYXWGMMMAJDYBBBPPBCMUUPLJZSMTXERXJMHQNUTPJDCBSSMSSSTKJTSSMMTRCPLZSZMLQDSDMJMQPNQDXCFYNBFSDQXYXHYAYKQYDDLQYYYSSZBYDSLNTFQTZQPZMCHDHCZCWFDXTMYQSPHQYYXSRGJCWTJTZZQMGWJJTJHTQJBBHWZPXXHYQFXXQYWYYHYSCDYDHHQMNMTMWCPBSZPPZZGLMZFOLLCFWHMMSJZTTDHZZYFFYTZZGZYSKYJXQYJZQBHMBZZLYGHGFMSHPZFZSNCLPBQSNJXZSLXXFPMTYJYGBXLLDLXPZJYZJYHHZCYWHJYLSJEXFSZZYWXKZJLUYDTMLYMQJPWXYHXSKTQJEZRPXXZHHMHWQPWQLYJJQJJZSZCPHJLCHHNXJLQWZJHBMZYXBDHHYPZLHLHLGFWLCHYYTLHJXCJMSCPXSTKPNHQXSRTYXXTESYJCTLSSLSTDLLLWWYHDHRJZSFGXTSYCZYNYHTDHWJSLHTZDQDJZXXQHGYLTZPHCSQFCLNJTCLZPFSTPDYNYLGMJLLYCQHYSSHCHYLHQYQTMZYPBYWRFQYKQSYSLZDQJMPXYYSSRHZJNYWTQDFZBWWTWWRXCWHGYHXMKMYYYQMSMZHNGCEPMLQQMTCWCTMMPXJPJJHFXYYZSXZHTYBMSTSYJTTQQQYYLHYNPYQZLCYZHZWSMYLKFJXLWGXYPJYTYSYXYMZCKTTWLKSMZSYLMPWLZWXWQZSSAQSYXYRHSSNTSRAPXCPWCMGDXHXZDZYFJHGZTTSBJHGYZSZYSMYCLLLXBTYXHBBZJKSSDMALXHYCFYGMQYPJYCQXJLLLJGSLZGQLYCJCCZOTYXMTMTTLLWTGPXYMZMKLPSZZZXHKQYSXCTYJZYHXSHYXZKXLZWPSQPYHJWPJPWXQQYLXSDHMRSLZZYZWTTCYXYSZZSHBSCCSTPLWSSCJCHNLCGCHSSPHYLHFHHXJSXYLLNYLSZDHZXYLSXLWZYKCLDYAXZCMDDYSPJTQJZLNWQPSSSWCTSTSZLBLNXSMNYYMJQBQHRZWTYYDCHQLXKPZWBGQYBKFCMZWPZLLYYLSZYDWHXPSBCMLJBSCGBHXLQHYRLJXYSWXWXZSLDFHLSLYNJLZYFLYJYCDRJLFSYZFSLLCQYQFGJYHYXZLYLMSTDJCYHBZLLNWLXXYGYYHSMGDHXXHHLZZJZXCZZZCYQZFNGWPYLCPKPYYPMCLQKDGXZGGWQBDXZZKZFBXXLZXJTPJPTTBYTSZZDWSLCHZHSLTYXHQLHYXXXYYZYSWTXZKHLXZXZPYHGCHKCFSYHUTJRLXFJXPTZTWHPLYXFCRHXSHXKYXXYHZQDXQWULHYHMJTBFLKHTXCWHJFWJCFPQRYQXCYYYQYGRPYWSGSUNGWCHKZDXYFLXXHJJBYZWTSXXNCYJJYMSWZJQRMHXZWFQSYLZJZGBHYNSLBGTTCSYBYXXWXYHXYYXNSQYXMQYWRGYQLXBBZLJSYLPSYTJZYHYZAWLRORJMKSCZJXXXYXCHDYXRYXXJDTSQFXLYLTSFFYXLMTYJMJUYYYXLTZCSXQZQHZXLYYXZHDNBRXXXJCTYHLBRLMBRLLAXKYLLLJLYXXLYCRYLCJTGJCMTLZLLCYZZPZPCYAWHJJFYBDYYZSMPCKZDQYQPBPCJPDCYZMDPBCYYDYCNNPLMTMLRMFMMGWYZBSJGYGSMZQQQZTXMKQWGXLLPJGZBQCDJJJFPKJKCXBLJMSWMDTQJXLDLPPBXCWRCQFBFQJCZAHZGMYKPHYYHZYKNDKZMBPJYXPXYHLFPNYYGXJDBKXNXHJMZJXSTRSTLDXSKZYSYBZXJLXYSLBZYSLHXJPFXPQNBYLLJQKYGZMCYZZYMCCSLCLHZFWFWYXZMWSXTYNXJHPYYMCYSPMHYSMYDYSHQYZCHMJJMZCAAGCFJBBHPLYZYLXXSDJGXDHKXXTXXNBHRMLYJSLTXMRHNLXQJXYZLLYSWQGDLBJHDCGJYQYCMHWFMJYBMBYJYJWYMDPWHXQLDYGPDFXXBCGJSPCKRSSYZJMSLBZZJFLJJJLGXZGYXYXLSZQYXBEXYXHGCXBPLDYHWETTWWCJMBTXCHXYQXLLXFLYXLLJLSSFWDPZSMYJCLMWYTCZPCHQEKCQBWLCQYDPLQPPQZQFJQDJHYMMCXTXDRMJWRHXCJZYLQXDYYNHYYHRSLSRSYWWZJYMTLTLLGTQCJZYABTCKZCJYCCQLJZQXALMZYHYWLWDXZXQDLLQSHGPJFJLJHJABCQZDJGTKHSSTCYJLPSWZLXZXRWGLDLZRLZXTGSLLLLZLYXXWGDZYGBDPHZPBRLWSXQBPFDWOFMWHLYPCBJCCLDMBZPBZZLCYQXLDOMZBLZWPDWYYGDSTTHCSQSCCRSSSYSLFYBFNTYJSZDFNDPDHDZZMBBLSLCMYFFGTJJQWFTMTPJWFNLBZCMMJTGBDZLQLPYFHYYMJYLSDCHDZJWJCCTLJCLDTLJJCPDDSQDSSZYBNDBJLGGJZXSXNLYCYBJXQYCBYLZCFZPPGKCXZDZFZTJJFJSJXZBNZYJQTTYJYHTYCZHYMDJXTTMPXSPLZCDWSLSHXYPZGTFMLCJTYCBPMGDKWYCYZCDSZZYHFLYCTYGWHKJYYLSJCXGYWJCBLLCSNDDBTZBSCLYZCZZSSQDLLMQYYHFSLQLLXFTYHABXGWNYWYYPLLSDLDLLBJCYXJZMLHLJDXYYQYTDLLLBUGBFDFBBQJZZMDPJHGCLGMJJPGAEHHBWCQXAXHHHZCHXYPHJAXHLPHJPGPZJQCQZGJJZZUZDMQYYBZZPHYHYBWHAZYJHYKFGDPFQSDLZMLJXKXGALXZDAGLMDGXMWZQYXXDXXPFDMMSSYMPFMDMMKXKSYZYSHDZKXSYSMMZZZMSYDNZZCZXFPLSTMZDNMXCKJMZTYYMZMZZMSXHHDCZJEMXXKLJSTLWLSQLYJZLLZJSSDPPMHNLZJCZYHMXXHGZCJMDHXTKGRMXFWMCGMWKDTKSXQMMMFZZYDKMSCLCMPCGMHSPXQPZDSSLCXKYXTWLWJYAHZJGZQMCSNXYYMMPMLKJXMHLMLQMXCTKZMJQYSZJSYSZHSYJZJCDAJZYBSDQJZGWZQQXFKDMSDJLFWEHKZQKJPEYPZYSZCDWYJFFMZZYLTTDZZEFMZLBNPPLPLPEPSZALLTYLKCKQZKGENQLWAGYXYDPXLHSXQQWQCQXQCLHYXXMLYCCWLYMQYSKGCHLCJNSZKPYZKCQZQLJPDMDZHLASXLBYDWQLWDNBQCRYDDZTJYBKBWSZDXDTNPJDTCTQDFXQQMGNXECLTTBKPWSLCTYQLPWYZZKLPYGZCQQPLLKCCYLPQMZCZQCLJSLQZDJXLDDHPZQDLJJXZQDXYZQKZLJCYQDYJPPYPQYKJYRMPCBYMCXKLLZLLFQPYLLLMBSGLCYSSLRSYSQTMXYXZQZFDZUYSYZTFFMZZSMZQHZSSCCMLYXWTPZGXZJGZGSJSGKDDHTQGGZLLBJDZLCBCHYXYZHZFYWXYZYMSDBZZYJGTSMTFXQYXQSTDGSLNXDLRYZZLRYYLXQHTXSRTZNGZXBNQQZFMYKMZJBZYMKBPNLYZPBLMCNQYZZZSJZHJCTZKHYZZJRDYZHNPXGLFZTLKGJTCTSSYLLGZRZBBQZZKLPKLCZYSSUYXBJFPNJZZXCDWXZYJXZZDJJKGGRSRJKMSMZJLSJYWQSKYHQJSXPJZZZLSNSHRNYPZTWCHKLPSRZLZXYJQXQKYSJYCZTLQZYBBYBWZPQDWWYZCYTJCJXCKCWDKKZXSGKDZXWWYYJQYYTCYTDLLXWKCZKKLCCLZCQQDZLQLCSFQCHQHSFSMQZZLNBJJZBSJHTSZDYSJQJPDLZCDCWJKJZZLPYCGMZWDJJBSJQZSYZYHHXJPBJYDSSXDZNCGLQMBTSFSBPDZDLZNFGFJGFSMPXJQLMBLGQCYYXBQKDJJQYRFKZTJDHCZKLBSDZCFJTPLLJGXHYXZCSSZZXSTJYGKGCKGYOQXJPLZPBPGTGYJZGHZQZZLBJLSQFZGKQQJZGYCZBZQTLDXRJXBSXXPZXHYZYCLWDXJJHXMFDZPFZHQHQMQGKSLYHTYCGFRZGNQXCLPDLBZCSCZQLLJBLHBZCYPZZPPDYMZZSGYHCKCPZJGSLJLNSCDSLDLXBMSTLDDFJMKDJDHZLZXLSZQPQPGJLLYBDSZGQLBZLSLKYYHZTTNTJYQTZZPSZQZTLLJTYYLLQLLQYZQLBDZLSLYYZYMDFSZSNHLXZNCZQZPBWSKRFBSYZMTHBLGJPMCZZLSTLXSHTCSYZLZBLFEQHLXFLCJLYLJQCBZLZJHHSSTBRMHXZHJZCLXFNBGXGTQJCZTMSFZKJMSSNXLJKBHSJXNTNLZDNTLMSJXGZJYJCZXYJYJWRWWQNZTNFJSZPZSHZJFYRDJSFSZJZBJFZQZZHZLXFYSBZQLZSGYFTZDCSZXZJBQMSZKJRHYJZCKMJKHCHGTXKXQGLXPXFXTRTYLXJXHDTSJXHJZJXZWZLCQSBTXWXGXTXXHXFTSDKFJHZYJFJXRZSDLLLTQSQQZQWZXSYQTWGWBZCGZLLYZBCLMQQTZHZXZXLJFRMYZFLXYSQXXJKXRMQDZDMMYYBSQBHGZMWFWXGMXLZPYYTGZYCCDXYZXYWGSYJYZNBHPZJSQSYXSXRTFYZGRHZTXSZZTHCBFCLSYXZLZQMZLMPLMXZJXSFLBYZMYQHXJSXRXSQZZZSSLYFRCZJRCRXHHZXQYDYHXSJJHZCXZBTYNSYSXJBQLPXZQPYMLXZKYXLXCJLCYSXXZZLXDLLLJJYHZXGYJWKJRWYHCPSGNRZLFZWFZZNSXGXFLZSXZZZBFCSYJDBRJKRDHHGXJLJJTGXJXXSTJTJXLYXQFCSGSWMSBCTLQZZWLZZKXJMLTMJYHSDDBXGZHDLBMYJFRZFSGCLYJBPMLYSMSXLSZJQQHJZFXGFQFQBPXZGYYQXGZTCQWYLTLGWSGWHRLFSFGZJMGMGBGTJFSYZZGZYZAFLSSPMLPFLCWBJZCLJJMZLPJJLYMQDMYYYFBGYGYZMLYZDXQYXRQQQHSYYYQXYLJTYXFSFSLLGNQCYHYCWFHCCCFXPYLYPLLZYXXXXXKQHHXSHJZCFZSCZJXCPZWHHHHHAPYLQALPQAFYHXDYLUKMZQGGGDDESRNNZLTZGCHYPPYSQJJHCLLJTOLNJPZLJLHYMHEYDYDSQYCDDHGZUNDZCLZYZLLZNTNYZGSLHSLPJJBDGWXPCDUTJCKLKCLWKLLCASSTKZZDNQNTTLYYZSSYSSZZRYLJQKCQDHHCRXRZYDGRGCWCGZQFFFPPJFZYNAKRGYWYQPQXXFKJTSZZXSWZDDFBBXTBGTZKZNPZZPZXZPJSZBMQHKCYXYLDKLJNYPKYGHGDZJXXEAHPNZKZTZCMXCXMMJXNKSZQNMNLWBWWXJKYHCPSTMCSQTZJYXTPCTPDTNNPGLLLZSJLSPBLPLQHDTNJNLYYRSZFFJFQWDPHZDWMRZCCLODAXNSSNYZRESTYJWJYJDBCFXNMWTTBYLWSTSZGYBLJPXGLBOCLHPCBJLTMXZLJYLZXCLTPNCLCKXTPZJSWCYXSFYSZDKNTLBYJCYJLLSTGQCBXRYZXBXKLYLHZLQZLNZCXWJZLJZJNCJHXMNZZGJZZXTZJXYCYYCXXJYYXJJXSSSJSTSSTTPPGQTCSXWZDCSYFPTFBFHFBBLZJCLZZDBXGCXLQPXKFZFLSYLTUWBMQJHSZBMDDBCYSCCLDXYCDDQLYJJWMQLLCSGLJJSYFPYYCCYLTJANTJJPWYCMMGQYYSXDXQMZHSZXPFTWWZQSWQRFKJLZJQQYFBRXJHHFWJJZYQAZMYFRHCYYBYQWLPEXCCZSTYRLTTDMQLYKMBBGMYYJPRKZNPBSXYXBHYZDJDNGHPMFSGMWFZMFQMMBCMZZCJJLCNUXYQLMLRYGQZCYXZLWJGCJCGGMCJNFYZZJHYCPRRCMTZQZXHFQGTJXCCJEAQCRJYHPLQLSZDJRBCQHQDYRHYLYXJSYMHZYDWLDFRYHBPYDTSSCNWBXGLPZMLZZTQSSCPJMXXYCSJYTYCGHYCJWYRXXLFEMWJNMKLLSWTXHYYYNCMMCWJDQDJZGLLJWJRKHPZGGFLCCSCZMCBLTBHBQJXQDSPDJZZGHGLFQYWBZYZJLTSTDHQHCTCBCHFLQMPWDSHYYTQWCNZZJTLBYMBPDYYYXSQKXWYYFLXXNCWCXYPMAELYKKJMZZZBRXYYQJFLJPFHHHYTZZXSGQQMHSPGDZQWBWPJHZJDYSCQWZKTXXSQLZYYMYSDZGRXCKKUJLWPYSYSCSYZLRMLQSYLJXBCXTLWDQZPCYCYKPPPNSXFYZJJRCEMHSZMSXLXGLRWGCSTLRSXBZGBZGZTCPLUJLSLYLYMTXMTZPALZXPXJTJWTCYYZLBLXBZLQMYLXPGHDSLSSDMXMBDZZSXWHAMLCZCPJMCNHJYSNSYGCHSKQMZZQDLLKABLWJXSFMOCDXJRRLYQZKJMYBYQLYHETFJZFRFKSRYXFJTWDSXXSYSQJYSLYXWJHSNLXYYXHBHAWHHJZXWMYLJCSSLKYDZTXBZSYFDXGXZJKHSXXYBSSXDPYNZWRPTQZCZENYGCXQFJYKJBZMLJCMQQXUOXSLYXXLYLLJDZBTYMHPFSTTQQWLHOKYBLZZALZXQLHZWRRQHLSTMYPYXJJXMQSJFNBXYXYJXXYQYLTHYLQYFMLKLJTMLLHSZWKZHLJMLHLJKLJSTLQXYLMBHHLNLZXQJHXCFXXLHYHJJGBYZZKBXSCQDJQDSUJZYYHZHHMGSXCSYMXFEBCQWWRBPYYJQTYZCYQYQQZYHMWFFHGZFRJFCDPXNTQYZPDYKHJLFRZXPPXZDBBGZQSTLGDGYLCQMLCHHMFYWLZYXKJLYPQHSYWMQQGQZMLZJNSQXJQSYJYCBEHSXFSZPXZWFLLBCYYJDYTDTHWZSFJMQQYJLMQXXLLDTTKHHYBFPWTYYSQQWNQWLGWDEBZWCMYGCULKJXTMXMYJSXHYBRWFYMWFRXYQMXYSZTZZTFYKMLDHQDXWYYNLCRYJBLPSXCXYWLSPRRJWXHQYPHTYDNXHHMMYWYTZCSQMTSSCCDALWZTCPQPYJLLQZYJSWXMZZMMYLMXCLMXCZMXMZSQTZPPQQBLPGXQZHFLJJHYTJSRXWZXSCCDLXTYJDCQJXSLQYCLZXLZZXMXQRJMHRHZJBHMFLJLMLCLQNLDXZLLLPYPSYJYSXCQQDCMQJZZXHNPNXZMEKMXHYKYQLXSXTXJYYHWDCWDZHQYYBGYBCYSCFGPSJNZDYZZJZXRZRQJJYMCANYRJTLDPPYZBSTJKXXZYPFDWFGZZRPYMTNGXZQBYXNBUFNQKRJQZMJEGRZGYCLKXZDSKKNSXKCLJSPJYYZLQQJYBZSSQLLLKJXTBKTYLCCDDBLSPPFYLGYDTZJYQGGKQTTFZXBDKTYYHYBBFYTYYBCLPDYTGDHRYRNJSPTCSNYJQHKLLLZSLYDXXWBCJQSPXBPJZJCJDZFFXXBRMLAZHCSNDLBJDSZBLPRZTSWSBXBCLLXXLZDJZSJPYLYXXYFTFFFBHJJXGBYXJPMMMPSSJZJMTLYZJXSWXTYLEDQPJMYGQZJGDJLQJWJQLLSJGJGYGMSCLJJXDTYGJQJQJCJZCJGDZZSXQGSJGGCXHQXSNQLZZBXHSGZXCXYLJXYXYYDFQQJHJFXDHCTXJYRXYSQTJXYEFYYSSYYJXNCYZXFXMSYSZXYYSCHSHXZZZGZZZGFJDLTYLNPZGYJYZYYQZPBXQBDZTZCZYXXYHHSQXSHDHGQHJHGYWSZTMZMLHYXGEBTYLZKQWYTJZRCLEKYSTDBCYKQQSAYXCJXWWGSBHJYZYDHCSJKQCXSWXFLTYNYZPZCCZJQTZWJQDZZZQZLJJXLSBHPYXXPSXSHHEZTXFPTLQYZZXHYTXNCFZYYHXGNXMYWXTZSJPTHHGYMXMXQZXTSBCZYJYXXTYYZYPCQLMMSZMJZZLLZXGXZAAJZYXJMZXWDXZSXZDZXLEYJJZQBHZWZZZQTZPSXZTDSXJJJZNYAZPHXYYSRNQDTHZHYYKYJHDZXZLSWCLYBZYECWCYCRYLCXNHZYDZYDYJDFRJJHTRSQTXYXJRJHOJYNXELXSFSFJZGHPZSXZSZDZCQZBYYKLSGSJHCZSHDGQGXYZGXCHXZJWYQWGYHKSSEQZZNDZFKWYSSTCLZSTSYMCDHJXXYWEYXCZAYDMPXMDSXYBSQMJMZJMTZQLPJYQZCGQHXJHHLXXHLHDLDJQCLDWBSXFZZYYSCHTYTYYBHECXHYKGJPXHHYZJFXHWHBDZFYZBCAPNPGNYDMSXHMMMMAMYNBYJTMPXYYMCTHJBZYFCGTYHWPHFTWZZEZSBZEGPFMTSKFTYCMHFLLHGPZJXZJGZJYXZSBBQSCZZLZCCSTPGXMJSFTCCZJZDJXCYBZLFCJSYZFGSZLYBCWZZBYZDZYPSWYJZXZBDSYUXLZZBZFYGCZXBZHZFTPBGZGEJBSTGKDMFHYZZJHZLLZZGJQZLSFDJSSCBZGPDLFZFZSZYZYZSYGCXSNXXCHCZXTZZLJFZGQSQYXZJQDCCZTQCDXZJYQJQCHXZTDLGSCXZSYQJQTZWLQDQZTQCHQQJZYEZZZPBWKDJFCJPZTYPQYQTTYNLMBDKTJZPQZQZZFPZSBNJLGYJDXJDZZKZGQKXDLPZJTCJDQBXDJQJSTCKNXBXZMSLYJCQMTJQWWCJQNJNLLLHJCWQTBZQYDZCZPZZDZYDDCYZZZCCJTTJFZDPRRTZTJDCQTQZDTJNPLZBCLLCTZSXKJZQZPZLBZRBTJDCXFCZDBCCJJLTQQPLDCGZDBBZJCQDCJWYNLLZYZCCDWLLXWZLXRXNTQQCZXKQLSGDFQTDDGLRLAJJTKUYMKQLLTZYTDYYCZGJWYXDXFRSKSTQTENQMRKQZHHQKDLDAZFKYPBGGPZREBZZYKZZSPEGJXGYKQZZZSLYSYYYZWFQZYLZZLZHWCHKYPQGNPGBLPLRRJYXCCSYYHSFZFYBZYYTGZXYLXCZWXXZJZBLFFLGSKHYJZEYJHLPLLLLCZGXDRZELRHGKLZZYHZLYQSZZJZQLJZFLNBHGWLCZCFJYSPYXZLZLXGCCPZBLLCYBBBBUBBCBPCRNNZCZYRBFSRLDCGQYYQXYGMQZWTZYTYJXYFWTEHZZJYWLCCNTZYJJZDEDPZDZTSYQJHDYMBJNYJZLXTSSTPHNDJXXBYXQTZQDDTJTDYYTGWSCSZQFLSHLGLBCZPHDLYZJYCKWTYTYLBNYTSDSYCCTYSZYYEBHEXHQDTWNYGYCLXTSZYSTQMYGZAZCCSZZDSLZCLZRQXYYELJSBYMXSXZTEMBBLLYYLLYTDQYSHYMRQWKFKBFXNXSBYCHXBWJYHTQBPBSBWDZYLKGZSKYHXQZJXHXJXGNLJKZLYYCDXLFYFGHLJGJYBXQLYBXQPQGZTZPLNCYPXDJYQYDYMRBESJYYHKXXSTMXRCZZYWXYQYBMCLLYZHQYZWQXDBXBZWZMSLPDMYSKFMZKLZCYQYCZLQXFZZYDQZPZYGYJYZMZXDZFYFYTTQTZHGSPCZMLCCYTZXJCYTJMKSLPZHYSNZLLYTPZCTZZCKTXDHXXTQCYFKSMQCCYYAZHTJPCYLZLYJBJXTPNYLJYYNRXSYLMMNXJSMYBCSYSYLZYLXJJQYLDZLPQBFZZBLFNDXQKCZFYWHGQMRDSXYCYTXNQQJZYYPFZXDYZFPRXEJDGYQBXRCNFYYQPGHYJDYZXGRHTKYLNWDZNTSMPKLBTHBPYSZBZTJZSZZJTYYXZPHSSZZBZCZPTQFZMYFLYPYBBJQXZMXXDJMTSYSKKBJZXHJCKLPSMKYJZCXTMLJYXRZZQSLXXQPYZXMKYXXXJCLJPRMYYGADYSKQLSNDHYZKQXZYZTCGHZTLMLWZYBWSYCTBHJHJFCWZTXWYTKZLXQSHLYJZJXTMPLPYCGLTBZZTLZJCYJGDTCLKLPLLQPJMZPAPXYZLKKTKDZCZZBNZDYDYQZJYJGMCTXLTGXSZLMLHBGLKFWNWZHDXUHLFMKYSLGXDTWWFRJEJZTZHYDXYKSHWFZCQSHKTMQQHTZHYMJDJSKHXZJZBZZXYMPAGQMSTPXLSKLZYNWRTSQLSZBPSPSGZWYHTLKSSSWHZZLYYTNXJGMJSZSUFWNLSOZTXGXLSAMMLBWLDSZYLAKQCQCTMYCFJBSLXCLZZCLXXKSBZQCLHJPSQPLSXXCKSLNHPSFQQYTXYJZLQLDXZQJZDYYDJNZPTUZDSKJFSLJHYLZSQZLBTXYDGTQFDBYAZXDZHZJNHHQBYKNXJJQCZMLLJZKSPLDYCLBBLXKLELXJLBQYCXJXGCNLCQPLZLZYJTZLJGYZDZPLTQCSXFDMNYCXGBTJDCZNBGBQYQJWGKFHTNPYQZQGBKPBBYZMTJDYTBLSQMPSXTBNPDXKLEMYYCJYNZCTLDYKZZXDDXHQSHDGMZSJYCCTAYRZLPYLTLKXSLZCGGEXCLFXLKJRTLQJAQZNCMBYDKKCXGLCZJZXJHPTDJJMZQYKQSECQZDSHHADMLZFMMZBGNTJNNLGBYJBRBTMLBYJDZXLCJLPLDLPCQDHLXZLYCBLCXZZJADJLNZMMSSSMYBHBSQKBHRSXXJMXSDZNZPXLGBRHWGGFCXGMSKLLTSJYYCQLTSKYWYYHYWXBXQYWPYWYKQLSQPTNTKHQCWDQKTWPXXHCPTHTWUMSSYHBWCRWXHJMKMZNGWTMLKFGHKJYLSYYCXWHYECLQHKQHTTQKHFZLDXQWYZYYDESBPKYRZPJFYYZJCEQDZZDLATZBBFJLLCXDLMJSSXEGYGSJQXCWBXSSZPDYZCXDNYXPPZYDLYJCZPLTXLSXYZYRXCYYYDYLWWNZSAHJSYQYHGYWWAXTJZDAXYSRLTDPSSYYFNEJDXYZHLXLLLZQZSJNYQYQQXYJGHZGZCYJCHZLYCDSHWSHJZYJXCLLNXZJJYYXNFXMWFPYLCYLLABWDDHWDXJMCXZTZPMLQZHSFHZYNZTLLDYWLSLXHYMMYLMBWWKYXYADTXYLLDJPYBPWUXJMWMLLSAFDLLYFLBHHHBQQLTZJCQJLDJTFFKMMMBYTHYGDCQRDDWRQJXNBYSNWZDBYYTBJHPYBYTTJXAAHGQDQTMYSTQXKBTZPKJLZRBEQQSSMJJBDJOTGTBXPGBKTLHQXJJJCTHXQDWJLWRFWQGWSHCKRYSWGFTGYGBXSDWDWRFHWYTJJXXXJYZYSLPYYYPAYXHYDQKXSHXYXGSKQHYWFDDDPPLCJLQQEEWXKSYYKDYPLTJTHKJLTCYYHHJTTPLTZZCDLTHQKZXQYSTEEYWYYZYXXYYSTTJKLLPZMCYHQGXYHSRMBXPLLNQYDQHXSXXWGDQBSHYLLPJJJTHYJKYPPTHYYKTYEZYENMDSHLCRPQFDGFXZPSFTLJXXJBSWYYSKSFLXLPPLBBBLBSFXFYZBSJSSYLPBBFFFFSSCJDSTZSXZRYYSYFFSYZYZBJTBCTSBSDHRTJJBYTCXYJEYLXCBNEBJDSYXYKGSJZBXBYTFZWGENYHHTHZHHXFWGCSTBGXKLSXYWMTMBYXJSTZSCDYQRCYTWXZFHMYMCXLZNSDJTTTXRYCFYJSBSDYERXJLJXBBDEYNJGHXGCKGSCYMBLXJMSZNSKGXFBNBPTHFJAAFXYXFPXMYPQDTZCXZZPXRSYWZDLYBBKTYQPQJPZYPZJZNJPZJLZZFYSBTTSLMPTZRTDXQSJEHBZYLZDHLJSQMLHTXTJECXSLZZSPKTLZKQQYFSYGYWPCPQFHQHYTQXZKRSGTTSQCZLPTXCDYYZXSQZSLXLZMYCPCQBZYXHBSXLZDLTCDXTYLZJYYZPZYZLTXJSJXHLPMYTXCQRBLZSSFJZZTNJYTXMYJHLHPPLCYXQJQQKZZSCPZKSWALQSBLCCZJSXGWWWYGYKTJBBZTDKHXHKGTGPBKQYSLPXPJCKBMLLXDZSTBKLGGQKQLSBKKTFXRMDKBFTPZFRTBBRFERQGXYJPZSSTLBZTPSZQZSJDHLJQLZBPMSMMSXLQQNHKNBLRDDNXXDHDDJCYYGYLXGZLXSYGMQQGKHBPMXYXLYTQWLWGCPBMQXCYZYDRJBHTDJYHQSHTMJSBYPLWHLZFFNYPMHXXHPLTBQPFBJWQDBYGPNZTPFZJGSDDTQSHZEAWZZYLLTYYBWJKXXGHLFKXDJTMSZSQYNZGGSWQSPHTLSSKMCLZXYSZQZXNCJDQGZDLFNYKLJCJLLZLMZZNHYDSSHTHZZLZZBBHQZWWYCRZHLYQQJBEYFXXXWHSRXWQHWPSLMSSKZTTYGYQQWRSLALHMJTQJSMXQBJJZJXZYZKXBYQXBJXSHZTSFJLXMXZXFGHKZSZGGYLCLSARJYHSLLLMZXELGLXYDJYTLFBHBPNLYZFBBHPTGJKWETZHKJJXZXXGLLJLSTGSHJJYQLQZFKCGNNDJSSZFDBCTWWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ 19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=0,f=a.length;e14){var i=g.substring(0,1);for(b=0;b0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(c=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return BI.contains(this.array,a)},indexOf:function(a){return BI.contains(this.array,a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){BI.remove(this.array,a)},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(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;c0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},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(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);null!=b&&b.setRight(c||null),null!=c&&c.setLeft(b||null),this.children.splice(a,1)},removeAllChilds:function(){this.children=[]},addChild:function(a,b){var c=null;c=BI.isUndefined(b)?this.children.length-1:b-1,a.setParent(this),c>=0&&(this.getChild(c)&&this.getChild(c).setRight(a),a.setLeft(this.getChild(c))),BI.isUndefined(b)?this.children.push(a):this.children.splice(b,0,a)},equals:function(a){return this===a||this.id===a.id},clear:function(){this.parent=null,this.left=null,this.right=null,this.children=[]}},BI.extend(BI.Tree,{transformToArrayFormat:function(a,b){if(!a)return[];var c=[];if(BI.isArray(a))for(var d=0,e=a.length;d=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},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(){}}),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(a){this.element.append(a)},_mountChildren:function(){var a=this,b=BI.Widget._renderEngine.createFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.appendFragment(b)},_getChildName:function(a){return a+""},_addElement:function(a,b,c){var d,e=this;return this.hasWidget(this._getChildName(a))?d=this.getWidgetByName(this._getChildName(a)):(d=BI.createWidget(b,c),d.on(BI.Events.DESTROY,function(){BI.each(e._children,function(a,b){b===d&&(BI.remove(e._children,b),e.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),d)),d},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a,b){var c=this,d=this.options,e=BI.Widget._renderEngine.createFragment(),f=[];BI.each(a,function(a,g){var h=c._addElement(d.items.length,g,b);c._children[c._getChildName(d.items.length)]=h,d.items.push(g),f.push(h),e.appendChild(h.element[0])}),this._isMounted&&(this._getWrapper().append(e),BI.each(f,function(a,b){b._mount()}))},prependItems:function(a,b){var c=this;a=a||[];for(var d=BI.Widget._renderEngine.createFragment(),e=[],f=a.length-1;f>=0;f--){this._addItemAt(0,a[f]);var g=this._addElement(0,a[f],b);c._children[c._getChildName(0)]=g,this.options.items.unshift(a[f]),e.push(g),d.appendChild(g.element[0])}this._isMounted&&(this._getWrapper().prepend(d),BI.each(e,function(a,b){b._mount()}))},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=k._getOptions(a),b=k._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=k._getOptions(a),d=null==c.key?k._getChildName(b):c.key;return t[d]=k._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=a[b];if(BI.isNotNull(d)){var e=k._getOptions(d),f=null==e.key?k._getChildName(b):e.key;delete k._children[k._getChildName(f)],t[f]._destroy()}}}function g(a,b,c,d){a=k._getOptions(a),b=b&&k._getOptions(b);var e=BI.isKey(a.key)?a.key:k._getChildName(d);if(b&&t[b.key]){var f,g=BI.isKey(b.key)?b.key:k._getChildName(d);f=c?t[g].element.next():t[g].element,f.length>0?f.before(t[e].element):k._getWrapper().append(t[e].element)}else k._getWrapper().append(t[e].element)}function h(a,b,d,e){var f,g;for(f=d;f<=e;++f)a[f]&&c(a[f],b)&&(g=a[f]);return g}var i,j,k=this,l=0,m=0,n=a.length-1,o=a[0],p=a[n],q=b.length-1,r=b[0],s=b[q],t={};for(BI.each(a,function(a,b){b=k._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(t[c]=k._children[k._getChildName(a)])});l<=n&&m<=q;)if(BI.isNull(o))o=a[++l];else if(BI.isNull(p))p=a[--n];else if(c(o,r,l,m))j=this.patchItem(o,r,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],o=a[++l],r=b[++m];else if(c(p,s,n,q))j=this.patchItem(p,s,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],p=a[--n],s=b[--q];else if(c(o,s))j=this.patchItem(o,s,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],g(o,p,!0),o=a[++l],s=b[--q];else if(c(p,r))j=this.patchItem(p,r,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],g(p,o),p=a[--n],r=b[++m];else{var u=h(a,r,l,n);if(BI.isNull(u)){var v=d(r);g(v,o),r=b[++m]}else BI.each(a,function(b,d){d&&c(d,r)&&(j=k.patchItem(u,r,b)||j,t[null==u.key?k._getChildName(b):u.key]=k._children[k._getChildName(b)],a[b]=void 0,g(u,o))}),r=b[++m]}return l>n?(i=BI.isNull(b[q+1])?null:b[q+1],e(i,b,m,q)):m>q&&f(a,l,n),this._children={},BI.each(b,function(a,b){var c=k._getOptions(b),d=null==c.key?k._getChildName(a):c.key;t[d]._mount(),k._children[k._getChildName(a)]=t[d]}),j},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},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(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a,b,c={},d={},e={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(a&&a(b,d),e[b])for(var f=e[b].length-1;f>=0;f--)e[b][f](d);if(c[b])for(var g,f=c[b].length-1;f>=0;f--)if(g=c[b][f](d))return g;return d},config:function(c,d){a=c,b=d},configWidget:function(a,b){e[a]||(e[a]=[]),e[a].push(b)},registerWidget:function(a,b){c[a]||(c[a]=[]),c[a].length>0&&console.log("组件已经注册过了!"),c[a].push(b)},relieveWidget:function(a){delete c[a]},getObject:function(a,c){if(b&&b(a,c),d[a])for(var e,f=0,g=d[a].length;f0&&console.log("对象已经注册过了!"),d[a].push(b)},relieveObject:function(a){delete d[a]}})}(),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(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},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(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){function c(a,b){var c=a<0?(a*=-1,"-"):"",h="",i=a>0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;iBI.Widget._renderEngine.createElement("body").outerWidth()&&(l-=k.element.outerWidth()+15);var n=BI.Widget._renderEngine.createElement("body").outerHeight();return m+k.element.outerHeight()>n||j+k.element.outerHeight()>n?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.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"}}),_.extend(BI,{pushArray:function(a,b){for(var c=0;ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",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(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),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(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){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(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},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 a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.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 a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p 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%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?b.attachEvent("onresize",c):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
          ',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
          ").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",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(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),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(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){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(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},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 a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.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 a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p 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%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?(b.attachEvent("onresize",c),c()):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
          ',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
          ").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g0&&b-1 in a)))}function d(a){var b=xa[a]={};return ia.each(a.match(ka)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(ia.acceptData(a)){var f,g,h=ia.expando,i="string"==typeof c,j=a.nodeType,k=j?ia.cache:a,l=j?a[h]:a[h]&&h;if(l&&k[l]&&(e||k[l].data)||!i||d!==b)return l||(j?a[h]=l=_.pop()||ia.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=ia.noop)),"object"!=typeof c&&"function"!=typeof c||(e?k[l]=ia.extend(k[l],c):k[l].data=ia.extend(k[l].data,c)),f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[ia.camelCase(c)]=d),i?(g=f[c],null==g&&(g=f[ia.camelCase(c)])):g=f,g}}function f(a,b,c){if(ia.acceptData(a)){var d,e,f,g=a.nodeType,i=g?ia.cache:a,j=g?a[ia.expando]:ia.expando;if(i[j]){if(b&&(f=c?i[j]:i[j].data)){ia.isArray(b)?b=b.concat(ia.map(b,ia.camelCase)):b in f?b=[b]:(b=ia.camelCase(b),b=b in f?[b]:b.split(" "));for(d=0,e=b.length;d=0===c})}function m(a){var b=Ua.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function n(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function o(a){var b=a.getAttributeNode("type");return a.type=(b&&b.specified)+"/"+a.type,a}function p(a){var b=eb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function q(a,b){for(var c,d=0;null!=(c=a[d]);d++)ia._data(c,"globalEval",!b||ia._data(b[d],"globalEval"))}function r(a,b){if(1===b.nodeType&&ia.hasData(a)){var c,d,e,f=ia._data(a),g=ia._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jb[0].contentWindow||jb[0].contentDocument).document,b.write(""),b.close(),c=C(a,b),jb.detach()),ub[a]=c),c}function C(a,b){var c=ia(b.createElement(a)).appendTo(b.body),d=ia.css(c[0],"display");return c.remove(),d}function D(a,b,c,d){var e;if(ia.isArray(b))ia.each(b,function(b,e){c||Ab.test(a)?d(a,e):D(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==ia.type(b))d(a,b);else for(e in b)D(a+"["+e+"]",b[e],c,d)}function E(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(ka)||[];if(ia.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function F(a,b,c,d){function e(h){var i;return f[h]=!0,ia.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function G(a,c){var d,e,f=ia.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&ia.extend(!0,a,d),a}function H(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(h in k)h in d&&(c[k[h]]=d[h]);for(;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}if(g)return g!==j[0]&&j.unshift(g),d[g]}function I(a,b){var c,d,e,f,g={},h=0,i=a.dataTypes.slice(),j=i[0];if(a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i[1])for(e in a.converters)g[e.toLowerCase()]=a.converters[e];for(;d=i[++h];)if("*"!==d){if("*"!==j&&j!==d){if(e=g[j+" "+d]||g["* "+d],!e)for(c in g)if(f=c.split(" "),f[1]===d&&(e=g[j+" "+f[0]]||g["* "+f[0]])){e===!0?e=g[c]:g[c]!==!0&&(d=f[0],i.splice(h--,0,d));break}if(e!==!0)if(e&&a["throws"])b=e(b);else try{b=e(b)}catch(k){return{state:"parsererror",error:e?k:"No conversion from "+j+" to "+d}}}j=d}return{state:"success",data:b}}function J(){try{return new a.XMLHttpRequest}catch(b){}}function K(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function L(){return setTimeout(function(){$b=b}),$b=ia.now()}function M(a,b){ia.each(b,function(b,c){for(var d=(ec[b]||[]).concat(ec["*"]),e=0,f=d.length;e)[^>]*|#([\w-]*))$/,na=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,oa=/^[\],:{}\s]*$/,pa=/(?:^|:|,)(?:\s*\[)+/g,qa=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,ra=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,sa=/^-ms-/,ta=/-([\da-z])/gi,ua=function(a,b){return b.toUpperCase()},va=function(a){(W.addEventListener||"load"===a.type||"complete"===W.readyState)&&(wa(),ia.ready())},wa=function(){W.addEventListener?(W.removeEventListener("DOMContentLoaded",va,!1),a.removeEventListener("load",va,!1)):(W.detachEvent("onreadystatechange",va),a.detachEvent("onload",va))};ia.fn=ia.prototype={jquery:aa,constructor:ia,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ma.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof ia?c[0]:c,ia.merge(this,ia.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:W,!0)),na.test(e[1])&&ia.isPlainObject(c))for(e in c)ia.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=W.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=W,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):ia.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),ia.makeArray(a,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return da.call(this)},get:function(a){return null==a?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a){var b=ia.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return ia.each(this,a,b)},ready:function(a){return ia.ready.promise().done(a),this},slice:function(){return this.pushStack(da.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0||(T.resolveWith(W,[ia]),ia.fn.trigger&&ia(W).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===ia.type(a)},isArray:Array.isArray||function(a){return"array"===ia.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?$[fa.call(a)]||"object":typeof a},isPlainObject:function(a){if(!a||"object"!==ia.type(a)||a.nodeType||ia.isWindow(a))return!1;try{if(a.constructor&&!ga.call(a,"constructor")&&!ga.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||ga.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||W;var d=na.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=ia.buildFragment([a],b,e),e&&ia(e).remove(),ia.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=ia.trim(b),b&&oa.test(b.replace(qa,"@").replace(ra,"]").replace(pa,"")))?new Function("return "+b)():void ia.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||ia.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&ia.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(sa,"ms-").replace(ta,ua)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;f-1;)j.splice(d,1),c&&(d<=g&&g--,d<=h&&h--)}),this},has:function(a){return a?ia.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!j||f&&!k||(c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},ia.extend({Deferred:function(a){var b=[["resolve","done",ia.Callbacks("once memory"),"resolved"],["reject","fail",ia.Callbacks("once memory"),"rejected"],["notify","progress",ia.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return ia.Deferred(function(c){ia.each(b,function(b,f){var g=f[0],h=ia.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&ia.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?ia.extend(a,d):d}},e={};return d.pipe=d.then,ia.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=da.call(arguments),g=f.length,h=1!==g||a&&ia.isFunction(a.promise)?g:0,i=1===h?a:ia.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?da.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e
        • a",c=l.getElementsByTagName("*"),d=l.getElementsByTagName("a")[0],!c||!d||!c.length)return{};f=W.createElement("select"),h=f.appendChild(W.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b={getSetAttribute:"t"!==l.className,leadingWhitespace:3===l.firstChild.nodeType,tbody:!l.getElementsByTagName("tbody").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:!!e.value,optSelected:h.selected,enctype:!!W.createElement("form").enctype,html5Clone:"<:nav>"!==W.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===W.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=W.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=W.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;return l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip,ia(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=W.getElementsByTagName("body")[0];g&&(c=W.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="
          t
          ",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.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%;",b.boxSizing=4===l.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==g.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(W.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==V&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="
          ",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}();var ya=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,za=/([A-Z])/g;ia.extend({cache:{},expando:"jQuery"+(aa+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?ia.cache[a[ia.expando]]:a[ia.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&ia.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),ia.fn.extend({data:function(a,c){var d,e,f=this[0],h=0,i=null;if(a===b){if(this.length&&(i=ia.data(f),1===f.nodeType&&!ia._data(f,"parsedAttrs"))){for(d=f.attributes;h1,null,!0)},removeData:function(a){return this.each(function(){ia.removeData(this,a)})}}),ia.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=ia._data(a,b),c&&(!d||ia.isArray(c)?d=ia._data(a,b,ia.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=ia.queue(a,b),d=c.length,e=c.shift(),f=ia._queueHooks(a,b),g=function(){ia.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),f.cur=e,e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return ia._data(a,c)||ia._data(a,c,{empty:ia.Callbacks("once memory").add(function(){ia._removeData(a,b+"queue"),ia._removeData(a,c)})})}}),ia.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){ia.removeAttr(this,a)})},prop:function(a,b){return ia.access(this,ia.prop,a,b,arguments.length>1)},removeProp:function(a){return a=ia.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(ia.isFunction(a))return this.each(function(b){ia(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(ka)||[];g=0;)d=d.replace(" "+e+" "," ");c.className=a?ia.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return ia.isFunction(a)?this.each(function(c){ia(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=ia(this),h=b,i=a.match(ka)||[];e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else c!==V&&"boolean"!==c||(this.className&&ia._data(this,"__className__",this.className),this.className=this.className||a===!1?"":ia._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=ia.isFunction(a),this.each(function(c){var f,g=ia(this);1===this.nodeType&&(f=e?a.call(this,c,g.val()):a,null==f?f="":"number"==typeof f?f+="":ia.isArray(f)&&(f=ia.map(f,function(a){return null==a?"":a+""})),d=ia.valHooks[this.type]||ia.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=ia.valHooks[f.type]||ia.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Da,""):null==c?"":c)}}}),ia.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i=0}),c.length||(a.selectedIndex=-1),c}}},attr:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return typeof a.getAttribute===V?ia.prop(a,c,d):(f=1!==h||!ia.isXMLDoc(a),f&&(c=c.toLowerCase(),e=ia.attrHooks[c]||(Ga.test(c)?Ba:Aa)),d===b?e&&f&&"get"in e&&null!==(g=e.get(a,c))?g:(typeof a.getAttribute!==V&&(g=a.getAttribute(c)),null==g?b:g):null!==d?e&&f&&"set"in e&&(g=e.set(a,d,c))!==b?g:(a.setAttribute(c,d+""),d):void ia.removeAttr(a,c))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ka);if(f&&1===a.nodeType)for(;c=f[e++];)d=ia.propFix[c]||c,Ga.test(c)?!Ia&&Ha.test(c)?a[ia.camelCase("default-"+c)]=a[d]=!1:a[d]=!1:ia.attr(a,c,""),a.removeAttribute(Ia?c:d)},attrHooks:{type:{set:function(a,b){if(!ia.support.radioValue&&"radio"===b&&ia.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},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(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!ia.isXMLDoc(a),g&&(c=ia.propFix[c]||c,f=ia.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):Ea.test(a.nodeName)||Fa.test(a.nodeName)&&a.href?0:b}}}}),Ba={get:function(a,c){var d=ia.prop(a,c),e="boolean"==typeof d&&a.getAttribute(c),f="boolean"==typeof d?Ja&&Ia?null!=e:Ha.test(c)?a[ia.camelCase("default-"+c)]:!!e:a.getAttributeNode(c);return f&&f.value!==!1?c.toLowerCase():b},set:function(a,b,c){return b===!1?ia.removeAttr(a,c):Ja&&Ia||!Ha.test(c)?a.setAttribute(!Ia&&ia.propFix[c]||c,c):a[ia.camelCase("default-"+c)]=a[c]=!0,c}},Ja&&Ia||(ia.attrHooks.value={get:function(a,c){var d=a.getAttributeNode(c);return ia.nodeName(a,"input")?a.defaultValue:d&&d.specified?d.value:b},set:function(a,b,c){return ia.nodeName(a,"input")?void(a.defaultValue=b):Aa&&Aa.set(a,b,c)}}),Ia||(Aa=ia.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&("id"===c||"name"===c||"coords"===c?""!==d.value:d.specified)?d.value:b},set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},ia.attrHooks.contenteditable={get:Aa.get,set:function(a,b,c){Aa.set(a,""!==b&&b,c)}},ia.each(["width","height"],function(a,b){ia.attrHooks[b]=ia.extend(ia.attrHooks[b],{set:function(a,c){if(""===c)return a.setAttribute(b,"auto"),c}})})),ia.support.hrefNormalized||(ia.each(["href","src","width","height"],function(a,c){ia.attrHooks[c]=ia.extend(ia.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null==d?b:d}})}),ia.each(["href","src"],function(a,b){ia.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}})),ia.support.style||(ia.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),ia.support.optSelected||(ia.propHooks.selected=ia.extend(ia.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),ia.support.enctype||(ia.propFix.enctype="encoding"),ia.support.checkOn||ia.each(["radio","checkbox"],function(){ia.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),ia.each(["radio","checkbox"],function(){ia.valHooks[this]=ia.extend(ia.valHooks[this],{set:function(a,b){if(ia.isArray(b))return a.checked=ia.inArray(ia(a).val(),b)>=0}})});var Ka=/^(?:input|select|textarea)$/i,La=/^key/,Ma=/^(?:mouse|contextmenu)|click/,Na=/^(?:focusinfocus|focusoutblur)$/,Oa=/^([^.]*)(?:\.(.+)|)$/;ia.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=ia._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=ia.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof ia===V||a&&ia.event.triggered===a.type?b:ia.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(ka)||[""],i=c.length;i--;)g=Oa.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),k=ia.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=ia.event.special[o]||{},m=ia.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&ia.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),ia.event.global[o]=!0;a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ia.hasData(a)&&ia._data(a);if(q&&(k=q.events)){for(b=(b||"").match(ka)||[""],j=b.length;j--;)if(h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=ia.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||ia.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)ia.event.remove(a,n+b[j],c,d,!0);ia.isEmptyObject(k)&&(delete q.handle,ia._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||W],o=ga.call(c,"type")?c.type:c,p=ga.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||W,3!==e.nodeType&&8!==e.nodeType&&!Na.test(o+ia.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[ia.expando]?c:new ia.Event(o,"object"==typeof c&&c),c.isTrigger=!0,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:ia.makeArray(d,[c]),k=ia.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!ia.isWindow(e)){for(j=k.delegateType||o,Na.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||W)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(ia._data(i,"events")||{})[c.type]&&ia._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&ia.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(e.ownerDocument,d)===!1)&&("click"!==o||!ia.nodeName(e,"a"))&&ia.acceptData(e)&&h&&e[o]&&!ia.isWindow(e)){l=e[h],l&&(e[h]=null),ia.event.triggered=o;try{e[o]()}catch(q){}ia.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=ia.event.fix(a);var c,d,e,f,g,h=[],i=da.call(arguments),j=(ia._data(this,"events")||{})[a.type]||[],k=ia.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=ia.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(e.namespace)){a.handleObj=e,a.data=e.data;var l=(ia.event.special[e.origType]||{}).handle||e.handler;l.apply&&(d=l.apply(f.elem,i)),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation())}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;g=0:ia.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return iy.cacheLength&&delete a[b.shift()],a[c]=d}}function e(a){return a[N]=!0,a}function f(a){var b=F.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}}function g(a,b,c,d){var e,f,g,h,i,j,k,n,o,p;if((b?b.ownerDocument||b:O)!==F&&E(b),b=b||F,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(!H&&!d){if(e=pa.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&L(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return Z.apply(c,$.call(b.getElementsByTagName(a),0)),c;if((g=e[3])&&P.getByClassName&&b.getElementsByClassName)return Z.apply(c,$.call(b.getElementsByClassName(g),0)),c}if(P.qsa&&!I.test(a)){if(k=!0,n=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=l(a),(k=b.getAttribute("id"))?n=k.replace(sa,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=na.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return Z.apply(c,$.call(o.querySelectorAll(p),0)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return u(a.replace(ga,"$1"),b,c,d)}function h(a,b){var c=b&&a,d=c&&(~b.sourceIndex||W)-(~a.sourceIndex||W);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(a,b){var c,d,e,f,h,i,j,k=T[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=y.preFilter;h;){c&&!(d=ha.exec(h))||(d&&(h=h.slice(d[0].length)||h),i.push(e=[])),c=!1,(d=ja.exec(h))&&(c=d.shift(),e.push({value:c,type:d[0].replace(ga," ")}),h=h.slice(c.length));for(f in y.filter)!(d=ma[f].exec(h))||j[f]&&!(d=j[f](d))||(c=d.shift(),e.push({value:c,type:f,matches:d}),h=h.slice(c.length));if(!c)break}return b?h.length:h?g.error(a):T(a,i).slice(0)}function m(a){for(var b=0,c=a.length,d="";b1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h-1&&(e[j]=!(g[j]=l))}}else s=p(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):Z.apply(g,s)})}function r(a){for(var b,c,d,e=a.length,f=y.relative[a[0].type],g=f||y.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return _.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];h1&&o(k),h>1&&m(a.slice(0,h-1)).replace(ga,"$1"),c,h0,f=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],q=0,r="0",s=e&&[],t=null!=k,u=D,v=e||f&&y.find.TAG("*",k&&h.parentNode||h),w=Q+=null==u?1:Math.random()||.1;for(t&&(D=h!==F&&h,x=c);null!=(l=v[r]);r++){if(f&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(Q=w,x=++c)}d&&((l=!n&&l)&&q--,e&&s.push(l))}if(q+=r,d&&r!==q){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(q>0)for(;r--;)s[r]||o[r]||(o[r]=Y.call(j));o=p(o)}Z.apply(j,o),t&&!e&&o.length>0&&q+b.length>1&&g.uniqueSort(j)}return t&&(Q=w,D=u),s};return d?e(h):h}function t(a,b,c){for(var d=0,e=b.length;d2&&"ID"===(g=f[0]).type&&9===b.nodeType&&!H&&y.relative[f[1].type]){if(b=y.find.ID(g.matches[0].replace(ua,va),b)[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=ma.needsContext.test(a)?0:f.length;e--&&(g=f[e],!y.relative[h=g.type]);)if((i=y.find[h])&&(d=i(g.matches[0].replace(ua,va),na.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return Z.apply(c,$.call(d,0)),c;break}}return B(a,j)(d,b,H,c,na.test(a)),c}function v(){}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P={},Q=0,R=0,S=d(),T=d(),U=d(),V=typeof b,W=1<<31,X=[],Y=X.pop,Z=X.push,$=X.slice,_=X.indexOf||function(a){for(var b=0,c=this.length;b+~])"+aa+"*"),ka=new RegExp(fa),la=new RegExp("^"+ca+"$"),ma={ID:new RegExp("^#("+ba+")"),CLASS:new RegExp("^\\.("+ba+")"),NAME:new RegExp("^\\[name=['\"]?("+ba+")['\"]?\\]"),TAG:new RegExp("^("+ba.replace("w","w*")+")"),ATTR:new RegExp("^"+ea),PSEUDO:new RegExp("^"+fa),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+aa+"*(even|odd|(([+-]|)(\\d*)n|)"+aa+"*(?:([+-]|)"+aa+"*(\\d+)|))"+aa+"*\\)|)","i"),needsContext:new RegExp("^"+aa+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+aa+"*((?:-\\d)?\\d*)"+aa+"*\\)|)(?=[^-]|$)","i")},na=/[\x20\t\r\n\f]*[+~]/,oa=/^[^{]+\{\s*\[native code/,pa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,qa=/^(?:input|select|textarea|button)$/i,ra=/^h\d$/i,sa=/'|\\/g,ta=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,ua=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,va=function(a,b){var c="0x"+b-65536;return c!==c?b:c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320)};try{$.call(O.documentElement.childNodes,0)[0].nodeType}catch(wa){$=function(a){for(var b,c=[];b=this[a++];)c.push(b);return c}}A=g.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},E=g.setDocument=function(a){var d=a?a.ownerDocument||a:O;return d!==F&&9===d.nodeType&&d.documentElement?(F=d,G=d.documentElement,H=A(d),P.tagNameNoComments=f(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),P.attributes=f(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),P.getByClassName=f(function(a){return a.innerHTML="",!(!a.getElementsByClassName||!a.getElementsByClassName("e").length)&&(a.lastChild.className="e",2===a.getElementsByClassName("e").length)}),P.getByName=f(function(a){a.id=N+0,a.innerHTML="
          ",G.insertBefore(a,G.firstChild);var b=d.getElementsByName&&d.getElementsByName(N).length===2+d.getElementsByName(N+0).length;return P.getIdNotName=!d.getElementById(N),G.removeChild(a),b}),y.attrHandle=f(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==V&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},P.getIdNotName?(y.find.ID=function(a,b){if(typeof b.getElementById!==V&&!H){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){return a.getAttribute("id")===b}}):(y.find.ID=function(a,c){if(typeof c.getElementById!==V&&!H){var d=c.getElementById(a);return d?d.id===a||typeof d.getAttributeNode!==V&&d.getAttributeNode("id").value===a?[d]:b:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){var c=typeof a.getAttributeNode!==V&&a.getAttributeNode("id");return c&&c.value===b}}),y.find.TAG=P.tagNameNoComments?function(a,b){if(typeof b.getElementsByTagName!==V)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},y.find.NAME=P.getByName&&function(a,b){if(typeof b.getElementsByName!==V)return b.getElementsByName(name)},y.find.CLASS=P.getByClassName&&function(a,b){if(typeof b.getElementsByClassName!==V&&!H)return b.getElementsByClassName(a)},J=[],I=[":focus"],(P.qsa=c(d.querySelectorAll))&&(f(function(a){a.innerHTML="",a.querySelectorAll("[selected]").length||I.push("\\["+aa+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||I.push(":checked")}),f(function(a){a.innerHTML="",a.querySelectorAll("[i^='']").length&&I.push("[*^$]="+aa+"*(?:\"\"|'')"),a.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),I.push(",.*:")})),(P.matchesSelector=c(K=G.matchesSelector||G.mozMatchesSelector||G.webkitMatchesSelector||G.oMatchesSelector||G.msMatchesSelector))&&f(function(a){P.disconnectedMatch=K.call(a,"div"),K.call(a,"[s!='']:x"),J.push("!=",fa)}),I=new RegExp(I.join("|")),J=new RegExp(J.join("|")),L=c(G.contains)||G.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},M=G.compareDocumentPosition?function(a,b){var c;return a===b?(C=!0,0):(c=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b))?1&c||a.parentNode&&11===a.parentNode.nodeType?a===d||L(O,a)?-1:b===d||L(O,b)?1:0:4&c?-1:1:a.compareDocumentPosition?-1:1}:function(a,b){var c,e=0,f=a.parentNode,g=b.parentNode,i=[a],j=[b];if(a===b)return C=!0,0;if(!f||!g)return a===d?-1:b===d?1:f?-1:g?1:0;if(f===g)return h(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},C=!1,[0,0].sort(M),P.detectDuplicates=C,F):F},g.matches=function(a,b){return g(a,null,null,b)},g.matchesSelector=function(a,b){if((a.ownerDocument||a)!==F&&E(a),b=b.replace(ta,"='$1']"),P.matchesSelector&&!H&&(!J||!J.test(b))&&!I.test(b))try{var c=K.call(a,b);if(c||P.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(d){}return g(b,F,null,[a]).length>0},g.contains=function(a,b){return(a.ownerDocument||a)!==F&&E(a),L(a,b)},g.attr=function(a,b){var c;return(a.ownerDocument||a)!==F&&E(a),H||(b=b.toLowerCase()),(c=y.attrHandle[b])?c(a):H||P.attributes?a.getAttribute(b):((c=a.getAttributeNode(b))||a.getAttribute(b))&&a[b]===!0?b:c&&c.specified?c.value:null},g.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},g.uniqueSort=function(a){var b,c=[],d=1,e=0;if(C=!P.detectDuplicates,a.sort(M),C){for(;b=a[d];d++)b===a[d-1]&&(e=c.push(d));for(;e--;)a.splice(c[e],1)}return a},z=g.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=z(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=z(b);return c},y=g.selectors={cacheLength:50,createPseudo:e,match:ma,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ua,va),a[3]=(a[4]||a[5]||"").replace(ua,va),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||g.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&g.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return ma.CHILD.test(a[0])?null:(a[4]?a[2]=a[4]:c&&ka.test(c)&&(b=l(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(ua,va).toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=S[a+" "];return b||(b=new RegExp("(^|"+aa+")"+a+"("+aa+"|$)"))&&S(a,function(a){return b.test(a.className||typeof a.getAttribute!==V&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=g.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===Q&&j[1],m=j[0]===Q&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[Q,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===Q)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[Q,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,d=y.pseudos[a]||y.setFilters[a.toLowerCase()]||g.error("unsupported pseudo: "+a);return d[N]?d(b):d.length>1?(c=[a,a,"",b],y.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var e,f=d(a,b),g=f.length;g--;)e=_.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:e(function(a){var b=[],c=[],d=B(a.replace(ga,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return g(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||z(b)).indexOf(a)>-1}}),lang:e(function(a){return la.test(a||"")||g.error("unsupported lang: "+a),a=a.replace(ua,va).toLowerCase(),function(b){var c;do if(c=H?b.getAttribute("xml:lang")||b.getAttribute("lang"):b.lang)return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===G},focus:function(a){return a===F.activeElement&&(!F.hasFocus||F.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!y.pseudos.empty(a)},header:function(a){return ra.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[c<0?c+b:c]}),even:k(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=c<0?c+b:c;++d1?ia.unique(c):c),c.selector=(this.selector?this.selector+" ":"")+a,c},has:function(a){var b,c=ia(a,this),d=c.length;return this.filter(function(){for(b=0;b=0:ia.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sa.test(a)||"string"!=typeof a?ia(a,b||this.context):0;d-1:ia.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}return this.pushStack(f.length>1?ia.unique(f):f)},index:function(a){return a?"string"==typeof a?ia.inArray(this[0],ia(a)):ia.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?ia(a,b):ia.makeArray(a&&a.nodeType?[a]:a),d=ia.merge(this.get(),c);return this.pushStack(ia.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),ia.fn.andSelf=ia.fn.addBack,ia.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return ia.dir(a,"parentNode")},parentsUntil:function(a,b,c){return ia.dir(a,"parentNode",c)},next:function(a){return k(a,"nextSibling")},prev:function(a){return k(a,"previousSibling")},nextAll:function(a){return ia.dir(a,"nextSibling")},prevAll:function(a){return ia.dir(a,"previousSibling")},nextUntil:function(a,b,c){return ia.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return ia.dir(a,"previousSibling",c)},siblings:function(a){return ia.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return ia.sibling(a.firstChild)},contents:function(a){return ia.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:ia.merge([],a.childNodes)}},function(a,b){ia.fn[a]=function(c,d){var e=ia.map(this,b,c);return Pa.test(a)||(d=c),d&&"string"==typeof d&&(e=ia.filter(d,e)),e=this.length>1&&!Ta[a]?ia.unique(e):e,this.length>1&&Qa.test(a)&&(e=e.reverse()),this.pushStack(e)}}),ia.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?ia.find.matchesSelector(b[0],a)?[b[0]]:[]:ia.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!ia(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ua="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Va=/ jQuery\d+="(?:null|\d+)"/g,Wa=new RegExp("<(?:"+Ua+")[\\s/>]","i"),Xa=/^\s+/,Ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Za=/<([\w:]+)/,$a=/\s*$/g,gb={option:[1,""],legend:[1,"
          ","
          "],area:[1,"",""],param:[1,"",""],thead:[1,"","
          "],tr:[2,"","
          "],col:[2,"","
          "],td:[3,"","
          "],_default:ia.support.htmlSerialize?[0,"",""]:[1,"X
          ","
          "]},hb=m(W),ib=hb.appendChild(W.createElement("div"));gb.optgroup=gb.option,gb.tbody=gb.tfoot=gb.colgroup=gb.caption=gb.thead,gb.th=gb.td,ia.fn.extend({text:function(a){return ia.access(this,function(a){return a===b?ia.text(this):this.empty().append((this[0]&&this[0].ownerDocument||W).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(ia.isFunction(a))return this.each(function(b){ia(this).wrapAll(a.call(this,b))});if(this[0]){var b=ia(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return ia.isFunction(a)?this.each(function(b){ia(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ia(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ia.isFunction(a);return this.each(function(c){ia(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){ia.nodeName(this,"body")||ia(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||ia.filter(a,[c]).length>0)&&(b||1!==c.nodeType||ia.cleanData(t(c)),c.parentNode&&(b&&ia.contains(c.ownerDocument,c)&&q(t(c,"script")),c.parentNode.removeChild(c)));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&ia.cleanData(t(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&ia.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return ia.clone(this,a,b)})},html:function(a){return ia.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Va,""):b;if("string"==typeof a&&!ab.test(a)&&(ia.support.htmlSerialize||!Wa.test(a))&&(ia.support.leadingWhitespace||!Xa.test(a))&&!gb[(Za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ya,"<$1>");try{for(;d")?f=a.cloneNode(!0):(ib.innerHTML=a.outerHTML,ib.removeChild(f=ib.firstChild)),!(ia.support.noCloneEvent&&ia.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ia.isXMLDoc(a)))for(d=t(f),h=t(a),g=0;null!=(e=h[g]);++g)d[g]&&s(e,d[g]);if(b)if(c)for(h=h||t(a),d=d||t(f),g=0;null!=(e=h[g]);g++)r(e,d[g]);else r(a,f);return d=t(f,"script"),d.length>0&&q(d,!i&&t(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,n=m(b),o=[],p=0;p")+k[2],e=k[0];e--;)h=h.lastChild;if(!ia.support.leadingWhitespace&&Xa.test(f)&&o.push(b.createTextNode(Xa.exec(f)[0])),!ia.support.tbody)for(f="table"!==i||$a.test(f)?""!==k[1]||$a.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)ia.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(ia.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=n.lastChild}else o.push(b.createTextNode(f));for(h&&n.removeChild(h),ia.support.appendChecked||ia.grep(t(o,"input"),u),p=0;f=o[p++];)if((!d||ia.inArray(f,d)===-1)&&(g=ia.contains(f.ownerDocument,f),h=t(n.appendChild(f),"script"),g&&q(h),c))for(e=0;f=h[e++];)db.test(f.type||"")&&c.push(f);return h=null,n},cleanData:function(a,b){for(var c,d,e,f,g=0,h=ia.expando,i=ia.cache,j=ia.support.deleteExpando,k=ia.event.special;null!=(c=a[g]);g++)if((b||ia.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?ia.event.remove(c,d):ia.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==V?c.removeAttribute(h):c[h]=null,_.push(e))}}});var jb,kb,lb,mb=/alpha\([^)]*\)/i,nb=/opacity\s*=\s*([^)]*)/,ob=/^(top|right|bottom|left)$/,pb=/^(none|table(?!-c[ea]).+)/,qb=/^margin/,rb=new RegExp("^("+ja+")(.*)$","i"),sb=new RegExp("^("+ja+")(?!px)[a-z%]+$","i"),tb=new RegExp("^([+-])=("+ja+")","i"),ub={BODY:"block"},vb={position:"absolute",visibility:"hidden",display:"block"},wb={letterSpacing:0,fontWeight:400},xb=["Top","Right","Bottom","Left"],yb=["Webkit","O","Moz","ms"];ia.fn.extend({css:function(a,c){return ia.access(this,function(a,c,d){var e,f,g={},h=0;if(ia.isArray(c)){for(f=kb(a),e=c.length;h1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(a){var b="boolean"==typeof a;return this.each(function(){(b?a:w(this))?ia(this).show():ia(this).hide()})}}),ia.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ia.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=ia.camelCase(c),j=a.style;if(c=ia.cssProps[i]||(ia.cssProps[i]=v(j,i)),h=ia.cssHooks[c]||ia.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tb.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(ia.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||ia.cssNumber[i]||(d+="px"),ia.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=ia.camelCase(c);return c=ia.cssProps[i]||(ia.cssProps[i]=v(a.style,i)),h=ia.cssHooks[c]||ia.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lb(a,c,e)),"normal"===g&&c in wb&&(g=wb[c]),""===d||d?(f=parseFloat(g),d===!0||ia.isNumeric(f)?f||0:g):g},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),a.getComputedStyle?(kb=function(b){return a.getComputedStyle(b,null)},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||ia.contains(a.ownerDocument,a)||(i=ia.style(a,c)),sb.test(i)&&qb.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):W.documentElement.currentStyle&&(kb=function(a){return a.currentStyle},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sb.test(i)&&!ob.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),ia.each(["height","width"],function(a,b){ia.cssHooks[b]={get:function(a,c,d){if(c)return 0===a.offsetWidth&&pb.test(ia.css(a,"display"))?ia.swap(a,vb,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&kb(a);return y(a,c,d?z(a,b,d,ia.support.boxSizing&&"border-box"===ia.css(a,"boxSizing",!1,e),e):0)}}}),ia.support.opacity||(ia.cssHooks.opacity={get:function(a,b){return nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=ia.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===ia.trim(f.replace(mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mb.test(f)?f.replace(mb,e):f+" "+e)}}),ia(function(){ia.support.reliableMarginRight||(ia.cssHooks.marginRight={get:function(a,b){if(b)return ia.swap(a,{display:"inline-block"},lb,[a,"marginRight"])}}),!ia.support.pixelPosition&&ia.fn.position&&ia.each(["top","left"],function(a,b){ia.cssHooks[b]={get:function(a,c){if(c)return c=lb(a,b),sb.test(c)?ia(a).position()[b]+"px":c}}})}),ia.expr&&ia.expr.filters&&(ia.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!ia.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||ia.css(a,"display"))},ia.expr.filters.visible=function(a){return!ia.expr.filters.hidden(a)}),ia.each({margin:"",padding:"",border:"Width"},function(a,b){ia.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+xb[d]+b]=f[d]||f[d-2]||f[0];return e}},qb.test(a)||(ia.cssHooks[a+b].set=y)});var zb=/%20/g,Ab=/\[\]$/,Bb=/\r?\n/g,Cb=/^(?:submit|button|image|reset|file)$/i,Db=/^(?:input|select|textarea|keygen)/i;ia.fn.extend({serialize:function(){return ia.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ia.prop(this,"elements");return a?ia.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ia(this).is(":disabled")&&Db.test(this.nodeName)&&!Cb.test(a)&&(this.checked||!bb.test(a))}).map(function(a,b){var c=ia(this).val();return null==c?null:ia.isArray(c)?ia.map(c,function(a){return{name:b.name,value:a.replace(Bb,"\r\n")}}):{name:b.name,value:c.replace(Bb,"\r\n")}}).get()}}),ia.param=function(a,c){var d,e=[],f=function(a,b){b=ia.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=ia.ajaxSettings&&ia.ajaxSettings.traditional),ia.isArray(a)||a.jquery&&!ia.isPlainObject(a))ia.each(a,function(){f(this.name,this.value)});else for(d in a)D(d,a[d],c,f);return e.join("&").replace(zb,"+")},ia.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(a,b){ia.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),ia.fn.hover=function(a,b){return this.mouseenter(a).mouseleave(b||a)};var Eb,Fb,Gb=ia.now(),Hb=/\?/,Ib=/#.*$/,Jb=/([?&])_=[^&]*/,Kb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mb=/^(?:GET|HEAD)$/,Nb=/^\/\//,Ob=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pb=ia.fn.load,Qb={},Rb={},Sb="*/".concat("*");try{Fb=X.href}catch(Tb){Fb=W.createElement("a"),Fb.href="",Fb=Fb.href}Eb=Ob.exec(Fb.toLowerCase())||[],ia.fn.load=function(a,c,d){if("string"!=typeof a&&Pb)return Pb.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),ia.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&ia.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?ia("
          ").append(ia.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},ia.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){ia.fn[b]=function(a){return this.on(b,a)}}),ia.each(["get","post"],function(a,c){ia[c]=function(a,d,e,f){return ia.isFunction(d)&&(f=f||e,e=d,d=b),ia.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),ia.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fb,type:"GET",isLocal:Lb.test(Eb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sb,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":a.String,"text html":!0,"text json":ia.parseJSON,"text xml":ia.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?G(G(a,ia.ajaxSettings),b):G(ia.ajaxSettings,a)},ajaxPrefilter:E(Qb),ajaxTransport:E(Rb),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,d&&(t=H(m,w,d)),a>=200&&a<300||304===a?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(ia.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(ia.etag[g]=v)),204===a?(f=!0,x="nocontent"):304===a?(f=!0,x="notmodified"):(f=I(m,t),x=f.state,l=f.data,s=f.error,f=!s)):(s=x,!a&&x||(x="error",a<0&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--ia.active||ia.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=ia.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?ia(n):ia.event,p=ia.Deferred(),q=ia.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kb.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(u<2)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fb)+"").replace(Ib,"").replace(Nb,Eb[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=ia.trim(m.dataType||"*").toLowerCase().match(ka)||[""],null==m.crossDomain&&(e=Ob.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Eb[1]&&e[2]===Eb[2]&&(e[3]||("http:"===e[1]?80:443))==(Eb[3]||("http:"===Eb[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=ia.param(m.data,m.traditional)),F(Qb,m,c,w),2===u)return w;j=m.global,j&&0===ia.active++&&ia.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mb.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hb.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jb.test(g)?g.replace(Jb,"$1_="+Gb++):g+(Hb.test(g)?"&":"?")+"_="+Gb++)),m.ifModified&&(ia.lastModified[g]&&w.setRequestHeader("If-Modified-Since",ia.lastModified[g]),ia.etag[g]&&w.setRequestHeader("If-None-Match",ia.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sb+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=F(Rb,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(u<2))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getScript:function(a,c){return ia.get(a,b,c,"script")},getJSON:function(a,b,c){return ia.get(a,b,c,"json")}}),ia.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return ia.globalEval(a),a}}}),ia.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),ia.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=W.head||ia("head")[0]||W.documentElement;return{send:function(b,e){c=W.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Ub=[],Vb=/(=)\?(?=&|$)|\?\?/;ia.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Ub.pop()||ia.expando+"_"+Gb++;return this[a]=!0,a}}),ia.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vb.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vb.test(c.data)&&"data");if(i||"jsonp"===c.dataTypes[0])return f=c.jsonpCallback=ia.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vb,"$1"+f):c.jsonp!==!1&&(c.url+=(Hb.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||ia.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Ub.push(f)),h&&ia.isFunction(g)&&g(h[0]),h=g=b}),"script"});var Wb,Xb,Yb=0,Zb=a.ActiveXObject&&function(){var a;for(a in Wb)Wb[a](b,!0)};ia.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&J()||K()}:J,Xb=ia.ajaxSettings.xhr(),ia.support.cors=!!Xb&&"withCredentials"in Xb,Xb=ia.support.ajax=!!Xb,Xb&&ia.ajaxTransport(function(c){if(!c.crossDomain||ia.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=ia.noop,Zb&&delete Wb[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yb,Zb&&(Wb||(Wb={},ia(a).unload(Zb)),Wb[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+ja+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[P],ec={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=bc.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||(ia.cssNumber[a]?"":"px"),"px"!==d&&h){h=ia.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,ia.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};ia.Animation=ia.extend(N,{tweener:function(a,b){ia.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),ia.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},ia.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===ia.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),ia.nodeName(a[0],"html")||(c=a.offset()),c.top+=ia.css(a[0],"borderTopWidth",!0),c.left+=ia.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-ia.css(d,"marginTop",!0),left:b.left-c.left-ia.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||W.documentElement;a&&!ia.nodeName(a,"html")&&"static"===ia.css(a,"position");)a=a.offsetParent;return a||W.documentElement})}}),ia.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);ia.fn[a]=function(e){return ia.access(this,function(a,e,f){var g=S(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:void(g?g.scrollTo(d?ia(g).scrollLeft():f,d?f:ia(g).scrollTop()):a[e]=f)},a,e,arguments.length,null)}}),ia.each({Height:"height",Width:"width"},function(a,c){ia.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){ia.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return ia.access(this,function(c,d,e){var f;return ia.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?ia.css(c,d,h):ia.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=ia,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ia})}(window),$.extend($.Event.prototype,{stopEvent:function(){this.stopPropagation(),this.preventDefault()}}),jQuery&&(!function(a){a.fn.insets||(a.fn.insets=function(){var a=this.padding(),b=this.border();return{top:a.top,bottom:a.bottom+b.bottom+b.top,left:a.left,right:a.right+b.right+b.left}}),a.fn.bounds||(a.fn.bounds=function(a){var b={hasIgnoredBounds:!0};return a?(isNaN(a.x)||(b.left=a.x),isNaN(a.y)||(b.top=a.y),null!=a.width&&(b.width=a.width-(this.outerWidth(!0)-this.width()),b.width=b.width>=0?b.width:a.width),null!=a.height&&(b.height=a.height-(this.outerHeight(!0)-this.height()),b.height=b.height>=0?b.height:a.height),this.css(b),this):(b=this.position(),{x:b.left,y:b.top,width:this.outerWidth(),height:this.outerHeight()})})}(jQuery),BI.extend(jQuery.fn,{destroy:function(){this.remove(),BI.isIE()===!0&&(this[0].outerHTML="")},__textKeywordMarked__:function(a,b,c){if(!BI.isKey(b)||(a+"").length>100)return this.html(BI.htmlEncode(a));b+="",b=BI.toUpperCase(b);var d=(a||"")+"";for(c=(c||BI.makeFirstPY(a))+"",null!=c&&(c=BI.toUpperCase(c)),this.empty();;){var e=BI.toUpperCase(d).indexOf(b),f=null;if(null!=c&&(f=c.indexOf(b),f>=0&&(f%=a.length)),e>=0)this.append(BI.htmlEncode(d.substr(0,e))),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(e,b.length)))),d=d.substr(e+b.length),null!=c&&(c=c.substr(e+b.length));else{if(!(null!=f&&f>=0&&Math.floor(f/a.length)===Math.floor((f+b.length-1)/a.length))){this.append(BI.htmlEncode(d));break}this.append(BI.htmlEncode(d.substr(0,f))),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(f,b.length)))),null!=c&&(c=c.substr(f+b.length)),d=d.substr(f+b.length)}}return this},getDomHeight:function(a){var b=$(this).clone();b.appendTo($(a||"body"));var c=b.height();return b.remove(),c},hasVerticalScroll:function(){return this.height()>0&&this[0].clientWidth0&&this[0].clientHeightb.left+c||a.pageYb.top+d)},__hasZIndexMask__:function(a){return a&&null!=this.zIndexMask[a]},__buildZIndexMask__:function(a,b){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var c=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:b});return c.element.css({"z-index":a}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(c),a&&(this.zIndexMask[a]=c),c.element},__releaseZIndexMask__:function(a){if(a&&this.zIndexMask[a])return BI.remove(this.indexMask,this.zIndexMask[a]),void this.zIndexMask[a].destroy();this.indexMask=this.indexMask||[];var b=this.indexMask.pop();b&&b.destroy()}})),_.extend(BI,{$import:function(){function a(a,c){var d=$("head script, body script");$.each(d,function(c,d){d.src.indexOf(a)!=-1&&(b[a]=!0)});var e=$("head link");$.each(e,function(d,e){e.href.indexOf(a)!=-1&&c&&(b[a]=!1,$(e).remove())})}var b={};return function(c,d,e){if(a(c,e),b[c]!==!0)if("css"===d){var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.href=c;var g=document.getElementsByTagName("head")[0];g.appendChild(f),b[c]=!0}else $.ajax({url:c,dataType:"script",async:!1,cache:!0,complete:function(a,d){"success"==d&&(b[c]=!0)}})}}()}),Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||!function(){function a(a,b){for(var c=-1;++c=0;)c+=h[b],h[b]=Math.floor(c/a),c=c%a*f}function c(){for(var a=g,b="";--a>=0;)if(""!==b||0===a||0!==h[a]){var c=String(h[a]);""===b?b=c:b+="0000000".slice(0,7-c.length)+c}return b}function d(a,b,c){return 0===b?c:b%2===1?d(a,b-1,c*a):d(a*a,b/2,c)}function e(a){for(var b=0;a>=4096;)b+=12,a/=4096;for(;a>=2;)b+=1,a/=2;return b}var f,g,h;f=1e7,g=6,h=[0,0,0,0,0,0],Number.prototype.toFixed=function(f){var g,h,i,j,k,l,m,n;if(g=Number(f),g=g!==g?0:Math.floor(g),g<0||g>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(h=Number(this),h!==h)return"NaN";if(h<=-1e21||h>1e21)return String(h);if(i="",h<0&&(i="-",h=-h),j="0",h>1e-21)if(k=e(h*d(2,69,1))-69,l=k<0?h*d(2,-k,1):h/d(2,k,1),l*=4503599627370496,k=52-k,k>0){for(a(0,l),m=g;m>=7;)a(1e7,0),m-=7;for(a(d(10,m,1),0),m=k-1;m>=23;)b(1<<23),m-=23;b(1<0?(n=j.length,j=n<=g?i+"0.0000000000000000000".slice(0,g-n+2)+j:i+j.slice(0,n-g)+"."+j.slice(n-g)):j=i+j,j}}(),_.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}),BI.version="2.0",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(a,b){var c=this.options,d=BI.AbsoluteCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0),right:c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0),top:c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0),bottom:c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0),margin:"auto"}),d},resize:function(){},populate:function(a){BI.AbsoluteCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_center_adapt",BI.AbsoluteCenterLayout),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(a,b){var c=this.options,d=BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0),right:c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0),margin:"auto"}),c.vgap+c.tgap+(b.vgap||0)+(b.tgap||0)!==0&&d.element.css("top",c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)),c.vgap+c.bgap+(b.vgap||0)+(b.bgap||0)!==0&&d.element.css("bottom",c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_horizontal_adapt",BI.AbsoluteHorizontalLayout),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(a,b){var c=this.options,d=BI.AbsoluteVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:b.lgap,right:b.rgap,top:c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0),bottom:c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0),margin:"auto"}),c.hgap+c.lgap+(b.hgap||0)+(b.lgap||0)!==0&&d.element.css("left",c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)),c.hgap+c.rgap+(b.hgap||0)+(b.rgap||0)!==0&&d.element.css("right",c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_vertical_adapt",BI.AbsoluteVerticalLayout),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 a=this.options,b=this;return BI.CenterAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:a.horizontalAlign,columnSize:a.columnSize,scrollx:a.scrollx,items:a.items,ref:function(a){b.layout=a},hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.center_adapt",BI.CenterAdaptLayout),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 a=this,b=this.options;return BI.HorizontalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,items:b.items,scrollx:b.scrollx,ref:function(b){a.layout=b},hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.horizontal_adapt",BI.HorizontalAdaptLayout),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 a=this.options;BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this,arguments);var b=[];return"left"in a.items&&b.push({type:"bi.left",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items.left,hgap:a.lhgap,lgap:a.llgap,rgap:a.lrgap}}]}),"right"in a.items&&b.push({type:"bi.right",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items.right,textAlign:"right",hgap:a.rhgap,lgap:a.rlgap,rgap:a.rrgap}}]}),b},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){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 a=this.options,b=this;return BI.LeftVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.left",ref:function(a){b.layout=a},items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items,lgap:a.lgap,hgap:a.hgap,rgap:a.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){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 a=this.options,b=this;return BI.RightVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.right",ref:function(a){b.layout=a},items:[{el:{type:"bi.vertical_adapt",height:"100%",textAlign:"right",items:a.items,lgap:a.lgap,hgap:a.hgap,rgap:a.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.right_vertical_adapt",BI.RightVerticalAdaptLayout),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 a=this.options;BI.TableAdaptLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("
          ").css({position:"relative",display:"table",height:a.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:a.horizontalAlign===BI.HorizontalAlign.Center?"100%":"auto","white-space":"nowrap"}),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.width(e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",width:e,items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]<=1?e:e+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative",display:"table-cell","vertical-align":d.verticalAlign,margin:"0",padding:"0",height:"100%"}),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},appendFragment:function(a){this.$table.append(a),this.element.append(this.$table)},resize:function(){},populate:function(a){BI.TableAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table_adapt",BI.TableAdaptLayout),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 a=this,b=this.options;return BI.VerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,items:b.items,scrollx:b.scrollx,ref:function(b){a.layout=b},hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.vertical_adapt",BI.VerticalAdaptLayout),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(a,b){var c=this.options,d=BI.HorizontalAutoLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",margin:"0px auto"}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":(0===a?c.vgap:0)+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_auto",BI.HorizontalAutoLayout),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 a=this,b=this.left.element.width(),c=this.left.element.height();this.left.element.width(b).height(c).css("float","none"),BI.remove(this._children,function(b,c){c===a.container&&delete a._children[b]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.left]})},_addElement:function(a,b){var c=this.options;return this.left=BI.createWidget({type:"bi.vertical",items:[b],hgap:c.hgap,vgap:c.vgap,tgap:c.tgap,bgap:c.bgap,lgap:c.lgap,rgap:c.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]}),this.left},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_float",BI.FloatHorizontalLayout),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(a,b,c){var d=this.options,e=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return e.element.css({position:"relative","vertical-align":"middle"}),e.element.addClass("inline-center-adapt-item"),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&e.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&e.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&e.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&e.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),e},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("不能添加元素")},stroke:function(a){var b=this;BI.each(a,function(c,d){d&&b._addElement(c,d,a.length)})},populate:function(a){BI.InlineCenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_center_adapt",BI.InlineCenterAdaptLayout),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 a=this.options;this.element.css({whiteSpace:"nowrap",textAlign:a.textAlign}),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","vertical-align":"middle"}),d.element.addClass("inline-vertical-adapt-item"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.InlineVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_vertical_adapt",BI.InlineVerticalAdaptLayout),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(a,b){var c=this.options,d=BI.FlexCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0","margin-left":(0===a?c.hgap:0)+"px","margin-right":c.hgap+"px","margin-top":c.vgap+"px","margin-bottom":c.vgap+"px"}),d},resize:function(){},populate:function(a){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_center_adapt",BI.FlexCenterLayout),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 a=this,b=this.options;return{type:"bi.flex_vertical",ref:function(b){a.wrapper=b},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:b.verticalAlign,rowSize:b.rowSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},resize:function(){},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_horizontal_adapt",BI.FlexHorizontalCenter),BI.shortcut("bi.flex_horizontal_center_adapt",BI.FlexHorizontalCenter),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 a=this.options;this.element.addClass("v-"+a.verticalAlign).addClass("h-"+a.horizontalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.columnSize[a]>0&&d.element.width(c.columnSize[a]),"fill"===c.columnSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-center-adapt-layout",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var a=this,b=this.options;return{type:"bi.flex_horizontal",ref:function(b){a.wrapper=b},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,hgap:b.hgap,items:b.items}},resize:function(){},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_vertical_adapt",BI.FlexVerticalCenter),BI.shortcut("bi.flex_vertical_center_adapt",BI.FlexVerticalCenter),BI.FlexVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-layout",horizontalAlign:BI.HorizontalAlign.Left,verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrolly:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalLayout.superclass.render.apply(this,arguments);var a=this.options;this.element.addClass("h-"+a.horizontalAlign).addClass("v-"+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=BI.FlexVerticalLayout.superclass._addElement.apply(this,arguments),d=this.options;return c.element.css({position:"relative","flex-shrink":"0"}),d.rowSize[a]>0&&c.element.height(d.rowSize[a]),"fill"===d.rowSize[a]&&c.element.css("flex","1"),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&c.element.css({"margin-top":(0===a?d.vgap:0)+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&c.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&c.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&c.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},resize:function(){},populate:function(a){BI.FlexVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical",BI.FlexVerticalLayout),BI.FlexWrapperCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-center-adapt-layout clearfix",scrollable:!0})},render:function(){BI.FlexWrapperCenterLayout.superclass.render.apply(this,arguments),this.$wrapper=BI.Widget._renderEngine.createElement("
          ").addClass("flex-scrollable-center-adapt-layout-wrapper"),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","margin-left":(0===a?c.hgap:0)+"px","margin-right":c.hgap+"px","margin-top":c.vgap+"px","margin-bottom":c.vgap+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_center_adapt",BI.FlexWrapperCenterLayout),BI.FlexWrapperHorizontalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-center-adapt-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 a=this,b=this.options;return{type:"bi.flex_scrollable_vertical",ref:function(b){a.wrapper=b},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:b.verticalAlign,rowSize:b.rowSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_scrollable_horizontal_adapt",BI.FlexWrapperHorizontalCenter),BI.shortcut("bi.flex_scrollable_horizontal_center_adapt",BI.FlexWrapperHorizontalCenter),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 a=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("
          ").addClass("flex-scrollable-horizontal-layout-wrapper v-"+a.verticalAlign).addClass("h-"+a.horizontalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.columnSize[a]>0&&d.element.width(c.columnSize[a]),"fill"===c.columnSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_horizontal",BI.FlexWrapperHorizontalLayout),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 a=this,b=this.options;return{type:"bi.flex_scrollable_horizontal",ref:function(b){a.wrapper=b},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,items:b.items}},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_scrollable_vertical_adapt",BI.FlexWrapperVerticalCenter),BI.shortcut("bi.flex_scrollable_vertical_center_adapt",BI.FlexWrapperVerticalCenter),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 a=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("
          ").addClass("flex-scrollable-vertical-layout-wrapper h-"+a.horizontalAlign).addClass("v-"+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.rowSize[a]>0&&d.element.height(c.rowSize[a]),"fill"===c.rowSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":(0===a?c.vgap:0)+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_vertical",BI.FlexWrapperVerticalLayout),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(a,b){var c=this.options,d=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),e=0,f=0,g=0,h=0; return BI.isNotNull(b.left)&&(d.element.css({left:b.left}),e+=b.left),BI.isNotNull(b.right)&&(d.element.css({right:b.right}),f+=b.right),BI.isNotNull(b.top)&&(d.element.css({top:b.top}),g+=b.top),BI.isNotNull(b.bottom)&&(d.element.css({bottom:b.bottom}),h+=b.bottom),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d.element.css({position:"absolute"}),d},resize:function(){this.stroke(this.options.items)},stroke:function(a){this.options.items=a||[];var b=this;BI.each(a,function(a,c){if(c){if(!BI.isWidget(c)&&!c.el)throw new Error("el must be exist");b._addElement(a,c)}})},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute",BI.AbsoluteLayout),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(a,b){var c=this.options,d=BI.AdaptiveLayout.superclass._addElement.apply(this,arguments);d.element.css({position:"relative"});var e=0,f=0,g=0,h=0;return BI.isNotNull(b.left)&&d.element.css({"margin-left":b.left}),BI.isNotNull(b.right)&&d.element.css({"margin-right":b.right}),BI.isNotNull(b.top)&&d.element.css({"margin-top":b.top}),BI.isNotNull(b.bottom)&&d.element.css({"margin-bottom":b.bottom}),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.adaptive",BI.AdaptiveLayout),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(a){throw new Error("cannot be added")},stroke:function(a){var b,c=0,d=0,e=0,f=0;if("north"in a&&(b=a.north,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"north")){var g=BI.createWidget(b);this.addWidget(this.getName()+"north",g)}this.getWidgetByName(this.getName()+"north").element.height(b.height).css({position:"absolute",top:b.top||0,left:b.left||0,right:b.right||0,bottom:"initial"})}c=(b.height||0)+(b.top||0)+(b.bottom||0)}if("south"in a&&(b=a.south,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"south")){var g=BI.createWidget(b);this.addWidget(this.getName()+"south",g)}this.getWidgetByName(this.getName()+"south").element.height(b.height).css({position:"absolute",bottom:b.bottom||0,left:b.left||0,right:b.right||0,top:"initial"})}d=(b.height||0)+(b.top||0)+(b.bottom||0)}if("west"in a&&(b=a.west,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"west")){var g=BI.createWidget(b);this.addWidget(this.getName()+"west",g)}this.getWidgetByName(this.getName()+"west").element.width(b.width).css({position:"absolute",left:b.left||0,top:c,bottom:d,right:"initial"})}e=(b.width||0)+(b.left||0)+(b.right||0)}if("east"in a&&(b=a.east,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"east")){var g=BI.createWidget(b);this.addWidget(this.getName()+"east",g)}this.getWidgetByName(this.getName()+"east").element.width(b.width).css({position:"absolute",right:b.right||0,top:c,bottom:d,left:"initial"})}f=(b.width||0)+(b.left||0)+(b.right||0)}if("center"in a&&(b=a.center,null!=b)){if(!this.hasWidget(this.getName()+"center")){var g=BI.createWidget(b);this.addWidget(this.getName()+"center",g)}this.getWidgetByName(this.getName()+"center").element.css({position:"absolute",top:c,bottom:d,left:e,right:f})}},update:function(a){},populate:function(a){BI.BorderLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.border",BI.BorderLayout),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(a){var b=this,c=this.options;this.showIndex=void 0,BI.each(a,function(a,d){if(d){if(b.hasWidget(d.cardName))var e=b.getWidgetByName(d.cardName);else{var e=BI.createWidget(d);e.on(BI.Events.DESTROY,function(){var a=BI.findIndex(c.items,function(a,b){return b.cardName==d.cardName});a>-1&&c.items.splice(a,1)}),b.addWidget(d.cardName,e)}e.element.css({position:"absolute",top:"0",right:"0",bottom:"0",left:"0"}),e.setVisible(!1)}})},update:function(){},empty:function(){BI.CardLayout.superclass.empty.apply(this,arguments),this.options.items=[]},populate:function(a){BI.CardLayout.superclass.populate.apply(this,arguments),this._mount(),this.options.defaultShowName&&this.showCardByName(this.options.defaultShowName)},isCardExisted:function(a){return BI.some(this.options.items,function(b,c){return c.cardName==a&&c.el})},getCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");return this._children[a]},_deleteCardByName:function(a){delete this._children[a];var b=BI.findIndex(this.options.items,function(b,c){return c.cardName==a});b>-1&&this.options.items.splice(b,1)},deleteCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");var b=this._children[a];this._deleteCardByName(a),b&&b._destroy()},addCardByName:function(a,b){if(this.isCardExisted(a))throw new Error("cardName is already exist");var c=BI.createWidget(b,this);return c.element.css({position:"relative",top:"0",left:"0",width:"100%",height:"100%"}).appendTo(this.element),c.invisible(),this.addWidget(a,c),this.options.items.push({el:b,cardName:a}),c},showCardByName:function(a,b,c){var d=this,e=this.isCardExisted(a);null!=this.showIndex&&(this.lastShowIndex=this.showIndex),this.showIndex=a;var f=!1;BI.each(this.options.items,function(g,h){var i=d._children[h.cardName];i&&(a!=h.cardName?!f&&!e&&BI.Action&&b instanceof BI.Action?(b.actionBack(i),f=!0):i.invisible():BI.Action&&b instanceof BI.Action?b.actionPerformed(void 0,i,c):(i.visible(),c&&c()))})},showLastCard:function(){var a=this;this.showIndex=this.lastShowIndex,BI.each(this.options.items,function(b,c){a._children[c.cardName].setVisible(a.showIndex==b)})},setDefaultShowName:function(a){return this.options.defaultShowName=a,this},getDefaultShowName:function(){return this.options.defaultShowName},getAllCardNames:function(){return BI.map(this.options.items,function(a,b){return b.cardName})},getShowingCard:function(){if(BI.isKey(this.showIndex))return this.getWidgetByName(this.showIndex)},deleteAllCard:function(){var a=this;BI.each(this.getAllCardNames(),function(b,c){a.deleteCardByName(c)})},hideAllCard:function(){var a=this;BI.each(this.options.items,function(b,c){a._children[c.cardName].invisible()})},isAllCardHide:function(){var a=this,b=!0;return BI.some(this.options.items,function(c,d){if(a._children[d.cardName].isVisible())return b=!1,!1}),b},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._deleteCardByName(b)}}),BI.shortcut("bi.card",BI.CardLayout),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(a,b){var c=this.options,d=BI.DefaultLayout.superclass._addElement.apply(this,arguments);return c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.DefaultLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.default",BI.DefaultLayout),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(a){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=BI.makeArray(f),i={},j={};BI.each(h,function(a){h[a]=BI.makeArray(g)}),BI.each(a,function(a,b){return BI.isArray(b)?void BI.each(b,function(c,d){i[a]=(i[a]||0)+b.width,j[c]=(j[c]||0)+b.height,h[a][c]=d}):(i[b.row]=(i[b.row]||0)+b.width,j[b.column]=(j[b.column]||0)+b.height,void(h[b.row][b.column]=b))});for(var k=0;k0){var p=this.getWidgetByName(this.getName()+k+"_"+(m-1));p.element.css({right:100-o+"%"})}m==e.columns-1&&n.element.css({right:"0%"}),d(n,k,m),l+=h[k][m].width}for(var m=0;m0){var p=this.getWidgetByName(this.getName()+(k-1)+"_"+m);p.element.css({bottom:100-r+"%"})}k==e.rows-1&&n.element.css({bottom:"0%"}),q+=h[k][m].height}},update:function(){},populate:function(a){BI.DivisionLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.division",BI.DivisionLayout),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(a,b){var c=this.options,d=BI.FloatLeftLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"left"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),BI.isNotNull(b.bottom)&&d.element.css({bottom:b.bottom}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){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(a,b){var c=this.options,d=BI.FloatRightLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"right"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),BI.isNotNull(b.bottom)&&d.element.css({bottom:b.bottom}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":(0===a?c.hgap:0)+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.FloatRightLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right",BI.FloatRightLayout),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(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}for(var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=100/g,i=100/f,j=[],k=0;k").attr({cellspacing:0,cellpadding:0}).css({position:"relative","white-space":"nowrap",height:a.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:a.horizontalAlign===BI.HorizontalAlign.Center||a.horizontalAlign===BI.HorizontalAlign.Stretch?"100%":"auto","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=BI.Widget._renderEngine.createElement("
          "),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]<=1?e:e+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative","vertical-align":d.verticalAlign,margin:"0",padding:"0",border:"none"}),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},appendFragment:function(a){this.$tr.append(a),this.element.append(this.$table)},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){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(a,b){var c=this.options,d=BI.HorizontalCellLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"table-cell","vertical-align":"middle"}),c.hgap+c.lgap>0&&d.element.css({"margin-left":c.hgap+c.lgap+"px"}),c.hgap+c.rgap>0&&d.element.css({"margin-right":c.hgap+c.rgap+"px"}),c.vgap+c.tgap>0&&d.element.css({"margin-top":c.vgap+c.tgap+"px"}),c.vgap+c.bgap>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalCellLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_cell",BI.HorizontalCellLayout),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(a,b){var c=this.options,d=BI.InlineLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"inline-block","*display":"inline","*zoom":1}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.InlineLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline",BI.InlineLayout),BI.LatticeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LatticeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-lattice-layout clearfix"})},render:function(){BI.LatticeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.LatticeLayout.superclass._addElement.apply(this,arguments);if(c.columnSize&&c.columnSize[a])var e=c.columnSize[a]/BI.sum(c.columnSize)*100+"%";else var e=1/this.options.items.length*100+"%";return d.element.css({position:"relative","float":"left",width:e}),d},addItem:function(a){var b=BI.LatticeLayout.superclass.addItem.apply(this,arguments);return this.resize(),b},addItemAt:function(a){var b=BI.LatticeLayout.superclass.addItemAt.apply(this,arguments);return this.resize(),b},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.LatticeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.lattice",BI.LatticeLayout),BI.TableLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-layout",scrolly:!0,columnSize:[200,200,"fill"],rowSize:30,hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TableLayout.superclass.render.apply(this,arguments),this.rows=0,this.populate(this.options.items)},_addElement:function(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}var f,g,h=this.options,i=[],j=0,k=0;for(f=0;ff;g--){if(!BI.isNumber(h.columnSize[g]))throw new Error("item with fill can only be one");e(b[g],this.rows,g),i.push(BI.extend({top:0,bottom:0,right:h.columnSize[g]<=1?100*k+"%":k,width:h.columnSize[g]<=1?100*h.columnSize[g]+"%":h.columnSize[g]},b[g])),k+=h.columnSize[g]+(h.columnSize[g]<1?0:h.hgap)}f>=0&&f0&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":h.vgap}),l.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,l),l},resize:function(){},addItem:function(a){if(!BI.isArray(a))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},update:function(){},populate:function(a){BI.TableLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table",BI.TableLayout),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(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",top:(d.vgap||0)+(d.tgap||0)+c.vgap+c.tgap+"px",bottom:(d.bgap||0)+(d.vgap||0)+c.vgap+c.bgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].width+(a[e-1].lgap||0)+2*(a[e-1].hgap||0)+c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({left:100*d[e]+"%",width:100*f.width+"%"}):g.element.css({left:d[e]+(f.lgap||0)+(f.hgap||0)+c.hgap+c.lgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].width+(a[d+1].rgap||0)+2*(a[d+1].hgap||0)+c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({right:100*e[d]+"%",width:100*f.width+"%"}):g.element.css({right:e[d]+(f.rgap||0)+(f.hgap||0)+c.hgap+c.rgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0})},update:function(){var a;return BI.each(this._children,function(b,c){a=c.update()||a}),a},populate:function(a){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(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",left:(d.lgap||0)+(d.hgap||0)+c.hgap+c.lgap+"px",right:+(d.hgap||0)+(d.rgap||0)+c.hgap+c.rgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].height+(a[e-1].tgap||0)+2*(a[e-1].vgap||0)+c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({top:100*d[e]+"%",height:100*f.height+"%"}):g.element.css({top:d[e]+(f.vgap||0)+(f.tgap||0)+c.vgap+c.tgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].height+(a[d+1].bgap||0)+2*(a[d+1].vgap||0)+c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({bottom:100*e[d]+"%",height:100*f.height+"%"}):g.element.css({bottom:e[d]+(f.vgap||0)+(f.bgap||0)+c.vgap+c.bgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0})},update:function(){},populate:function(a){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout),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("
          ").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(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}for(var f=this.options,g=BI.createWidget({type:"bi.default",tagName:"tr"}),h=0;h=0;f--){for(var g=0;g=0;g--){for(var f=0;f0&&void 0!==arguments[0]?arguments[0]:"bi";return String(Math.random()+Math.random()).replace(N,a)}function g(){return"undefined"!=typeof navigator&&/(msie|trident)/i.test(navigator.userAgent.toLowerCase())}function h(){var a=0;if("undefined"==typeof navigator)return!1;var b=navigator.userAgent.toLowerCase(),c=b.match(/(?:msie\s([\w.]+))/),d=b.match(/(?:trident.*rv:([\w.]+))/);return a=c&&d&&c[1]&&d[1]?Math.max(1*c[1],1*d[1]):c&&c[1]?1*c[1]:d&&d[1]?1*d[1]:0}function i(a){return"[object Object]"===O.call(a)}function j(a){if(!P.test(a)){var b=a.split(".");return function(a){for(var c=0;c3&&void 0!==arguments[3]?arguments[3]:{},f=a;!f.$watch&&f.$vm&&(f=f.$vm),i(d)&&(e=d,d=d.handler),"string"==typeof d&&(d=f[d]),e=e||{},e.user=!0;var g=void 0;if(c.isFunction(b)||!(g=b.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g))||1===g.length&&!/\*/.test(b))return f.$watch(b,d,e),[];var h=[],j=g.slice(),k=!1,l=!1,m=function(b,c,f,h){k!==!0&&(j[b]=!0,q(j)&&(k=!0,d.call(a,c,f,h)),e&&e.sync?(k=!1,l=!1,j=g.slice()):l||(l=!0,Q(function(){k=!1,l=!1,j=g.slice()})))};return c.each(g,function(a,b){if(!c.has(Z,a)){if(/^[1-9a-zA-Z.]+(\*\*$|\*$)/.test(a)||"**"===a){var d=/\*\*$/.test(a);a=d?a.replace(".**",""):a.replace(".*","");var g=d?a:function(){var a={};return c.each(f.model,function(b,c){c in L||(a[c]=b)}),a};return void f.$watch(g,function(a,d,e){m(b,a,d,c.extend({index:b},e))},c.extend(e,{deep:d}))}if(/\*\*$|\*$/.test(a))throw new Error("not support");if(/\*/.test(a)){var h=a.split("."),i=function(){for(var a={root:f.model},b=(function(b,d){var e={};"*"===h[d]?c.each(a,function(a,b){c.each(a,function(a,c){b+c in L||(e[b+c]=a)})}):c.each(a,function(a,b){b+h[d]in L||(e[b+h[d]]=a[h[d]])}),a=e}),d=0,e=h.length;d3&&void 0!==arguments[3]?arguments[3]:{};i(d)&&(e=d,d=d.handler),"string"==typeof d&&(d=a[d]);var f=c.isFunction(b)?c.bind(b,a):c.bind(function(){return j("model."+b)(a)},a);return new da({get:f,listener:c.bind(d,a),last:f(),sync:e.sync,deep:e.deep,id:e.id})}function w(a,b){return function(){var c=a.apply(b,[].concat(Array.prototype.slice.call(arguments)));return b.$digest(),c}}function x(a,b){for(var c in b)a[c]=null==b[c]?d:w(b[c],a)}function y(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];c.each(b.reverse(),function(b){var d=o(b);for(var e in d)"function"==typeof d[e]&&(c.has(a,e)||(a[e]=w(d[e],a)))})}function z(a,b){function d(b){for(var c=a._parent;c;){if(c.childContext&&c.childContext.indexOf(b)>-1)return c.$watch(b,function(c,d,e){a._contextWatchers[b]&&(a.model[b]=c,a._contextWatchers[b].last=l(c),a.$digest())},{id:a._modelHashId+"-"+b}),{p:c,value:c.model[b]};c=c._parent}}var e=a._contextWatchers={};c.each(b,function(b){var f=d(b);f&&(a.model[b]=f.p?f.p.model[b]:void 0,e[b]=new da({id:f.p._modelHashId+"-"+b,get:function(){return a.model[b]},last:a.model[b],listener:c.bind(function(){f.p.model[b]=a.model[b],f.p.$digest()},f.p)}))})}function A(a,b,d,e){var f={id:b.id,cb:c.bind(b.listener,a,d,e,a)};b.sync===!0?a.syncListeners.push(f):a.asyncListeners.push(f)}function B(a){var b=!1;return c.each(a._stateWatchers,function(c,d){var e=c.get(),f=c.last;n(e,f)||(A(a,c,e,f),a.model[d]=e,b=!0,c.last=l(e))}),b}function C(a){var b=!1,d=[],e=[];return c.each(a._computedOrder,function(c){var f=a._computedWatchers[c];try{var g=f.get(),h=f.last;n(g,h)?e.push(c):(A(a,f,g,h),a.model[c]=g,b=!0,d.push(c),f.last=l(g))}catch(i){b=!0,d.push(c)}}),a._computedOrder=[].concat(e,d),b}function D(a){var b=!1;return c.each(a._contextWatchers,function(d,e){var f=d.get(),g=d.last;if(!n(f,g)){var h={id:d.id,cb:c.bind(d.listener,a,f,g,a)};a.contextListeners.push(h),a.model[e]=f,b=!0,d.last=l(f)}}),b}function E(a){for(var b=!0,c=!0,d=!0,e=ca;b&&e>0;e--)b=B(a);for(var f=ca;c&&f>0;f--)c=D(a);for(var g=ca;d&&g>0;g--)d=C(a)}function F(a){var b=[].concat(a.syncListeners||[]),d=[].concat(a.asyncListeners||[]),e=[].concat(a.contextListeners||[]);a.asyncListeners=[],a.syncListeners=[];var f=[].concat(a._watchers);c.each(f,function(e){if(e){var f=e.get(),g=e.last;if(!n(f,g)){var h={id:e.id,cb:c.bind(e.listener,a,f,g,a)};e.sync===!0?b.push(h):d.push(h),e.last=l(f)}}}),c.each(b,function(a){a.cb()}),Q(function(){c.each(e,function(a){a.cb()}),c.each(d,function(a){a.cb()})})}function G(){c.each(aa,function(a){a&&a.$digest&&a.$digest()})}function H(){return $}function I(){c.each(H(),function(a){a&&a.$digest&&a.$digest()})}function J(a){var b=m(fa,{state:function(){return a}}),c=new b({define:!0});return aa[c.getModelID()]=c,c.model}c="default"in c?c["default"]:c;var K=void 0,L={$accessors:K,$vbthis:K,$vbsetter:K,$vm:K},M=[];c.each(["slice","splice"],function(a){M[a]=Array.prototype[a]}),Array.prototype.splice=function(){this.__ref__=f();for(var a=arguments.length,b=Array(a),c=0;c=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),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 a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(BI.isIE()&&BI.getIEVersion()<10?" hack":""),height:30,width:30,hgap:5,vgap:2.5,items:[{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),b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:c}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=c,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 a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(a,b){b||(b={});var c=this.options,d=this.getTipType()||(this.isEnabled()?"success":"warning"),e="success"===d?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(e)&&(BI.Tooltips.show(a,this.getName(),e,d,this,b),c.action&&BI.Actions.runAction(c.action,"hover",c,this),BI.Actions.runGlobalAction("hover",c,this))},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover({belowMouse:a.belowMouse,container:a.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(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(c){b._e=c,BI.isNotNull(b.showTimeout)&&(clearTimeout(b.showTimeout),b.showTimeout=null),BI.isNull(b.hideTimeout)&&(b.hideTimeout=BI.delay(function(){BI.isNotNull(b.hideTimeout)&&b._hideTooltip()},500)),b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&(BI.isNotNull(b.hideTimeout)&&(clearTimeout(b.hideTimeout),b.hideTimeout=null),b._showToolTip(b._e||c,a))},500)}),this.element.on("mouseleave.title"+this.getName(),function(a){b._e=null,b._clearTimeOut(),b._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(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.Tooltips.remove(this.getName())}}),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var c=this._getShowText();BI.isKey(c)?this.setText(c):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.doRedMark(b.keyword),b.highLight&&this.doHighLight()},_getShowText:function(){var a=this.options;return BI.isFunction(a.text)?a.text():a.text},doRedMark:function(a){var b=this.options;b.keyword=a,this.text.element.__textKeywordMarked__(this._getShowText()||b.value,a,b.py)},unRedMark:function(){var a=this.options;a.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){return BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(a)?a:"",BI.isIE9Below()?void this.text.element.html(BI.htmlEncode(this._getShowText())):void(/\s/.test(a)?this.text.element[0].innerHTML=BI.htmlEncode(this._getShowText()):this.text.element[0].textContent=this._getShowText())}}),BI.shortcut("bi.text",BI.Text),BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-basic-button"+(a.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 a=this.options;a.selected===!0&&BI.nextTick(BI.bind(function(){this.setSelected(a.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),a.shadow&&this._createShadow(),a.level&&this.element.addClass("button-"+a.level)},_createShadow:function(){var a=this,b=this.options,c=function(){a.$mask||(a.$mask=BI.createWidget(BI.isObject(b.shadow)?b.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),a.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:a,items:[{el:a.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){a._hover||b.isShadowShowingOnSelected||(c(),a.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(d){a.element.__isMouseInBounds__(d)&&(!a.isEnabled()||a._hover||!b.isShadowShowingOnSelected&&a.isSelected()||(c(),a.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(b){a.element.__isMouseInBounds__(b)||a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())})},bindEvent:function(){function a(a){e.stopEvent&&a.stopEvent(),e.stopPropagation&&a.stopPropagation()}function b(b){if(a(b),!(!d.isEnabled()||d.isOnce()&&d.isSelected())){if(BI.isKey(e.bubble)||BI.isFunction(e.bubble)){if(BI.isNull(d.combo)){var f;BI.createWidget({type:"bi.absolute",element:d,items:[{el:{type:"bi.bubble_combo",trigger:"",ref:function(){d.combo=this},el:{type:"bi.layout",height:"100%"},popup:{type:"bi.text_bubble_bar_popup_view",text:c(),ref:function(){f=this},listeners:[{eventName:BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,action:function(a){d.combo.hideView(),a&&h.apply(d,arguments)}}]},listeners:[{eventName:BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,action:function(){f.populate(c())}}]},left:0,right:0,bottom:0,top:0}]})}return void(d.combo.isViewVisible()?d.combo.hideView():d.combo.showView())}h.apply(d,arguments)}}function c(){var a=d.options.bubble;return BI.isFunction(a)?a():a}var d=this,e=this.options,f=this.handle();if(f){f=f.element;var g=(e.trigger||"").split(",");BI.each(g,function(c,g){switch(g){case"mouseup":var h=!1;f.mousedown(function(){h=!0}),f.mouseup(function(c){h===!0&&b(c),h=!1,a(c)});break;case"mousedown":var h=!1,i=!1;f.mousedown(function(c){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){!BI.DOM.isExist(d)||f.__isMouseInBounds__(a)||h!==!0||i||d._trigger(),h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(d.isSelected()?i=!0:b(c),h=!0,a(c))}),f.mouseup(function(a){BI.DOM.isExist(d)&&h===!0&&i===!0&&b(a),h=!1,i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())});break;case"dblclick":f.dblclick(b);break;case"lclick":var j,h=!1;f.mousedown(function(b){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){j&&clearInterval(j),j=null,h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(!d.isEnabled()||d.isOnce()&&d.isSelected()||(j=setInterval(function(){d.isEnabled()&&d.doClick()},180),h=!0,a(b)))});break;default:(e.stopEvent||e.stopPropagation)&&f.mousedown(function(b){a(b)}),f.click(b)}});var h=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1})}},_trigger:function(a){var b=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())), +var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options;BI.isNumber(e.rowSize)&&(e.rowSize=BI.makeArray(e.items.length,1/e.items.length)),BI.isNumber(e.columnSize)&&(e.columnSize=BI.makeArray(e.items[0].length,1/e.items[0].length));for(var f=0;f=0;f--){for(var g=0;g=0;g--){for(var f=0;f0&&void 0!==arguments[0]?arguments[0]:"bi";return String(Math.random()+Math.random()).replace(N,a)}function g(){return"undefined"!=typeof navigator&&/(msie|trident)/i.test(navigator.userAgent.toLowerCase())}function h(){var a=0;if("undefined"==typeof navigator)return!1;var b=navigator.userAgent.toLowerCase(),c=b.match(/(?:msie\s([\w.]+))/),d=b.match(/(?:trident.*rv:([\w.]+))/);return a=c&&d&&c[1]&&d[1]?Math.max(1*c[1],1*d[1]):c&&c[1]?1*c[1]:d&&d[1]?1*d[1]:0}function i(a){return"[object Object]"===O.call(a)}function j(a){if(!P.test(a)){var b=a.split(".");return function(a){for(var c=0;c3&&void 0!==arguments[3]?arguments[3]:{},f=a;!f.$watch&&f.$vm&&(f=f.$vm),i(d)&&(e=d,d=d.handler),"string"==typeof d&&(d=f[d]),e=e||{},e.user=!0;var g=void 0;if(c.isFunction(b)||!(g=b.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g))||1===g.length&&!/\*/.test(b))return f.$watch(b,d,e),[];var h=[],j=g.slice(),k=!1,l=!1,m=function(b,c,f,h){k!==!0&&(j[b]=!0,q(j)&&(k=!0,d.call(a,c,f,h)),e&&e.sync?(k=!1,l=!1,j=g.slice()):l||(l=!0,Q(function(){k=!1,l=!1,j=g.slice()})))};return c.each(g,function(a,b){if(!c.has(Z,a)){if(/^[1-9a-zA-Z.]+(\*\*$|\*$)/.test(a)||"**"===a){var d=/\*\*$/.test(a);a=d?a.replace(".**",""):a.replace(".*","");var g=d?a:function(){var a={};return c.each(f.model,function(b,c){c in L||(a[c]=b)}),a};return void f.$watch(g,function(a,d,e){m(b,a,d,c.extend({index:b},e))},c.extend(e,{deep:d}))}if(/\*\*$|\*$/.test(a))throw new Error("not support");if(/\*/.test(a)){var h=a.split("."),i=function(){for(var a={root:f.model},b=(function(b,d){var e={};"*"===h[d]?c.each(a,function(a,b){c.each(a,function(a,c){b+c in L||(e[b+c]=a)})}):c.each(a,function(a,b){b+h[d]in L||(e[b+h[d]]=a[h[d]])}),a=e}),d=0,e=h.length;d3&&void 0!==arguments[3]?arguments[3]:{};i(d)&&(e=d,d=d.handler),"string"==typeof d&&(d=a[d]);var f=c.isFunction(b)?c.bind(b,a):c.bind(function(){return j("model."+b)(a)},a);return new da({get:f,listener:c.bind(d,a),last:f(),sync:e.sync,deep:e.deep,id:e.id})}function w(a,b){return function(){var c=a.apply(b,[].concat(Array.prototype.slice.call(arguments)));return b.$digest(),c}}function x(a,b){for(var c in b)a[c]=null==b[c]?d:w(b[c],a)}function y(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];c.each(b.reverse(),function(b){var d=o(b);for(var e in d)"function"==typeof d[e]&&(c.has(a,e)||(a[e]=w(d[e],a)))})}function z(a,b){function d(b){for(var c=a._parent;c;){if(c.childContext&&c.childContext.indexOf(b)>-1)return c.$watch(b,function(c,d,e){a._contextWatchers[b]&&(a.model[b]=c,a._contextWatchers[b].last=l(c),a.$digest())},{id:a._modelHashId+"-"+b}),{p:c,value:c.model[b]};c=c._parent}}var e=a._contextWatchers={};c.each(b,function(b){var f=d(b);f&&(a.model[b]=f.p?f.p.model[b]:void 0,e[b]=new da({id:f.p._modelHashId+"-"+b,get:function(){return a.model[b]},last:a.model[b],listener:c.bind(function(){f.p.model[b]=a.model[b],f.p.$digest()},f.p)}))})}function A(a,b,d,e){var f={id:b.id,cb:c.bind(b.listener,a,d,e,a)};b.sync===!0?a.syncListeners.push(f):a.asyncListeners.push(f)}function B(a){var b=!1;return c.each(a._stateWatchers,function(c,d){var e=c.get(),f=c.last;n(e,f)||(A(a,c,e,f),a.model[d]=e,b=!0,c.last=l(e))}),b}function C(a){var b=!1,d=[],e=[];return c.each(a._computedOrder,function(c){var f=a._computedWatchers[c];try{var g=f.get(),h=f.last;n(g,h)?e.push(c):(A(a,f,g,h),a.model[c]=g,b=!0,d.push(c),f.last=l(g))}catch(i){b=!0,d.push(c)}}),a._computedOrder=[].concat(e,d),b}function D(a){var b=!1;return c.each(a._contextWatchers,function(d,e){var f=d.get(),g=d.last;if(!n(f,g)){var h={id:d.id,cb:c.bind(d.listener,a,f,g,a)};a.contextListeners.push(h),a.model[e]=f,b=!0,d.last=l(f)}}),b}function E(a){for(var b=!0,c=!0,d=!0,e=ca;b&&e>0;e--)b=B(a);for(var f=ca;c&&f>0;f--)c=D(a);for(var g=ca;d&&g>0;g--)d=C(a)}function F(a){var b=[].concat(a.syncListeners||[]),d=[].concat(a.asyncListeners||[]),e=[].concat(a.contextListeners||[]);a.asyncListeners=[],a.syncListeners=[];var f=[].concat(a._watchers);c.each(f,function(e){if(e){var f=e.get(),g=e.last;if(!n(f,g)){var h={id:e.id,cb:c.bind(e.listener,a,f,g,a)};e.sync===!0?b.push(h):d.push(h),e.last=l(f)}}}),c.each(b,function(a){a.cb()}),Q(function(){c.each(e,function(a){a.cb()}),c.each(d,function(a){a.cb()})})}function G(){c.each(aa,function(a){a&&a.$digest&&a.$digest()})}function H(){return $}function I(){c.each(H(),function(a){a&&a.$digest&&a.$digest()})}function J(a){var b=m(fa,{state:function(){return a}}),c=new b({define:!0});return aa[c.getModelID()]=c,c.model}c="default"in c?c["default"]:c;var K=void 0,L={$accessors:K,$vbthis:K,$vbsetter:K,$vm:K},M=[];c.each(["slice","splice"],function(a){M[a]=Array.prototype[a]}),Array.prototype.splice=function(){this.__ref__=f();for(var a=arguments.length,b=Array(a),c=0;c=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),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 a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var a=this,b=this.options,c=BI.isIE(),d=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(c?" wave-loading hack":""),height:30,width:30,hgap:5,vgap:2.5,items:c?[]:[{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),b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:d}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=d,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 a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(a,b){b||(b={});var c=this.options,d=this.getTipType()||(this.isEnabled()?"success":"warning"),e="success"===d?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(e)&&(BI.Tooltips.show(a,this.getName(),e,d,this,b),c.action&&BI.Actions.runAction(c.action,"hover",c,this),BI.Actions.runGlobalAction("hover",c,this))},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover({belowMouse:a.belowMouse,container:a.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(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(c){b._e=c,BI.isNotNull(b.showTimeout)&&(clearTimeout(b.showTimeout),b.showTimeout=null),BI.isNull(b.hideTimeout)&&(b.hideTimeout=BI.delay(function(){BI.isNotNull(b.hideTimeout)&&b._hideTooltip()},500)),b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&(BI.isNotNull(b.hideTimeout)&&(clearTimeout(b.hideTimeout),b.hideTimeout=null),b._showToolTip(b._e||c,a))},500)}),this.element.on("mouseleave.title"+this.getName(),function(a){b._e=null,b._clearTimeOut(),b._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(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.Tooltips.remove(this.getName())}}),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var c=this._getShowText();BI.isKey(c)?this.setText(c):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.doRedMark(b.keyword),b.highLight&&this.doHighLight()},_getShowText:function(){var a=this.options;return BI.isFunction(a.text)?a.text():a.text},doRedMark:function(a){var b=this.options;b.keyword=a,this.text.element.__textKeywordMarked__(this._getShowText()||b.value,a,b.py)},unRedMark:function(){var a=this.options;a.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){return BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(a)?a:"",BI.isIE9Below()?void this.text.element.html(BI.htmlEncode(this._getShowText())):void(/\s/.test(a)?this.text.element[0].innerHTML=BI.htmlEncode(this._getShowText()):this.text.element[0].textContent=this._getShowText())}}),BI.shortcut("bi.text",BI.Text),BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-basic-button"+(a.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 a=this.options;a.selected===!0&&BI.nextTick(BI.bind(function(){this.setSelected(a.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),a.shadow&&this._createShadow(),a.level&&this.element.addClass("button-"+a.level)},_createShadow:function(){var a=this,b=this.options,c=function(){a.$mask||(a.$mask=BI.createWidget(BI.isObject(b.shadow)?b.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),a.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:a,items:[{el:a.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){a._hover||b.isShadowShowingOnSelected||(c(),a.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(d){a.element.__isMouseInBounds__(d)&&(!a.isEnabled()||a._hover||!b.isShadowShowingOnSelected&&a.isSelected()||(c(),a.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(b){a.element.__isMouseInBounds__(b)||a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())})},bindEvent:function(){function a(a){e.stopEvent&&a.stopEvent(),e.stopPropagation&&a.stopPropagation()}function b(b){if(a(b),!(!d.isEnabled()||d.isOnce()&&d.isSelected())){if(BI.isKey(e.bubble)||BI.isFunction(e.bubble)){if(BI.isNull(d.combo)){var f;BI.createWidget({type:"bi.absolute",element:d,items:[{el:{type:"bi.bubble_combo",trigger:"",ref:function(){d.combo=this},el:{type:"bi.layout",height:"100%"},popup:{type:"bi.text_bubble_bar_popup_view",text:c(),ref:function(){f=this},listeners:[{eventName:BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,action:function(a){d.combo.hideView(),a&&h.apply(d,arguments)}}]},listeners:[{eventName:BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,action:function(){f.populate(c())}}]},left:0,right:0,bottom:0,top:0}]})}return void(d.combo.isViewVisible()?d.combo.hideView():d.combo.showView())}h.apply(d,arguments)}}function c(){var a=d.options.bubble;return BI.isFunction(a)?a():a}var d=this,e=this.options,f=this.handle();if(f){f=f.element;var g=(e.trigger||"").split(",");BI.each(g,function(c,g){switch(g){case"mouseup":var h=!1;f.mousedown(function(){h=!0}),f.mouseup(function(c){h===!0&&b(c),h=!1,a(c)});break;case"mousedown":var h=!1,i=!1;f.mousedown(function(c){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){!BI.DOM.isExist(d)||f.__isMouseInBounds__(a)||h!==!0||i||d._trigger(),h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(d.isSelected()?i=!0:b(c),h=!0,a(c))}),f.mouseup(function(a){BI.DOM.isExist(d)&&h===!0&&i===!0&&b(a),h=!1,i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())});break;case"dblclick":f.dblclick(b);break;case"lclick":var j,h=!1;f.mousedown(function(b){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){j&&clearInterval(j),j=null,h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(!d.isEnabled()||d.isOnce()&&d.isSelected()||(j=setInterval(function(){d.isEnabled()&&d.doClick()},180),h=!0,a(b)))});break;default:(e.stopEvent||e.stopPropagation)&&f.mousedown(function(b){a(b)}),f.click(b)}});var h=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1})}},_trigger:function(a){var b=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())), this.isValid())){b.handler.call(this,this.getValue(),this,a);var c=this.getValue();this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,c,this,a),this.fireEvent(BI.BasicButton.EVENT_CHANGE,c,this),b.action&&BI.Actions.runAction(b.action,"click",b,this),BI.Actions.runGlobalAction("click",b,this)}},_doClick:function(a){this.isValid()&&this.beforeClick(a),this._trigger(a),this.isValid()&&this.doClick(a)},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(a){var b=this.options;b.selected=a,a?this.handle().element.addClass("active"):this.handle().element.removeClass("active"),b.shadow&&!b.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(a){this.options.text=a},getText:function(){return this.options.text},_setEnable:function(a){BI.BasicButton.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),a||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",BI.NodeButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.NodeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-node",open:!1})},_init:function(){BI.NodeButton.superclass._init.apply(this,arguments);var a=this;BI.nextTick(function(){a.setOpened(a.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(a){this.options.open=!!a},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))}}),BI.Tip=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Tip.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-tip",zIndex:BI.zIndex_tip})},_init:function(){BI.Tip.superclass._init.apply(this,arguments),this.element.css({zIndex:this.options.zIndex})}}),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 a=this.options,b={};BI.each(a.behaviors,function(a,c){b[a]=BI.BehaviorFactory.createBehavior(a,{rule:c})}),this.behaviors=b,this.populate(a.items),(BI.isKey(a.value)||BI.isNotEmptyArray(a.value))&&this.setValue(a.value)},_createBtns:function(a){this.options;return BI.createWidgets(BI.createItems(a,{type:"bi.text_button"}))},_btnsCreator:function(a){var b=this,c=Array.prototype.slice.call(arguments),d=this.options,e=this._createBtns(a);return c[0]=e,BI.each(this.behaviors,function(a,b){b.doBehavior.apply(b,c)}),BI.each(e,function(a,c){c.on(BI.Controller.EVENT_CHANGE,function(a,e,f){if(a===BI.Events.CLICK){switch(d.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:b.setValue(c.getValue());break;case BI.ButtonGroup.CHOOSE_TYPE_NONE:b.setValue([])}b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b.fireEvent(BI.ButtonGroup.EVENT_CHANGE,e,f)}else b.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),c.on(BI.Events.DESTROY,function(){BI.remove(b.buttons,c)})}),e},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:d})]})});return a},_packageSimpleItems:function(a){var b=this.options;return BI.map(b.items,function(b,c){return BI.stripEL(c)===c?a[b]:BI.extend({},c,{el:a[b]})})},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},_isSimpleLayout:function(){var a=this.options;return 1===a.layouts.length&&!BI.isArray(a.items[0])},doBehavior:function(){var a=Array.prototype.slice.call(arguments);a.unshift(this.buttons),BI.each(this.behaviors,function(b,c){c.doBehavior.apply(c,a)})},prependItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(b,this.buttons),this._isSimpleLayout()&&this.layouts&&this.layouts.prependItems?void this.layouts.prependItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.prependItems(this._packageLayout(a).items))},addItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(this.buttons,b),this._isSimpleLayout()&&this.layouts&&this.layouts.addItems?void this.layouts.addItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.addItems(this._packageLayout(a).items))},removeItemAt:function(a){BI.removeAt(this.buttons,a),this.layouts.removeItemAt(a)},removeItems:function(a){a=BI.isArray(a)?a:[a];var b=[];BI.each(this.buttons,function(c,d){BI.deepContains(a,d.getValue())&&b.push(c)}),BI.removeAt(this.buttons,b),this.layouts.removeItemAt(b)},populate:function(a){a=a||[],this.empty(),this.options.items=a,this.buttons=this._btnsCreator.apply(this,arguments),a=this._isSimpleLayout()?this._packageSimpleItems(this.buttons):this._packageItems(a,this._packageBtns(this.buttons)),this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1)})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue())}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},getAllButtons:function(){return this.buttons},getAllLeaves:function(){return this.buttons},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&c.isSelected()&&a.push(c)}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&!c.isSelected()&&a.push(c)}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.options.id===a)return b=d,!0}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=d,!0}),b},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),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(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!1):c.setSelected(!0)):void c.setNotSelectedValue(a)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setEnabledValue)?void c.setEnabledValue(a):void(BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1))})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!0):c.setSelected(!1)):void c.setValue(a)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getNotSelectedValue())):void(c.isEnabled()&&c.isSelected&&!c.isSelected()&&a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getValue())):void(c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue()))}),a},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getSelectedButtons())):void(c.isSelected&&c.isSelected()&&a.push(c))}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getNotSelectedButtons())):void(c.isSelected&&!c.isSelected()&&a.push(c))}),a},getAllLeaves:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getAllLeaves())):void(c.isEnabled()&&a.push(c))}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){var e=d.getValue();if(d.isEnabled()&&(e===a||BI.contains(e,a)))return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()){if(d.attr("id")===a)return b=d,!0;if(BI.isFunction(d.getNodeById)&&(b=d.getNodeById(a)))return!0}}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled())if(BI.isFunction(d.getNodeByValue)){if(b=d.getNodeByValue(a))return!0}else if(d.attr("value")===a)return b=d,!0}),b}}),BI.ButtonTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_tree",BI.ButtonTree),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 a=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(a.value)&&this.setSelectedValue(a.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:"
            "}),BI.createWidget({type:"bi.default",element:this.element,items:[this.tree]})},_selectTreeNode:function(a,b){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,b,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,b,this)},_configSetting:function(){function a(a,b,c){var d=c.checked,e=c.getCheckStatus();e.half===!0&&e.checked===!0&&(d=!1),l.nodes.checkNode(c,!d,!0,!0)}function b(a,b){var c=l._getParentValues(b);b.times=b.times||1;var d="id="+b.id+"×="+b.times++ +"&parentValues= "+_global.encodeURIComponent(BI.jsonEncode(c))+"&checkState="+_global.encodeURIComponent(BI.jsonEncode(b.getCheckStatus()));return"&"+d}function c(a,b){return b.isAjaxing?(BI.Msg.toast("Please Wait。","warning"),!1):(b.children||(b.times=1,f(b,"refresh")),!0)}function d(a,b,c,d){if(c.halfCheck=!1,d&&0!==d.length&&!/^[\s,\S]*<\/html>$/gi.test(d)&&!l._stop){var e=l.nodes,g=c.count||0;c.children.length>g?(c.count=c.children.length,BI.delay(function(){f(c)},n)):(e.updateNode(c),e.selectNode(c.children[0]))}}function e(a,b,c,d,e,f){l.nodes;BI.Msg.toast("Error!","warning")}function f(a,b){var c=l.nodes;"refresh"==b&&c.updateNode(a),c.reAsyncChildNodes(a,b,!0)}function g(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=l.nodes,e=d.getSelectedNodes();$.each(e,function(a,b){b.halfCheck=!1})}var f=b.getCheckStatus();f.half===!0&&f.checked===!0&&(b.checked=!1)}function h(a,b,c){l._selectTreeNode(b,c)}function i(a,b,c){c.halfCheck=!1}function j(a,b,c){}var k=this.options.paras,l=this,m={async:{enable:!0,url:b,autoParam:["id","name"],otherParam:BI.cjkEncodeDO(k)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:c,onAsyncSuccess:d,onAsyncError:e,beforeCheck:g,onCheck:h,onExpand:i,onCollapse:j,onClick:a}},n=100;return m},_getParentValues:function(a){if(!a.getParentNode())return[];var b=a.getParentNode(),c=this._getParentValues(b);return c=c.concat([this._getNodeValue(b)])},_getNodeValue:function(a){return null==a.value?BI.replaceAll(a.text.replace(/<[^>]+>/g,"")," "," "):a.value},_getHalfSelectedValues:function(a,b){var c=this,d=b.getCheckStatus();if(d.checked!==!1||d.half!==!1){if(BI.isNotEmptyArray(b.children)&&d.half===!0){var e=b.children;return void BI.each(e,function(b,d){c._getHalfSelectedValues(a,d)})}var f=b.parentValues||c._getParentValues(b),g=f.concat(this._getNodeValue(b));if(BI.isNotEmptyArray(b.children)||d.half===!1)return void this._buildTree(a,g);var h=BI.deepClone(this.options.paras.selectedValues),i=this._getTree(h,g);this._addTreeNode(a,f,this._getNodeValue(b),i)}},_getTree:function(a,b){var c=a;return BI.any(b,function(a,b){return null==c[b]||void(c=c[b])}),c},_addTreeNode:function(a,b,c,d){var e=a;BI.each(b,function(a,b){null==e[b]&&(e[b]={}),e=e[b]}),e[c]=d},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){null==c[b]&&(c[b]={}),c=c[b]})},_getSelectedValues:function(){function a(a){BI.each(a,function(a,d){var e=d.getCheckStatus();if(e.checked===!0||e.half===!0)if(e.half===!0)b._getHalfSelectedValues(c,d);else{var f=d.parentValues||b._getParentValues(d),g=f.concat([b._getNodeValue(d)]);b._buildTree(c,g)}})}var b=this,c={},d=this.nodes.getNodes();return a(d),c},_dealWidthNodes:function(a){var b=this.options,c=BI.Tree.arrayFormat(a);return BI.each(c,function(a,c){c.title=c.title||c.text||c.value,c.isParent=c.isParent||c.parent,BI.isKey(b.paras.keyword)?c.text=$("
            ").__textKeywordMarked__(c.text,b.paras.keyword,c.py).html():c.text=BI.htmlEncode(c.text+"")}),a},_loadMore:function(){var a=this,b=this.options;this.tip.setLoading();var c=BI.extend({},b.paras,{times:++this.times});b.itemsCreator(c,function(b){if(a._stop!==!0){var c=!!b.hasNext,d=b.items||[];c?a.tip.setLoaded():a.tip.setEnd(),d.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(d))}})},_initTree:function(a){var b=this,c=this.options;b.fireEvent(BI.Events.INIT),this.times=1;var d=this.tree;d.empty(),this.loading(),this.tip.setVisible(!1);var e=function(c){b._stop!==!0&&(b.nodes=$.fn.zTree.init(d.element,a,c))},f=BI.extend({},c.paras,{times:1});c.itemsCreator(f,function(a){if(b._stop!==!0){var c=!!a.hasNext,d=a.items||[];d.length>0&&e(b._dealWidthNodes(d)),b.setTipVisible(d.length<=0),b.loaded(),c?b.tip.setLoaded():b.tip.invisible(),1===f.times&&b.fireEvent(BI.Events.AFTERINIT)}})},initTree:function(a,b){var b=b||{async:{enable:!1},check:{enable:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=$.fn.zTree.init(this.tree.element,b,a)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._createTree(),this.start(),this._initTree(b)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){var a=this.nodes;return a.getCheckedNodes(!0).length>0},checkAll:function(a){function b(a){BI.each(a,function(a,c){c.halfCheck=!1,b(c.children)})}this.nodes&&(BI.each(this.nodes.getNodes(),function(a,c){c.halfCheck=!1,b(c.children)}),this.nodes.checkAllNodes(a))},expandAll:function(a){this.nodes&&this.nodes.expandAll(a)},setValue:function(a,b){this.checkAll(!1),this.updateValue(a,b),this.refresh()},setSelectedValue:function(a){this.options.paras.selectedValues=BI.deepClone(a||{})},updateValue:function(a,b){if(this.nodes){b||(b="value");var c=this.nodes;BI.each(a,function(a,d){var e=c.getNodesByParam(b,a,null);BI.each(e,function(a,b){BI.extend(b,{checked:!0},d),c.updateNode(b)})})}},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),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)},_configSetting:function(){function a(a,b,c){var d=$.fn.zTree.getZTreeObj(b),e=c.checked,f=c.getCheckStatus();f.half===!0&&f.checked===!0&&(e=!1),d.checkNode(c,!e,!0,!0)}function b(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=$.fn.zTree.getZTreeObj(a),e=d.getSelectedNodes();BI.each(e,function(a,b){b.halfCheck=!1})}var f=b.getCheckStatus();f.half===!0&&f.checked===!0&&(b.checked=!1)}function c(a,b){h._beforeExpandNode(a,b)}function d(a,b,c){h._selectTreeNode(b,c)}function e(a,b,c){c.halfCheck=!1}function f(a,b,c){c.halfCheck=!1}var g=this.options.paras,h=this,i={async:{enable:!1,otherParam:BI.cjkEncodeDO(g)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeCheck:b,onCheck:d,beforeExpand:c,onExpand:e,onCollapse:f,onClick:a}};return i},_selectTreeNode:function(a,b){var c=this,d=(this.options,BI.deepClone(b.parentValues||c._getParentValues(b))),e=this._getNodeValue(b);if(b.checked===!0);else{var f=b,g=this._getTree(this.options.paras.selectedValues,d);for(BI.isNotNull(g[e])&&delete g[e];null!=f&&BI.isEmpty(g);)d=d.slice(0,d.length-1),f=f.getParentNode(),null!=f&&(g=this._getTree(this.options.paras.selectedValues,d),e=this._getNodeValue(f),delete g[e])}BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b)),checkState:b.getCheckStatus()}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||setTimeout(function(){e.itemsCreator(g,h)},17)},_join:function(a,b){function c(a,b,f){BI.each(b,function(g,h){BI.isNull(f[g])?d._addTreeNode(e,a,g,h):BI.isEmpty(f[g])?d._addTreeNode(e,a,g,{}):c(a.concat([g]),b[g],f[g])})}var d=this,e={};return c([],a,b),c([],b,a),e},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.AsyncTree.superclass.hasChecked.apply(this,arguments)},_getJoinValue:function(){if(!this.nodes)return{};var a=this._getSelectedValues();return BI.isEmpty(a)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?a:this._join(a,this.options.paras.selectedValues)},getValue:function(){return this._getJoinValue()},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.async_tree",BI.AsyncTree),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 a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_selectTreeNode:function(a,b){var c=this,d=this.options,e=BI.deepClone(b.parentValues||c._getParentValues(b)),f=this._getNodeValue(b);if(b.checked===!0)this.options.paras.selectedValues=this._getJoinValue(),d.itemsCreator(BI.extend({},d.paras,{type:BI.TreeView.REQ_TYPE_ADJUST_DATA,curSelectedValue:f,parentValues:e}),function(a){c.options.paras.selectedValues=a,BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)});else{for(var g=this.options.paras.selectedValues,h=e.concat(f),i=0,j=h.length;i0?d._dealWidthNodes(g):[]),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},getValue:function(){return BI.deepClone(this.options.paras.selectedValues||{})},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.part_tree",BI.PartTree),BI.ListTreeView=BI.inherit(BI.TreeView,{_constants:{SPLIT:"<|>"},_defaultConfig:function(){return BI.extend(BI.ListTreeView.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ListTreeView.superclass._init.apply(this,arguments);var a=this.options;this.storeValue=a.value||{}},_configSetting:function(){function a(a,b,d){var e=$.fn.zTree.getZTreeObj(b),f=d.checked;c._checkValue(d,!f),e.checkNode(d,!f,!0,!0)}function b(a,b,d){c._selectTreeNode(b,d)}var c=(this.options.paras,this),d={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:b,onClick:a}};return d},_selectTreeNode:function(a,b){this._checkValue(b,b.checked),BI.ListTreeView.superclass._selectTreeNode.apply(this,arguments)},_transArrayToMap:function(a){var b=this,c={};return BI.each(a,function(a,d){var e=d.join(b._constants.SPLIT);c[e]=!0}),c},_transMapToArray:function(a){var b=this,c=[];return BI.each(a,function(a){var d=a.split(b._constants.SPLIT);c.push(d)}),c},_checkValue:function(a,b){var c=BI.concat(this._getParentValues(a),this._getNodeValue(a)).join(this._constants.SPLIT);b?this.storeValue[c]=!0:delete this.storeValue[c]},setSelectedValue:function(a){this.options.paras.selectedValues=a||[],this.storeValue=this._transArrayToMap(a)},getValue:function(){return this._transMapToArray(this.storeValue)}}),BI.shortcut("bi.list_tree_view",BI.ListTreeView),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(){function a(a,b){b.half=!1}function b(a,b,c){var d=$.fn.zTree.getZTreeObj(b),e=c.checked;f._checkValue(c,!e),d.checkNode(c,!e,!0,!0)}function c(a,b){f._beforeExpandNode(a,b)}function d(a,b,c){f._selectTreeNode(b,c)}var e=this.options.paras,f=this,g={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:d,beforeExpand:c,beforeCheck:a,onClick:b}};return g},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b))}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||setTimeout(function(){e.itemsCreator(g,h)},17)},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.ListAsyncTree.superclass.hasChecked.apply(this,arguments)},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.list_async_tree",BI.ListAsyncTree),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 a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_initTree:function(a,b){function c(b){d._stop!==!0&&(d.nodes=$.fn.zTree.init(f.element,a,b))}var d=this,e=this.options;this.times=1;var f=this.tree;f.empty(),d.tip.setVisible(!1),this.loading();var g=BI.extend({},e.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:this.times}),h=function(a){if(d._stop!==!0&&b==e.paras.keyword){var f=!!a.hasNext,g=a.items||[];e.paras.lastSearchValue=a.lastSearchValue,c(g.length>0?d._dealWidthNodes(g):[]),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.list_part_tree",BI.ListPartTree),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}),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 a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.CollectionView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&(this._calculateSizeAndPositionData(),this._populate())},mounted:function(){var a=this.options;0===a.scrollLeft&&0===a.scrollTop||(this.element.scrollTop(a.scrollTop),this.element.scrollLeft(a.scrollLeft))},_calculateSizeAndPositionData:function(){for(var a=this.options,b=[],c=new BI.SectionManager,d=0,e=0,f=0,g=a.items.length;f0&&h>0){if(f>=this.renderRange.minY&&h<=this.renderRange.maxY&&e>=this.renderRange.minX&&g<=this.renderRange.maxX)return;for(var i=this._cellRenderers(h-f,g-e,e,f),j=[],k={},l={},m={},n={},o=0,p=i.length;o=0?(q.width!==this.renderedCells[A]._width&&(this.renderedCells[A]._width=q.width,this.renderedCells[A].el.setWidth(q.width)),q.height!==this.renderedCells[A]._height&&(this.renderedCells[A]._height=q.height,this.renderedCells[A].el.setHeight(q.height)),this.renderedCells[A]._left!==q.x&&this.renderedCells[A].el.element.css("left",q.x+"px"), this.renderedCells[A]._top!==q.y&&this.renderedCells[A].el.element.css("top",q.y+"px"),j.push(z=this.renderedCells[A])):(z=BI.createWidget(BI.extend({type:"bi.label",width:q.width,height:q.height},b.items[q.index],{cls:(b.items[q.index].cls||"")+" container-cell"+(0===q.y?" first-row":"")+(0===q.x?" first-col":""),_left:q.x,_top:q.y})),j.push({el:z,left:q.x,top:q.y,_left:q.x,_top:q.y,_width:q.width,_height:q.height}));for(var B=0|s[q.y],C=0|s[q.y+q.height],D=B;D<=C;D++){var E=n[D];x(t,E),y(u,E),t[E]=Math.min(t[E],q.x),u[E]=Math.max(u[E],q.x+q.width)}for(var F=0|r[q.x],G=0|r[q.x+q.width],D=F;D<=G;D++){var H=m[D];x(v,H),y(w,H),v[H]=Math.min(v[H],q.y),w[H]=Math.max(w[H],q.y+q.height)}k[q.index]=[q.index,o],l[o]=z}var I={},J={},K=[];BI.each(k,function(b,c){a.renderedKeys[b]?I[b]=c:J[b]=c}),BI.each(this.renderedKeys,function(a,b){I[a]||J[a]||K.push(b[1])}),BI.each(K,function(b,c){a.renderedCells[c].el._destroy()});var L=[];BI.each(J,function(a,b){L.push(j[b[1]])}),this.container.addItems(L),this.container._children=l,this.container.attr("items",j),this.renderedCells=j,this.renderedKeys=k;var M=BI.min(t),N=BI.max(u),O=BI.max(v),P=BI.min(w);this.renderRange={minX:M,minY:O,maxX:N,maxY:P}}},_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(a){var b=this.options;if(this._reRange(),a&&a!==this.options.items&&(this.options.items=a,this._calculateSizeAndPositionData()),b.items.length>0){this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender();try{this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)}catch(c){}}},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"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(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.CollectionView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.collection_view",BI.CollectionView),BI.Combo=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Combo.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Combo.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,d))}),a.element.on("mouseenter."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.addClass(b.hoverClass)}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(b.logic,{items:[{el:this.combo}]})))),b.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(){function a(){b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&c.toggle===!0&&(b._hideView(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",b.combo),b.fireEvent(BI.Combo.EVENT_COLLAPSE)),b.popupView&&b.popupView.element.off("mouseenter."+b.getName()).off("mouseleave."+b.getName()),f=!1}var b=this,c=this.options,d=(this.options.trigger||"").split(","),e=function(a){c.stopEvent&&a.stopEvent(),c.stopPropagation&&a.stopPropagation()},f=!1;BI.each(d,function(d,g){switch(g){case"hover":b.element.on("mouseenter."+b.getName(),function(a){b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(b._popupView(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND))}),b.element.on("mouseleave."+b.getName(),function(c){b.popupView&&(b.popupView.element.on("mouseenter."+b.getName(),function(c){f=!0,b.popupView.element.on("mouseleave."+b.getName(),function(b){a()}),b.popupView.element.off("mouseenter."+b.getName())}),BI.defer(function(){f||a()},50))});break;case"click":var h=BI.debounce(function(a){b.combo.element.__isMouseInBounds__(a)&&b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(c.toggle?b._toggle():b._popupView(),b.isViewVisible()?(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND)):(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",b.combo),b.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});b.element.off(g+"."+b.getName()).on(g+"."+b.getName(),function(a){h(a),e(a)});break;case"click-hover":var h=BI.debounce(function(a){b.combo.element.__isMouseInBounds__(a)&&b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(b._popupView(),b.isViewVisible()&&(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});b.element.off("click."+b.getName()).on("click."+b.getName(),function(a){h(a),e(a)}),b.element.on("mouseleave."+b.getName(),function(c){b.popupView&&(b.popupView.element.on("mouseenter."+b.getName(),function(c){f=!0,b.popupView.element.on("mouseleave."+b.getName(),function(b){a()}),b.popupView.element.off("mouseenter."+b.getName())}),BI.defer(function(){f||a()},50))})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var a=this,b=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view",value:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a.combo.setValue(a.getValue()),a.fireEvent(BI.Combo.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){a.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(a){if(this.element.find(a.target).length>0||this.popupView&&this.popupView.element.find(a.target).length>0||"CodeMirror-cursor"===a.target.className||BI.Widget._renderEngine.createElement(a.target).closest(".CodeMirror-hints").length>0){var b=this.options.direction.split(",");return void((BI.contains(b,"innerLeft")||BI.contains(b,"innerRight"))&&(this.adjustWidth(),this.adjustHeight()))}var c=this.options.hideChecker.apply(this,[a]);c!==!1&&this._hideView()},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),this.options.destroyWhenHide===!0?(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(a){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(a),this.adjustHeight(a),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(a){var b=this.options;if(this.popupView&&b.isNeedAdjustWidth===!0){this.resetListWidth("");var c=this.popupView.element.outerWidth(),d=this.element.outerWidth()||b.width;c>d+80?d+=80:c>d&&(d=c),this.resetListWidth(d<100?100:d)}},adjustHeight:function(a){var b=this.options,c={};if(this.popupView){var d=this.popupView.isVisible();this.popupView.visible();var e=BI.isNotNull(a)?{element:{offset:function(){return{left:a.pageX,top:a.pageY}},bounds:function(){return{x:a.offsetX,y:a.offsetY,width:0,height:24}},outerWidth:function(){return 0},outerHeight:function(){return 24}}}:this.combo;switch(b.direction){case"bottom":case"bottom,right":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["bottom","top","right","left"],b.offsetStyle);break;case"top":case"top,right":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["top","bottom","right","left"],b.offsetStyle);break;case"left":case"left,bottom":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["left","right","bottom","top"],b.offsetStyle);break;case"right":case"right,bottom":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","bottom","top"],b.offsetStyle);break;case"top,left":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["top","bottom","left","right"],b.offsetStyle);break;case"bottom,left":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["bottom","top","left","right"],b.offsetStyle);break;case"left,top":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["left","right","top","bottom"],b.offsetStyle);break;case"right,top":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","top","bottom"],b.offsetStyle);break;case"right,innerRight":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","innerRight","innerLeft","bottom","top"],b.offsetStyle);break;case"right,innerLeft":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","innerLeft","innerRight","bottom","top"],b.offsetStyle);break;case"innerRight":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["innerRight","innerLeft","right","left","bottom","top"],b.offsetStyle);break;case"innerLeft":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["innerLeft","innerRight","left","right","bottom","top"],b.offsetStyle);break;case"top,custom":case"custom,top":c=BI.DOM.getTopAdaptPosition(e,this.popupView,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":c=BI.DOM.getBottomAdaptPosition(e,this.popupView,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight);break;case"left,custom":case"custom,left":c=BI.DOM.getLeftAdaptPosition(e,this.popupView,b.adjustXOffset||b.adjustLength),delete c.top,delete c.adaptHeight;break;case"custom,right":case"right,custom":c=BI.DOM.getRightAdaptPosition(e,this.popupView,b.adjustXOffset||b.adjustLength),delete c.top,delete c.adaptHeight}"adaptHeight"in c&&this.resetListHeight(c.adaptHeight),"left"in c&&this.popupView.element.css({left:c.left}),"top"in c&&this.popupView.element.css({top:c.top}),this.position=c,this.popupView.setVisible(d)}},resetListHeight:function(a){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(a)},resetListWidth:function(a){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(a)},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate.apply(this.combo,arguments)},_setEnable:function(a){BI.Combo.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.combo.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},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(a){this.isEnabled()&&this.combo.isEnabled()&&!this.isViewVisible()&&this._popupView(a)},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())}}),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),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 a=this,b=this.options;this._expanded=!!b.el.open,this._initExpander(),this._initPullDownAction(),this.expander.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Expander.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Expander.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.expander}]}),b.isDefaultInit&&this._assertPopupView(),this.expander.isOpened()===!0&&this._popupView()},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND))},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE))});break;case"click":d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.expander.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.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 a=this,b=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:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_CHANGE,c,d)}),this.popupView.setVisible(this.isExpanded()),BI.nextTick(function(){a.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(a){this.popupView&&this.popupView.populate.apply(this.popupView,arguments),this.expander.populate.apply(this.expander,arguments)},_setEnable:function(a){BI.Expander.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.expander.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},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(a){return this.expander.options.id===a?this.expander:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.expander.getValue()===a?this.expander:this.popupView&&this.popupView.getNodeByValue(a)},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),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(a){var b=this,c=this.options,d=c.children;if(BI.isEmpty(d))throw new Error("ComboGroup构造错误");BI.each(d,function(a,b){var d=BI.formatEL(b).el.children;b=BI.formatEL(b).el,BI.isEmpty(d)||(b.el=BI.clone(b),b.children=d,b.type="bi.combo_group",b.action=c.action,b.height=c.height,b.direction=c.direction,b.isDefaultInit=c.isDefaultInit,b.isNeedAdjustHeight=c.isNeedAdjustHeight,b.isNeedAdjustWidth=c.isNeedAdjustWidth,b.adjustLength=c.adjustLength,b.popup=c.popup)}),this.combo=BI.createWidget({type:"bi.combo",element:this,container:c.container,height:c.height,trigger:c.trigger,direction:c.direction,isDefaultInit:c.isDefaultInit,isNeedAdjustWidth:c.isNeedAdjustWidth,isNeedAdjustHeight:c.isNeedAdjustHeight,adjustLength:c.adjustLength,el:a,popup:BI.extend({},c.popup,{el:BI.extend({items:d},c.popup.el)})}),this.combo.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.ComboGroup.EVENT_CHANGE,d)})},getValue:function(){return this.combo.getValue()},setValue:function(a){this.combo.setValue(a)}}),BI.ComboGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.combo_group",BI.ComboGroup),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 a=this.options;this.populate(a.items),BI.isKey(a.value)&&this.setValue(a.value)},_packageBtns:function(a){for(var b=this.options,c=this.buttonMap={},d=b.layouts.length-1;d>0;d--)a=BI.map(a,function(a,e){var f=BI.stripEL(e);return BI.extend({},b.layouts[d],{items:[BI.extend({},b.layouts[d].el,{el:BI.extend({ref:function(a){BI.isKey(c[f.value])&&(c[f.value]=a)}},f)})]})});return a},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},addItems:function(a){this.layouts.addItems(a)},prependItems:function(a){this.layouts.prependItems(a)},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttonMap,function(b,c){c&&(a.deepContains(b)?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1))})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttonMap,function(b,c){c&&(!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttonMap,function(b,c){c&&c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},populate:function(a){a=a||[],this.options.items=a,a=this._packageBtns(a),this.layouts?this.layouts.populate(a):this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))}}),BI.VirtualGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.virtual_group",BI.VirtualGroup),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 a=this,b=this.options;this.prev.setLoading(),b.itemsCreator.apply(this,[{times:--this.times},function(){a.prev.setLoaded(),a.prependItems.apply(a,arguments)}])},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.Loader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.prev=!1,b.next=!1),b.prev!==!1&&(this.prev=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.prev)),this.prev.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._prevLoad()})),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}],value:b.value}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Loader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.prev,this.button_group,this.next)})))),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){b.isDefaultInit&&BI.isEmpty(b.items)&&this._populate()},this)),BI.isNotEmptyArray(b.items)&&this._populate(b.items)},hasPrev:function(){var a=this.options;return BI.isNumber(a.count)?this.count0&&f.push(c),BI.Maskers.show(a.getName()),a.popupView.populate.apply(a.popupView,f),b.isAutoSync&&b.adapter&&b.adapter.getValue&&a.popupView.setValue(b.adapter.getValue()),a.popupView.loaded&&a.popupView.loaded(),a.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(a){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(a){BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},getKeyword:function(){return this.editor.getValue()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var a=this.options;return a.isAutoSync&&a.adapter&&a.adapter.getValue?a.adapter.getValue():this.isSearching()?this.popupView.getValue():a.adapter&&a.adapter.getValue?a.adapter.getValue():BI.isNull(this.popupView)?a.popup.value:this.popupView.getValue()},populate:function(a,b,c){var d=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),d.isAutoSync&&d.adapter&&d.adapter.getValue&&this.popupView.setValue(d.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),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 a=this,b=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Switcher.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Switcher.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),b.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.switcher.isEnabled()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND))},function(){a.isEnabled()&&a.switcher.isEnabled()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.switcher.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.switcher.isEnabled()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.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 a=this,b=this.options;this._created||(this.popupView=BI.createWidget(b.popup,{type:"bi.button_group",element:b.adapter&&BI.Maskers.create(this.getName(),b.adapter,BI.extend({container:this},b.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_CHANGE,c,d)}),b.direction===BI.Direction.Custom||b.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){a.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var a=this,b=this.options;b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),BI.nextTick(function(){b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),a.element.removeClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var a=this,b=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),b.adapter?BI.Maskers.show(this.getName()):a.popupView.setVisible(!0),BI.nextTick(function(c){b.adapter?BI.Maskers.show(c):a.popupView.setVisible(!0),a.element.addClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(a){BI.Switcher.superclass._setEnable.apply(this,arguments),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.switcher.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},setAdapter:function(a){this.options.adapter=a,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(a){return this.switcher.attr("id")===a?this.switcher:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.switcher.getValue()===a?this.switcher:this.popupView&&this.popupView.getNodeByValue(a)},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Switcher.superclass.destroy.apply(this,arguments)}}),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),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(a){return BI.createWidget()}})},render:function(){var a=this,b=this.options;BI.isObject(b.tab)&&(this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.tab.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.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(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tab,this.layout)}))));var c=new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardCreator:function(c){var d=b.cardCreator.apply(a,arguments);return a.cardMap[c]=d,d},afterCardShow:function(b){a._deleteOtherCards(b),a.curr=b}});c.on(BI.ShowListener.EVENT_CHANGE,function(b){a.fireEvent(BI.Tab.EVENT_CHANGE,b,a)})},_deleteOtherCards:function(a){var b=this,c=this.options;c.single===!0&&BI.each(this.cardMap,function(c,d){c!==a+""&&(b.layout.deleteCardByName(c),delete b.cardMap[c])})},_assertCard:function(a){if(!this.layout.isCardExisted(a)){var b=this.options.cardCreator(a);this.cardMap[a]=b,this.layout.addCardByName(a,b)}},mounted:function(){var a=this.options;a.showIndex!==!1&&this.setSelect(a.showIndex)},setSelect:function(a){this.tab&&this.tab.setValue(a),this._assertCard(a),this.layout.showCardByName(a),this._deleteOtherCards(a),this.curr!==a&&(this.curr=a)},removeTab:function(a){var b=this;this.options;BI.any(this.cardMap,function(c,d){if(BI.isEqual(c,a+""))return b.layout.deleteCardByName(c),delete b.cardMap[c],!0})},getSelect:function(){return this.curr},getSelectedTab:function(){return this.layout.getShowingCard()},getTab:function(a){return this._assertCard(a),this.layout.getCardByName(a)},setValue:function(a){var b=this.layout.getShowingCard();b&&b.setValue(a)},getValue:function(){var a=this.layout.getShowingCard();if(a)return a.getValue()},populate:function(){var a=this.layout.getShowingCard();if(a)return a.populate&&a.populate.apply(a,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),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 a=this,b=this.options;this.ele=BI.createWidget(b.el),BI.createWidget(b.layout,{type:"bi.adaptive",element:this,items:[this.ele]}),this.ele.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.ele.setValue(a)},getValue:function(){return this.ele.getValue()},populate:function(){this.ele.populate.apply(this,arguments)}}),BI.shortcut("bi.el",BI.EL),BI.Msg=function(){var a,b,c,d=[];return{alert:function(a,b,c){this._show(!1,a,b,c)},confirm:function(a,b,c){this._show(!0,a,b,c)},prompt:function(a,b,c,d,e){},toast:function(a,b,c){b=b||{},c=c||BI.Widget._renderEngine.createElement("body");var e=b.level||"normal",f=!!BI.isNull(b.autoClose)||b.autoClose,g=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:e,autoClose:f,text:a,listeners:[{eventName:BI.Toast.EVENT_DESTORY,action:function(){BI.remove(d,g.element);var a=10;BI.each(d,function(b,c){c.css({top:a}),a+=c.outerHeight()+10})}}]}),h=10;BI.each(d,function(a,b){h+=b.outerHeight()+10}),BI.createWidget({type:"bi.absolute",element:c,items:[{el:g,left:"50%",top:h}]}),d.push(g.element),g.element.css({"margin-left":-1*g.element.outerWidth()/2}),g.element.removeClass("bi-message-leave").addClass("bi-message-enter"),f&&BI.delay(function(){g.element.removeClass("bi-message-enter").addClass("bi-message-leave"),g.destroy()},5e3)},_show:function(d,e,f,g){b=BI.Widget._renderEngine.createElement('
            ').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=BI.Widget._renderEngine.createElement('
            ').css({position:"absolute",zIndex:BI.zIndex_tip-1,top:0,left:0,right:0,bottom:0}).appendTo("body");var h=function(){a.destroy(),b.remove()},i=[];d===!0&&i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_Cancel"),level:"ignore",handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!1])}}}),i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_OK"),handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!0])}}});var j={element:c,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:e||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(){h(),BI.isFunction(g)&&g.apply(null,[!1])}},width:60}}},height:40},center:{el:{type:"bi.label",vgap:10,hgap:20,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",lgap:10,items:i},top:0,left:20,right:20,bottom:0}]},height:44}},width:450,height:200}]};a=BI.createWidget(j)}}}(),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 a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.GridView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&this._populate()},mounted:function(){var a=this.options;0===a.scrollLeft&&0===a.scrollTop||(this.element.scrollTop(a.scrollTop),this.element.scrollLeft(a.scrollLeft))},_getOverscanIndices:function(a,b,c,d){return{overscanStartIndex:Math.max(0,c-b),overscanStopIndex:Math.min(a-1,d+b)}},_calculateChildrenToRender:function(){var a=this,b=this.options,c=b.width,d=b.height,e=BI.clamp(b.scrollLeft,0,this._getMaxScrollLeft()),f=BI.clamp(b.scrollTop,0,this._getMaxScrollTop()),g=b.overscanColumnCount,h=b.overscanRowCount;if(d>0&&c>0){var i=this._columnSizeAndPositionManager.getVisibleCellRange(c,e),j=this._rowSizeAndPositionManager.getVisibleCellRange(d,f);if(BI.isEmpty(i)||BI.isEmpty(j))return;var k=this._columnSizeAndPositionManager.getOffsetAdjustment(c,e),l=this._rowSizeAndPositionManager.getOffsetAdjustment(d,f);this._renderedColumnStartIndex=i.start,this._renderedColumnStopIndex=i.stop,this._renderedRowStartIndex=j.start,this._renderedRowStopIndex=j.stop;var m=this._getOverscanIndices(this.columnCount,g,this._renderedColumnStartIndex,this._renderedColumnStopIndex),n=this._getOverscanIndices(this.rowCount,h,this._renderedRowStartIndex,this._renderedRowStopIndex),o=m.overscanStartIndex,p=m.overscanStopIndex,q=n.overscanStartIndex,r=n.overscanStopIndex,s=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(q),t=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(o),u=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(r),v=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(p),w=s.offset+l,x=t.offset+k,y=u.offset+l+u.size,z=v.offset+k+v.size;if(w>=this.renderRange.minY&&y<=this.renderRange.maxY&&x>=this.renderRange.minX&&z<=this.renderRange.maxX)return;for(var A=[],B={},C={},D=this._getMaxScrollLeft(),E=this._getMaxScrollTop(),F=0,G=0,H=0,I=q;I<=r;I++)for(var J=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(I),K=o;K<=p;K++){var L,M=I+"-"+K,N=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(K),O=this.renderedKeys[M]&&this.renderedKeys[M][2];O>=0?(N.size!==this.renderedCells[O]._width&&(this.renderedCells[O]._width=N.size,this.renderedCells[O].el.setWidth(N.size)),J.size!==this.renderedCells[O]._height&&(this.renderedCells[O]._height=J.size,this.renderedCells[O].el.setHeight(J.size)),this.renderedCells[O]._left!==N.offset+k&&this.renderedCells[O].el.element.css("left",N.offset+k+"px"),this.renderedCells[O]._top!==J.offset+l&&this.renderedCells[O].el.element.css("top",J.offset+l+"px"),A.push(L=this.renderedCells[O])):(L=BI.createWidget(BI.extend({type:"bi.label",width:N.size,height:J.size},b.items[I][K],{cls:(b.items[I][K].cls||"")+" grid-cell"+(0===I?" first-row":"")+(0===K?" first-col":""),_rowIndex:I,_columnIndex:K,_left:N.offset+k,_top:J.offset+l}),this),A.push({el:L,left:N.offset+k,top:J.offset+l,_left:N.offset+k,_top:J.offset+l,_width:N.size,_height:J.size})),D=Math.min(D,N.offset+k),F=Math.max(F,N.offset+k+N.size),E=Math.min(E,J.offset+l),G=Math.max(G,J.offset+l+J.size),B[M]=[I,K,H],C[H]=L,H++}var P={},Q={},R=[];BI.each(B,function(b,c){a.renderedKeys[b]?P[b]=c:Q[b]=c}),BI.each(this.renderedKeys,function(a,b){P[a]||Q[a]||R.push(b[2])}),BI.each(R,function(b,c){a.renderedCells[c].el._destroy()});var S=[];BI.each(Q,function(a,b){S.push(A[b[2]])}),this.container.addItems(S,this),this.container._children=C,this.container.attr("items",A),this.renderedCells=A,this.renderedKeys=B,this.renderRange={minX:D,minY:E,maxX:F,maxY:G}}},_getRealMaxScrollLeft:function(){var a=this.options,b=0;return BI.count(0,this.columnCount,function(c){b+=a.columnWidthGetter(c)}),Math.max(0,b-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(a){var b=this.options;this._reRange(),this.columnCount=0,this.rowCount=0,a&&a!==this.options.items&&(this.options.items=a),BI.isNumber(b.columnCount)?this.columnCount=b.columnCount:b.items.length>0&&(this.columnCount=b.items[0].length),BI.isNumber(b.rowCount)?this.rowCount=b.rowCount:this.rowCount=b.items.length,this.container.setWidth(this.columnCount*b.estimatedColumnSize),this.container.setHeight(this.rowCount*b.estimatedRowSize),this._columnSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.columnCount,b.columnWidthGetter,b.estimatedColumnSize),this._rowSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.rowCount,b.rowHeightGetter,b.estimatedRowSize),this._calculateChildrenToRender();try{this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)}catch(c){}},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getRealMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setColumnCount:function(a){this.options.columnCount=a},setRowCount:function(a){this.options.rowCount=a},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"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(a){this.options.estimatedColumnSize=a},setEstimatedRowSize:function(a){this.options.estimatedRowSize=a},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.GridView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_view",BI.GridView),BI.Popover=BI.inherit(BI.Widget,{_constant:{SIZE:{SMALL:"small",NORMAL:"normal",BIG:"big"},HEADER_HEIGHT:40},_defaultConfig:function(){return BI.extend(BI.Popover.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-popover bi-card",size:"normal",logic:{dynamic:!1},header:null,body:null,footer:null,closable:!0})},render:function(){var a=this,b=this.options;this.startX=0,this.startY=0,this.tracker=new BI.MouseMoveTracker(function(b,c){var d=(a._calculateSize(),BI.Widget._renderEngine.createElement("body").width()),e=BI.Widget._renderEngine.createElement("body").height();a.startX+=b,a.startY+=c,a.element.css({left:BI.clamp(a.startX,0,d-a.element.width())+"px",top:BI.clamp(a.startY,0,e-a.element.height())+"px"}),BI.Resizers._resize()},function(){a.tracker.releaseMouseMoves()},_global);var c=[{el:{type:"bi.htape",cls:"bi-message-title bi-header-background",ref:function(b){a.dragger=b},items:[{type:"bi.absolute",items:[{el:BI.isPlainObject(b.header)?BI.createWidget(b.header,{extraCls:"bi-font-bold"}):{type:"bi.label",cls:"bi-font-bold",height:this._constant.HEADER_HEIGHT,text:b.header,textAlign:"left"},left:20,top:0,right:0,bottom:0}]},{el:b.closable?{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){a.close()}}:{type:"bi.layout"},width:56}],height:this._constant.HEADER_HEIGHT},height:this._constant.HEADER_HEIGHT},{el:b.logic.dynamic?{type:"bi.vertical",scrolly:!1,cls:"popover-body",ref:function(){a.body=this},hgap:20,tgap:10,items:[{el:BI.createWidget(b.body)}]}:{type:"bi.absolute",items:[{el:BI.createWidget(b.body),left:20,top:10,right:20,bottom:0}]}}];b.footer&&c.push({el:{type:"bi.absolute",items:[{el:BI.createWidget(b.footer),left:20,top:0,right:20,bottom:0}],height:44},height:44});var d=this._calculateSize();return BI.extend({type:b.logic.dynamic?"bi.vertical":"bi.vtape",items:c,width:d.width},b.logic.dynamic?{type:"bi.vertical",scrolly:!1}:{type:"bi.vtape",height:d.height})},mounted:function(){var a=this,b=this.options;if(this.dragger.element.mousedown(function(b){var c=a.element.offset();a.startX=c.left,a.startY=c.top,a.tracker.captureMouseMoves(b)}),b.logic.dynamic){var c=this._calculateSize(),d=this.element.height(),e=BI.clamp(d,c.height,600)-(b.footer?84:44);this.body.element.height(e)}},_calculateSize:function(){var a=this.options,b={};if(BI.isNotNull(a.size))switch(a.size){case this._constant.SIZE.SMALL:b.width=450,b.height=200;break;case this._constant.SIZE.BIG:b.width=900,b.height=500;break;default:b.width=550,b.height=500}return{width:a.width||b.width,height:a.height||b.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(a){this.element.css({"z-index":a})},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.i18nText("BI-Basic_Sure")),BI.i18nText(BI.i18nText("BI-Basic_Cancel"))]})},beforeCreate:function(){var a=this,b=this.options;b.footer||(b.footer={type:"bi.right_vertical_adapt",lgap:10,items:[{type:"bi.button",text:this.options.btns[1],value:1,level:"ignore",handler:function(b){a.fireEvent(BI.Popover.EVENT_CANCEL,b),a.close(b)}},{type:"bi.button",text:this.options.btns[0],warningTitle:b.warningTitle,value:0,handler:function(b){a.fireEvent(BI.Popover.EVENT_CONFIRM,b),a.close(b)}}]})}}),BI.shortcut("bi.bar_popover",BI.BarPopover),BI.Popover.EVENT_CLOSE="EVENT_CLOSE",BI.Popover.EVENT_OPEN="EVENT_OPEN",BI.Popover.EVENT_CANCEL="EVENT_CANCEL",BI.Popover.EVENT_CONFIRM="EVENT_CONFIRM",BI.PopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PopupView.superclass._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 a=this,b=this.options,c=function(a){a.stopPropagation()},d=function(a){return a.stopEvent(),!1};this.element.css({"z-index":BI.zIndex_popup,"min-width":b.minWidth+"px","max-width":b.maxWidth+"px"}).bind({click:c}),this.element.bind("mousewheel",c),b.stopPropagation&&this.element.bind({mousedown:c,mouseup:c,mouseover:c}),b.stopEvent&&this.element.bind({mousedown:d,mouseup:d,mouseover:d}),this.tool=this._createTool(),this.tab=this._createTab(),this.view=this._createView(),this.toolbar=this._createToolBar(),this.view.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.PopupView.EVENT_CHANGE)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{scrolly:!1,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap,items:BI.LogicFactory.createLogicItemsByDirection(b.direction,BI.extend({cls:"list-view-outer bi-card list-view-shadow"},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tool,this.tab,this.view,this.toolbar)}))))}))))},_createView:function(){var a=this.options;return this.button_group=BI.createWidget(a.el,{type:"bi.button_group",value:a.value}),this.button_group.element.css({"min-height":a.minHeight+"px","padding-top":a.innerVGap+"px","padding-bottom":a.innerVGap+"px"}),this.button_group},_createTool:function(){var a=this.options;if(!1!==a.tool)return BI.createWidget(a.tool)},_createTab:function(){var a=this.options;if(0!==a.tabs.length)return BI.createWidget({type:"bi.center",cls:"list-view-tab",height:25,items:a.tabs,value:a.value})},_createToolBar:function(){var a=this.options;if(0!==a.buttons.length)return BI.createWidget({type:"bi.center",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.view},populate:function(a){this.view.populate.apply(this.view,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||24:0,c=this.tab?this.tab.attr("height")||24:0,d=(this.tool&&this.tool.attr("height")||24)*(this.tool&&this.tool.isVisible()?1:0),e=a-b-c-d-2*this.options.innerVGap;this.view.resetHeight?this.view.resetHeight(e):this.view.element.css({"max-height":e+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.view.setValue(a)},getValue:function(){return this.view.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView),BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.matcher=BI.createWidget(b.matcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:b.value}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),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(b.searcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:b.value}),this.searcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.matcher,this.spliter,this.searcher]})},startSearch:function(){},stopSearch:function(){},setValue:function(a){this.matcher.setValue(a),this.searcher.setValue(a)},getValue:function(){return this.matcher.getValue().concat(this.searcher.getValue())},populate:function(a,b,c){a||(a=[]),b||(b=[]),this.setTipVisible(a.length+b.length===0),this.spliter.setVisible(BI.isNotEmptyArray(b)&&BI.isNotEmptyArray(a)),this.matcher.populate(b,c),this.searcher.populate(a,c)},empty:function(){this.searcher.empty(),this.matcher.empty()},hasMatched:function(){return this.matcher.getAllButtons().length>0}}),BI.SearcherView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.searcher_view",BI.SearcherView),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 a=this,b=this.options;return{type:"bi.vertical",items:[BI.extend({type:"bi.vertical",scrolly:!1,ref:function(){a.container=this}},b.el)],element:this}},mounted:function(){var a=this,b=this.options;this._populate(),this.element.scroll(function(c){b.scrollTop=a.element.scrollTop(),a._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){a._calculateBlocksToRender()})},_renderMoreIf:function(){for(var a,b=this,c=this.options,d=this.element.height(),e=c.scrollTop+d+c.overscanHeight,f=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+c.blockSize||0,g=this.renderedIndex+1,h=function(){return b.container.element.height()};(a=h())e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.Pager.superclass.attr.apply(this,arguments),"curr"===a&&(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),BI.A=BI.inherit(BI.Text,{_defaultConfig:function(){var a=BI.A.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-a display-block",href:"",target:"_blank",el:null,tagName:"a"})},_init:function(){var a=this.options;BI.A.superclass._init.apply(this,arguments),this.element.attr({href:a.href,target:a.target}),a.el&&BI.createWidget(a.el,{element:this})}}),BI.shortcut("bi.a",BI.A),BI.LoadingBar=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.LoadingBar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-loading-bar bi-tips",height:30,handler:BI.emptyFn})},_init:function(){BI.LoadingBar.superclass._init.apply(this,arguments);var a=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(b){a.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 b=BI.createWidget({type:"bi.center_adapt",items:[this.loaded]}),c=BI.createWidget({type:"bi.center_adapt",items:[this.loading]});this.cardLayout=BI.createWidget({type:"bi.card",element:this,items:[{el:b,cardName:"loaded"},{el:c,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),BI.IconButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-icon-button horizon-center",iconWidth:null,iconHeight:null})},_init:function(){BI.IconButton.superclass._init.apply(this,arguments);var a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.ImageButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ImageButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-button",src:"",iconWidth:"100%",iconHeight:"100%"})},_init:function(){BI.ImageButton.superclass._init.apply(this,arguments);var a=this.options;this.image=BI.createWidget({type:"bi.img",width:a.iconWidth,height:a.iconHeight,src:a.src}),BI.isNumber(a.iconWidth)||BI.isNumber(a.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(a){BI.ImageButton.superclass.setWidth.apply(this,arguments),this.options.width=a},setHeight:function(a){BI.ImageButton.superclass.setHeight.apply(this,arguments),this.options.height=a},setImageWidth:function(a){this.image.setWidth(a)},setImageHeight:function(a){this.image.setHeight(a)},getImageWidth:function(){return this.image.element.width()},getImageHeight:function(){return this.image.element.height()},setSrc:function(a){this.options.src=a,this.image.setSrc(a)},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),BI.Button=BI.inherit(BI.BasicButton,{_defaultConfig:function(a){var b=BI.Button.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{baseCls:(b.baseCls||"")+" bi-button"+(BI.isIE()&&BI.isIE9Below()?" hack":""),minWidth:a.block===!0||a.clear===!0?0:80,height:24,shadow:a.clear!==!0,isShadowShowingOnSelected:!0,readonly:!0,iconCls:"",level:"common",block:!1,clear:!1,ghost:!1,textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:a.clear?0:10,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},_init:function(){BI.Button.superclass._init.apply(this,arguments);var a=this.options;!BI.isNumber(a.height)||a.clear||a.block?a.clear||a.block?this.element.css({lineHeight:a.height+"px"}):this.element.css({lineHeight:a.height-2+"px"}):this.element.css({height:a.height+"px",lineHeight:a.height-2+"px"}),BI.isKey(a.iconCls)?(this.icon=BI.createWidget({type:"bi.icon_label",cls:a.iconCls,width:18,height:a.height-2,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value,height:a.height-2}),BI.createWidget({type:"bi.center_adapt",element:this,hgap:a.hgap,vgap:a.vgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,element:this,text:a.text,value:a.value}),a.block===!0&&this.element.addClass("block"),a.clear===!0&&this.element.addClass("clear"),a.ghost===!0&&this.element.addClass("ghost"),a.minWidth>0&&this.element.css({"min-width":a.minWidth+"px"})},doClick:function(){BI.Button.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Button.EVENT_CHANGE,this)},setText:function(a){BI.Button.superclass.setText.apply(this,arguments),this.text.setText(a)},setValue:function(a){BI.Button.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},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",BI.TextButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-button",textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:0,lgap:0,rgap:0,text:"",py:""})},_init:function(){BI.TextButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,width:a.width,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.rgap,text:a.text,value:a.value,py:a.py,keyword:a.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(a){BI.TextButton.superclass.setText.apply(this,arguments),a=BI.isArray(a)?a.join(","):a,this.text.setText(a)},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.TextButton.superclass.setValue.apply(this,arguments),this.isReadOnly()||(a=BI.isArray(a)?a.join(","):a,this.text.setValue(a))}}),BI.TextButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_button",BI.TextButton),BI.BlankIconIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=(this._const,BI.createWidget({type:"bi.layout",width:a.blankWidth,height:a.height}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,forceNotSelected:!0,width:a.height,height:a.height}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,forceNotSelected:!0,width:a.height,height:a.height}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,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(a){BI.BlankIconIconTextItem.superclass.setSelected.apply(this,arguments),this.icon1.setSelected(a),this.icon2.setSelected(a)},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),BI.BlankIconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.layout",width:a.blankWidth},b,this.text,{type:"bi.layout",width:a.height})}))))},doClick:function(){BI.BlankIconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.BlankIconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_icon_item",BI.BlankIconTextIconItem),BI.BlankIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=(this._const,BI.createWidget({type:"bi.layout",width:a.blankWidth}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.icon,this.text)}))))},doClick:function(){BI.BlankIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_item",BI.BlankIconTextItem),BI.IconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.leftIconWrapperWidth,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.rightIconWrapperWidth,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.iconWrapperWidth||a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.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),BI.TextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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), -BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height,height:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"",root:!0,value:b.value,watermark:b.watermark,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,height:b.height-2*(b.vgap+b.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}}),this.watermark.element.bind("click",function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}));var c=[];this.watermark&&c.push({el:this.watermark,left:3,right:3,top:0,bottom:0}),c.push({el:this.editor,left:0,right:0,top:0,bottom:0});var d=[{el:{type:"bi.absolute",items:c},left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:d}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){a._checkError(),a.element.addClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){a._setErrorVisible(!1),a.element.removeClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){a.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){a.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(b){b.keyCode!==BI.KeyCode.TAB&&a.watermark&&a.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){a._checkWaterMark(),a._setErrorVisible(!1),a.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_ERROR,arguments),a._setErrorVisible(a.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){a._checkWaterMark();var b=a._setErrorVisible(!0);b&&b.element.fadeOut(100,function(){b.element.fadeIn(100)}),a.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){a.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){a.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){a.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){a.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){a.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){a.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){a.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM,arguments)}),this.element.click(function(a){return a.stopPropagation(),!1}),BI.isKey(this.options.value)||BI.isEmptyString(this.options.value)?(this._checkError(),this._checkWaterMark()):this._checkWaterMark()},_checkToolTip:function(){var a=this.options,b=a.errorText;BI.isFunction(b)&&(b=b(this.editor.getValue())),BI.isKey(b)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(b))},_checkError:function(){this._setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(a){this.options.errorText=a},getErrorText:function(){return this.options.errorText},_setErrorVisible:function(a){var b=this.options,c=b.errorText;if(BI.isFunction(c)&&(c=c(BI.trim(this.editor.getValue()))),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,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(a){this.editor.onKeyDown(a)},setValue:function(a){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(a),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),BI.MultifileEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var a=this,b=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:b.name,url:b.url,multiple:b.multiple,accept:b.accept,maxSize:b.maxSize,title:b.title}),this.file.on(BI.File.EVENT_CHANGE,function(){a.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments)}),this.file.on(BI.File.EVENT_ERROR,function(){a.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){a.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){a.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),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},render:function(){var a=this.options,b=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:10,top:4,bottom:8}]}),this.content.element.on("input propertychange",function(a){b._checkWaterMark(),b.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){b.isValid()&&(b._focus(),b.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),BI.Widget._renderEngine.createElement(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&(BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&this.setValue(a.value),BI.isNotNull(a.style)&&this.setStyle(a.style),this._checkWaterMark()},_checkWaterMark:function(){var a=this,b=this.options,c=this.getValue();BI.isNotEmptyString(c)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(b.watermark)&&(this.watermark?(this.watermark.setText(b.watermark),this.watermark.setValid(!b.invalid),this.watermark.setEnable(!b.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark cursor-default",textAlign:"left",height:20,text:b.watermark,invalid:b.invalid,disabled:b.disabled}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){a.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:4,top:4,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(a){this.content.element.val(a),this._checkWaterMark()},setStyle:function(a){this.style=a,this.element.css(a),this.content.element.css(BI.extend({},a,{color:a.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(a.backgroundColor)?BI.DOM.rgb2hex(a.backgroundColor):a.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(a){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)},_setEnable:function(a){BI.TextAreaEditor.superclass._setEnable.apply(this,[a]),this.content&&(this.content.element[0].disabled=!a)}}),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),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(b.text)?this.setText(b.text):BI.isKey(b.value)&&this.setText(b.value),b.highLight&&this.doHighLight()},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Html.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){BI.Html.superclass.setText.apply(this,arguments),this.options.text=a,this.text.element.html(a)}}),BI.shortcut("bi.html",BI.Html),BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"i",baseCls:(a.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),BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"iframe",baseCls:(a.baseCls||"")+" bi-iframe",src:"",name:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.frameborder="0",a.attributes.src=a.src,a.attributes.name=a.name,BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src},setName:function(a){this.options.name=a,this.element.attr("name",a)},getName:function(){return this.options.name}}),BI.shortcut("bi.iframe",BI.Iframe),BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"img",baseCls:(a.baseCls||"")+" bi-img display-block",src:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.src=a.src,BI.Img.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img),BI.ImageCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageCheckbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})}}),BI.ImageCheckbox.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_checkbox",BI.ImageCheckbox),BI.Checkbox=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-checkbox",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16},render:function(){var a=this,b=this.options;return{type:"bi.center_adapt",items:[{type:"bi.default",ref:function(b){a.checkbox=b},cls:"checkbox-content",width:b.iconWidth-2,height:b.iconHeight-2}]}},_setEnable:function(a){BI.Checkbox.superclass._setEnable.apply(this,arguments),a===!0?this.checkbox.element.removeClass("base-disabled disabled"):this.checkbox.element.addClass("base-disabled disabled")},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)},setSelected:function(a){BI.Checkbox.superclass.setSelected.apply(this,arguments),a?this.checkbox.element.addClass("bi-high-light-background"):this.checkbox.element.removeClass("bi-high-light-background")}}),BI.Checkbox.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox),function(document){var F=function(a){return function(b){var c=b.files||[b];return c.item||(c.item=a),c}}(function(a){return this[a]}),event={add:document.addEventListener?function(a,b,c){return a.addEventListener(b,c,!1),this}:function(a,b,c){return a.attachEvent("on"+b,c),this},del:document.removeEventListener?function(a,b,c){return a.removeEventListener(b,c,!1),this}:function(a,b,c){return a.detachEvent("on"+b,c),this},stop:function(a){return a?(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,a.preventDefault?a.preventDefault():a.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(a,b,c){return"--".concat(a,CRLF,'Content-Disposition: form-data; name="',b,'"; filename="',_global.encodeURIComponent(c.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,c.getAsBinary(),CRLF,"--",a,"--",CRLF)},isFunction=function(a){return"[object Function]"===toString.call(a)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(a,b,c,d){if(-1'),iframe=handler.iframe||(handler.iframe=document.createElement(''))}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(a){isFunction(handler.onerror)&&handler.onerror(rpe,a||_global.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loadedc.status||c.status>399?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void a.fireEvent(BI.File.EVENT_ERROR)):void a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url,c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d0&&b.fireEvent(BI.File.EVENT_CHANGE,{files:a.files}),c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){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(a){this.wrap&&this.wrap.upload(a); -},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(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?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||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=!1,c=null,d=!1,e=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),f=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){d=!1,b=e.ctrlKey||e.metaKey,c=e.keyCode,a.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(b){c=null,d&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,e(b.keyCode))}).on("input propertychange",function(b){var f=b.originalEvent;(BI.isNull(f.propertyName)||"value"===f.propertyName)&&(c=null,d=!0,a._keydown_=!0,e(c))}).click(function(a){a.stopPropagation(),f()}).mousedown(function(b){a.element.val(a.element.val())}).focus(function(b){a._focusDebounce()}).focusout(function(b){a._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(){function a(){if(b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()){var a=b._lastValidValue;b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM),b._lastValidValue!==a&&b.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){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)&&(this._pause!==!0||/(\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))),a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN),BI.isEndWithBlank(this.getValue())&&BI.trim(this.getValue())===BI.trim(this._lastValue||"")?(this._pause=!0,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.PAUSE,"",this),this.fireEvent(BI.Input.EVENT_PAUSE),this._defaultState()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===this._lastValue||""===BI.trim(this._lastValue)?this._valueChange():(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_STOP),this._valueChange())},_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 a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastChangedValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(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(a){this.element.val(a),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(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),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),BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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),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 a=this,b=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(b){a.radio=b},width:b.iconWidth,height:b.iconHeight}]}},_setEnable:function(a){BI.Radio.superclass._setEnable.apply(this,arguments),a===!0?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(a){BI.Radio.superclass.setSelected.apply(this,arguments),a?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),BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(a){var b=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{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 a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();return b.textAlign="left",BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:"bi.center_adapt",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,maxWidth:"100%"}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(b,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var a=this.options,b="right"===a.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",c=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:b,height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(c)}]}):void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})),void("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}))):(c.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(c,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(c,{maxWidth:"100%"})),void BI.createWidget({type:b,element:this,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(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}}),BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var a=this.options;return{type:"bi.html",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel),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 a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.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),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),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 a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var a=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+a.level,text:a.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(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),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 a=this,b=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+b.level);var c=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:c,mousedown:c,mouseup:c,mouseover:c,mouseenter:c,mouseleave:c,mousemove:c});var d="close-font";switch(b.level){case"success":d="toast-success-font";break;case"error":d="toast-error-font";break;case"warning":d="toast-warning-font";break;case"normal":default:d="toast-message-font"}var e=[{type:"bi.icon_label",cls:d+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,textHeight:16,textAlign:"left"},rgap:b.autoClose?this._const.hgap:0}],f=[36,""];b.autoClose===!1&&(e.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){a.destroy()},width:36}),f.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:e,vgap:7,columnSize:f})},setText:function(a){this.text.setText(a)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:18})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,height:a.height,textHeight:a.height-2,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{value:e.value},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])},value:c.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},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(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),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(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;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;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(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=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("")},makeDOMNodeMainBefore:function(a,b,c){a.push("
          • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
              "),c.push(d),c.push("
            ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={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"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0};return d},getTreeCheckedNodes:function(a,b,c,d){if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f=a.check.chkboxType,g=""===f.Y&&""===f.N;fullStyle="",b.chkDisabled===!0?fullStyle=d.DISABLED:b.halfCheck?fullStyle=d.PART:a.check.chkStyle==e.STYLE?fullStyle=b.check_Child_State<1?d.FULL:d.PART:fullStyle=b[c]?2===b.check_Child_State||b.check_Child_State===-1||g?d.FULL:d.PART:b.check_Child_State<1||g?d.FULL:d.PART;var h=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+fullStyle;return h=b.check_Focus&&b.chkDisabled!==!0?h+"_"+d.FOCUS:h,t.className.BUTTON+" "+d.DEFAULT+" "+h},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconCls,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconCls!==a&&(this.element.removeClass(b.iconCls).addClass(a),b.iconCls=a)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=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:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:b.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(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),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 a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconCls,once:b.once,iconWrapperWidth:b.iconWrapperWidth,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},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),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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,title:a.title||a.text,warningTitle:a.warningTitle,py:a.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(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 a=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:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var c=BI.createWidget({type:"bi.icon_label",width:24,cls:b.iconCls,iconWidth:b.iconWidth,iconHeight:b.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},{width:24,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},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(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,cls:"bi-list-item-none",id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.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(a){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=a?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),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),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 a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:24,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},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},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),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 a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.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),BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:b.text,value:b.value,ref:function(){a.text=this}},left:b.lgap,right:b.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(a){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(a)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=BI.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=BI.Date._MD.slice(0);i[1]=BI.isLeapYear(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay();var j=(7-BI.StartOfWeek+e.FDay)%7;e.PDay=i[0===b?11:b-1]-j+1,e.NDay=1;var k=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=j&&a=0?c%12:(12+c%12)%12;return{year:BI.getDate().getFullYear()+d,month:e+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[],e=BI.parseDateTime(b.min,"%Y-%X-%d"),f=BI.parseDateTime(b.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var b={};BI.checkDateVoid(c+a,1,1,BI.print(BI.getDate(e.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(f.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(b.disabled=!0),b.text=c+a,d.push(b)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=BI.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=BI.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(a){var b=BI.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?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),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(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),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(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),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 a=this,b=this.options;this.editor=BI.createWidget(b.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.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(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:""})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:b.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(b){a.trigger=b},width:b.width,height:b.height},b.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(b){a.colorPicker=b},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){c(),a._isRGBColor(a.colorPicker.getValue())||a.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){c(),a.combo.hideView()}}]},b.popup),stopPropagation:!0,width:230},value:b.value});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var a=this,b=this.options;this.colorEditor=BI.createWidget(b.editor,{type:b.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:b.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a._dealStoreColors(),a.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:b.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:b.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:b.editor});var c=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:c}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),c.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a._dealStoreColors(),a.more.hideView(),a.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:!b.disabled,ref:function(){a.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_setEnable:function(a){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!a)},_dealStoreColors:function(){var a=this.getValue(),b=this._getStoreColors(),c=new BI.Queue(8);c.fromArray(b),c.remove(a),c.unshift(a);var d=c.toArray();BI.Cache.setItem("colors",BI.array2String(d)),this.setStoreColors(d)},_digestStoreColors:function(a){var b=BI.map(a,function(a,b){return{value:b}});return BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),b},_getStoreColors:function(){var a=this,b=this.options,c=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(c,function(c,d){return!b.simple||a._isRGBColor(d)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},setStoreColors:function(a){BI.isArray(a)&&this.storeColors.populate([this._digestStoreColors(a)])},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},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),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 a=this,b=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:b.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(a){this.popup.setStoreColors(a)},setValue:function(a){this.popup.setValue(a)},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),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:b.container,value:b.value,width:b.width,height:b.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_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 a=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:a,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var a=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(b){a.changeIcon=b},iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(b){a.label=b},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var b=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:b,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?(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"===a?(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":a}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),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:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{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 a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:b.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),d(a.storeValue.r)&&d(a.storeValue.g)&&d(a.storeValue.b)&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[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()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#ffffff"),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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()?(a.lastColor=a.getValue(),a.setValue("transparent")):("transparent"===a.lastColor&&(a.lastColor=""),a.setValue(a.lastColor||"#ffffff")),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){""===a?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===a?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":a}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(a){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){if("transparent"===a)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:""});a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.storeValue={r:BI.isNull(b.r)?"":b.r,g:BI.isNull(b.r)?"":b.g,b:BI.isNull(b.r)?"":b.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),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){this.colorShow.element.css({"background-color":a});var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.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),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 a=this; -return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(b){a.colorWrapper=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(b){a.wheel=b}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(b){a.overlay=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.hMarker=b},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.slMarker=b},scrollable:!1,width:17,height:17}}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this.setValue(a.value)},_unpack:function(a){return 7===a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4===a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},_pack:function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},_setColor:function(a){var b=this._unpack(a);this.value!==a&&b&&(this.value=a,this.rgb=b,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(a){return this.hsl=a,this.rgb=this._HSLToRGB(a),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this._hueToRGB(b,c,d+.33333),this._hueToRGB(b,c,d),this._hueToRGB(b,c,d-.33333)]},_hueToRGB:function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},_RGBToHSL:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},_updateDisplay:function(){var a=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(a)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(a)*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(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var c=this._absolutePosition(a.offsetParent);b.x+=c.x,b.y+=c.y}return b},_widgetCoords:function(a){var b,c,d=a.target||a.srcElement,e=this.wheel.element[0];if("undefined"!=typeof a.offsetX){for(var f={x:a.offsetX,y:a.offsetY},g=d;g;)g.mouseX=f.x,g.mouseY=f.y,f.x+=g.offsetLeft,f.y+=g.offsetTop,g=g.offsetParent;for(var g=e,h={x:0,y:0};g;){if("undefined"!=typeof g.mouseX){b=g.mouseX-h.x,c=g.mouseY-h.y;break}h.x+=g.offsetLeft,h.y+=g.offsetTop,g=g.offsetParent}for(g=d;g;)g.mouseX=void 0,g.mouseY=void 0,g=g.offsetParent}else{var f=this._absolutePosition(e);b=(a.pageX||0)-f.x,c=(a.pageY||0)-f.y}return{x:b-this.constants.WIDTH/2,y:c-this.constants.WIDTH/2}},_doMouseMove:function(a){var b=this._widgetCoords(a);if(this.circleDrag){var c=Math.atan2(b.x,-b.y)/6.28;c<0&&(c+=1),this._setHSL([c,this.hsl[1],this.hsl[2]])}else{var d=Math.max(0,Math.min(1,-(b.x/this.constants.SQUARE)+.5)),e=Math.max(0,Math.min(1,-(b.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],d,e])}},doClick:function(a){var b=this._widgetCoords(a);return this.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>this.constants.SQUARE,this._doMouseMove(a),!1},setValue:function(a){this._setColor(a)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,container:b.container,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.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),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.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 a=this.options,b=this,c=[];return BI.each(a.buttons,function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:24,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:c}]})},_createView:function(){var a=this.options,b=BI.createWidget({type:"bi.button_group",items:[a.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return b.element.css("min-height",a.minHeight-44),b}}),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,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var a=this,b=this.options,c=BI.map(b.buttons,function(b,c){return BI.isWidget(c)?c:BI.extend({type:"bi.button",height:24,handler:function(b){a.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,b)}},c)});return{type:"bi.bubble_bar_popup_view",ref:function(){a.popup=this},el:{type:"bi.label",text:b.text,whiteSpace:"normal",textAlign:"left",ref:function(){a.text=this}},buttons:c}},populate:function(a){this.text.setText(a||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,value:b.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),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 a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconCls:b.iconCls,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,value:b.value}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),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 a=this.options,b="";BI.isKey(a.value)&&(b=this._digest(a.value,a.items)),this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b,disableSelected:!0,width:a.isShowDown?a.width-12:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight,selected:BI.isNotEmptyString(b)}),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(b)}),this.down.setVisible(a.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(a,b){var c="";return a=BI.isArray(a)?a[0]:a,BI.any(b,function(b,d){if(a===d.value)return c=d.iconCls,!0}),c},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c=this._digest(a,this.options.items);a=BI.isArray(a)?a[0]:a,BI.isNotEmptyString(c)?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:b.items,height:b.height,text:b.text,iconCls:b.iconCls,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth,title:b.title,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this.setValue(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:a.behaviors,value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a,b){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var c=this.options;a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:c.iconWrapperWidth,iconHeight:c.iconHeight,iconWidth:c.iconWidth}),this.popup.populate(a,b)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),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 a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,adjustLength:2,toggle:!1,ref:function(){a.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){a.trigger=this},items:b.items,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:b.value,items:b.items,ref:function(){a.popup=this,a.trigger.getSearcher().setAdapter(a.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:252},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){a.triggerBtn=this},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this._checkError(a.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.options.items=a,this.combo.populate(a)},setValue:function(a){this.combo.setValue(a),this._checkError(a)},getValue:function(){var a=this.combo.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo),BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var a=this,b=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){a.popup=this},items:BI.createItems(b.items,{type:"bi.single_select_item",textAlign:b.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,c,d)}}]}]}},mounted:function(){this.check()},populate:function(a,b,c){var d=BI.concat(a,b);BI.SearchTextValueComboPopup.superclass.populate.apply(this,d),d=BI.createItems(d,{type:"bi.single_select_item",height:24}),this.popup.populate(d,c)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup),BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value,b.items),value:b.value,height:b.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(a,c){var d=a.keyword,e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g,f)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(a){this.editor.setState(a)},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this._setState(this._digest(a,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),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,value:b.value,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this._checkError(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){ -this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),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 a=this,b=this.options;this._createValueMap();var c;BI.isNotNull(b.value)&&(c=this._digest(b.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:b.height,items:b.items,text:b.text,value:c}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,value:BI.isNull(c)?[]:[c],items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var b=a.combo.getValue()[0].value;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var b=a.combo.getValue()[0].childValue;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},_digest:function(a){return this.value=a,this.valueMap[a]},setValue:function(a){a=this._digest(a),this.combo.setValue([a]),this.trigger.setValue(a)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text,value:BI.isNull(a.value)?"":a.value.childValue||a.value.value})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a.childValue||a.value)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker,value:b.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(b.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:b.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]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.text.setStyle(a)},setValue:function(a){var b=this.options;this.editor.setValue(a),this._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(a.keyword)&&this.text.doRedMark(a.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text tip-text-style",textAlign:"left",height:b.height,text:b.text,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")},title:BI.isNotNull(b.tipText)?b.tipText:function(){var b="";return BI.isString(a.stateValue)&&(b=a.stateValue),BI.isArray(a.stateValue)&&1===a.stateValue.length&&(b=a.stateValue[0]),b},warningTitle:b.warningTitle,tipType:b.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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.options.disabled===!1&&(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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=a,BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text"))))},setTipType:function(a){this.text.options.tipType=a}}),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),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text",textAlign:"left",text:b.text,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")), -this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),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),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(c,{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(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.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:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded(),a.check()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.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(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{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(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 a=this,b=this.options;return[{type:"bi.label",text:b.text,height:b.height,value:b.value,hgap:b.hgap,ref:function(){a.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){a.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(a){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),a?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var a=this,b=this.options;return{type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.linear_segment_button",height:b.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){a.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.buttonGroup=this}}},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),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 a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(b.value)&&this.setValue(b.value)},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.allSelected=!!a,this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{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(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"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(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),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:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1),this.setPagerVisible(a>1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate(),this.setPagerVisible(this.options.pages>1)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),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 a=this.options;a.vertical,a.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 a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev column-pre-page-h-font"},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 direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev row-pre-page-h-font"},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 direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},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(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[86,110,0,24],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),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),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 a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:a.height,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:b.value,items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},_setEnable:function(a){BI.Segment.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(a){return a.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.selected===!0,d=!b.selected&&b.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())},selected:c,invisible:d}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)},invisible:c||!d}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:b.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(a){this.checkbox.setSelected(!!a)},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this.halfSelected=!!a,a===!0?(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(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(b),!b&&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),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(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};BI.isKey(f.id)||(f.id=BI.UUID()),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.mid_plus_group_node",e===a.length-1&&(g.type="bi.last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a,b){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a,b)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),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(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),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(){function a(a,b){return!1}function b(a,b){return b.isLeaf?{}:{color:"#999999"}}var c={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:b},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return c},_dealWidthNodes:function(a){a=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),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 a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate(),BI.isNotNull(b.value)&&this.setValue(b.value)},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},_digest:function(a){a||(a=[]);var b=this,c={},d=[];return BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),BI.makeObject(a.concat(d))},setValue:function(a){this.tree.setValue(this._digest(a))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,title:function(){return a.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:b.triggerWidth||b.height},width:b.triggerWidth||b.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:24})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(b){a.wrapper=b},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.iconWrapperWidth||b.height},{el:this.text,lgap:BI.isEmptyString(b.iconCls)?5:0},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a)},setIcon:function(a){var b=this.options;this.icon.setIcon(a);var c=this.wrapper.attr("items")[0],d=this.wrapper.attr("items")[1];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,d.lgap=5,this.wrapper.resize()):c.width!==(b.iconWrapperWidth||b.height)&&(c.width=b.iconWrapperWidth||b.height,d.lgap=0,this.wrapper.resize())},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),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 a=this.options,b=this._digist(a.value,a.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:b.text,iconCls:b.iconCls,height:a.height,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth})},_digist:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d,e=BI.Tree.transformToArrayFormat(b);return BI.any(e,function(b,c){if(BI.deepContains(a,c.value))return d={text:c.text||c.value,iconCls:c.iconCls},!0}),BI.isNotNull(d)?{text:d.text,iconCls:d.iconCls}:{text:c.text,iconCls:c.iconCls}},setValue:function(a){var b=this._digist(a,this.options.items);this.trigger.setText(b.text),this.trigger.setIcon(b.iconCls)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text,title:function(){return a.text.getText()},tipType:b.tipType,warningTitle:b.warningTitle,hgap:c.hgap,readonly:b.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setText:function(a){this.text.setText(a)},setTipType:function(a){this.text.options.tipType=a}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),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 a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height,readonly:a.readonly,text:this._digest(a.value,a.items),tipType:a.tipType,warningTitle:a.warningTitle})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},setTipType:function(a){this.trigger.setTipType(a)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),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 a=this.options,b=this._digest(a.text,a.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2,text:b.text,cls:b.cls})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?{cls:"",text:d.join(",")}:{cls:"bi-water-mark",text:c.text}},setValue:function(a){var b=this._digest(a,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(b.cls),this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:a.triggerWidth||a.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:a.triggerWidth||a.height}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:b.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(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:b.behaviors,min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=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===a._month?a.setValue({year:a.year.getValue()-1,month:12}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._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===a._month?a.setValue({year:a.year.getValue()+1,month:1}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:b.behaviors,min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:b.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.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 a=this.options,b=!(1===this._month&&this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(12===this._month&&this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=BI.parseInt(a.year),this._month=BI.parseInt(a.month),this.year.setValue(a.year),this.month.setValue(a.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),BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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(){a.setValue(a.year.getValue()-1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._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(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,behaviors:b.behaviors,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.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:{type:"bi.horizontal_float",width:50,items:[{el:this.year}]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:1});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.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(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.calendar,left:5,right:5},{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),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(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear();var c=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),d=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:[c,d]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();c.setEnable(!b.isFrontYear()),d.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;a=BI.parseInt(a);var c=BI.parseDateTime(b.min,"%Y-%X-%d"),d=BI.parseDateTime(b.max,"%Y-%X-%d");BI.checkDateVoid(a,1,1,BI.print(BI.getDate(c.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(d.getFullYear(),0,1),"%Y-%X-%d"))[0]?(a=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text", -textAlign:"right",text:a.text,value:a.value,height:b.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime={year:b.year,month:b.month},0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(b.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(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDatePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDatePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateCombo.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options,c=BI.getDate();this.storeValue=BI.isNotNull(b.value)?b.value:{year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:b.minDate,max:b.maxDate,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.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(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var d=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});d.on(BI.IconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()||a.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:d,top:0,right:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},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),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 a=this,b=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(){a.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(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.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(b){a.timeSelect=b}}]},height:50},{el:this.dateButton,height:30}]}),this.setValue(b.value)},setValue:function(a){var b,c=a;BI.isNull(c)?(b=BI.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}),this.timeSelect.setValue({hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()})):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.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),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text},{el:BI.createWidget(),width:a.height}]}),this.setValue(a.value)},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=BI.getDate(),b=BI.print(c,"%Y-%X-%d %H:%M:%S");else{var d=BI.getDate(c.year,c.month-1,c.day,c.hour,c.minute,c.second);b=BI.print(d,"%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.StaticDateTimePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime=BI.extend(a.selectedTime,{year:b.year,month:b.month,day:d}),0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.calendar.empty(),a.setValue(a.selectedTime),a.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(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.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(b.selectedTime)},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=BI.extend({},this.timeSelect.getValue(),a)},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){a=a||{},this._setDatePicker(a),this._setCalendar(a),this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_time_pane_card",BI.StaticDateTimePaneCard),BI.DynamicDateTimePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDateTimePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDateTimePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDateTimePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateTimePane.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateTimePane.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:b.stopPropagation,maxHeight:1e3,minWidth:140}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(a){this.downlistcombo.showView(a)},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},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),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 a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:a.value}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:36,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),BI.extend(a.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),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:36,disableSelected:!0,selected:this._digest(a.value)}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:24,forceNotSelected:!0});var c=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(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},_digest:function(a){var b=this.options;return a=BI.isArray(a)?a:[a],BI.any(a,function(a,c){return BI.contains(b.childValues,c)})},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(a){this.icon1.setSelected(this._digest(a))}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),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 a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options,c=this._createChildren(this.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!BI.contains(a.singleValues,d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.isDefaultInit=!0,c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5,maxHeight:378},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=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});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?1:0}},setValue:function(a){a=a||{},this.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT;var b=[],c=[];BI.isNotNull(a.year)&&(b.push(BI.DynamicDateCard.TYPE.YEAR),c.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))),BI.isNotNull(a.quarter)&&(b.push(BI.DynamicDateCard.TYPE.QUARTER),c.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))),BI.isNotNull(a.month)&&(b.push(BI.DynamicDateCard.TYPE.MONTH),c.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))),BI.isNotNull(a.week)&&(b.push(BI.DynamicDateCard.TYPE.WEEK),c.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,a.week))),BI.isNotNull(a.day)&&(b.push(BI.DynamicDateCard.TYPE.DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,a.day))),BI.isNotNull(a.workDay)&&(b.push(BI.DynamicDateCard.TYPE.WORK_DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,a.workDay))),this.checkgroup.setValue(b),this.workDayBox.setSelected(BI.isNotNull(a.workDay)),this.resultPane.populate(this._getParamJson(c,a.position))},getValue:function(){var a=this,b={},c=this.checkgroup.getValue(),d=this.resultPane.getAllButtons();if(0!==c.length&&BI.each(d,function(c,d){var e=d.getValue();switch(e.dateType){case BI.DynamicDateCard.TYPE.YEAR:b.year=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.QUARTER:b.quarter=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.MONTH:b.month=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.WEEK:b.week=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.DAY:b.day=0===e.offset?-e.value:e.value}BI.isNull(e.dateType)&&(b.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var e=d[0].getValue();b.workDay=0===e.offset?-e.value:e.value}return b}}),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}}),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 a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:b.minDate,max:b.maxDate,format:b.format,allowEdit:b.allowEdit,watermark:b.watermark,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.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:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},_defaultState:function(){},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(a){return BI.isNaturalNumber(a)},value:b.value,ref:function(){a.editor=this},errorText:function(a){return BI.isEmptyString(a)?BI.i18nText("BI-Basic_Please_Input_Content"):BI.i18nText("BI-Please_Input_Natural_Number")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:b.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(){a.offsetCombo=this},container:null,value:b.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var a="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:a=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:a=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:a=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:a=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:a=BI.i18nText("BI-Basic_Day");break;case BI.DynamicDateCard.TYPE.WORK_DAY:default:a=BI.i18nText("BI-Basic_Work_Day")}return a},setValue:function(a){a=a||{},a.value=a.value||0,a.offset=a.offset||0,this.editor.setValue(a.value),this.offsetCombo.setValue(a.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),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 a=this,b=this.options,c=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:c.buttonHeight-1,listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){a.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),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),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2]}}}a.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.getDate();e=BI.DynamicDateHelper.getCalculation(c);var f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[0,1,2],d=this._getFormatString().match(/%./g);BI.each(d,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":default:c[2]=a}});var e=BI.parseDateTime(a,this._getFormatString());BI.print(e,this._getFormatString())===a&&(a=BI.print(e,b.compareFormat),c=[0,1,2]);var f=a.match(/\d+/g),g=[];return BI.each(f,function(a){g[a]=f[c[a]]}),g.length===c.length&&2===g[0].length?BI.print(BI.parseDateTime(g.join("-"),b.compareFormat),b.compareFormat):g.join("-")},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,this._getFormatString()),this._const.compareFormat);return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,this._getFormatString()),c=BI.print(b,this._const.compareFormat);return b.getMonth()>=0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),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),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",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:b.minDate,max:b.maxDate,allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate(),hour:0,minute:0,second:0}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},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_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options,c=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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){a.timeSelect=this}},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a.timeSelect.setValue(),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();return{type:a,value:a===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), +BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height,height:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"",root:!0,value:b.value,watermark:b.watermark,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,height:b.height-2*(b.vgap+b.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}}),this.watermark.element.bind("click",function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}));var c=[];this.watermark&&c.push({el:this.watermark,left:3,right:3,top:0,bottom:0}),c.push({el:this.editor,left:0,right:0,top:0,bottom:0});var d=[{el:{type:"bi.absolute",items:c},left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:d}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){a._checkError(),a.element.addClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){a._setErrorVisible(!1),a.element.removeClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){a.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){a.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(b){b.keyCode!==BI.KeyCode.TAB&&a.watermark&&a.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){a._checkWaterMark(),a._setErrorVisible(!1),a.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_ERROR,arguments),a._setErrorVisible(a.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){a._checkWaterMark();var b=a._setErrorVisible(!0);b&&b.element.fadeOut(100,function(){b.element.fadeIn(100)}),a.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){a.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){a.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){a.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){a.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){a.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){a.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){a.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM,arguments)}),this.element.click(function(a){return a.stopPropagation(),!1}),BI.isKey(this.options.value)||BI.isEmptyString(this.options.value)?(this._checkError(),this._checkWaterMark()):this._checkWaterMark()},_checkToolTip:function(){var a=this.options,b=a.errorText;BI.isFunction(b)&&(b=b(this.editor.getValue())),BI.isKey(b)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(b))},_checkError:function(){this._setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(a){this.options.errorText=a},getErrorText:function(){return this.options.errorText},_setErrorVisible:function(a){var b=this.options,c=b.errorText;if(BI.isFunction(c)&&(c=c(BI.trim(this.editor.getValue()))),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,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(a){this.editor.onKeyDown(a)},setValue:function(a){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(a),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),BI.MultifileEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var a=this,b=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:b.name,url:b.url,multiple:b.multiple,accept:b.accept,maxSize:b.maxSize,title:b.title}),this.file.on(BI.File.EVENT_CHANGE,function(){a.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments)}),this.file.on(BI.File.EVENT_ERROR,function(){a.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){a.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){a.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),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},render:function(){var a=this.options,b=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:10,top:4,bottom:8}]}),this.content.element.on("input propertychange",function(a){b._checkWaterMark(),b.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){b.isValid()&&(b._focus(),b.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),BI.Widget._renderEngine.createElement(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&(BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&this.setValue(a.value),BI.isNotNull(a.style)&&this.setStyle(a.style),this._checkWaterMark()},_checkWaterMark:function(){var a=this,b=this.options,c=this.getValue();BI.isNotEmptyString(c)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(b.watermark)&&(this.watermark?(this.watermark.setText(b.watermark),this.watermark.setValid(!b.invalid),this.watermark.setEnable(!b.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark cursor-default",textAlign:"left",height:20,text:b.watermark,invalid:b.invalid,disabled:b.disabled}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){a.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:4,top:4,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(a){this.content.element.val(a),this._checkWaterMark()},setStyle:function(a){this.style=a,this.element.css(a),this.content.element.css(BI.extend({},a,{color:a.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(a.backgroundColor)?BI.DOM.rgb2hex(a.backgroundColor):a.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(a){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)},_setEnable:function(a){BI.TextAreaEditor.superclass._setEnable.apply(this,[a]),this.content&&(this.content.element[0].disabled=!a)}}),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),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(b.text)?this.setText(b.text):BI.isKey(b.value)&&this.setText(b.value),b.highLight&&this.doHighLight()},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Html.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){BI.Html.superclass.setText.apply(this,arguments),this.options.text=a,this.text.element.html(a)}}),BI.shortcut("bi.html",BI.Html),BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"i",baseCls:(a.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),BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"iframe",baseCls:(a.baseCls||"")+" bi-iframe",src:"",name:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.frameborder="0",a.attributes.src=a.src,a.attributes.name=a.name,BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src},setName:function(a){this.options.name=a,this.element.attr("name",a)},getName:function(){return this.options.name}}),BI.shortcut("bi.iframe",BI.Iframe),BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"img",baseCls:(a.baseCls||"")+" bi-img display-block",src:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.src=a.src,BI.Img.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img),BI.ImageCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageCheckbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})}}),BI.ImageCheckbox.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_checkbox",BI.ImageCheckbox),BI.Checkbox=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-checkbox",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16},render:function(){var a=this,b=this.options;return{type:"bi.center_adapt",items:[{type:"bi.default",ref:function(b){a.checkbox=b},cls:"checkbox-content",width:b.iconWidth-2,height:b.iconHeight-2}]}},_setEnable:function(a){BI.Checkbox.superclass._setEnable.apply(this,arguments),a===!0?this.checkbox.element.removeClass("base-disabled disabled"):this.checkbox.element.addClass("base-disabled disabled")},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)},setSelected:function(a){BI.Checkbox.superclass.setSelected.apply(this,arguments),a?this.checkbox.element.addClass("bi-high-light-background"):this.checkbox.element.removeClass("bi-high-light-background")}}),BI.Checkbox.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox),function(document){var F=function(a){return function(b){var c=b.files||[b];return c.item||(c.item=a),c}}(function(a){return this[a]}),event={add:document.addEventListener?function(a,b,c){return a.addEventListener(b,c,!1),this}:function(a,b,c){return a.attachEvent("on"+b,c),this},del:document.removeEventListener?function(a,b,c){return a.removeEventListener(b,c,!1),this}:function(a,b,c){return a.detachEvent("on"+b,c),this},stop:function(a){return a?(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,a.preventDefault?a.preventDefault():a.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(a,b,c){return"--".concat(a,CRLF,'Content-Disposition: form-data; name="',b,'"; filename="',_global.encodeURIComponent(c.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,c.getAsBinary(),CRLF,"--",a,"--",CRLF)},isFunction=function(a){return"[object Function]"===toString.call(a)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(a,b,c,d){if(-1'),iframe=handler.iframe||(handler.iframe=document.createElement(''))}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(a){isFunction(handler.onerror)&&handler.onerror(rpe,a||_global.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loadedd.status||d.status>399)return BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void a.fireEvent(BI.File.EVENT_ERROR);var b=BI.some(c.attach_array,function(b,c){if(c.errorCode)return BI.Msg.toast(c.errorMsg,{level:"error"}),a.fireEvent(BI.File.EVENT_ERROR,c),!0});!b&&a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url,c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d0&&b.fireEvent(BI.File.EVENT_CHANGE,{files:a.files}),c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){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(a){this.wrap&&this.wrap.upload(a)},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(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?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||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=!1,c=null,d=!1,e=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),f=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){d=!1,b=e.ctrlKey||e.metaKey,c=e.keyCode,a.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(b){c=null,d&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,e(b.keyCode))}).on("input propertychange",function(b){var f=b.originalEvent;(BI.isNull(f.propertyName)||"value"===f.propertyName)&&(d=!0,a._keydown_=!0,e(c),c=null)}).click(function(a){a.stopPropagation(),f()}).mousedown(function(b){a.element.val(a.element.val())}).focus(function(b){a._focusDebounce()}).focusout(function(b){a._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(){function a(){if(b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()){var a=b._lastValidValue;b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM),b._lastValidValue!==a&&b.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){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)&&(this._pause!==!0||/(\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))),a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN);var c=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()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===c||""===BI.trim(c)||(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 a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastChangedValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(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(a){this.element.val(a),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(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),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),BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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),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 a=this,b=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(b){a.radio=b},width:b.iconWidth,height:b.iconHeight}]}},_setEnable:function(a){BI.Radio.superclass._setEnable.apply(this,arguments),a===!0?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(a){BI.Radio.superclass.setSelected.apply(this,arguments),a?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),BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(a){var b=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{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 a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();return b.textAlign="left",BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:"bi.center_adapt",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,maxWidth:"100%"}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(b,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var a=this.options,b="right"===a.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",c=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:b,height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(c)}]}):void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})),void("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}))):(c.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(c,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(c,{maxWidth:"100%"})),void BI.createWidget({type:b,element:this,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(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}}),BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var a=this.options;return{type:"bi.html",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel),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 a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.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),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),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 a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var a=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+a.level,text:a.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(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),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 a=this,b=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+b.level);var c=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:c,mousedown:c,mouseup:c,mouseover:c,mouseenter:c,mouseleave:c,mousemove:c});var d="close-font";switch(b.level){case"success":d="toast-success-font";break;case"error":d="toast-error-font";break;case"warning":d="toast-warning-font";break;case"normal":default:d="toast-message-font"}var e=[{type:"bi.icon_label",cls:d+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,textHeight:16,textAlign:"left"},rgap:b.autoClose?this._const.hgap:0}],f=[36,""];b.autoClose===!1&&(e.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){a.destroy()},width:36}),f.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:e,vgap:7,columnSize:f})},setText:function(a){this.text.setText(a)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:18})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,height:a.height,textHeight:a.height-2,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{value:e.value},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])},value:c.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},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(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),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(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;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;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(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=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("
          • ")},makeDOMNodeMainBefore:function(a,b,c){a.push("
          • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
              "),c.push(d),c.push("
            ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={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"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0};return d},getTreeCheckedNodes:function(a,b,c,d){if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f=a.check.chkboxType,g=""===f.Y&&""===f.N;fullStyle="",b.chkDisabled===!0?fullStyle=d.DISABLED:b.halfCheck?fullStyle=d.PART:a.check.chkStyle==e.STYLE?fullStyle=b.check_Child_State<1?d.FULL:d.PART:fullStyle=b[c]?2===b.check_Child_State||b.check_Child_State===-1||g?d.FULL:d.PART:b.check_Child_State<1||g?d.FULL:d.PART;var h=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+fullStyle;return h=b.check_Focus&&b.chkDisabled!==!0?h+"_"+d.FOCUS:h,t.className.BUTTON+" "+d.DEFAULT+" "+h},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconCls,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconCls!==a&&(this.element.removeClass(b.iconCls).addClass(a),b.iconCls=a)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=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:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:b.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(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),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 a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconCls,once:b.once,iconWrapperWidth:b.iconWrapperWidth,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},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),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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,title:a.title||a.text,warningTitle:a.warningTitle,py:a.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(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 a=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:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var c=BI.createWidget({type:"bi.icon_label",width:24,cls:b.iconCls,iconWidth:b.iconWidth,iconHeight:b.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},{width:24,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},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(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,cls:"bi-list-item-none",id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.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(a){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=a?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),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),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 a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:24,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},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},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),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 a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.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),BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:b.text,value:b.value,ref:function(){a.text=this}},left:b.lgap,right:b.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(a){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(a)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=BI.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=BI.Date._MD.slice(0);i[1]=BI.isLeapYear(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay();var j=(7-BI.StartOfWeek+e.FDay)%7;e.PDay=i[0===b?11:b-1]-j+1,e.NDay=1;var k=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=j&&a=0?c%12:(12+c%12)%12;return{year:BI.getDate().getFullYear()+d,month:e+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[],e=BI.parseDateTime(b.min,"%Y-%X-%d"),f=BI.parseDateTime(b.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var b={};BI.checkDateVoid(c+a,1,1,BI.print(BI.getDate(e.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(f.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(b.disabled=!0),b.text=c+a,d.push(b)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=BI.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=BI.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(a){var b=BI.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?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),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(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),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(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),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 a=this,b=this.options;this.editor=BI.createWidget(b.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.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(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:""})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:b.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(b){a.trigger=b},width:b.width,height:b.height},b.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(b){a.colorPicker=b},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){c(),a._isRGBColor(a.colorPicker.getValue())||a.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){c(),a.combo.hideView()}}]},b.popup),stopPropagation:!0,width:230},value:b.value});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var a=this,b=this.options;this.colorEditor=BI.createWidget(b.editor,{type:b.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:b.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a._dealStoreColors(),a.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:b.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:b.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:b.editor});var c=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:c}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),c.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a._dealStoreColors(),a.more.hideView(),a.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:!b.disabled,ref:function(){a.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_setEnable:function(a){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!a)},_dealStoreColors:function(){var a=this.getValue(),b=this._getStoreColors(),c=new BI.Queue(8);c.fromArray(b),c.remove(a),c.unshift(a);var d=c.toArray();BI.Cache.setItem("colors",BI.array2String(d)),this.setStoreColors(d)},_digestStoreColors:function(a){var b=BI.map(a,function(a,b){return{value:b}});return BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),b},_getStoreColors:function(){var a=this,b=this.options,c=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(c,function(c,d){return!b.simple||a._isRGBColor(d)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},setStoreColors:function(a){BI.isArray(a)&&this.storeColors.populate([this._digestStoreColors(a)])},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},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),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 a=this,b=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:b.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(a){this.popup.setStoreColors(a)},setValue:function(a){this.popup.setValue(a)},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),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:b.container,value:b.value,width:b.width,height:b.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_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 a=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:a,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var a=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(b){a.changeIcon=b},iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(b){a.label=b},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var b=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:b,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?(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"===a?(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":a}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),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:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{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 a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:b.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),d(a.storeValue.r)&&d(a.storeValue.g)&&d(a.storeValue.b)&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[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()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#ffffff"),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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()?(a.lastColor=a.getValue(),a.setValue("transparent")):("transparent"===a.lastColor&&(a.lastColor=""),a.setValue(a.lastColor||"#ffffff")),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){""===a?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===a?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":a}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(a){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){if("transparent"===a)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:""});a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.storeValue={r:BI.isNull(b.r)?"":b.r,g:BI.isNull(b.r)?"":b.g,b:BI.isNull(b.r)?"":b.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),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){this.colorShow.element.css({"background-color":a});var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.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),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 a=this;return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(b){a.colorWrapper=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(b){a.wheel=b}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(b){a.overlay=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.hMarker=b},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.slMarker=b},scrollable:!1,width:17,height:17}}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this.setValue(a.value)},_unpack:function(a){return 7===a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4===a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},_pack:function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},_setColor:function(a){var b=this._unpack(a);this.value!==a&&b&&(this.value=a,this.rgb=b,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(a){return this.hsl=a,this.rgb=this._HSLToRGB(a),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this._hueToRGB(b,c,d+.33333),this._hueToRGB(b,c,d),this._hueToRGB(b,c,d-.33333)]},_hueToRGB:function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},_RGBToHSL:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},_updateDisplay:function(){var a=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(a)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(a)*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(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var c=this._absolutePosition(a.offsetParent);b.x+=c.x,b.y+=c.y}return b},_widgetCoords:function(a){var b,c,d=a.target||a.srcElement,e=this.wheel.element[0];if("undefined"!=typeof a.offsetX){for(var f={x:a.offsetX,y:a.offsetY},g=d;g;)g.mouseX=f.x,g.mouseY=f.y,f.x+=g.offsetLeft,f.y+=g.offsetTop,g=g.offsetParent;for(var g=e,h={x:0,y:0};g;){if("undefined"!=typeof g.mouseX){b=g.mouseX-h.x,c=g.mouseY-h.y;break}h.x+=g.offsetLeft,h.y+=g.offsetTop,g=g.offsetParent}for(g=d;g;)g.mouseX=void 0,g.mouseY=void 0,g=g.offsetParent}else{var f=this._absolutePosition(e);b=(a.pageX||0)-f.x,c=(a.pageY||0)-f.y}return{x:b-this.constants.WIDTH/2,y:c-this.constants.WIDTH/2}},_doMouseMove:function(a){var b=this._widgetCoords(a);if(this.circleDrag){var c=Math.atan2(b.x,-b.y)/6.28;c<0&&(c+=1),this._setHSL([c,this.hsl[1],this.hsl[2]])}else{var d=Math.max(0,Math.min(1,-(b.x/this.constants.SQUARE)+.5)),e=Math.max(0,Math.min(1,-(b.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],d,e])}},doClick:function(a){var b=this._widgetCoords(a);return this.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>this.constants.SQUARE,this._doMouseMove(a),!1},setValue:function(a){this._setColor(a)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,container:b.container,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.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),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.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 a=this.options,b=this,c=[];return BI.each(a.buttons,function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:24,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:c}]})},_createView:function(){var a=this.options,b=BI.createWidget({type:"bi.button_group",items:[a.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return b.element.css("min-height",a.minHeight-44),b}}),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,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var a=this,b=this.options,c=BI.map(b.buttons,function(b,c){return BI.isWidget(c)?c:BI.extend({type:"bi.button",height:24,handler:function(b){a.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,b)}},c)});return{type:"bi.bubble_bar_popup_view",ref:function(){a.popup=this},el:{type:"bi.label",text:b.text,whiteSpace:"normal",textAlign:"left",ref:function(){a.text=this}},buttons:c}},populate:function(a){this.text.setText(a||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,value:b.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),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 a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconCls:b.iconCls,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,value:b.value}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),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 a=this.options,b="";BI.isKey(a.value)&&(b=this._digest(a.value,a.items)),this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b,disableSelected:!0,width:a.isShowDown?a.width-12:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight,selected:BI.isNotEmptyString(b)}),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(b)}),this.down.setVisible(a.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(a,b){var c="";return a=BI.isArray(a)?a[0]:a,BI.any(b,function(b,d){if(a===d.value)return c=d.iconCls,!0}),c},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c=this._digest(a,this.options.items);a=BI.isArray(a)?a[0]:a,BI.isNotEmptyString(c)?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:b.items,height:b.height,text:b.text,iconCls:b.iconCls,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth,title:b.title,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this.setValue(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:a.behaviors,value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a,b){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var c=this.options;a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:c.iconWrapperWidth,iconHeight:c.iconHeight,iconWidth:c.iconWidth}),this.popup.populate(a,b)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),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 a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,adjustLength:2,toggle:!1,ref:function(){a.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){a.trigger=this},items:b.items,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:b.value,items:b.items,ref:function(){a.popup=this,a.trigger.getSearcher().setAdapter(a.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:252},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){a.triggerBtn=this},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this._checkError(a.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.options.items=a,this.combo.populate(a)},setValue:function(a){this.combo.setValue(a),this._checkError(a)},getValue:function(){var a=this.combo.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo),BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var a=this,b=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){a.popup=this},items:BI.createItems(b.items,{type:"bi.single_select_item",textAlign:b.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,c,d)}}]}]}},mounted:function(){this.check()},populate:function(a,b,c){var d=BI.concat(a,b);BI.SearchTextValueComboPopup.superclass.populate.apply(this,d),d=BI.createItems(d,{type:"bi.single_select_item",height:24}),this.popup.populate(d,c)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup),BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value,b.items),value:b.value,height:b.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(a,c){var d=a.keyword,e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g,f)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(a){this.editor.setState(a)},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this._setState(this._digest(a,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),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,value:b.value,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this._checkError(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a), +this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),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 a=this,b=this.options;this._createValueMap();var c;BI.isNotNull(b.value)&&(c=this._digest(b.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:b.height,items:b.items,text:b.text,value:c}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,value:BI.isNull(c)?[]:[c],items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var b=a.combo.getValue()[0].value;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var b=a.combo.getValue()[0].childValue;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},_digest:function(a){return this.value=a,this.valueMap[a]},setValue:function(a){a=this._digest(a),this.combo.setValue([a]),this.trigger.setValue(a)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text,value:BI.isNull(a.value)?"":a.value.childValue||a.value.value})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a.childValue||a.value)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker,value:b.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(b.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:b.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]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.text.setStyle(a)},setValue:function(a){var b=this.options;this.editor.setValue(a),this._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(a.keyword)&&this.text.doRedMark(a.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text tip-text-style",textAlign:"left",height:b.height,text:b.text,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")},title:BI.isNotNull(b.tipText)?b.tipText:function(){var b="";return BI.isString(a.stateValue)&&(b=a.stateValue),BI.isArray(a.stateValue)&&1===a.stateValue.length&&(b=a.stateValue[0]),b},warningTitle:b.warningTitle,tipType:b.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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.options.disabled===!1&&(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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=a,BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text"))))},setTipType:function(a){this.text.options.tipType=a}}),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),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text",textAlign:"left",text:b.text,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")), +this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),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),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(c,{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(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.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:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded(),a.check()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.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(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{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(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 a=this,b=this.options;return[{type:"bi.label",text:b.text,height:b.height,value:b.value,hgap:b.hgap,ref:function(){a.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){a.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(a){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),a?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var a=this,b=this.options;return{type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.linear_segment_button",height:b.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){a.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.buttonGroup=this}}},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),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 a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(b.value)&&this.setValue(b.value)},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.allSelected=!!a,this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{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(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"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(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),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:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1),this.setPagerVisible(a>1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate(),this.setPagerVisible(this.options.pages>1)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),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 a=this.options;a.vertical,a.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 a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev column-pre-page-h-font"},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 direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev row-pre-page-h-font"},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 direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},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(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[86,110,0,24],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),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),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 a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:a.height,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:b.value,items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},_setEnable:function(a){BI.Segment.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(a){return a.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.selected===!0,d=!b.selected&&b.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())},selected:c,invisible:d}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)},invisible:c||!d}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:b.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(a){this.checkbox.setSelected(!!a)},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this.halfSelected=!!a,a===!0?(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(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(b),!b&&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),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(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};BI.isKey(f.id)||(f.id=BI.UUID()),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.mid_plus_group_node",e===a.length-1&&(g.type="bi.last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a,b){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a,b)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),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(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),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(){function a(a,b){return!1}function b(a,b){return b.isLeaf?{}:{color:"#999999"}}var c={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:b},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return c},_dealWidthNodes:function(a){a=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),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 a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate(),BI.isNotNull(b.value)&&this.setValue(b.value)},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},_digest:function(a){a||(a=[]);var b=this,c={},d=[];return BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),BI.makeObject(a.concat(d))},setValue:function(a){this.tree.setValue(this._digest(a))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,title:function(){return a.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:b.triggerWidth||b.height},width:b.triggerWidth||b.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:24})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(b){a.wrapper=b},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.iconWrapperWidth||b.height},{el:this.text,lgap:BI.isEmptyString(b.iconCls)?5:0},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a)},setIcon:function(a){var b=this.options;this.icon.setIcon(a);var c=this.wrapper.attr("items")[0],d=this.wrapper.attr("items")[1];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,d.lgap=5,this.wrapper.resize()):c.width!==(b.iconWrapperWidth||b.height)&&(c.width=b.iconWrapperWidth||b.height,d.lgap=0,this.wrapper.resize())},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),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 a=this.options,b=this._digist(a.value,a.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:b.text,iconCls:b.iconCls,height:a.height,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth})},_digist:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d,e=BI.Tree.transformToArrayFormat(b);return BI.any(e,function(b,c){if(BI.deepContains(a,c.value))return d={text:c.text||c.value,iconCls:c.iconCls},!0}),BI.isNotNull(d)?{text:d.text,iconCls:d.iconCls}:{text:c.text,iconCls:c.iconCls}},setValue:function(a){var b=this._digist(a,this.options.items);this.trigger.setText(b.text),this.trigger.setIcon(b.iconCls)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text,title:function(){return a.text.getText()},tipType:b.tipType,warningTitle:b.warningTitle,hgap:c.hgap,readonly:b.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setText:function(a){this.text.setText(a)},setTipType:function(a){this.text.options.tipType=a}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),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 a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height,readonly:a.readonly,text:this._digest(a.value,a.items),tipType:a.tipType,warningTitle:a.warningTitle})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},setTipType:function(a){this.trigger.setTipType(a)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),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 a=this.options,b=this._digest(a.text,a.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2,text:b.text,cls:b.cls})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?{cls:"",text:d.join(",")}:{cls:"bi-water-mark",text:c.text}},setValue:function(a){var b=this._digest(a,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(b.cls),this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:a.triggerWidth||a.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:a.triggerWidth||a.height}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:b.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(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:b.behaviors,min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=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===a._month?a.setValue({year:a.year.getValue()-1,month:12}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._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===a._month?a.setValue({year:a.year.getValue()+1,month:1}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:b.behaviors,min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:b.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.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 a=this.options,b=!(1===this._month&&this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(12===this._month&&this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=BI.parseInt(a.year),this._month=BI.parseInt(a.month),this.year.setValue(a.year),this.month.setValue(a.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),BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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(){a.setValue(a.year.getValue()-1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._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(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,behaviors:b.behaviors,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.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:{type:"bi.horizontal_float",width:50,items:[{el:this.year}]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:1});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.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(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.calendar,left:5,right:5},{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),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(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear();var c=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),d=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:[c,d]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();c.setEnable(!b.isFrontYear()),d.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;a=BI.parseInt(a);var c=BI.parseDateTime(b.min,"%Y-%X-%d"),d=BI.parseDateTime(b.max,"%Y-%X-%d");BI.checkDateVoid(a,1,1,BI.print(BI.getDate(c.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(d.getFullYear(),0,1),"%Y-%X-%d"))[0]?(a=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime={year:b.year,month:b.month},0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(b.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(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDatePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDatePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateCombo.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options,c=BI.getDate();this.storeValue=BI.isNotNull(b.value)?b.value:{year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:b.minDate,max:b.maxDate,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.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(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var d=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});d.on(BI.IconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()||a.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:d,top:0,right:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},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),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 a=this,b=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(){a.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(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.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(b){a.timeSelect=b}}]},height:50},{el:this.dateButton,height:30}]}),this.setValue(b.value)},setValue:function(a){var b,c=a;BI.isNull(c)?(b=BI.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}),this.timeSelect.setValue({hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()})):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.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),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text},{el:BI.createWidget(),width:a.height}]}),this.setValue(a.value)},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=BI.getDate(),b=BI.print(c,"%Y-%X-%d %H:%M:%S");else{var d=BI.getDate(c.year,c.month-1,c.day,c.hour,c.minute,c.second);b=BI.print(d,"%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.StaticDateTimePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime=BI.extend(a.selectedTime,{year:b.year,month:b.month,day:d}),0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.calendar.empty(),a.setValue(a.selectedTime),a.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(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.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(b.selectedTime)},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=BI.extend({},this.timeSelect.getValue(),a)},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){a=a||{},this._setDatePicker(a),this._setCalendar(a),this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_time_pane_card",BI.StaticDateTimePaneCard),BI.DynamicDateTimePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDateTimePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDateTimePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDateTimePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateTimePane.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateTimePane.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:b.stopPropagation,maxHeight:1e3,minWidth:140}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(a){this.downlistcombo.showView(a)},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},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),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 a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:a.value}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:36,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),BI.extend(a.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),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:36,disableSelected:!0,selected:this._digest(a.value)}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:24,forceNotSelected:!0});var c=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(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},_digest:function(a){var b=this.options;return a=BI.isArray(a)?a:[a],BI.any(a,function(a,c){return BI.contains(b.childValues,c)})},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(a){this.icon1.setSelected(this._digest(a))}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),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 a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options,c=this._createChildren(this.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!BI.contains(a.singleValues,d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.isDefaultInit=!0,c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5,maxHeight:378},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=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});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?1:0}},setValue:function(a){a=a||{},this.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT;var b=[],c=[];BI.isNotNull(a.year)&&(b.push(BI.DynamicDateCard.TYPE.YEAR),c.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))),BI.isNotNull(a.quarter)&&(b.push(BI.DynamicDateCard.TYPE.QUARTER),c.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))),BI.isNotNull(a.month)&&(b.push(BI.DynamicDateCard.TYPE.MONTH),c.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))),BI.isNotNull(a.week)&&(b.push(BI.DynamicDateCard.TYPE.WEEK),c.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,a.week))),BI.isNotNull(a.day)&&(b.push(BI.DynamicDateCard.TYPE.DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,a.day))),BI.isNotNull(a.workDay)&&(b.push(BI.DynamicDateCard.TYPE.WORK_DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,a.workDay))),this.checkgroup.setValue(b),this.workDayBox.setSelected(BI.isNotNull(a.workDay)),this.resultPane.populate(this._getParamJson(c,a.position))},getValue:function(){var a=this,b={},c=this.checkgroup.getValue(),d=this.resultPane.getAllButtons();if(0!==c.length&&BI.each(d,function(c,d){var e=d.getValue();switch(e.dateType){case BI.DynamicDateCard.TYPE.YEAR:b.year=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.QUARTER:b.quarter=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.MONTH:b.month=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.WEEK:b.week=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.DAY:b.day=0===e.offset?-e.value:e.value}BI.isNull(e.dateType)&&(b.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var e=d[0].getValue();b.workDay=0===e.offset?-e.value:e.value}return b}}),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}}),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 a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:b.minDate,max:b.maxDate,format:b.format,allowEdit:b.allowEdit,watermark:b.watermark,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.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:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},_defaultState:function(){},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(a){return BI.isNaturalNumber(a)},value:b.value,ref:function(){a.editor=this},errorText:function(a){return BI.isEmptyString(a)?BI.i18nText("BI-Basic_Please_Input_Content"):BI.i18nText("BI-Please_Input_Natural_Number")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:b.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(){a.offsetCombo=this},container:null,value:b.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var a="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:a=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:a=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:a=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:a=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:a=BI.i18nText("BI-Basic_Day");break;case BI.DynamicDateCard.TYPE.WORK_DAY:default:a=BI.i18nText("BI-Basic_Work_Day")}return a},setValue:function(a){a=a||{},a.value=a.value||0,a.offset=a.offset||0,this.editor.setValue(a.value),this.offsetCombo.setValue(a.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),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 a=this,b=this.options,c=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:c.buttonHeight-1,listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){a.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),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),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2]}}}a.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.getDate();e=BI.DynamicDateHelper.getCalculation(c);var f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[0,1,2],d=this._getFormatString().match(/%./g);BI.each(d,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":default:c[2]=a}});var e=BI.parseDateTime(a,this._getFormatString());BI.print(e,this._getFormatString())===a&&(a=BI.print(e,b.compareFormat),c=[0,1,2]);var f=a.match(/\d+/g),g=[];return BI.each(f,function(a){g[a]=f[c[a]]}),g.length===c.length&&2===g[0].length?BI.print(BI.parseDateTime(g.join("-"),b.compareFormat),b.compareFormat):g.join("-")},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,this._getFormatString()),this._const.compareFormat);return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,this._getFormatString()),c=BI.print(b,this._const.compareFormat);return b.getMonth()>=0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),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),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",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:b.minDate,max:b.maxDate,allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate(),hour:0,minute:0,second:0}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},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_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options,c=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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){a.timeSelect=this}},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a.timeSelect.setValue(),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();return{type:a,value:a===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), BI.DynamicDateTimeSelect=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-select"},render:function(){var a=this;return{type:"bi.center_adapt",items:[{type:"bi.vertical_adapt",items:[{el:{type:"bi.number_editor",ref:function(){a.hour=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<24},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkHour(b),this.setValue(a._formatValueToDoubleDigit(b)),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.HOUR);this.setValue(b)}}],width:60,height:24}},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.minute=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkMinute(b),this.setValue(a._formatValueToDoubleDigit(b),BI.DynamicDateTimeSelect.MINUTE),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.MINUTE);this.setValue(b)}}],width:60,height:24},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.second=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkSecond(b),this.setValue(a._formatValueToDoubleDigit(b)),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}}],width:60,height:24}]}]}},_checkBorder:function(a){a=a||{},this._checkHour(a.hour),this._checkMinute(a.minute),this._checkSecond(a.second)},_checkHour:function(a){this.hour.setDownEnable(BI.parseInt(a)>0),this.hour.setUpEnable(BI.parseInt(a)<23)},_checkMinute:function(a){this.minute.setDownEnable(BI.parseInt(a)>0),this.minute.setUpEnable(BI.parseInt(a)<59)},_checkSecond:function(a){this.second.setDownEnable(BI.parseInt(a)>0),this.second.setUpEnable(BI.parseInt(a)<59)},_autoSwitch:function(a,b){var c=0,d=a+"";switch(b){case BI.DynamicDateTimeSelect.HOUR:c=2;break;case BI.DynamicDateTimeSelect.MINUTE:c=5}if(1===d.length&&BI.parseInt(d)>c&&(d="0"+d),2===d.length)switch(b){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 d},_formatValueToDoubleDigit:function(a){(BI.isNull(a)||BI.isEmptyString(a))&&(a=0);var b=BI.parseInt(a);return b<10&&(b="0"+b),b},_assertValue:function(a){return a=a||{},a.hour=this._formatValueToDoubleDigit(a.hour)||"00",a.minute=this._formatValueToDoubleDigit(a.minute)||"00",a.second=this._formatValueToDoubleDigit(a.second)||"00",a},getValue:function(){return{hour:BI.parseInt(this.hour.getValue()),minute:BI.parseInt(this.minute.getValue()),second:BI.parseInt(this.second.getValue())}},setValue:function(a){a=this._assertValue(a),this.hour.setValue(a.hour),this.minute.setValue(a.minute),this.second.setValue(a.second),this._checkBorder(a)}}),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}),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2],hour:0|d[3],minute:0|d[4],second:0|d[5]}}}a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.DynamicDateHelper.getCalculation(c),f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[],d=!1,e=this._getFormatString().match(/%./g);BI.each(e,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":c[2]=a;break;case"%S":d=!0}});var f=BI.parseDateTime(a,this._getFormatString());BI.print(f,this._getFormatString())===a&&(a=BI.print(f,b.compareFormat),c=[0,1,2]);var g=a.match(/\d+/g),h=[];BI.each(g.slice(0,3),function(a){h[a]=g[c[a]]});var i=g.slice(3);BI.each(i,function(a,b){BI.isNumeric(b)&&1===b.length&&(i[a]="0"+b)}),2!==i.length||d||i.push("00");var j=i.join(":"),k=h.slice(0,3).join("-");return BI.isNotEmptyString(j)&&(k+=" "+j),k},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S"),"%Y-%x-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S"),"%Y-%x-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S"),"%Y-%X-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d"),c=BI.print(b,"%Y-%X-%d");return b.getMonth()>0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue},isValid:function(){return this.editor.isValid()}}),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),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,hgap:1,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"close-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CHANGE),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.icon_label",cls:"search-font"},width:24},{el:a.editor},{el:this.clear,width:24}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:20})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,title:b.title,tipType:b.tipType,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:20})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.IntervalSlider=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""},render:function(){var a=this,b=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:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=a.valueOne,c=BI.parseFloat(this.getValue());a.valueOne=c;var d=a._getPercentByValue(c),e=BI.parseFloat(d.toFixed(1));a._setSliderOnePosition(e),a._setBlueTrack(),a._checkLabelPosition(b,a.valueTwo,a.valueOne,a.valueTwo),a.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:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=a.valueTwo,c=BI.parseFloat(this.getValue());a.valueTwo=c;var d=a._getPercentByValue(c),e=BI.parseFloat(d.toFixed(1));a._setSliderTwoPosition(e),a._setBlueTrack(),a._checkLabelPosition(a.valueOne,b,a.valueOne,a.valueTwo),a.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:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]}},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit);var g=this.valueOne,h=this.valueTwo;b?(this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f,this._checkLabelPosition(g,h,f,this.valueTwo)):(this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f,this._checkLabelPosition(g,h,this.valueOne,f)),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=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:a.EDITOR_R_GAP,height:a.SLIDER_HEIGHT},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=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:a.SLIDER_WIDTH_HALF,height:a.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(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_checkLabelPosition:function(a,b,c,d,e){if(a=BI.parseFloat(a),b=BI.parseFloat(b),c=BI.parseFloat(c),d=BI.parseFloat(d),a<=b&&c>d||a>=b&&c-1){d=b.split("e");var e=BI.size(d[0].split(".")[1]),f=BI.parseInt(d[1].substring(1));return e-f}return d=b.split("."),d.length>1?d[1].length:0},_assertValue:function(a){return a<=this.min?this.min:a>=this.max?this.max:a},_setEnable:function(a){BI.IntervalSlider.superclass._setEnable.apply(this,[a]),a?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(a){var b=BI.parseFloat(a.min),c=BI.parseFloat(a.max);!isNaN(b)&&!isNaN(c)&&c>=b&&(this.min=b,this.max=c,this.valueOne=b,this.valueTwo=c,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),c===b&&this._setDraggableEnable(!1)},setValue:function(a){var b=this.options,c=BI.parseFloat(a.min),d=BI.parseFloat(a.max);c=b.digit===!1?c:c.toFixed(b.digit),d=b.digit===!1?d:d.toFixed(b.digit),isNaN(c)||isNaN(d)||(this._checkValidation(c)&&(this.valueOne=this.valueOne<=this.valueTwo?c:d),this._checkValidation(d)&&(this.valueTwo=this.valueOne<=this.valueTwo?d:c),cthis.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(){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(this.valueOne),this.labelTwo.setValue(this.valueTwo),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider),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(a){for(var b="1",c=0;c0)var d=b;else{var d=a;c=0-c}for(var e=0;e=b.numDecimal.length?a.numDecimal.length:b.numDecimal.length}function d(a,b){for(var c=b-a.length,d=0;d=BI.parseInt(f.numDecimal))var i=(BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h);else{g--;var k=this._getMagnitude(h),i=(k+BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h)}var l=g+"."+j;return BI.parseFloat(l)},_accurateAddition:function(a,b){function c(a,b){for(var c=b-a.length,d=0;db)var e=d.numInteger.slice(0,d.numInteger.length-b),f=d.numInteger.slice(-b);else var e="0",f=c(d.numInteger,b);var g=e+"."+f+d.numDecimal;return BI.parseFloat(g)},accurateSubtraction:function(a,b){return a>=0&&b>=0?a>=b?this._accurateSubtraction(a,b):-this._accurateSubtraction(b,a):a>=0&&b<0?this._accurateAddition(a,-b):a<0&&b>=0?-this._accurateAddition(-a,b):a<0&&b<0?a>=b?this._accurateSubtraction(-b,-a):this._accurateSubtraction(-a,-b):void 0},accurateAddition:function(a,b){return a>=0&&b>=0?this._accurateAddition(a,b):a>=0&&b<0?this.accurateSubtraction(a,-b):a<0&&b>=0?this.accurateSubtraction(b,-a):a<0&&b<0?-this._accurateAddition(-a,-b):void 0},accurateMultiplication:function(a,b){return a>=0&&b>=0?this._accurateMultiplication(a,b):a>=0&&b<0?-this._accurateMultiplication(a,-b):a<0&&b>=0?-this._accurateMultiplication(-a,b):a<0&&b<0?this._accurateMultiplication(-a,-b):void 0},accurateDivisionTenExponent:function(a,b){return a>=0?this._accurateDivisionTenExponent(a,b):-this._accurateDivisionTenExponent(-a,b)}}),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:24})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger",value:b.value}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM))}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),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 a=this,b=this.options,c=[1,7,2,8,3,9,4,10,5,11,6,12],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),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:b.value}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){a=BI.parseInt(a),this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:24})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(""),this.editor.setValue(""),void this.editor.setTitle(""))},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),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 a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.multi_layer_down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:b.stopPropagation,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(a){this.downlistcombo.showView(a)},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},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),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 a=BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options,c=this._createPopupItems(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])){d=a.childValueMap[b];var e=a.fatherValueMap[b],f=(e+"").split("_");a.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE,d,f.length>1?f:e)}else a.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE,d,c);if(!BI.contains(a.singleValues,d)){var g=a.getValue(),h=[];BI.each(g,function(a,b){b.value!=d&&h.push(b)}),a.setValue(h)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createPopupItems:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5},c.el.childValues=[],BI.each(c.children,function(a,d){d=d.el?BI.extend(d.el,{children:d.children}):d;var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value),BI.isNotEmptyArray(d.children)&&(d.type="bi.down_list_group_item",b._createChildren(d),d.height=b.constants.height,d.iconCls2=b.constants.nextIcon,c.el.childValues=BI.concat(c.el.childValues,d.childValues))})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=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});c.push(g)}}),c},_createChildren:function(a){var b=this;a.childValues=[],BI.each(a.children,function(c,d){var e=BI.deepClone(a.value),f=BI.deepClone(d.value);d.type="bi.down_list_item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),a.childValues.push(d.value)})},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a1?g:f}else e.value=d;b.push(e)}),b}}),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),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})},render:function(){var a=this,b=this.options,c=b.itemsCreator===BI.emptyFn?this._getSyncConfig():this._getAsyncConfig();return b.allowEdit||b.itemsCreator!==BI.emptyFn?{type:"bi.absolute",items:[{el:c,left:0,right:0,top:0,bottom:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(b){a.triggerBtn=b},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}:c},_getBaseConfig:function(){var a=this,b=this.options;return{type:"bi.combo",container:b.container,adjustLength:2,ref:function(b){a.combo=b},popup:{el:{type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,itemsCreator:b.itemsCreator,items:b.items,ref:function(b){a.trigger&&a.trigger.getSearcher().setAdapter(b)},listeners:[{eventName:BI.MultiLayerSelectTreePopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:400,minHeight:240}}},_getSyncConfig:function(){var a=this.options,b=this._getBaseConfig();return b.el={type:"bi.single_tree_trigger",text:a.text,height:a.height,items:a.items,value:a.value},b},_getAsyncConfig:function(){var a=this,b=this.options,c=this._getBaseConfig();return BI.extend(c,{el:{type:"bi.multilayer_select_tree_trigger",allowEdit:b.allowEdit,cls:"multilayer-select-tree-trigger",ref:function(b){a.trigger=b},items:b.items,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_FOCUS)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BLUR)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING,action:function(){a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING)}}]},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}}]})},setValue:function(a){a=BI.isArray(a)?a:[a],this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(a){this.combo.populate(a)}}),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.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),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 a=this.options;BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.storeValue=a.value,this.initTree(this.options.items),this.check()},_formatItems:function(a,b,c){var d=this,e=this.options,f=e.keywordGetter();return BI.each(a,function(e,g){var h={};g.layer=b,BI.isKey(g.id)||(g.id=BI.UUID()),g.keyword=g.keyword||f,h.pNode=c,g.isParent===!0||g.parent===!0||BI.isNotEmptyArray(g.children)?(h.type="bi.multilayer_select_tree_mid_plus_group_node",e===a.length-1&&(h.type="bi.multilayer_select_tree_last_plus_group_node",h.isLastNode=!0),0!==e||c||(h.type="bi.multilayer_select_tree_first_plus_group_node"),0!==e||e!==a.length-1||c||(h.type="bi.multilayer_select_tree_plus_group_node"),BI.defaults(g,h),d._formatItems(g.children,b+1,g)):(h.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==e||c||(h.type="bi.multilayer_single_tree_first_tree_leaf_item"),e===a.length-1&&(h.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(g,h))}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options,d=!1;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,e){1===a.times&&!a.node&&BI.nextTick(function(){b.loading()}),c.itemsCreator(a,function(c){d=c.hasNext,1===a.times&&!a.node&&b._populate(c.items),e(b._formatItems(BI.Tree.transformToTreeFormat(c.items),a.node?a.node.layer+1:0,a.node)),b.setValue(b.storeValue),1===a.times&&!a.node&&BI.nextTick(function(){b.loaded()})})},value:c.value,el:{type:"bi.loader",isDefaultInit:c.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:c.chooseType,behaviors:c.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return d}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&(b.setValue(c),b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:c.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(a){this._populate(a),BI.isNull(a)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.options.chooseType===BI.Selection.None||(this.storeValue=a,this.tree.setValue(a))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),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:""})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator,keywordGetter:b.keywordGetter,value:b.value,scrollable:null}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-multi-layer-select-tree-trigger bi-border bi-focus-shadow",height:24,valueFormatter:function(a){return a},itemsCreator:BI.emptyFn},render:function(){var a=this,b=this.options,c={type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value),value:b.value,height:b.height,tipText:"",listeners:[{eventName:BI.StateEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS)}},{eventName:BI.StateEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_BLUR)}},{eventName:BI.StateEditor.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING)}}]},popup:{type:"bi.multilayer_select_tree_popup",itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},keywordGetter:function(){return a.editor.getValue()},cls:"bi-card"},onSearch:function(a,c){var d=a.keyword;if(b.itemsCreator===BI.emptyFn){var e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g.concat(f))}else c()},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]};return b.allowEdit?c:{type:"bi.absolute",items:[{el:c,left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}},_digest:function(a){return this.options.valueFormatter(a)},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this.editor.setState(this._digest(a[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.shortcut("bi.multilayer_select_tree_trigger",BI.MultiLayerSelectTreeTrigger),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSelectTreePlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_plus_group_node",BI.MultiLayerSelectTreePlusGroupNode),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})},render:function(){ var a=this,b=this.options,c=b.itemsCreator===BI.emptyFn?this._getSyncConfig():this._getAsyncConfig();return b.allowEdit||b.itemsCreator!==BI.emptyFn?{type:"bi.absolute",items:[{el:c,left:0,right:0,top:0,bottom:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(b){a.triggerBtn=b},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}:c},_getBaseConfig:function(){var a=this,b=this.options;return{type:"bi.combo",container:b.container,adjustLength:2,ref:function(b){a.combo=b},popup:{el:{type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,itemsCreator:b.itemsCreator,items:b.items,ref:function(b){a.trigger&&a.trigger.getSearcher().setAdapter(b)},listeners:[{eventName:BI.MultiLayerSingleTreePopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:400,minHeight:240}}},_getSyncConfig:function(){var a=this.options,b=this._getBaseConfig();return b.el={type:"bi.single_tree_trigger",text:a.text,height:a.height,items:a.items,value:a.value},b},_getAsyncConfig:function(){var a=this,b=this.options,c=this._getBaseConfig();return BI.extend(c,{el:{type:"bi.multilayer_single_tree_trigger",allowEdit:b.allowEdit,cls:"multilayer-single-tree-trigger",ref:function(b){a.trigger=b},items:b.items,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_FOCUS)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BLUR)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING,action:function(){a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING)}}]},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}}]})},setValue:function(a){a=BI.isArray(a)?a:[a],this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(a){this.combo.populate(a)}}),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.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),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 a=this.options;BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.storeValue=a.value,this.initTree(this.options.items),this.check()},_formatItems:function(a,b,c){var d=this,e=this.options,f=e.keywordGetter();return BI.each(a,function(e,g){var h={};g.layer=b,BI.isKey(g.id)||(g.id=BI.UUID()),g.keyword=g.keyword||f,h.pNode=c,g.isParent===!0||g.parent===!0||BI.isNotEmptyArray(g.children)?(h.type="bi.multilayer_single_tree_mid_plus_group_node",e===a.length-1&&(h.type="bi.multilayer_single_tree_last_plus_group_node",h.isLastNode=!0),0!==e||c||(h.type="bi.multilayer_single_tree_first_plus_group_node"),0!==e||e!==a.length-1||c||(h.type="bi.multilayer_single_tree_plus_group_node"),BI.defaults(g,h),d._formatItems(g.children,b+1,g)):(h.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==e||c||(h.type="bi.multilayer_single_tree_first_tree_leaf_item"),e===a.length-1&&(h.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(g,h))}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options,d=!1;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,itemsCreator:function(a,e){1===a.times&&!a.node&&BI.nextTick(function(){b.loading()}),c.itemsCreator(a,function(c){d=c.hasNext,1===a.times&&!a.node&&b._populate(c.items),e(b._formatItems(BI.Tree.transformToTreeFormat(c.items),a.node?a.node.layer+1:0,a.node)),b.setValue(b.storeValue),1===a.times&&!a.node&&BI.nextTick(function(){b.loaded()})})},el:{type:"bi.loader",isDefaultInit:c.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:c.chooseType,behaviors:c.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return d}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&(b.setValue(c),b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:c.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(a){this._populate(a),BI.isNull(a)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.options.chooseType===BI.Selection.None||(this.storeValue=a,this.tree.setValue(a))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),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:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator,keywordGetter:b.keywordGetter,value:b.value,scrollable:null}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-multi-layer-single-tree-trigger bi-border bi-focus-shadow",height:24,valueFormatter:function(a){return a},itemsCreator:BI.emptyFn},render:function(){var a=this,b=this.options,c={type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value),value:b.value,height:b.height,tipText:"",listeners:[{eventName:BI.StateEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS)}},{eventName:BI.StateEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_BLUR)}},{eventName:BI.StateEditor.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING)}}]},popup:{type:"bi.multilayer_single_tree_popup",itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},keywordGetter:function(){return a.editor.getValue()},cls:"bi-card"},onSearch:function(a,c){var d=a.keyword;if(b.itemsCreator===BI.emptyFn){var e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g.concat(f))}else c()},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]};return b.allowEdit?c:{type:"bi.absolute",items:[{el:c,left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}},_digest:function(a){return this.options.valueFormatter(a)},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this.editor.setState(this._digest(a[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.shortcut("bi.multilayer_single_tree_trigger",BI.MultiLayerSingleTreeTrigger),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.node=this._createNode();for(var b=[],c=a.pNode;c;)c.isLastNode&&b.push(c.layer),c=c.pNode;var d=[];BI.count(0,a.layer,function(c){d.push({type:"bi.layout",cls:BI.contains(b,c)?"":"base-line-conn-background",width:12,height:a.height})}),d.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(a.layer,12),items:[d]})},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(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)},_createNode:function(){var a=this,b=this.options;return BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,isLastNode:b.isLastNode,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.node=this._createNode();for(var b=[],c=a.pNode;c;)c.isLastNode&&b.push(c.layer),c=c.pNode;var d=[];BI.count(0,a.layer,function(c){d.push({type:"bi.layout",cls:BI.contains(b,c)?"":"base-line-conn-background",width:12,height:a.height})}),d.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(a.layer,12),items:[d]})},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(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)},_createNode:function(){var a=this,b=this.options;return BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.node=this._createNode();for(var b=[],c=a.pNode;c;)c.isLastNode&&b.push(c.layer),c=c.pNode;var d=[];BI.count(0,a.layer,function(c){d.push({type:"bi.layout",cls:BI.contains(b,c)?"":"base-line-conn-background",width:12,height:a.height})}),d.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(a.layer,12),items:[d]})},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(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)},_createNode:function(){var a=this,b=this.options;return BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.node=this._createNode();for(var b=[],c=a.pNode;c;)c.isLastNode&&b.push(c.layer),c=c.pNode;var d=[];BI.count(0,a.layer,function(c){d.push({type:"bi.layout",cls:BI.contains(b,c)?"":"base-line-conn-background",width:12,height:a.height})}),d.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(a.layer,12),items:[d]})},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(a){BI.MultiLayerSingleTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)},_createNode:function(){var a=this,b=this.options;return BI.createWidget({type:"bi.plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,isLastNode:b.isLastNode,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_plus_group_node",BI.MultiLayerSingleTreePlusGroupNode),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var c=[],d=b.pNode;d;)d.isLastNode&&c.push(d.layer),d=d.pNode;var e=[];BI.count(0,b.layer,function(a){e.push({type:"bi.layout",cls:BI.contains(c,a)?"":"base-line-conn-background",width:12,height:b.height})}),e.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,12),items:[e]})},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(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),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 a=this,b=this.options;this.storeValue=b.value||{},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),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(){b.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(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),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 a=this,b=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(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{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(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),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 a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=b.value||{},this._assertValue(this.storeValue),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:b.allowEdit,height:b.height,text:b.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})},value:this.storeValue}),this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue(""),a.fireEvent(BI.MultiSelectCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())}),a.fireEvent(BI.MultiSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()}),a.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().updateSelectedValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()}),a.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&(d.storeValue.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,c.storeValue.assist&&c.storeValue.assist.push(g[b]),delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,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),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 diff --git a/dist/fineui.js b/dist/fineui.js index 1761145f6..475ea7f1d 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -21919,8 +21919,10 @@ BI.prepares.push(function () { }; var addResizeListener = function (element, fn) { - if (attachEvent) element.attachEvent("onresize", fn); - else { + if (attachEvent) { + element.attachEvent("onresize", fn); + fn(); + } else { if (!element.__resizeTriggers__) { if (getComputedStyle(element).position === "static") element.style.position = "relative"; createStyles(); @@ -38724,14 +38726,15 @@ BI.Pane = BI.inherit(BI.Widget, { loading: function () { var self = this, o = this.options; + var isIE = BI.isIE(); var loadingAnimation = BI.createWidget({ type: "bi.horizontal", - cls: "bi-loading-widget" + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""), + cls: "bi-loading-widget" + (isIE ? " wave-loading hack" : ""), height: 30, width: 30, hgap: 5, vgap: 2.5, - items: [{ + items: isIE ? [] : [{ type: "bi.layout", cls: "animate-rect rect1", height: 25, @@ -48522,9 +48525,13 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/** handler.attach_array.push(attachO); } } catch (e) { - if (isFunction(handler.onerror)) {handler.onerror(rpe, event || _global.event);} + if (isFunction(handler.onerror)) { + handler.onerror(rpe, event || _global.event); + } + } + if (isFunction(handler.onload)) { + handler.onload(rpe, {responseText: responseText}); } - if (isFunction(handler.onload)) {handler.onload(rpe, {responseText: responseText});} }, target = ["AjaxUpload", (new Date).getTime(), String(Math.random()).substring(2)].join("_"); try { // IE < 8 does not accept enctype attribute ... @@ -48735,7 +48742,14 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/** self.fireEvent(BI.File.EVENT_ERROR); return; } - self.fireEvent(BI.File.EVENT_UPLOADED); + var error = BI.some(_wrap.attach_array, function (index, attach) { + if (attach.errorCode) { + BI.Msg.toast(attach.errorMsg, {level: "error"}); + self.fireEvent(BI.File.EVENT_ERROR, attach); + return true; + } + }); + !error && self.fireEvent(BI.File.EVENT_UPLOADED); // enable again the submit button/element }, 1000); }; @@ -48941,10 +48955,10 @@ BI.Input = BI.inherit(BI.Single, { // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓) var originalEvent = e.originalEvent; if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { - keyCode = null; inputEventValid = true; self._keydown_ = true; _keydown(keyCode); + keyCode = null; } }) .click(function (e) { @@ -49049,18 +49063,20 @@ BI.Input = BI.inherit(BI.Single, { } this.fireEvent(BI.Input.EVENT_KEY_DOWN); - if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) { + // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 + var lastValue = this._lastValue; + if(BI.trim(this.getValue()) !== BI.trim(this._lastValue || "")){ + this._valueChange(); + } + if (BI.isEndWithBlank(this.getValue())) { this._pause = true; this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this); this.fireEvent(BI.Input.EVENT_PAUSE); this._defaultState(); } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && - BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { + BI.trim(this.getValue()) === "" && (lastValue !== null && BI.trim(lastValue) !== "")) { this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); this.fireEvent(BI.Input.EVENT_STOP); - this._valueChange(); - } else { - this._valueChange(); } }, diff --git a/dist/fineui.min.js b/dist/fineui.min.js index 65190ee72..93b117903 100644 --- a/dist/fineui.min.js +++ b/dist/fineui.min.js @@ -1,29 +1,29 @@ -/*! fineui 2019-07-12 17:17:35 */ +/*! fineui 2019-07-17 10:06:48 */ function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=0|b;if(f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);c>>0;if(0===e)return-1;for(b=e-1,arguments.length>1&&(b=Number(arguments[1]),b!=b?b=0:0!=b&&b!=1/0&&b!=-(1/0)&&(b=(b>0||-1)*Math.floor(Math.abs(b)))),c=b>=0?Math.min(b,e-1):e-Math.abs(b);c>=0;c--)if(c in d&&d[c]===a)return c;return-1}),_global.console=_global.console||function(){var a={};return a.log=a.warn=a.debug=a.info=a.error=a.time=a.dir=a.profile=a.clear=a.exception=a.trace=a.assert=function(){},a}(),_global.localStorage||(_global.localStorage={items:{},setItem:function(a,b){BI.Cache.addCookie(a,b)},getItem:function(a){return BI.Cache.getCookie(a)},removeItem:function(a){BI.Cache.deleteCookie(a)},key:function(){},clear:function(){this.items={}}}),Object.keys||(Object.keys=function(a){if(a!==Object(a))throw new TypeError("Object.keys called on a non-object");var b,c,d={__ob__:b,$accessors:b,$vbthis:b,$vbsetter:b},e=[];for(c in a)c in d||Object.prototype.hasOwnProperty.call(a,c)&&e.push(c);return e}),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="".__proto__===String.prototype?function(a){return a.__proto__}:function(a){return a.constructor.prototype}),Date.now||(Date.now=function(){return(new Date).valueOf()}),"undefined"!=typeof Set&&Set.toString().match(/native code/)||(Set=function(){this.set={}},Set.prototype.has=function(a){return void 0!==this.set[a]},Set.prototype.add=function(a){this.set[a]=1},Set.prototype.clear=function(){this.set={}}),!function(a){var b=a.navigator.userAgent.toLowerCase(),c=/msie/;if(c.test(b)){var d=Array.prototype.sort;Array.prototype.sort=function(a){if(a&&"function"==typeof a){if(this.length<2)return this;for(var b,c=0,e=c+1,f=this.length,g=!1,h=0;c0,g===!0&&(b=this[c],this[c]=this[e],this[e]=b);return this}return d.call(this)}}}(window);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),function(){function a(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function b(a,b,c,d){for(var e=-1,f=null==a?0:a.length;++e-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0: return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["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"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime(); }})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||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(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJCZGJMZMGXMPRYXKJNYMSGMZJYMKMFXMLDTGFBHCJHKYLPFMDXLQJJSMTQGZSJLQDLDGJYCALCMZCSDJLLNXDJFFFFJCZFMZFFPFKHKGDPSXKTACJDHHZDDCRRCFQYJKQCCWJDXHWJLYLLZGCFCQDSMLZPBJJPLSBCJGGDCKKDEZSQCCKJGCGKDJTJDLZYCXKLQSCGJCLTFPCQCZGWPJDQYZJJBYJHSJDZWGFSJGZKQCCZLLPSPKJGQJHZZLJPLGJGJJTHJJYJZCZMLZLYQBGJWMLJKXZDZNJQSYZMLJLLJKYWXMKJLHSKJGBMCLYYMKXJQLBMLLKMDXXKWYXYSLMLPSJQQJQXYXFJTJDXMXXLLCXQBSYJBGWYMBGGBCYXPJYGPEPFGDJGBHBNSQJYZJKJKHXQFGQZKFHYGKHDKLLSDJQXPQYKYBNQSXQNSZSWHBSXWHXWBZZXDMNSJBSBKBBZKLYLXGWXDRWYQZMYWSJQLCJXXJXKJEQXSCYETLZHLYYYSDZPAQYZCMTLSHTZCFYZYXYLJSDCJQAGYSLCQLYYYSHMRQQKLDXZSCSSSYDYCJYSFSJBFRSSZQSBXXPXJYSDRCKGJLGDKZJZBDKTCSYQPYHSTCLDJDHMXMCGXYZHJDDTMHLTXZXYLYMOHYJCLTYFBQQXPFBDFHHTKSQHZYYWCNXXCRWHOWGYJLEGWDQCWGFJYCSNTMYTOLBYGWQWESJPWNMLRYDZSZTXYQPZGCWXHNGPYXSHMYQJXZTDPPBFYHZHTJYFDZWKGKZBLDNTSXHQEEGZZYLZMMZYJZGXZXKHKSTXNXXWYLYAPSTHXDWHZYMPXAGKYDXBHNHXKDPJNMYHYLPMGOCSLNZHKXXLPZZLBMLSFBHHGYGYYGGBHSCYAQTYWLXTZQCEZYDQDQMMHTKLLSZHLSJZWFYHQSWSCWLQAZYNYTLSXTHAZNKZZSZZLAXXZWWCTGQQTDDYZTCCHYQZFLXPSLZYGPZSZNGLNDQTBDLXGTCTAJDKYWNSYZLJHHZZCWNYYZYWMHYCHHYXHJKZWSXHZYXLYSKQYSPSLYZWMYPPKBYGLKZHTYXAXQSYSHXASMCHKDSCRSWJPWXSGZJLWWSCHSJHSQNHCSEGNDAQTBAALZZMSSTDQJCJKTSCJAXPLGGXHHGXXZCXPDMMHLDGTYBYSJMXHMRCPXXJZCKZXSHMLQXXTTHXWZFKHCCZDYTCJYXQHLXDHYPJQXYLSYYDZOZJNYXQEZYSQYAYXWYPDGXDDXSPPYZNDLTWRHXYDXZZJHTCXMCZLHPYYYYMHZLLHNXMYLLLMDCPPXHMXDKYCYRDLTXJCHHZZXZLCCLYLNZSHZJZZLNNRLWHYQSNJHXYNTTTKYJPYCHHYEGKCTTWLGQRLGGTGTYGYHPYHYLQYQGCWYQKPYYYTTTTLHYHLLTYTTSPLKYZXGZWGPYDSSZZDQXSKCQNMJJZZBXYQMJRTFFBTKHZKBXLJJKDXJTLBWFZPPTKQTZTGPDGNTPJYFALQMKGXBDCLZFHZCLLLLADPMXDJHLCCLGYHDZFGYDDGCYYFGYDXKSSEBDHYKDKDKHNAXXYBPBYYHXZQGAFFQYJXDMLJCSQZLLPCHBSXGJYNDYBYQSPZWJLZKSDDTACTBXZDYZYPJZQSJNKKTKNJDJGYYPGTLFYQKASDNTCYHBLWDZHBBYDWJRYGKZYHEYYFJMSDTYFZJJHGCXPLXHLDWXXJKYTCYKSSSMTWCTTQZLPBSZDZWZXGZAGYKTYWXLHLSPBCLLOQMMZSSLCMBJCSZZKYDCZJGQQDSMCYTZQQLWZQZXSSFPTTFQMDDZDSHDTDWFHTDYZJYQJQKYPBDJYYXTLJHDRQXXXHAYDHRJLKLYTWHLLRLLRCXYLBWSRSZZSYMKZZHHKYHXKSMDSYDYCJPBZBSQLFCXXXNXKXWYWSDZYQOGGQMMYHCDZTTFJYYBGSTTTYBYKJDHKYXBELHTYPJQNFXFDYKZHQKZBYJTZBXHFDXKDASWTAWAJLDYJSFHBLDNNTNQJTJNCHXFJSRFWHZFMDRYJYJWZPDJKZYJYMPCYZNYNXFBYTFYFWYGDBNZZZDNYTXZEMMQBSQEHXFZMBMFLZZSRXYMJGSXWZJSPRYDJSJGXHJJGLJJYNZZJXHGXKYMLPYYYCXYTWQZSWHWLYRJLPXSLSXMFSWWKLCTNXNYNPSJSZHDZEPTXMYYWXYYSYWLXJQZQXZDCLEEELMCPJPCLWBXSQHFWWTFFJTNQJHJQDXHWLBYZNFJLALKYYJLDXHHYCSTYYWNRJYXYWTRMDRQHWQCMFJDYZMHMYYXJWMYZQZXTLMRSPWWCHAQBXYGZYPXYYRRCLMPYMGKSJSZYSRMYJSNXTPLNBAPPYPYLXYYZKYNLDZYJZCZNNLMZHHARQMPGWQTZMXXMLLHGDZXYHXKYXYCJMFFYYHJFSBSSQLXXNDYCANNMTCJCYPRRNYTYQNYYMBMSXNDLYLYSLJRLXYSXQMLLYZLZJJJKYZZCSFBZXXMSTBJGNXYZHLXNMCWSCYZYFZLXBRNNNYLBNRTGZQYSATSWRYHYJZMZDHZGZDWYBSSCSKXSYHYTXXGCQGXZZSHYXJSCRHMKKBXCZJYJYMKQHZJFNBHMQHYSNJNZYBKNQMCLGQHWLZNZSWXKHLJHYYBQLBFCDSXDLDSPFZPSKJYZWZXZDDXJSMMEGJSCSSMGCLXXKYYYLNYPWWWGYDKZJGGGZGGSYCKNJWNJPCXBJJTQTJWDSSPJXZXNZXUMELPXFSXTLLXCLJXJJLJZXCTPSWXLYDHLYQRWHSYCSQYYBYAYWJJJQFWQCQQCJQGXALDBZZYJGKGXPLTZYFXJLTPADKYQHPMATLCPDCKBMTXYBHKLENXDLEEGQDYMSAWHZMLJTWYGXLYQZLJEEYYBQQFFNLYXRDSCTGJGXYYNKLLYQKCCTLHJLQMKKZGCYYGLLLJDZGYDHZWXPYSJBZKDZGYZZHYWYFQYTYZSZYEZZLYMHJJHTSMQWYZLKYYWZCSRKQYTLTDXWCTYJKLWSQZWBDCQYNCJSRSZJLKCDCDTLZZZACQQZZDDXYPLXZBQJYLZLLLQDDZQJYJYJZYXNYYYNYJXKXDAZWYRDLJYYYRJLXLLDYXJCYWYWNQCCLDDNYYYNYCKCZHXXCCLGZQJGKWPPCQQJYSBZZXYJSQPXJPZBSBDSFNSFPZXHDWZTDWPPTFLZZBZDMYYPQJRSDZSQZSQXBDGCPZSWDWCSQZGMDHZXMWWFYBPDGPHTMJTHZSMMBGZMBZJCFZWFZBBZMQCFMBDMCJXLGPNJBBXGYHYYJGPTZGZMQBQTCGYXJXLWZKYDPDYMGCFTPFXYZTZXDZXTGKMTYBBCLBJASKYTSSQYYMSZXFJEWLXLLSZBQJJJAKLYLXLYCCTSXMCWFKKKBSXLLLLJYXTYLTJYYTDPJHNHNNKBYQNFQYYZBYYESSESSGDYHFHWTCJBSDZZTFDMXHCNJZYMQWSRYJDZJQPDQBBSTJGGFBKJBXTGQHNGWJXJGDLLTHZHHYYYYYYSXWTYYYCCBDBPYPZYCCZYJPZYWCBDLFWZCWJDXXHYHLHWZZXJTCZLCDPXUJCZZZLYXJJTXPHFXWPYWXZPTDZZBDZCYHJHMLXBQXSBYLRDTGJRRCTTTHYTCZWMXFYTWWZCWJWXJYWCSKYBZSCCTZQNHXNWXXKHKFHTSWOCCJYBCMPZZYKBNNZPBZHHZDLSYDDYTYFJPXYNGFXBYQXCBHXCPSXTYZDMKYSNXSXLHKMZXLYHDHKWHXXSSKQYHHCJYXGLHZXCSNHEKDTGZXQYPKDHEXTYKCNYMYYYPKQYYYKXZLTHJQTBYQHXBMYHSQCKWWYLLHCYYLNNEQXQWMCFBDCCMLJGGXDQKTLXKGNQCDGZJWYJJLYHHQTTTNWCHMXCXWHWSZJYDJCCDBQCDGDNYXZTHCQRXCBHZTQCBXWGQWYYBXHMBYMYQTYEXMQKYAQYRGYZSLFYKKQHYSSQYSHJGJCNXKZYCXSBXYXHYYLSTYCXQTHYSMGSCPMMGCCCCCMTZTASMGQZJHKLOSQYLSWTMXSYQKDZLJQQYPLSYCZTCQQPBBQJZCLPKHQZYYXXDTDDTSJCXFFLLCHQXMJLWCJCXTSPYCXNDTJSHJWXDQQJSKXYAMYLSJHMLALYKXCYYDMNMDQMXMCZNNCYBZKKYFLMCHCMLHXRCJJHSYLNMTJZGZGYWJXSRXCWJGJQHQZDQJDCJJZKJKGDZQGJJYJYLXZXXCDQHHHEYTMHLFSBDJSYYSHFYSTCZQLPBDRFRZTZYKYWHSZYQKWDQZRKMSYNBCRXQBJYFAZPZZEDZCJYWBCJWHYJBQSZYWRYSZPTDKZPFPBNZTKLQYHBBZPNPPTYZZYBQNYDCPJMMCYCQMCYFZZDCMNLFPBPLNGQJTBTTNJZPZBBZNJKLJQYLNBZQHKSJZNGGQSZZKYXSHPZSNBCGZKDDZQANZHJKDRTLZLSWJLJZLYWTJNDJZJHXYAYNCBGTZCSSQMNJPJYTYSWXZFKWJQTKHTZPLBHSNJZSYZBWZZZZLSYLSBJHDWWQPSLMMFBJDWAQYZTCJTBNNWZXQXCDSLQGDSDPDZHJTQQPSWLYYJZLGYXYZLCTCBJTKTYCZJTQKBSJLGMGZDMCSGPYNJZYQYYKNXRPWSZXMTNCSZZYXYBYHYZAXYWQCJTLLCKJJTJHGDXDXYQYZZBYWDLWQCGLZGJGQRQZCZSSBCRPCSKYDZNXJSQGXSSJMYDNSTZTPBDLTKZWXQWQTZEXNQCZGWEZKSSBYBRTSSSLCCGBPSZQSZLCCGLLLZXHZQTHCZMQGYZQZNMCOCSZJMMZSQPJYGQLJYJPPLDXRGZYXCCSXHSHGTZNLZWZKJCXTCFCJXLBMQBCZZWPQDNHXLJCTHYZLGYLNLSZZPCXDSCQQHJQKSXZPBAJYEMSMJTZDXLCJYRYYNWJBNGZZTMJXLTBSLYRZPYLSSCNXPHLLHYLLQQZQLXYMRSYCXZLMMCZLTZSDWTJJLLNZGGQXPFSKYGYGHBFZPDKMWGHCXMSGDXJMCJZDYCABXJDLNBCDQYGSKYDQTXDJJYXMSZQAZDZFSLQXYJSJZYLBTXXWXQQZBJZUFBBLYLWDSLJHXJYZJWTDJCZFQZQZZDZSXZZQLZCDZFJHYSPYMPQZMLPPLFFXJJNZZYLSJEYQZFPFZKSYWJJJHRDJZZXTXXGLGHYDXCSKYSWMMZCWYBAZBJKSHFHJCXMHFQHYXXYZFTSJYZFXYXPZLCHMZMBXHZZSXYFYMNCWDABAZLXKTCSHHXKXJJZJSTHYGXSXYYHHHJWXKZXSSBZZWHHHCWTZZZPJXSNXQQJGZYZYWLLCWXZFXXYXYHXMKYYSWSQMNLNAYCYSPMJKHWCQHYLAJJMZXHMMCNZHBHXCLXTJPLTXYJHDYYLTTXFSZHYXXSJBJYAYRSMXYPLCKDUYHLXRLNLLSTYZYYQYGYHHSCCSMZCTZQXKYQFPYYRPFFLKQUNTSZLLZMWWTCQQYZWTLLMLMPWMBZSSTZRBPDDTLQJJBXZCSRZQQYGWCSXFWZLXCCRSZDZMCYGGDZQSGTJSWLJMYMMZYHFBJDGYXCCPSHXNZCSBSJYJGJMPPWAFFYFNXHYZXZYLREMZGZCYZSSZDLLJCSQFNXZKPTXZGXJJGFMYYYSNBTYLBNLHPFZDCYFBMGQRRSSSZXYSGTZRNYDZZCDGPJAFJFZKNZBLCZSZPSGCYCJSZLMLRSZBZZLDLSLLYSXSQZQLYXZLSKKBRXBRBZCYCXZZZEEYFGKLZLYYHGZSGZLFJHGTGWKRAAJYZKZQTSSHJJXDCYZUYJLZYRZDQQHGJZXSSZBYKJPBFRTJXLLFQWJHYLQTYMBLPZDXTZYGBDHZZRBGXHWNJTJXLKSCFSMWLSDQYSJTXKZSCFWJLBXFTZLLJZLLQBLSQMQQCGCZFPBPHZCZJLPYYGGDTGWDCFCZQYYYQYSSCLXZSKLZZZGFFCQNWGLHQYZJJCZLQZZYJPJZZBPDCCMHJGXDQDGDLZQMFGPSYTSDYFWWDJZJYSXYYCZCYHZWPBYKXRYLYBHKJKSFXTZJMMCKHLLTNYYMSYXYZPYJQYCSYCWMTJJKQYRHLLQXPSGTLYYCLJSCPXJYZFNMLRGJJTYZBXYZMSJYJHHFZQMSYXRSZCWTLRTQZSSTKXGQKGSPTGCZNJSJCQCXHMXGGZTQYDJKZDLBZSXJLHYQGGGTHQSZPYHJHHGYYGKGGCWJZZYLCZLXQSFTGZSLLLMLJSKCTBLLZZSZMMNYTPZSXQHJCJYQXYZXZQZCPSHKZZYSXCDFGMWQRLLQXRFZTLYSTCTMJCXJJXHJNXTNRZTZFQYHQGLLGCXSZSJDJLJCYDSJTLNYXHSZXCGJZYQPYLFHDJSBPCCZHJJJQZJQDYBSSLLCMYTTMQTBHJQNNYGKYRQYQMZGCJKPDCGMYZHQLLSLLCLMHOLZGDYYFZSLJCQZLYLZQJESHNYLLJXGJXLYSYYYXNBZLJSSZCQQCJYLLZLTJYLLZLLBNYLGQCHXYYXOXCXQKYJXXXYKLXSXXYQXCYKQXQCSGYXXYQXYGYTQOHXHXPYXXXULCYEYCHZZCBWQBBWJQZSCSZSSLZYLKDESJZWMYMCYTSDSXXSCJPQQSQYLYYZYCMDJDZYWCBTJSYDJKCYDDJLBDJJSODZYSYXQQYXDHHGQQYQHDYXWGMMMAJDYBBBPPBCMUUPLJZSMTXERXJMHQNUTPJDCBSSMSSSTKJTSSMMTRCPLZSZMLQDSDMJMQPNQDXCFYNBFSDQXYXHYAYKQYDDLQYYYSSZBYDSLNTFQTZQPZMCHDHCZCWFDXTMYQSPHQYYXSRGJCWTJTZZQMGWJJTJHTQJBBHWZPXXHYQFXXQYWYYHYSCDYDHHQMNMTMWCPBSZPPZZGLMZFOLLCFWHMMSJZTTDHZZYFFYTZZGZYSKYJXQYJZQBHMBZZLYGHGFMSHPZFZSNCLPBQSNJXZSLXXFPMTYJYGBXLLDLXPZJYZJYHHZCYWHJYLSJEXFSZZYWXKZJLUYDTMLYMQJPWXYHXSKTQJEZRPXXZHHMHWQPWQLYJJQJJZSZCPHJLCHHNXJLQWZJHBMZYXBDHHYPZLHLHLGFWLCHYYTLHJXCJMSCPXSTKPNHQXSRTYXXTESYJCTLSSLSTDLLLWWYHDHRJZSFGXTSYCZYNYHTDHWJSLHTZDQDJZXXQHGYLTZPHCSQFCLNJTCLZPFSTPDYNYLGMJLLYCQHYSSHCHYLHQYQTMZYPBYWRFQYKQSYSLZDQJMPXYYSSRHZJNYWTQDFZBWWTWWRXCWHGYHXMKMYYYQMSMZHNGCEPMLQQMTCWCTMMPXJPJJHFXYYZSXZHTYBMSTSYJTTQQQYYLHYNPYQZLCYZHZWSMYLKFJXLWGXYPJYTYSYXYMZCKTTWLKSMZSYLMPWLZWXWQZSSAQSYXYRHSSNTSRAPXCPWCMGDXHXZDZYFJHGZTTSBJHGYZSZYSMYCLLLXBTYXHBBZJKSSDMALXHYCFYGMQYPJYCQXJLLLJGSLZGQLYCJCCZOTYXMTMTTLLWTGPXYMZMKLPSZZZXHKQYSXCTYJZYHXSHYXZKXLZWPSQPYHJWPJPWXQQYLXSDHMRSLZZYZWTTCYXYSZZSHBSCCSTPLWSSCJCHNLCGCHSSPHYLHFHHXJSXYLLNYLSZDHZXYLSXLWZYKCLDYAXZCMDDYSPJTQJZLNWQPSSSWCTSTSZLBLNXSMNYYMJQBQHRZWTYYDCHQLXKPZWBGQYBKFCMZWPZLLYYLSZYDWHXPSBCMLJBSCGBHXLQHYRLJXYSWXWXZSLDFHLSLYNJLZYFLYJYCDRJLFSYZFSLLCQYQFGJYHYXZLYLMSTDJCYHBZLLNWLXXYGYYHSMGDHXXHHLZZJZXCZZZCYQZFNGWPYLCPKPYYPMCLQKDGXZGGWQBDXZZKZFBXXLZXJTPJPTTBYTSZZDWSLCHZHSLTYXHQLHYXXXYYZYSWTXZKHLXZXZPYHGCHKCFSYHUTJRLXFJXPTZTWHPLYXFCRHXSHXKYXXYHZQDXQWULHYHMJTBFLKHTXCWHJFWJCFPQRYQXCYYYQYGRPYWSGSUNGWCHKZDXYFLXXHJJBYZWTSXXNCYJJYMSWZJQRMHXZWFQSYLZJZGBHYNSLBGTTCSYBYXXWXYHXYYXNSQYXMQYWRGYQLXBBZLJSYLPSYTJZYHYZAWLRORJMKSCZJXXXYXCHDYXRYXXJDTSQFXLYLTSFFYXLMTYJMJUYYYXLTZCSXQZQHZXLYYXZHDNBRXXXJCTYHLBRLMBRLLAXKYLLLJLYXXLYCRYLCJTGJCMTLZLLCYZZPZPCYAWHJJFYBDYYZSMPCKZDQYQPBPCJPDCYZMDPBCYYDYCNNPLMTMLRMFMMGWYZBSJGYGSMZQQQZTXMKQWGXLLPJGZBQCDJJJFPKJKCXBLJMSWMDTQJXLDLPPBXCWRCQFBFQJCZAHZGMYKPHYYHZYKNDKZMBPJYXPXYHLFPNYYGXJDBKXNXHJMZJXSTRSTLDXSKZYSYBZXJLXYSLBZYSLHXJPFXPQNBYLLJQKYGZMCYZZYMCCSLCLHZFWFWYXZMWSXTYNXJHPYYMCYSPMHYSMYDYSHQYZCHMJJMZCAAGCFJBBHPLYZYLXXSDJGXDHKXXTXXNBHRMLYJSLTXMRHNLXQJXYZLLYSWQGDLBJHDCGJYQYCMHWFMJYBMBYJYJWYMDPWHXQLDYGPDFXXBCGJSPCKRSSYZJMSLBZZJFLJJJLGXZGYXYXLSZQYXBEXYXHGCXBPLDYHWETTWWCJMBTXCHXYQXLLXFLYXLLJLSSFWDPZSMYJCLMWYTCZPCHQEKCQBWLCQYDPLQPPQZQFJQDJHYMMCXTXDRMJWRHXCJZYLQXDYYNHYYHRSLSRSYWWZJYMTLTLLGTQCJZYABTCKZCJYCCQLJZQXALMZYHYWLWDXZXQDLLQSHGPJFJLJHJABCQZDJGTKHSSTCYJLPSWZLXZXRWGLDLZRLZXTGSLLLLZLYXXWGDZYGBDPHZPBRLWSXQBPFDWOFMWHLYPCBJCCLDMBZPBZZLCYQXLDOMZBLZWPDWYYGDSTTHCSQSCCRSSSYSLFYBFNTYJSZDFNDPDHDZZMBBLSLCMYFFGTJJQWFTMTPJWFNLBZCMMJTGBDZLQLPYFHYYMJYLSDCHDZJWJCCTLJCLDTLJJCPDDSQDSSZYBNDBJLGGJZXSXNLYCYBJXQYCBYLZCFZPPGKCXZDZFZTJJFJSJXZBNZYJQTTYJYHTYCZHYMDJXTTMPXSPLZCDWSLSHXYPZGTFMLCJTYCBPMGDKWYCYZCDSZZYHFLYCTYGWHKJYYLSJCXGYWJCBLLCSNDDBTZBSCLYZCZZSSQDLLMQYYHFSLQLLXFTYHABXGWNYWYYPLLSDLDLLBJCYXJZMLHLJDXYYQYTDLLLBUGBFDFBBQJZZMDPJHGCLGMJJPGAEHHBWCQXAXHHHZCHXYPHJAXHLPHJPGPZJQCQZGJJZZUZDMQYYBZZPHYHYBWHAZYJHYKFGDPFQSDLZMLJXKXGALXZDAGLMDGXMWZQYXXDXXPFDMMSSYMPFMDMMKXKSYZYSHDZKXSYSMMZZZMSYDNZZCZXFPLSTMZDNMXCKJMZTYYMZMZZMSXHHDCZJEMXXKLJSTLWLSQLYJZLLZJSSDPPMHNLZJCZYHMXXHGZCJMDHXTKGRMXFWMCGMWKDTKSXQMMMFZZYDKMSCLCMPCGMHSPXQPZDSSLCXKYXTWLWJYAHZJGZQMCSNXYYMMPMLKJXMHLMLQMXCTKZMJQYSZJSYSZHSYJZJCDAJZYBSDQJZGWZQQXFKDMSDJLFWEHKZQKJPEYPZYSZCDWYJFFMZZYLTTDZZEFMZLBNPPLPLPEPSZALLTYLKCKQZKGENQLWAGYXYDPXLHSXQQWQCQXQCLHYXXMLYCCWLYMQYSKGCHLCJNSZKPYZKCQZQLJPDMDZHLASXLBYDWQLWDNBQCRYDDZTJYBKBWSZDXDTNPJDTCTQDFXQQMGNXECLTTBKPWSLCTYQLPWYZZKLPYGZCQQPLLKCCYLPQMZCZQCLJSLQZDJXLDDHPZQDLJJXZQDXYZQKZLJCYQDYJPPYPQYKJYRMPCBYMCXKLLZLLFQPYLLLMBSGLCYSSLRSYSQTMXYXZQZFDZUYSYZTFFMZZSMZQHZSSCCMLYXWTPZGXZJGZGSJSGKDDHTQGGZLLBJDZLCBCHYXYZHZFYWXYZYMSDBZZYJGTSMTFXQYXQSTDGSLNXDLRYZZLRYYLXQHTXSRTZNGZXBNQQZFMYKMZJBZYMKBPNLYZPBLMCNQYZZZSJZHJCTZKHYZZJRDYZHNPXGLFZTLKGJTCTSSYLLGZRZBBQZZKLPKLCZYSSUYXBJFPNJZZXCDWXZYJXZZDJJKGGRSRJKMSMZJLSJYWQSKYHQJSXPJZZZLSNSHRNYPZTWCHKLPSRZLZXYJQXQKYSJYCZTLQZYBBYBWZPQDWWYZCYTJCJXCKCWDKKZXSGKDZXWWYYJQYYTCYTDLLXWKCZKKLCCLZCQQDZLQLCSFQCHQHSFSMQZZLNBJJZBSJHTSZDYSJQJPDLZCDCWJKJZZLPYCGMZWDJJBSJQZSYZYHHXJPBJYDSSXDZNCGLQMBTSFSBPDZDLZNFGFJGFSMPXJQLMBLGQCYYXBQKDJJQYRFKZTJDHCZKLBSDZCFJTPLLJGXHYXZCSSZZXSTJYGKGCKGYOQXJPLZPBPGTGYJZGHZQZZLBJLSQFZGKQQJZGYCZBZQTLDXRJXBSXXPZXHYZYCLWDXJJHXMFDZPFZHQHQMQGKSLYHTYCGFRZGNQXCLPDLBZCSCZQLLJBLHBZCYPZZPPDYMZZSGYHCKCPZJGSLJLNSCDSLDLXBMSTLDDFJMKDJDHZLZXLSZQPQPGJLLYBDSZGQLBZLSLKYYHZTTNTJYQTZZPSZQZTLLJTYYLLQLLQYZQLBDZLSLYYZYMDFSZSNHLXZNCZQZPBWSKRFBSYZMTHBLGJPMCZZLSTLXSHTCSYZLZBLFEQHLXFLCJLYLJQCBZLZJHHSSTBRMHXZHJZCLXFNBGXGTQJCZTMSFZKJMSSNXLJKBHSJXNTNLZDNTLMSJXGZJYJCZXYJYJWRWWQNZTNFJSZPZSHZJFYRDJSFSZJZBJFZQZZHZLXFYSBZQLZSGYFTZDCSZXZJBQMSZKJRHYJZCKMJKHCHGTXKXQGLXPXFXTRTYLXJXHDTSJXHJZJXZWZLCQSBTXWXGXTXXHXFTSDKFJHZYJFJXRZSDLLLTQSQQZQWZXSYQTWGWBZCGZLLYZBCLMQQTZHZXZXLJFRMYZFLXYSQXXJKXRMQDZDMMYYBSQBHGZMWFWXGMXLZPYYTGZYCCDXYZXYWGSYJYZNBHPZJSQSYXSXRTFYZGRHZTXSZZTHCBFCLSYXZLZQMZLMPLMXZJXSFLBYZMYQHXJSXRXSQZZZSSLYFRCZJRCRXHHZXQYDYHXSJJHZCXZBTYNSYSXJBQLPXZQPYMLXZKYXLXCJLCYSXXZZLXDLLLJJYHZXGYJWKJRWYHCPSGNRZLFZWFZZNSXGXFLZSXZZZBFCSYJDBRJKRDHHGXJLJJTGXJXXSTJTJXLYXQFCSGSWMSBCTLQZZWLZZKXJMLTMJYHSDDBXGZHDLBMYJFRZFSGCLYJBPMLYSMSXLSZJQQHJZFXGFQFQBPXZGYYQXGZTCQWYLTLGWSGWHRLFSFGZJMGMGBGTJFSYZZGZYZAFLSSPMLPFLCWBJZCLJJMZLPJJLYMQDMYYYFBGYGYZMLYZDXQYXRQQQHSYYYQXYLJTYXFSFSLLGNQCYHYCWFHCCCFXPYLYPLLZYXXXXXKQHHXSHJZCFZSCZJXCPZWHHHHHAPYLQALPQAFYHXDYLUKMZQGGGDDESRNNZLTZGCHYPPYSQJJHCLLJTOLNJPZLJLHYMHEYDYDSQYCDDHGZUNDZCLZYZLLZNTNYZGSLHSLPJJBDGWXPCDUTJCKLKCLWKLLCASSTKZZDNQNTTLYYZSSYSSZZRYLJQKCQDHHCRXRZYDGRGCWCGZQFFFPPJFZYNAKRGYWYQPQXXFKJTSZZXSWZDDFBBXTBGTZKZNPZZPZXZPJSZBMQHKCYXYLDKLJNYPKYGHGDZJXXEAHPNZKZTZCMXCXMMJXNKSZQNMNLWBWWXJKYHCPSTMCSQTZJYXTPCTPDTNNPGLLLZSJLSPBLPLQHDTNJNLYYRSZFFJFQWDPHZDWMRZCCLODAXNSSNYZRESTYJWJYJDBCFXNMWTTBYLWSTSZGYBLJPXGLBOCLHPCBJLTMXZLJYLZXCLTPNCLCKXTPZJSWCYXSFYSZDKNTLBYJCYJLLSTGQCBXRYZXBXKLYLHZLQZLNZCXWJZLJZJNCJHXMNZZGJZZXTZJXYCYYCXXJYYXJJXSSSJSTSSTTPPGQTCSXWZDCSYFPTFBFHFBBLZJCLZZDBXGCXLQPXKFZFLSYLTUWBMQJHSZBMDDBCYSCCLDXYCDDQLYJJWMQLLCSGLJJSYFPYYCCYLTJANTJJPWYCMMGQYYSXDXQMZHSZXPFTWWZQSWQRFKJLZJQQYFBRXJHHFWJJZYQAZMYFRHCYYBYQWLPEXCCZSTYRLTTDMQLYKMBBGMYYJPRKZNPBSXYXBHYZDJDNGHPMFSGMWFZMFQMMBCMZZCJJLCNUXYQLMLRYGQZCYXZLWJGCJCGGMCJNFYZZJHYCPRRCMTZQZXHFQGTJXCCJEAQCRJYHPLQLSZDJRBCQHQDYRHYLYXJSYMHZYDWLDFRYHBPYDTSSCNWBXGLPZMLZZTQSSCPJMXXYCSJYTYCGHYCJWYRXXLFEMWJNMKLLSWTXHYYYNCMMCWJDQDJZGLLJWJRKHPZGGFLCCSCZMCBLTBHBQJXQDSPDJZZGHGLFQYWBZYZJLTSTDHQHCTCBCHFLQMPWDSHYYTQWCNZZJTLBYMBPDYYYXSQKXWYYFLXXNCWCXYPMAELYKKJMZZZBRXYYQJFLJPFHHHYTZZXSGQQMHSPGDZQWBWPJHZJDYSCQWZKTXXSQLZYYMYSDZGRXCKKUJLWPYSYSCSYZLRMLQSYLJXBCXTLWDQZPCYCYKPPPNSXFYZJJRCEMHSZMSXLXGLRWGCSTLRSXBZGBZGZTCPLUJLSLYLYMTXMTZPALZXPXJTJWTCYYZLBLXBZLQMYLXPGHDSLSSDMXMBDZZSXWHAMLCZCPJMCNHJYSNSYGCHSKQMZZQDLLKABLWJXSFMOCDXJRRLYQZKJMYBYQLYHETFJZFRFKSRYXFJTWDSXXSYSQJYSLYXWJHSNLXYYXHBHAWHHJZXWMYLJCSSLKYDZTXBZSYFDXGXZJKHSXXYBSSXDPYNZWRPTQZCZENYGCXQFJYKJBZMLJCMQQXUOXSLYXXLYLLJDZBTYMHPFSTTQQWLHOKYBLZZALZXQLHZWRRQHLSTMYPYXJJXMQSJFNBXYXYJXXYQYLTHYLQYFMLKLJTMLLHSZWKZHLJMLHLJKLJSTLQXYLMBHHLNLZXQJHXCFXXLHYHJJGBYZZKBXSCQDJQDSUJZYYHZHHMGSXCSYMXFEBCQWWRBPYYJQTYZCYQYQQZYHMWFFHGZFRJFCDPXNTQYZPDYKHJLFRZXPPXZDBBGZQSTLGDGYLCQMLCHHMFYWLZYXKJLYPQHSYWMQQGQZMLZJNSQXJQSYJYCBEHSXFSZPXZWFLLBCYYJDYTDTHWZSFJMQQYJLMQXXLLDTTKHHYBFPWTYYSQQWNQWLGWDEBZWCMYGCULKJXTMXMYJSXHYBRWFYMWFRXYQMXYSZTZZTFYKMLDHQDXWYYNLCRYJBLPSXCXYWLSPRRJWXHQYPHTYDNXHHMMYWYTZCSQMTSSCCDALWZTCPQPYJLLQZYJSWXMZZMMYLMXCLMXCZMXMZSQTZPPQQBLPGXQZHFLJJHYTJSRXWZXSCCDLXTYJDCQJXSLQYCLZXLZZXMXQRJMHRHZJBHMFLJLMLCLQNLDXZLLLPYPSYJYSXCQQDCMQJZZXHNPNXZMEKMXHYKYQLXSXTXJYYHWDCWDZHQYYBGYBCYSCFGPSJNZDYZZJZXRZRQJJYMCANYRJTLDPPYZBSTJKXXZYPFDWFGZZRPYMTNGXZQBYXNBUFNQKRJQZMJEGRZGYCLKXZDSKKNSXKCLJSPJYYZLQQJYBZSSQLLLKJXTBKTYLCCDDBLSPPFYLGYDTZJYQGGKQTTFZXBDKTYYHYBBFYTYYBCLPDYTGDHRYRNJSPTCSNYJQHKLLLZSLYDXXWBCJQSPXBPJZJCJDZFFXXBRMLAZHCSNDLBJDSZBLPRZTSWSBXBCLLXXLZDJZSJPYLYXXYFTFFFBHJJXGBYXJPMMMPSSJZJMTLYZJXSWXTYLEDQPJMYGQZJGDJLQJWJQLLSJGJGYGMSCLJJXDTYGJQJQJCJZCJGDZZSXQGSJGGCXHQXSNQLZZBXHSGZXCXYLJXYXYYDFQQJHJFXDHCTXJYRXYSQTJXYEFYYSSYYJXNCYZXFXMSYSZXYYSCHSHXZZZGZZZGFJDLTYLNPZGYJYZYYQZPBXQBDZTZCZYXXYHHSQXSHDHGQHJHGYWSZTMZMLHYXGEBTYLZKQWYTJZRCLEKYSTDBCYKQQSAYXCJXWWGSBHJYZYDHCSJKQCXSWXFLTYNYZPZCCZJQTZWJQDZZZQZLJJXLSBHPYXXPSXSHHEZTXFPTLQYZZXHYTXNCFZYYHXGNXMYWXTZSJPTHHGYMXMXQZXTSBCZYJYXXTYYZYPCQLMMSZMJZZLLZXGXZAAJZYXJMZXWDXZSXZDZXLEYJJZQBHZWZZZQTZPSXZTDSXJJJZNYAZPHXYYSRNQDTHZHYYKYJHDZXZLSWCLYBZYECWCYCRYLCXNHZYDZYDYJDFRJJHTRSQTXYXJRJHOJYNXELXSFSFJZGHPZSXZSZDZCQZBYYKLSGSJHCZSHDGQGXYZGXCHXZJWYQWGYHKSSEQZZNDZFKWYSSTCLZSTSYMCDHJXXYWEYXCZAYDMPXMDSXYBSQMJMZJMTZQLPJYQZCGQHXJHHLXXHLHDLDJQCLDWBSXFZZYYSCHTYTYYBHECXHYKGJPXHHYZJFXHWHBDZFYZBCAPNPGNYDMSXHMMMMAMYNBYJTMPXYYMCTHJBZYFCGTYHWPHFTWZZEZSBZEGPFMTSKFTYCMHFLLHGPZJXZJGZJYXZSBBQSCZZLZCCSTPGXMJSFTCCZJZDJXCYBZLFCJSYZFGSZLYBCWZZBYZDZYPSWYJZXZBDSYUXLZZBZFYGCZXBZHZFTPBGZGEJBSTGKDMFHYZZJHZLLZZGJQZLSFDJSSCBZGPDLFZFZSZYZYZSYGCXSNXXCHCZXTZZLJFZGQSQYXZJQDCCZTQCDXZJYQJQCHXZTDLGSCXZSYQJQTZWLQDQZTQCHQQJZYEZZZPBWKDJFCJPZTYPQYQTTYNLMBDKTJZPQZQZZFPZSBNJLGYJDXJDZZKZGQKXDLPZJTCJDQBXDJQJSTCKNXBXZMSLYJCQMTJQWWCJQNJNLLLHJCWQTBZQYDZCZPZZDZYDDCYZZZCCJTTJFZDPRRTZTJDCQTQZDTJNPLZBCLLCTZSXKJZQZPZLBZRBTJDCXFCZDBCCJJLTQQPLDCGZDBBZJCQDCJWYNLLZYZCCDWLLXWZLXRXNTQQCZXKQLSGDFQTDDGLRLAJJTKUYMKQLLTZYTDYYCZGJWYXDXFRSKSTQTENQMRKQZHHQKDLDAZFKYPBGGPZREBZZYKZZSPEGJXGYKQZZZSLYSYYYZWFQZYLZZLZHWCHKYPQGNPGBLPLRRJYXCCSYYHSFZFYBZYYTGZXYLXCZWXXZJZBLFFLGSKHYJZEYJHLPLLLLCZGXDRZELRHGKLZZYHZLYQSZZJZQLJZFLNBHGWLCZCFJYSPYXZLZLXGCCPZBLLCYBBBBUBBCBPCRNNZCZYRBFSRLDCGQYYQXYGMQZWTZYTYJXYFWTEHZZJYWLCCNTZYJJZDEDPZDZTSYQJHDYMBJNYJZLXTSSTPHNDJXXBYXQTZQDDTJTDYYTGWSCSZQFLSHLGLBCZPHDLYZJYCKWTYTYLBNYTSDSYCCTYSZYYEBHEXHQDTWNYGYCLXTSZYSTQMYGZAZCCSZZDSLZCLZRQXYYELJSBYMXSXZTEMBBLLYYLLYTDQYSHYMRQWKFKBFXNXSBYCHXBWJYHTQBPBSBWDZYLKGZSKYHXQZJXHXJXGNLJKZLYYCDXLFYFGHLJGJYBXQLYBXQPQGZTZPLNCYPXDJYQYDYMRBESJYYHKXXSTMXRCZZYWXYQYBMCLLYZHQYZWQXDBXBZWZMSLPDMYSKFMZKLZCYQYCZLQXFZZYDQZPZYGYJYZMZXDZFYFYTTQTZHGSPCZMLCCYTZXJCYTJMKSLPZHYSNZLLYTPZCTZZCKTXDHXXTQCYFKSMQCCYYAZHTJPCYLZLYJBJXTPNYLJYYNRXSYLMMNXJSMYBCSYSYLZYLXJJQYLDZLPQBFZZBLFNDXQKCZFYWHGQMRDSXYCYTXNQQJZYYPFZXDYZFPRXEJDGYQBXRCNFYYQPGHYJDYZXGRHTKYLNWDZNTSMPKLBTHBPYSZBZTJZSZZJTYYXZPHSSZZBZCZPTQFZMYFLYPYBBJQXZMXXDJMTSYSKKBJZXHJCKLPSMKYJZCXTMLJYXRZZQSLXXQPYZXMKYXXXJCLJPRMYYGADYSKQLSNDHYZKQXZYZTCGHZTLMLWZYBWSYCTBHJHJFCWZTXWYTKZLXQSHLYJZJXTMPLPYCGLTBZZTLZJCYJGDTCLKLPLLQPJMZPAPXYZLKKTKDZCZZBNZDYDYQZJYJGMCTXLTGXSZLMLHBGLKFWNWZHDXUHLFMKYSLGXDTWWFRJEJZTZHYDXYKSHWFZCQSHKTMQQHTZHYMJDJSKHXZJZBZZXYMPAGQMSTPXLSKLZYNWRTSQLSZBPSPSGZWYHTLKSSSWHZZLYYTNXJGMJSZSUFWNLSOZTXGXLSAMMLBWLDSZYLAKQCQCTMYCFJBSLXCLZZCLXXKSBZQCLHJPSQPLSXXCKSLNHPSFQQYTXYJZLQLDXZQJZDYYDJNZPTUZDSKJFSLJHYLZSQZLBTXYDGTQFDBYAZXDZHZJNHHQBYKNXJJQCZMLLJZKSPLDYCLBBLXKLELXJLBQYCXJXGCNLCQPLZLZYJTZLJGYZDZPLTQCSXFDMNYCXGBTJDCZNBGBQYQJWGKFHTNPYQZQGBKPBBYZMTJDYTBLSQMPSXTBNPDXKLEMYYCJYNZCTLDYKZZXDDXHQSHDGMZSJYCCTAYRZLPYLTLKXSLZCGGEXCLFXLKJRTLQJAQZNCMBYDKKCXGLCZJZXJHPTDJJMZQYKQSECQZDSHHADMLZFMMZBGNTJNNLGBYJBRBTMLBYJDZXLCJLPLDLPCQDHLXZLYCBLCXZZJADJLNZMMSSSMYBHBSQKBHRSXXJMXSDZNZPXLGBRHWGGFCXGMSKLLTSJYYCQLTSKYWYYHYWXBXQYWPYWYKQLSQPTNTKHQCWDQKTWPXXHCPTHTWUMSSYHBWCRWXHJMKMZNGWTMLKFGHKJYLSYYCXWHYECLQHKQHTTQKHFZLDXQWYZYYDESBPKYRZPJFYYZJCEQDZZDLATZBBFJLLCXDLMJSSXEGYGSJQXCWBXSSZPDYZCXDNYXPPZYDLYJCZPLTXLSXYZYRXCYYYDYLWWNZSAHJSYQYHGYWWAXTJZDAXYSRLTDPSSYYFNEJDXYZHLXLLLZQZSJNYQYQQXYJGHZGZCYJCHZLYCDSHWSHJZYJXCLLNXZJJYYXNFXMWFPYLCYLLABWDDHWDXJMCXZTZPMLQZHSFHZYNZTLLDYWLSLXHYMMYLMBWWKYXYADTXYLLDJPYBPWUXJMWMLLSAFDLLYFLBHHHBQQLTZJCQJLDJTFFKMMMBYTHYGDCQRDDWRQJXNBYSNWZDBYYTBJHPYBYTTJXAAHGQDQTMYSTQXKBTZPKJLZRBEQQSSMJJBDJOTGTBXPGBKTLHQXJJJCTHXQDWJLWRFWQGWSHCKRYSWGFTGYGBXSDWDWRFHWYTJJXXXJYZYSLPYYYPAYXHYDQKXSHXYXGSKQHYWFDDDPPLCJLQQEEWXKSYYKDYPLTJTHKJLTCYYHHJTTPLTZZCDLTHQKZXQYSTEEYWYYZYXXYYSTTJKLLPZMCYHQGXYHSRMBXPLLNQYDQHXSXXWGDQBSHYLLPJJJTHYJKYPPTHYYKTYEZYENMDSHLCRPQFDGFXZPSFTLJXXJBSWYYSKSFLXLPPLBBBLBSFXFYZBSJSSYLPBBFFFFSSCJDSTZSXZRYYSYFFSYZYZBJTBCTSBSDHRTJJBYTCXYJEYLXCBNEBJDSYXYKGSJZBXBYTFZWGENYHHTHZHHXFWGCSTBGXKLSXYWMTMBYXJSTZSCDYQRCYTWXZFHMYMCXLZNSDJTTTXRYCFYJSBSDYERXJLJXBBDEYNJGHXGCKGSCYMBLXJMSZNSKGXFBNBPTHFJAAFXYXFPXMYPQDTZCXZZPXRSYWZDLYBBKTYQPQJPZYPZJZNJPZJLZZFYSBTTSLMPTZRTDXQSJEHBZYLZDHLJSQMLHTXTJECXSLZZSPKTLZKQQYFSYGYWPCPQFHQHYTQXZKRSGTTSQCZLPTXCDYYZXSQZSLXLZMYCPCQBZYXHBSXLZDLTCDXTYLZJYYZPZYZLTXJSJXHLPMYTXCQRBLZSSFJZZTNJYTXMYJHLHPPLCYXQJQQKZZSCPZKSWALQSBLCCZJSXGWWWYGYKTJBBZTDKHXHKGTGPBKQYSLPXPJCKBMLLXDZSTBKLGGQKQLSBKKTFXRMDKBFTPZFRTBBRFERQGXYJPZSSTLBZTPSZQZSJDHLJQLZBPMSMMSXLQQNHKNBLRDDNXXDHDDJCYYGYLXGZLXSYGMQQGKHBPMXYXLYTQWLWGCPBMQXCYZYDRJBHTDJYHQSHTMJSBYPLWHLZFFNYPMHXXHPLTBQPFBJWQDBYGPNZTPFZJGSDDTQSHZEAWZZYLLTYYBWJKXXGHLFKXDJTMSZSQYNZGGSWQSPHTLSSKMCLZXYSZQZXNCJDQGZDLFNYKLJCJLLZLMZZNHYDSSHTHZZLZZBBHQZWWYCRZHLYQQJBEYFXXXWHSRXWQHWPSLMSSKZTTYGYQQWRSLALHMJTQJSMXQBJJZJXZYZKXBYQXBJXSHZTSFJLXMXZXFGHKZSZGGYLCLSARJYHSLLLMZXELGLXYDJYTLFBHBPNLYZFBBHPTGJKWETZHKJJXZXXGLLJLSTGSHJJYQLQZFKCGNNDJSSZFDBCTWWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ 19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=0,f=a.length;e14){var i=g.substring(0,1);for(b=0;b0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(c=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return BI.contains(this.array,a)},indexOf:function(a){return BI.contains(this.array,a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){BI.remove(this.array,a)},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(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;c0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},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(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);null!=b&&b.setRight(c||null),null!=c&&c.setLeft(b||null),this.children.splice(a,1)},removeAllChilds:function(){this.children=[]},addChild:function(a,b){var c=null;c=BI.isUndefined(b)?this.children.length-1:b-1,a.setParent(this),c>=0&&(this.getChild(c)&&this.getChild(c).setRight(a),a.setLeft(this.getChild(c))),BI.isUndefined(b)?this.children.push(a):this.children.splice(b,0,a)},equals:function(a){return this===a||this.id===a.id},clear:function(){this.parent=null,this.left=null,this.right=null,this.children=[]}},BI.extend(BI.Tree,{transformToArrayFormat:function(a,b){if(!a)return[];var c=[];if(BI.isArray(a))for(var d=0,e=a.length;d=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},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(){}}),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(a){this.element.append(a)},_mountChildren:function(){var a=this,b=BI.Widget._renderEngine.createFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.appendFragment(b)},_getChildName:function(a){return a+""},_addElement:function(a,b,c){var d,e=this;return this.hasWidget(this._getChildName(a))?d=this.getWidgetByName(this._getChildName(a)):(d=BI.createWidget(b,c),d.on(BI.Events.DESTROY,function(){BI.each(e._children,function(a,b){b===d&&(BI.remove(e._children,b),e.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),d)),d},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a,b){var c=this,d=this.options,e=BI.Widget._renderEngine.createFragment(),f=[];BI.each(a,function(a,g){var h=c._addElement(d.items.length,g,b);c._children[c._getChildName(d.items.length)]=h,d.items.push(g),f.push(h),e.appendChild(h.element[0])}),this._isMounted&&(this._getWrapper().append(e),BI.each(f,function(a,b){b._mount()}))},prependItems:function(a,b){var c=this;a=a||[];for(var d=BI.Widget._renderEngine.createFragment(),e=[],f=a.length-1;f>=0;f--){this._addItemAt(0,a[f]);var g=this._addElement(0,a[f],b);c._children[c._getChildName(0)]=g,this.options.items.unshift(a[f]),e.push(g),d.appendChild(g.element[0])}this._isMounted&&(this._getWrapper().prepend(d),BI.each(e,function(a,b){b._mount()}))},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=k._getOptions(a),b=k._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=k._getOptions(a),d=null==c.key?k._getChildName(b):c.key;return t[d]=k._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=a[b];if(BI.isNotNull(d)){var e=k._getOptions(d),f=null==e.key?k._getChildName(b):e.key;delete k._children[k._getChildName(f)],t[f]._destroy()}}}function g(a,b,c,d){a=k._getOptions(a),b=b&&k._getOptions(b);var e=BI.isKey(a.key)?a.key:k._getChildName(d);if(b&&t[b.key]){var f,g=BI.isKey(b.key)?b.key:k._getChildName(d);f=c?t[g].element.next():t[g].element,f.length>0?f.before(t[e].element):k._getWrapper().append(t[e].element)}else k._getWrapper().append(t[e].element)}function h(a,b,d,e){var f,g;for(f=d;f<=e;++f)a[f]&&c(a[f],b)&&(g=a[f]);return g}var i,j,k=this,l=0,m=0,n=a.length-1,o=a[0],p=a[n],q=b.length-1,r=b[0],s=b[q],t={};for(BI.each(a,function(a,b){b=k._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(t[c]=k._children[k._getChildName(a)])});l<=n&&m<=q;)if(BI.isNull(o))o=a[++l];else if(BI.isNull(p))p=a[--n];else if(c(o,r,l,m))j=this.patchItem(o,r,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],o=a[++l],r=b[++m];else if(c(p,s,n,q))j=this.patchItem(p,s,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],p=a[--n],s=b[--q];else if(c(o,s))j=this.patchItem(o,s,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],g(o,p,!0),o=a[++l],s=b[--q];else if(c(p,r))j=this.patchItem(p,r,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],g(p,o),p=a[--n],r=b[++m];else{var u=h(a,r,l,n);if(BI.isNull(u)){var v=d(r);g(v,o),r=b[++m]}else BI.each(a,function(b,d){d&&c(d,r)&&(j=k.patchItem(u,r,b)||j,t[null==u.key?k._getChildName(b):u.key]=k._children[k._getChildName(b)],a[b]=void 0,g(u,o))}),r=b[++m]}return l>n?(i=BI.isNull(b[q+1])?null:b[q+1],e(i,b,m,q)):m>q&&f(a,l,n),this._children={},BI.each(b,function(a,b){var c=k._getOptions(b),d=null==c.key?k._getChildName(a):c.key;t[d]._mount(),k._children[k._getChildName(a)]=t[d]}),j},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},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(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a,b,c={},d={},e={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(a&&a(b,d),e[b])for(var f=e[b].length-1;f>=0;f--)e[b][f](d);if(c[b])for(var g,f=c[b].length-1;f>=0;f--)if(g=c[b][f](d))return g;return d},config:function(c,d){a=c,b=d},configWidget:function(a,b){e[a]||(e[a]=[]),e[a].push(b)},registerWidget:function(a,b){c[a]||(c[a]=[]),c[a].length>0&&console.log("组件已经注册过了!"),c[a].push(b)},relieveWidget:function(a){delete c[a]},getObject:function(a,c){if(b&&b(a,c),d[a])for(var e,f=0,g=d[a].length;f0&&console.log("对象已经注册过了!"),d[a].push(b)},relieveObject:function(a){delete d[a]}})}(),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(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},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(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){function c(a,b){var c=a<0?(a*=-1,"-"):"",h="",i=a>0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;iBI.Widget._renderEngine.createElement("body").outerWidth()&&(l-=k.element.outerWidth()+15);var n=BI.Widget._renderEngine.createElement("body").outerHeight();return m+k.element.outerHeight()>n||j+k.element.outerHeight()>n?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.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"}}),_.extend(BI,{pushArray:function(a,b){for(var c=0;ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",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(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),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(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){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(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},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 a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.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 a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p 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%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?b.attachEvent("onresize",c):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
            ',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
            ").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}if(f=Math.abs(c-d),e=Math.pow(10,Math.max(c,d)),f>0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",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(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),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(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){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(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},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 a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.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 a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.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 a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p 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%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?(b.attachEvent("onresize",c),c()):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
            ',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
            ").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g0&&b-1 in a)))}function d(a){var b=xa[a]={};return ia.each(a.match(ka)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(ia.acceptData(a)){var f,g,h=ia.expando,i="string"==typeof c,j=a.nodeType,k=j?ia.cache:a,l=j?a[h]:a[h]&&h;if(l&&k[l]&&(e||k[l].data)||!i||d!==b)return l||(j?a[h]=l=_.pop()||ia.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=ia.noop)),"object"!=typeof c&&"function"!=typeof c||(e?k[l]=ia.extend(k[l],c):k[l].data=ia.extend(k[l].data,c)),f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[ia.camelCase(c)]=d),i?(g=f[c],null==g&&(g=f[ia.camelCase(c)])):g=f,g}}function f(a,b,c){if(ia.acceptData(a)){var d,e,f,g=a.nodeType,i=g?ia.cache:a,j=g?a[ia.expando]:ia.expando;if(i[j]){if(b&&(f=c?i[j]:i[j].data)){ia.isArray(b)?b=b.concat(ia.map(b,ia.camelCase)):b in f?b=[b]:(b=ia.camelCase(b),b=b in f?[b]:b.split(" "));for(d=0,e=b.length;d=0===c})}function m(a){var b=Ua.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function n(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function o(a){var b=a.getAttributeNode("type");return a.type=(b&&b.specified)+"/"+a.type,a}function p(a){var b=eb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function q(a,b){for(var c,d=0;null!=(c=a[d]);d++)ia._data(c,"globalEval",!b||ia._data(b[d],"globalEval"))}function r(a,b){if(1===b.nodeType&&ia.hasData(a)){var c,d,e,f=ia._data(a),g=ia._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jb[0].contentWindow||jb[0].contentDocument).document,b.write(""),b.close(),c=C(a,b),jb.detach()),ub[a]=c),c}function C(a,b){var c=ia(b.createElement(a)).appendTo(b.body),d=ia.css(c[0],"display");return c.remove(),d}function D(a,b,c,d){var e;if(ia.isArray(b))ia.each(b,function(b,e){c||Ab.test(a)?d(a,e):D(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==ia.type(b))d(a,b);else for(e in b)D(a+"["+e+"]",b[e],c,d)}function E(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(ka)||[];if(ia.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function F(a,b,c,d){function e(h){var i;return f[h]=!0,ia.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function G(a,c){var d,e,f=ia.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&ia.extend(!0,a,d),a}function H(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(h in k)h in d&&(c[k[h]]=d[h]);for(;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}if(g)return g!==j[0]&&j.unshift(g),d[g]}function I(a,b){var c,d,e,f,g={},h=0,i=a.dataTypes.slice(),j=i[0];if(a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i[1])for(e in a.converters)g[e.toLowerCase()]=a.converters[e];for(;d=i[++h];)if("*"!==d){if("*"!==j&&j!==d){if(e=g[j+" "+d]||g["* "+d],!e)for(c in g)if(f=c.split(" "),f[1]===d&&(e=g[j+" "+f[0]]||g["* "+f[0]])){e===!0?e=g[c]:g[c]!==!0&&(d=f[0],i.splice(h--,0,d));break}if(e!==!0)if(e&&a["throws"])b=e(b);else try{b=e(b)}catch(k){return{state:"parsererror",error:e?k:"No conversion from "+j+" to "+d}}}j=d}return{state:"success",data:b}}function J(){try{return new a.XMLHttpRequest}catch(b){}}function K(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function L(){return setTimeout(function(){$b=b}),$b=ia.now()}function M(a,b){ia.each(b,function(b,c){for(var d=(ec[b]||[]).concat(ec["*"]),e=0,f=d.length;e)[^>]*|#([\w-]*))$/,na=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,oa=/^[\],:{}\s]*$/,pa=/(?:^|:|,)(?:\s*\[)+/g,qa=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,ra=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,sa=/^-ms-/,ta=/-([\da-z])/gi,ua=function(a,b){return b.toUpperCase()},va=function(a){(W.addEventListener||"load"===a.type||"complete"===W.readyState)&&(wa(),ia.ready())},wa=function(){W.addEventListener?(W.removeEventListener("DOMContentLoaded",va,!1),a.removeEventListener("load",va,!1)):(W.detachEvent("onreadystatechange",va),a.detachEvent("onload",va))};ia.fn=ia.prototype={jquery:aa,constructor:ia,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ma.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof ia?c[0]:c,ia.merge(this,ia.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:W,!0)),na.test(e[1])&&ia.isPlainObject(c))for(e in c)ia.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=W.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=W,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):ia.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),ia.makeArray(a,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return da.call(this)},get:function(a){return null==a?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a){var b=ia.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return ia.each(this,a,b)},ready:function(a){return ia.ready.promise().done(a),this},slice:function(){return this.pushStack(da.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0||(T.resolveWith(W,[ia]),ia.fn.trigger&&ia(W).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===ia.type(a)},isArray:Array.isArray||function(a){return"array"===ia.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?$[fa.call(a)]||"object":typeof a},isPlainObject:function(a){if(!a||"object"!==ia.type(a)||a.nodeType||ia.isWindow(a))return!1;try{if(a.constructor&&!ga.call(a,"constructor")&&!ga.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||ga.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||W;var d=na.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=ia.buildFragment([a],b,e),e&&ia(e).remove(),ia.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=ia.trim(b),b&&oa.test(b.replace(qa,"@").replace(ra,"]").replace(pa,"")))?new Function("return "+b)():void ia.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||ia.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&ia.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(sa,"ms-").replace(ta,ua)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;f-1;)j.splice(d,1),c&&(d<=g&&g--,d<=h&&h--)}),this},has:function(a){return a?ia.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!j||f&&!k||(c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},ia.extend({Deferred:function(a){var b=[["resolve","done",ia.Callbacks("once memory"),"resolved"],["reject","fail",ia.Callbacks("once memory"),"rejected"],["notify","progress",ia.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return ia.Deferred(function(c){ia.each(b,function(b,f){var g=f[0],h=ia.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&ia.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?ia.extend(a,d):d}},e={};return d.pipe=d.then,ia.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=da.call(arguments),g=f.length,h=1!==g||a&&ia.isFunction(a.promise)?g:0,i=1===h?a:ia.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?da.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e
          • a",c=l.getElementsByTagName("*"),d=l.getElementsByTagName("a")[0],!c||!d||!c.length)return{};f=W.createElement("select"),h=f.appendChild(W.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b={getSetAttribute:"t"!==l.className,leadingWhitespace:3===l.firstChild.nodeType,tbody:!l.getElementsByTagName("tbody").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:!!e.value,optSelected:h.selected,enctype:!!W.createElement("form").enctype,html5Clone:"<:nav>"!==W.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===W.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=W.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=W.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;return l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip,ia(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=W.getElementsByTagName("body")[0];g&&(c=W.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="
            t
            ",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.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%;",b.boxSizing=4===l.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==g.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(W.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==V&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="
            ",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}();var ya=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,za=/([A-Z])/g;ia.extend({cache:{},expando:"jQuery"+(aa+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?ia.cache[a[ia.expando]]:a[ia.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&ia.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),ia.fn.extend({data:function(a,c){var d,e,f=this[0],h=0,i=null;if(a===b){if(this.length&&(i=ia.data(f),1===f.nodeType&&!ia._data(f,"parsedAttrs"))){for(d=f.attributes;h1,null,!0)},removeData:function(a){return this.each(function(){ia.removeData(this,a)})}}),ia.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=ia._data(a,b),c&&(!d||ia.isArray(c)?d=ia._data(a,b,ia.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=ia.queue(a,b),d=c.length,e=c.shift(),f=ia._queueHooks(a,b),g=function(){ia.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),f.cur=e,e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return ia._data(a,c)||ia._data(a,c,{empty:ia.Callbacks("once memory").add(function(){ia._removeData(a,b+"queue"),ia._removeData(a,c)})})}}),ia.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){ia.removeAttr(this,a)})},prop:function(a,b){return ia.access(this,ia.prop,a,b,arguments.length>1)},removeProp:function(a){return a=ia.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(ia.isFunction(a))return this.each(function(b){ia(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(ka)||[];g=0;)d=d.replace(" "+e+" "," ");c.className=a?ia.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return ia.isFunction(a)?this.each(function(c){ia(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=ia(this),h=b,i=a.match(ka)||[];e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else c!==V&&"boolean"!==c||(this.className&&ia._data(this,"__className__",this.className),this.className=this.className||a===!1?"":ia._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=ia.isFunction(a),this.each(function(c){var f,g=ia(this);1===this.nodeType&&(f=e?a.call(this,c,g.val()):a,null==f?f="":"number"==typeof f?f+="":ia.isArray(f)&&(f=ia.map(f,function(a){return null==a?"":a+""})),d=ia.valHooks[this.type]||ia.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=ia.valHooks[f.type]||ia.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Da,""):null==c?"":c)}}}),ia.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i=0}),c.length||(a.selectedIndex=-1),c}}},attr:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return typeof a.getAttribute===V?ia.prop(a,c,d):(f=1!==h||!ia.isXMLDoc(a),f&&(c=c.toLowerCase(),e=ia.attrHooks[c]||(Ga.test(c)?Ba:Aa)),d===b?e&&f&&"get"in e&&null!==(g=e.get(a,c))?g:(typeof a.getAttribute!==V&&(g=a.getAttribute(c)),null==g?b:g):null!==d?e&&f&&"set"in e&&(g=e.set(a,d,c))!==b?g:(a.setAttribute(c,d+""),d):void ia.removeAttr(a,c))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ka);if(f&&1===a.nodeType)for(;c=f[e++];)d=ia.propFix[c]||c,Ga.test(c)?!Ia&&Ha.test(c)?a[ia.camelCase("default-"+c)]=a[d]=!1:a[d]=!1:ia.attr(a,c,""),a.removeAttribute(Ia?c:d)},attrHooks:{type:{set:function(a,b){if(!ia.support.radioValue&&"radio"===b&&ia.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},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(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!ia.isXMLDoc(a),g&&(c=ia.propFix[c]||c,f=ia.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):Ea.test(a.nodeName)||Fa.test(a.nodeName)&&a.href?0:b}}}}),Ba={get:function(a,c){var d=ia.prop(a,c),e="boolean"==typeof d&&a.getAttribute(c),f="boolean"==typeof d?Ja&&Ia?null!=e:Ha.test(c)?a[ia.camelCase("default-"+c)]:!!e:a.getAttributeNode(c);return f&&f.value!==!1?c.toLowerCase():b},set:function(a,b,c){return b===!1?ia.removeAttr(a,c):Ja&&Ia||!Ha.test(c)?a.setAttribute(!Ia&&ia.propFix[c]||c,c):a[ia.camelCase("default-"+c)]=a[c]=!0,c}},Ja&&Ia||(ia.attrHooks.value={get:function(a,c){var d=a.getAttributeNode(c);return ia.nodeName(a,"input")?a.defaultValue:d&&d.specified?d.value:b},set:function(a,b,c){return ia.nodeName(a,"input")?void(a.defaultValue=b):Aa&&Aa.set(a,b,c)}}),Ia||(Aa=ia.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&("id"===c||"name"===c||"coords"===c?""!==d.value:d.specified)?d.value:b},set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},ia.attrHooks.contenteditable={get:Aa.get,set:function(a,b,c){Aa.set(a,""!==b&&b,c)}},ia.each(["width","height"],function(a,b){ia.attrHooks[b]=ia.extend(ia.attrHooks[b],{set:function(a,c){if(""===c)return a.setAttribute(b,"auto"),c}})})),ia.support.hrefNormalized||(ia.each(["href","src","width","height"],function(a,c){ia.attrHooks[c]=ia.extend(ia.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null==d?b:d}})}),ia.each(["href","src"],function(a,b){ia.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}})),ia.support.style||(ia.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),ia.support.optSelected||(ia.propHooks.selected=ia.extend(ia.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),ia.support.enctype||(ia.propFix.enctype="encoding"),ia.support.checkOn||ia.each(["radio","checkbox"],function(){ia.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),ia.each(["radio","checkbox"],function(){ia.valHooks[this]=ia.extend(ia.valHooks[this],{set:function(a,b){if(ia.isArray(b))return a.checked=ia.inArray(ia(a).val(),b)>=0}})});var Ka=/^(?:input|select|textarea)$/i,La=/^key/,Ma=/^(?:mouse|contextmenu)|click/,Na=/^(?:focusinfocus|focusoutblur)$/,Oa=/^([^.]*)(?:\.(.+)|)$/;ia.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=ia._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=ia.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof ia===V||a&&ia.event.triggered===a.type?b:ia.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(ka)||[""],i=c.length;i--;)g=Oa.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),k=ia.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=ia.event.special[o]||{},m=ia.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&ia.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),ia.event.global[o]=!0;a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ia.hasData(a)&&ia._data(a);if(q&&(k=q.events)){for(b=(b||"").match(ka)||[""],j=b.length;j--;)if(h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=ia.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||ia.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)ia.event.remove(a,n+b[j],c,d,!0);ia.isEmptyObject(k)&&(delete q.handle,ia._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||W],o=ga.call(c,"type")?c.type:c,p=ga.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||W,3!==e.nodeType&&8!==e.nodeType&&!Na.test(o+ia.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[ia.expando]?c:new ia.Event(o,"object"==typeof c&&c),c.isTrigger=!0,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:ia.makeArray(d,[c]),k=ia.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!ia.isWindow(e)){for(j=k.delegateType||o,Na.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||W)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(ia._data(i,"events")||{})[c.type]&&ia._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&ia.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(e.ownerDocument,d)===!1)&&("click"!==o||!ia.nodeName(e,"a"))&&ia.acceptData(e)&&h&&e[o]&&!ia.isWindow(e)){l=e[h],l&&(e[h]=null),ia.event.triggered=o;try{e[o]()}catch(q){}ia.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=ia.event.fix(a);var c,d,e,f,g,h=[],i=da.call(arguments),j=(ia._data(this,"events")||{})[a.type]||[],k=ia.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=ia.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(e.namespace)){a.handleObj=e,a.data=e.data;var l=(ia.event.special[e.origType]||{}).handle||e.handler;l.apply&&(d=l.apply(f.elem,i)),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation())}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;g=0:ia.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return iy.cacheLength&&delete a[b.shift()],a[c]=d}}function e(a){return a[N]=!0,a}function f(a){var b=F.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}}function g(a,b,c,d){var e,f,g,h,i,j,k,n,o,p;if((b?b.ownerDocument||b:O)!==F&&E(b),b=b||F,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(!H&&!d){if(e=pa.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&L(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return Z.apply(c,$.call(b.getElementsByTagName(a),0)),c;if((g=e[3])&&P.getByClassName&&b.getElementsByClassName)return Z.apply(c,$.call(b.getElementsByClassName(g),0)),c}if(P.qsa&&!I.test(a)){if(k=!0,n=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=l(a),(k=b.getAttribute("id"))?n=k.replace(sa,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=na.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return Z.apply(c,$.call(o.querySelectorAll(p),0)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return u(a.replace(ga,"$1"),b,c,d)}function h(a,b){var c=b&&a,d=c&&(~b.sourceIndex||W)-(~a.sourceIndex||W);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(a,b){var c,d,e,f,h,i,j,k=T[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=y.preFilter;h;){c&&!(d=ha.exec(h))||(d&&(h=h.slice(d[0].length)||h),i.push(e=[])),c=!1,(d=ja.exec(h))&&(c=d.shift(),e.push({value:c,type:d[0].replace(ga," ")}),h=h.slice(c.length));for(f in y.filter)!(d=ma[f].exec(h))||j[f]&&!(d=j[f](d))||(c=d.shift(),e.push({value:c,type:f,matches:d}),h=h.slice(c.length));if(!c)break}return b?h.length:h?g.error(a):T(a,i).slice(0)}function m(a){for(var b=0,c=a.length,d="";b1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h-1&&(e[j]=!(g[j]=l))}}else s=p(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):Z.apply(g,s)})}function r(a){for(var b,c,d,e=a.length,f=y.relative[a[0].type],g=f||y.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return _.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];h1&&o(k),h>1&&m(a.slice(0,h-1)).replace(ga,"$1"),c,h0,f=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],q=0,r="0",s=e&&[],t=null!=k,u=D,v=e||f&&y.find.TAG("*",k&&h.parentNode||h),w=Q+=null==u?1:Math.random()||.1;for(t&&(D=h!==F&&h,x=c);null!=(l=v[r]);r++){if(f&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(Q=w,x=++c)}d&&((l=!n&&l)&&q--,e&&s.push(l))}if(q+=r,d&&r!==q){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(q>0)for(;r--;)s[r]||o[r]||(o[r]=Y.call(j));o=p(o)}Z.apply(j,o),t&&!e&&o.length>0&&q+b.length>1&&g.uniqueSort(j)}return t&&(Q=w,D=u),s};return d?e(h):h}function t(a,b,c){for(var d=0,e=b.length;d2&&"ID"===(g=f[0]).type&&9===b.nodeType&&!H&&y.relative[f[1].type]){if(b=y.find.ID(g.matches[0].replace(ua,va),b)[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=ma.needsContext.test(a)?0:f.length;e--&&(g=f[e],!y.relative[h=g.type]);)if((i=y.find[h])&&(d=i(g.matches[0].replace(ua,va),na.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return Z.apply(c,$.call(d,0)),c;break}}return B(a,j)(d,b,H,c,na.test(a)),c}function v(){}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P={},Q=0,R=0,S=d(),T=d(),U=d(),V=typeof b,W=1<<31,X=[],Y=X.pop,Z=X.push,$=X.slice,_=X.indexOf||function(a){for(var b=0,c=this.length;b+~])"+aa+"*"),ka=new RegExp(fa),la=new RegExp("^"+ca+"$"),ma={ID:new RegExp("^#("+ba+")"),CLASS:new RegExp("^\\.("+ba+")"),NAME:new RegExp("^\\[name=['\"]?("+ba+")['\"]?\\]"),TAG:new RegExp("^("+ba.replace("w","w*")+")"),ATTR:new RegExp("^"+ea),PSEUDO:new RegExp("^"+fa),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+aa+"*(even|odd|(([+-]|)(\\d*)n|)"+aa+"*(?:([+-]|)"+aa+"*(\\d+)|))"+aa+"*\\)|)","i"),needsContext:new RegExp("^"+aa+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+aa+"*((?:-\\d)?\\d*)"+aa+"*\\)|)(?=[^-]|$)","i")},na=/[\x20\t\r\n\f]*[+~]/,oa=/^[^{]+\{\s*\[native code/,pa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,qa=/^(?:input|select|textarea|button)$/i,ra=/^h\d$/i,sa=/'|\\/g,ta=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,ua=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,va=function(a,b){var c="0x"+b-65536;return c!==c?b:c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320)};try{$.call(O.documentElement.childNodes,0)[0].nodeType}catch(wa){$=function(a){for(var b,c=[];b=this[a++];)c.push(b);return c}}A=g.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},E=g.setDocument=function(a){var d=a?a.ownerDocument||a:O;return d!==F&&9===d.nodeType&&d.documentElement?(F=d,G=d.documentElement,H=A(d),P.tagNameNoComments=f(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),P.attributes=f(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),P.getByClassName=f(function(a){return a.innerHTML="",!(!a.getElementsByClassName||!a.getElementsByClassName("e").length)&&(a.lastChild.className="e",2===a.getElementsByClassName("e").length)}),P.getByName=f(function(a){a.id=N+0,a.innerHTML="
            ",G.insertBefore(a,G.firstChild);var b=d.getElementsByName&&d.getElementsByName(N).length===2+d.getElementsByName(N+0).length;return P.getIdNotName=!d.getElementById(N),G.removeChild(a),b}),y.attrHandle=f(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==V&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},P.getIdNotName?(y.find.ID=function(a,b){if(typeof b.getElementById!==V&&!H){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){return a.getAttribute("id")===b}}):(y.find.ID=function(a,c){if(typeof c.getElementById!==V&&!H){var d=c.getElementById(a);return d?d.id===a||typeof d.getAttributeNode!==V&&d.getAttributeNode("id").value===a?[d]:b:[]}},y.filter.ID=function(a){var b=a.replace(ua,va);return function(a){var c=typeof a.getAttributeNode!==V&&a.getAttributeNode("id");return c&&c.value===b}}),y.find.TAG=P.tagNameNoComments?function(a,b){if(typeof b.getElementsByTagName!==V)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},y.find.NAME=P.getByName&&function(a,b){if(typeof b.getElementsByName!==V)return b.getElementsByName(name)},y.find.CLASS=P.getByClassName&&function(a,b){if(typeof b.getElementsByClassName!==V&&!H)return b.getElementsByClassName(a)},J=[],I=[":focus"],(P.qsa=c(d.querySelectorAll))&&(f(function(a){a.innerHTML="",a.querySelectorAll("[selected]").length||I.push("\\["+aa+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||I.push(":checked")}),f(function(a){a.innerHTML="",a.querySelectorAll("[i^='']").length&&I.push("[*^$]="+aa+"*(?:\"\"|'')"),a.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),I.push(",.*:")})),(P.matchesSelector=c(K=G.matchesSelector||G.mozMatchesSelector||G.webkitMatchesSelector||G.oMatchesSelector||G.msMatchesSelector))&&f(function(a){P.disconnectedMatch=K.call(a,"div"),K.call(a,"[s!='']:x"),J.push("!=",fa)}),I=new RegExp(I.join("|")),J=new RegExp(J.join("|")),L=c(G.contains)||G.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},M=G.compareDocumentPosition?function(a,b){var c;return a===b?(C=!0,0):(c=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b))?1&c||a.parentNode&&11===a.parentNode.nodeType?a===d||L(O,a)?-1:b===d||L(O,b)?1:0:4&c?-1:1:a.compareDocumentPosition?-1:1}:function(a,b){var c,e=0,f=a.parentNode,g=b.parentNode,i=[a],j=[b];if(a===b)return C=!0,0;if(!f||!g)return a===d?-1:b===d?1:f?-1:g?1:0;if(f===g)return h(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},C=!1,[0,0].sort(M),P.detectDuplicates=C,F):F},g.matches=function(a,b){return g(a,null,null,b)},g.matchesSelector=function(a,b){if((a.ownerDocument||a)!==F&&E(a),b=b.replace(ta,"='$1']"),P.matchesSelector&&!H&&(!J||!J.test(b))&&!I.test(b))try{var c=K.call(a,b);if(c||P.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(d){}return g(b,F,null,[a]).length>0},g.contains=function(a,b){return(a.ownerDocument||a)!==F&&E(a),L(a,b)},g.attr=function(a,b){var c;return(a.ownerDocument||a)!==F&&E(a),H||(b=b.toLowerCase()),(c=y.attrHandle[b])?c(a):H||P.attributes?a.getAttribute(b):((c=a.getAttributeNode(b))||a.getAttribute(b))&&a[b]===!0?b:c&&c.specified?c.value:null},g.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},g.uniqueSort=function(a){var b,c=[],d=1,e=0;if(C=!P.detectDuplicates,a.sort(M),C){for(;b=a[d];d++)b===a[d-1]&&(e=c.push(d));for(;e--;)a.splice(c[e],1)}return a},z=g.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=z(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=z(b);return c},y=g.selectors={cacheLength:50,createPseudo:e,match:ma,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ua,va),a[3]=(a[4]||a[5]||"").replace(ua,va),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||g.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&g.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return ma.CHILD.test(a[0])?null:(a[4]?a[2]=a[4]:c&&ka.test(c)&&(b=l(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(ua,va).toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=S[a+" "];return b||(b=new RegExp("(^|"+aa+")"+a+"("+aa+"|$)"))&&S(a,function(a){return b.test(a.className||typeof a.getAttribute!==V&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=g.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===Q&&j[1],m=j[0]===Q&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[Q,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===Q)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[Q,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,d=y.pseudos[a]||y.setFilters[a.toLowerCase()]||g.error("unsupported pseudo: "+a);return d[N]?d(b):d.length>1?(c=[a,a,"",b],y.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var e,f=d(a,b),g=f.length;g--;)e=_.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:e(function(a){var b=[],c=[],d=B(a.replace(ga,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return g(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||z(b)).indexOf(a)>-1}}),lang:e(function(a){return la.test(a||"")||g.error("unsupported lang: "+a),a=a.replace(ua,va).toLowerCase(),function(b){var c;do if(c=H?b.getAttribute("xml:lang")||b.getAttribute("lang"):b.lang)return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===G},focus:function(a){return a===F.activeElement&&(!F.hasFocus||F.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!y.pseudos.empty(a)},header:function(a){return ra.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[c<0?c+b:c]}),even:k(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=c<0?c+b:c;++d1?ia.unique(c):c),c.selector=(this.selector?this.selector+" ":"")+a,c},has:function(a){var b,c=ia(a,this),d=c.length;return this.filter(function(){for(b=0;b=0:ia.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sa.test(a)||"string"!=typeof a?ia(a,b||this.context):0;d-1:ia.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}return this.pushStack(f.length>1?ia.unique(f):f)},index:function(a){return a?"string"==typeof a?ia.inArray(this[0],ia(a)):ia.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?ia(a,b):ia.makeArray(a&&a.nodeType?[a]:a),d=ia.merge(this.get(),c);return this.pushStack(ia.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),ia.fn.andSelf=ia.fn.addBack,ia.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return ia.dir(a,"parentNode")},parentsUntil:function(a,b,c){return ia.dir(a,"parentNode",c)},next:function(a){return k(a,"nextSibling")},prev:function(a){return k(a,"previousSibling")},nextAll:function(a){return ia.dir(a,"nextSibling")},prevAll:function(a){return ia.dir(a,"previousSibling")},nextUntil:function(a,b,c){return ia.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return ia.dir(a,"previousSibling",c)},siblings:function(a){return ia.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return ia.sibling(a.firstChild)},contents:function(a){return ia.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:ia.merge([],a.childNodes)}},function(a,b){ia.fn[a]=function(c,d){var e=ia.map(this,b,c);return Pa.test(a)||(d=c),d&&"string"==typeof d&&(e=ia.filter(d,e)),e=this.length>1&&!Ta[a]?ia.unique(e):e,this.length>1&&Qa.test(a)&&(e=e.reverse()),this.pushStack(e)}}),ia.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?ia.find.matchesSelector(b[0],a)?[b[0]]:[]:ia.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!ia(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ua="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Va=/ jQuery\d+="(?:null|\d+)"/g,Wa=new RegExp("<(?:"+Ua+")[\\s/>]","i"),Xa=/^\s+/,Ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Za=/<([\w:]+)/,$a=/\s*$/g,gb={option:[1,""],legend:[1,"
            ","
            "],area:[1,"",""],param:[1,"",""],thead:[1,"","
            "],tr:[2,"","
            "],col:[2,"","
            "],td:[3,"","
            "],_default:ia.support.htmlSerialize?[0,"",""]:[1,"X
            ","
            "]},hb=m(W),ib=hb.appendChild(W.createElement("div"));gb.optgroup=gb.option,gb.tbody=gb.tfoot=gb.colgroup=gb.caption=gb.thead,gb.th=gb.td,ia.fn.extend({text:function(a){return ia.access(this,function(a){return a===b?ia.text(this):this.empty().append((this[0]&&this[0].ownerDocument||W).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(ia.isFunction(a))return this.each(function(b){ia(this).wrapAll(a.call(this,b))});if(this[0]){var b=ia(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return ia.isFunction(a)?this.each(function(b){ia(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ia(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ia.isFunction(a);return this.each(function(c){ia(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){ia.nodeName(this,"body")||ia(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||ia.filter(a,[c]).length>0)&&(b||1!==c.nodeType||ia.cleanData(t(c)),c.parentNode&&(b&&ia.contains(c.ownerDocument,c)&&q(t(c,"script")),c.parentNode.removeChild(c)));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&ia.cleanData(t(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&ia.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return ia.clone(this,a,b)})},html:function(a){return ia.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Va,""):b;if("string"==typeof a&&!ab.test(a)&&(ia.support.htmlSerialize||!Wa.test(a))&&(ia.support.leadingWhitespace||!Xa.test(a))&&!gb[(Za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ya,"<$1>");try{for(;d")?f=a.cloneNode(!0):(ib.innerHTML=a.outerHTML,ib.removeChild(f=ib.firstChild)),!(ia.support.noCloneEvent&&ia.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ia.isXMLDoc(a)))for(d=t(f),h=t(a),g=0;null!=(e=h[g]);++g)d[g]&&s(e,d[g]);if(b)if(c)for(h=h||t(a),d=d||t(f),g=0;null!=(e=h[g]);g++)r(e,d[g]);else r(a,f);return d=t(f,"script"),d.length>0&&q(d,!i&&t(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,n=m(b),o=[],p=0;p")+k[2],e=k[0];e--;)h=h.lastChild;if(!ia.support.leadingWhitespace&&Xa.test(f)&&o.push(b.createTextNode(Xa.exec(f)[0])),!ia.support.tbody)for(f="table"!==i||$a.test(f)?""!==k[1]||$a.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)ia.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(ia.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=n.lastChild}else o.push(b.createTextNode(f));for(h&&n.removeChild(h),ia.support.appendChecked||ia.grep(t(o,"input"),u),p=0;f=o[p++];)if((!d||ia.inArray(f,d)===-1)&&(g=ia.contains(f.ownerDocument,f),h=t(n.appendChild(f),"script"),g&&q(h),c))for(e=0;f=h[e++];)db.test(f.type||"")&&c.push(f);return h=null,n},cleanData:function(a,b){for(var c,d,e,f,g=0,h=ia.expando,i=ia.cache,j=ia.support.deleteExpando,k=ia.event.special;null!=(c=a[g]);g++)if((b||ia.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?ia.event.remove(c,d):ia.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==V?c.removeAttribute(h):c[h]=null,_.push(e))}}});var jb,kb,lb,mb=/alpha\([^)]*\)/i,nb=/opacity\s*=\s*([^)]*)/,ob=/^(top|right|bottom|left)$/,pb=/^(none|table(?!-c[ea]).+)/,qb=/^margin/,rb=new RegExp("^("+ja+")(.*)$","i"),sb=new RegExp("^("+ja+")(?!px)[a-z%]+$","i"),tb=new RegExp("^([+-])=("+ja+")","i"),ub={BODY:"block"},vb={position:"absolute",visibility:"hidden",display:"block"},wb={letterSpacing:0,fontWeight:400},xb=["Top","Right","Bottom","Left"],yb=["Webkit","O","Moz","ms"];ia.fn.extend({css:function(a,c){return ia.access(this,function(a,c,d){var e,f,g={},h=0;if(ia.isArray(c)){for(f=kb(a),e=c.length;h1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(a){var b="boolean"==typeof a;return this.each(function(){(b?a:w(this))?ia(this).show():ia(this).hide()})}}),ia.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ia.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=ia.camelCase(c),j=a.style;if(c=ia.cssProps[i]||(ia.cssProps[i]=v(j,i)),h=ia.cssHooks[c]||ia.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tb.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(ia.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||ia.cssNumber[i]||(d+="px"),ia.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=ia.camelCase(c);return c=ia.cssProps[i]||(ia.cssProps[i]=v(a.style,i)),h=ia.cssHooks[c]||ia.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lb(a,c,e)),"normal"===g&&c in wb&&(g=wb[c]),""===d||d?(f=parseFloat(g),d===!0||ia.isNumeric(f)?f||0:g):g},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),a.getComputedStyle?(kb=function(b){return a.getComputedStyle(b,null)},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||ia.contains(a.ownerDocument,a)||(i=ia.style(a,c)),sb.test(i)&&qb.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):W.documentElement.currentStyle&&(kb=function(a){return a.currentStyle},lb=function(a,c,d){var e,f,g,h=d||kb(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sb.test(i)&&!ob.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),ia.each(["height","width"],function(a,b){ia.cssHooks[b]={get:function(a,c,d){if(c)return 0===a.offsetWidth&&pb.test(ia.css(a,"display"))?ia.swap(a,vb,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&kb(a);return y(a,c,d?z(a,b,d,ia.support.boxSizing&&"border-box"===ia.css(a,"boxSizing",!1,e),e):0)}}}),ia.support.opacity||(ia.cssHooks.opacity={get:function(a,b){return nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=ia.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===ia.trim(f.replace(mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mb.test(f)?f.replace(mb,e):f+" "+e)}}),ia(function(){ia.support.reliableMarginRight||(ia.cssHooks.marginRight={get:function(a,b){if(b)return ia.swap(a,{display:"inline-block"},lb,[a,"marginRight"])}}),!ia.support.pixelPosition&&ia.fn.position&&ia.each(["top","left"],function(a,b){ia.cssHooks[b]={get:function(a,c){if(c)return c=lb(a,b),sb.test(c)?ia(a).position()[b]+"px":c}}})}),ia.expr&&ia.expr.filters&&(ia.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!ia.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||ia.css(a,"display"))},ia.expr.filters.visible=function(a){return!ia.expr.filters.hidden(a)}),ia.each({margin:"",padding:"",border:"Width"},function(a,b){ia.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+xb[d]+b]=f[d]||f[d-2]||f[0];return e}},qb.test(a)||(ia.cssHooks[a+b].set=y)});var zb=/%20/g,Ab=/\[\]$/,Bb=/\r?\n/g,Cb=/^(?:submit|button|image|reset|file)$/i,Db=/^(?:input|select|textarea|keygen)/i;ia.fn.extend({serialize:function(){return ia.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ia.prop(this,"elements");return a?ia.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ia(this).is(":disabled")&&Db.test(this.nodeName)&&!Cb.test(a)&&(this.checked||!bb.test(a))}).map(function(a,b){var c=ia(this).val();return null==c?null:ia.isArray(c)?ia.map(c,function(a){return{name:b.name,value:a.replace(Bb,"\r\n")}}):{name:b.name,value:c.replace(Bb,"\r\n")}}).get()}}),ia.param=function(a,c){var d,e=[],f=function(a,b){b=ia.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=ia.ajaxSettings&&ia.ajaxSettings.traditional),ia.isArray(a)||a.jquery&&!ia.isPlainObject(a))ia.each(a,function(){f(this.name,this.value)});else for(d in a)D(d,a[d],c,f);return e.join("&").replace(zb,"+")},ia.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(a,b){ia.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),ia.fn.hover=function(a,b){return this.mouseenter(a).mouseleave(b||a)};var Eb,Fb,Gb=ia.now(),Hb=/\?/,Ib=/#.*$/,Jb=/([?&])_=[^&]*/,Kb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mb=/^(?:GET|HEAD)$/,Nb=/^\/\//,Ob=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pb=ia.fn.load,Qb={},Rb={},Sb="*/".concat("*");try{Fb=X.href}catch(Tb){Fb=W.createElement("a"),Fb.href="",Fb=Fb.href}Eb=Ob.exec(Fb.toLowerCase())||[],ia.fn.load=function(a,c,d){if("string"!=typeof a&&Pb)return Pb.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),ia.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&ia.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?ia("
            ").append(ia.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},ia.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){ia.fn[b]=function(a){return this.on(b,a)}}),ia.each(["get","post"],function(a,c){ia[c]=function(a,d,e,f){return ia.isFunction(d)&&(f=f||e,e=d,d=b),ia.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),ia.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fb,type:"GET",isLocal:Lb.test(Eb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sb,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":a.String,"text html":!0,"text json":ia.parseJSON,"text xml":ia.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?G(G(a,ia.ajaxSettings),b):G(ia.ajaxSettings,a)},ajaxPrefilter:E(Qb),ajaxTransport:E(Rb),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,d&&(t=H(m,w,d)),a>=200&&a<300||304===a?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(ia.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(ia.etag[g]=v)),204===a?(f=!0,x="nocontent"):304===a?(f=!0,x="notmodified"):(f=I(m,t),x=f.state,l=f.data,s=f.error,f=!s)):(s=x,!a&&x||(x="error",a<0&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--ia.active||ia.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=ia.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?ia(n):ia.event,p=ia.Deferred(),q=ia.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kb.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(u<2)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fb)+"").replace(Ib,"").replace(Nb,Eb[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=ia.trim(m.dataType||"*").toLowerCase().match(ka)||[""],null==m.crossDomain&&(e=Ob.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Eb[1]&&e[2]===Eb[2]&&(e[3]||("http:"===e[1]?80:443))==(Eb[3]||("http:"===Eb[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=ia.param(m.data,m.traditional)),F(Qb,m,c,w),2===u)return w;j=m.global,j&&0===ia.active++&&ia.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mb.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hb.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jb.test(g)?g.replace(Jb,"$1_="+Gb++):g+(Hb.test(g)?"&":"?")+"_="+Gb++)),m.ifModified&&(ia.lastModified[g]&&w.setRequestHeader("If-Modified-Since",ia.lastModified[g]),ia.etag[g]&&w.setRequestHeader("If-None-Match",ia.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sb+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=F(Rb,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(u<2))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getScript:function(a,c){return ia.get(a,b,c,"script")},getJSON:function(a,b,c){return ia.get(a,b,c,"json")}}),ia.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return ia.globalEval(a),a}}}),ia.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),ia.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=W.head||ia("head")[0]||W.documentElement;return{send:function(b,e){c=W.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Ub=[],Vb=/(=)\?(?=&|$)|\?\?/;ia.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Ub.pop()||ia.expando+"_"+Gb++;return this[a]=!0,a}}),ia.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vb.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vb.test(c.data)&&"data");if(i||"jsonp"===c.dataTypes[0])return f=c.jsonpCallback=ia.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vb,"$1"+f):c.jsonp!==!1&&(c.url+=(Hb.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||ia.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Ub.push(f)),h&&ia.isFunction(g)&&g(h[0]),h=g=b}),"script"});var Wb,Xb,Yb=0,Zb=a.ActiveXObject&&function(){var a;for(a in Wb)Wb[a](b,!0)};ia.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&J()||K()}:J,Xb=ia.ajaxSettings.xhr(),ia.support.cors=!!Xb&&"withCredentials"in Xb,Xb=ia.support.ajax=!!Xb,Xb&&ia.ajaxTransport(function(c){if(!c.crossDomain||ia.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=ia.noop,Zb&&delete Wb[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yb,Zb&&(Wb||(Wb={},ia(a).unload(Zb)),Wb[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+ja+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[P],ec={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=bc.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){if(c=+f[2],d=f[3]||(ia.cssNumber[a]?"":"px"),"px"!==d&&h){h=ia.css(e.elem,a,!0)||c||1;do i=i||".5",h/=i,ia.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&1!==i&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};ia.Animation=ia.extend(N,{tweener:function(a,b){ia.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),ia.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},ia.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===ia.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),ia.nodeName(a[0],"html")||(c=a.offset()),c.top+=ia.css(a[0],"borderTopWidth",!0),c.left+=ia.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-ia.css(d,"marginTop",!0),left:b.left-c.left-ia.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||W.documentElement;a&&!ia.nodeName(a,"html")&&"static"===ia.css(a,"position");)a=a.offsetParent;return a||W.documentElement})}}),ia.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);ia.fn[a]=function(e){return ia.access(this,function(a,e,f){var g=S(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:void(g?g.scrollTo(d?ia(g).scrollLeft():f,d?f:ia(g).scrollTop()):a[e]=f)},a,e,arguments.length,null)}}),ia.each({Height:"height",Width:"width"},function(a,c){ia.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){ia.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return ia.access(this,function(c,d,e){var f;return ia.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?ia.css(c,d,h):ia.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=ia,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ia})}(window),$.extend($.Event.prototype,{stopEvent:function(){this.stopPropagation(),this.preventDefault()}}),jQuery&&(!function(a){a.fn.insets||(a.fn.insets=function(){var a=this.padding(),b=this.border();return{top:a.top,bottom:a.bottom+b.bottom+b.top,left:a.left,right:a.right+b.right+b.left}}),a.fn.bounds||(a.fn.bounds=function(a){var b={hasIgnoredBounds:!0};return a?(isNaN(a.x)||(b.left=a.x),isNaN(a.y)||(b.top=a.y),null!=a.width&&(b.width=a.width-(this.outerWidth(!0)-this.width()),b.width=b.width>=0?b.width:a.width),null!=a.height&&(b.height=a.height-(this.outerHeight(!0)-this.height()),b.height=b.height>=0?b.height:a.height),this.css(b),this):(b=this.position(),{x:b.left,y:b.top,width:this.outerWidth(),height:this.outerHeight()})})}(jQuery),BI.extend(jQuery.fn,{destroy:function(){this.remove(),BI.isIE()===!0&&(this[0].outerHTML="")},__textKeywordMarked__:function(a,b,c){if(!BI.isKey(b)||(a+"").length>100)return this.html(BI.htmlEncode(a));b+="",b=BI.toUpperCase(b);var d=(a||"")+"";for(c=(c||BI.makeFirstPY(a))+"",null!=c&&(c=BI.toUpperCase(c)),this.empty();;){var e=BI.toUpperCase(d).indexOf(b),f=null;if(null!=c&&(f=c.indexOf(b),f>=0&&(f%=a.length)),e>=0)this.append(BI.htmlEncode(d.substr(0,e))),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(e,b.length)))),d=d.substr(e+b.length),null!=c&&(c=c.substr(e+b.length));else{if(!(null!=f&&f>=0&&Math.floor(f/a.length)===Math.floor((f+b.length-1)/a.length))){this.append(BI.htmlEncode(d));break}this.append(BI.htmlEncode(d.substr(0,f))),this.append($("").addClass("bi-keyword-red-mark").html(BI.htmlEncode(d.substr(f,b.length)))),null!=c&&(c=c.substr(f+b.length)),d=d.substr(f+b.length)}}return this},getDomHeight:function(a){var b=$(this).clone();b.appendTo($(a||"body"));var c=b.height();return b.remove(),c},hasVerticalScroll:function(){return this.height()>0&&this[0].clientWidth0&&this[0].clientHeightb.left+c||a.pageYb.top+d)},__hasZIndexMask__:function(a){return a&&null!=this.zIndexMask[a]},__buildZIndexMask__:function(a,b){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var c=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:b});return c.element.css({"z-index":a}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(c),a&&(this.zIndexMask[a]=c),c.element},__releaseZIndexMask__:function(a){if(a&&this.zIndexMask[a])return BI.remove(this.indexMask,this.zIndexMask[a]),void this.zIndexMask[a].destroy();this.indexMask=this.indexMask||[];var b=this.indexMask.pop();b&&b.destroy()}})),_.extend(BI,{$import:function(){function a(a,c){var d=$("head script, body script");$.each(d,function(c,d){d.src.indexOf(a)!=-1&&(b[a]=!0)});var e=$("head link");$.each(e,function(d,e){e.href.indexOf(a)!=-1&&c&&(b[a]=!1,$(e).remove())})}var b={};return function(c,d,e){if(a(c,e),b[c]!==!0)if("css"===d){var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.href=c;var g=document.getElementsByTagName("head")[0];g.appendChild(f),b[c]=!0}else $.ajax({url:c,dataType:"script",async:!1,cache:!0,complete:function(a,d){"success"==d&&(b[c]=!0)}})}}()}),Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||!function(){function a(a,b){for(var c=-1;++c=0;)c+=h[b],h[b]=Math.floor(c/a),c=c%a*f}function c(){for(var a=g,b="";--a>=0;)if(""!==b||0===a||0!==h[a]){var c=String(h[a]);""===b?b=c:b+="0000000".slice(0,7-c.length)+c}return b}function d(a,b,c){return 0===b?c:b%2===1?d(a,b-1,c*a):d(a*a,b/2,c)}function e(a){for(var b=0;a>=4096;)b+=12,a/=4096;for(;a>=2;)b+=1,a/=2;return b}var f,g,h;f=1e7,g=6,h=[0,0,0,0,0,0],Number.prototype.toFixed=function(f){var g,h,i,j,k,l,m,n;if(g=Number(f),g=g!==g?0:Math.floor(g),g<0||g>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(h=Number(this),h!==h)return"NaN";if(h<=-1e21||h>1e21)return String(h);if(i="",h<0&&(i="-",h=-h),j="0",h>1e-21)if(k=e(h*d(2,69,1))-69,l=k<0?h*d(2,-k,1):h/d(2,k,1),l*=4503599627370496,k=52-k,k>0){for(a(0,l),m=g;m>=7;)a(1e7,0),m-=7;for(a(d(10,m,1),0),m=k-1;m>=23;)b(1<<23),m-=23;b(1<0?(n=j.length,j=n<=g?i+"0.0000000000000000000".slice(0,g-n+2)+j:i+j.slice(0,n-g)+"."+j.slice(n-g)):j=i+j,j}}(),_.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}),BI.version="2.0",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(a,b){var c=this.options,d=BI.AbsoluteCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0),right:c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0),top:c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0),bottom:c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0),margin:"auto"}),d},resize:function(){},populate:function(a){BI.AbsoluteCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_center_adapt",BI.AbsoluteCenterLayout),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(a,b){var c=this.options,d=BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0),right:c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0),margin:"auto"}),c.vgap+c.tgap+(b.vgap||0)+(b.tgap||0)!==0&&d.element.css("top",c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)),c.vgap+c.bgap+(b.vgap||0)+(b.bgap||0)!==0&&d.element.css("bottom",c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_horizontal_adapt",BI.AbsoluteHorizontalLayout),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(a,b){var c=this.options,d=BI.AbsoluteVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"absolute",left:b.lgap,right:b.rgap,top:c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0),bottom:c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0),margin:"auto"}),c.hgap+c.lgap+(b.hgap||0)+(b.lgap||0)!==0&&d.element.css("left",c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)),c.hgap+c.rgap+(b.hgap||0)+(b.rgap||0)!==0&&d.element.css("right",c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)),d},resize:function(){},populate:function(a){BI.AbsoluteVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_vertical_adapt",BI.AbsoluteVerticalLayout),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 a=this.options,b=this;return BI.CenterAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:a.horizontalAlign,columnSize:a.columnSize,scrollx:a.scrollx,items:a.items,ref:function(a){b.layout=a},hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.center_adapt",BI.CenterAdaptLayout),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 a=this,b=this.options;return BI.HorizontalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,items:b.items,scrollx:b.scrollx,ref:function(b){a.layout=b},hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.horizontal_adapt",BI.HorizontalAdaptLayout),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 a=this.options;BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this,arguments);var b=[];return"left"in a.items&&b.push({type:"bi.left",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items.left,hgap:a.lhgap,lgap:a.llgap,rgap:a.lrgap}}]}),"right"in a.items&&b.push({type:"bi.right",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items.right,textAlign:"right",hgap:a.rhgap,lgap:a.rlgap,rgap:a.rrgap}}]}),b},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){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 a=this.options,b=this;return BI.LeftVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.left",ref:function(a){b.layout=a},items:[{el:{type:"bi.vertical_adapt",height:"100%",items:a.items,lgap:a.lgap,hgap:a.hgap,rgap:a.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){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 a=this.options,b=this;return BI.RightVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.right",ref:function(a){b.layout=a},items:[{el:{type:"bi.vertical_adapt",height:"100%",textAlign:"right",items:a.items,lgap:a.lgap,hgap:a.hgap,rgap:a.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.right_vertical_adapt",BI.RightVerticalAdaptLayout),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 a=this.options;BI.TableAdaptLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("
            ").css({position:"relative",display:"table",height:a.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:a.horizontalAlign===BI.HorizontalAlign.Center?"100%":"auto","white-space":"nowrap"}),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.width(e);else{var f=BI.createWidget(b);f.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",width:e,items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]<=1?e:e+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative",display:"table-cell","vertical-align":d.verticalAlign,margin:"0",padding:"0",height:"100%"}),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},appendFragment:function(a){this.$table.append(a),this.element.append(this.$table)},resize:function(){},populate:function(a){BI.TableAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table_adapt",BI.TableAdaptLayout),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 a=this,b=this.options;return BI.VerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,items:b.items,scrollx:b.scrollx,ref:function(b){a.layout=b},hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap}},resize:function(){},populate:function(a){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.vertical_adapt",BI.VerticalAdaptLayout),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(a,b){var c=this.options,d=BI.HorizontalAutoLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",margin:"0px auto"}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":(0===a?c.vgap:0)+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_auto",BI.HorizontalAutoLayout),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 a=this,b=this.left.element.width(),c=this.left.element.height();this.left.element.width(b).height(c).css("float","none"),BI.remove(this._children,function(b,c){c===a.container&&delete a._children[b]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.left]})},_addElement:function(a,b){var c=this.options;return this.left=BI.createWidget({type:"bi.vertical",items:[b],hgap:c.hgap,vgap:c.vgap,tgap:c.tgap,bgap:c.bgap,lgap:c.lgap,rgap:c.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]}),this.left},populate:function(a){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_float",BI.FloatHorizontalLayout),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(a,b,c){var d=this.options,e=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return e.element.css({position:"relative","vertical-align":"middle"}),e.element.addClass("inline-center-adapt-item"),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&e.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&e.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&e.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&e.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),e},resize:function(){this.stroke(this.options.items)},addItem:function(a){throw new Error("不能添加元素")},stroke:function(a){var b=this;BI.each(a,function(c,d){d&&b._addElement(c,d,a.length)})},populate:function(a){BI.InlineCenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_center_adapt",BI.InlineCenterAdaptLayout),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 a=this.options;this.element.css({whiteSpace:"nowrap",textAlign:a.textAlign}),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","vertical-align":"middle"}),d.element.addClass("inline-vertical-adapt-item"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.InlineVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_vertical_adapt",BI.InlineVerticalAdaptLayout),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(a,b){var c=this.options,d=BI.FlexCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0","margin-left":(0===a?c.hgap:0)+"px","margin-right":c.hgap+"px","margin-top":c.vgap+"px","margin-bottom":c.vgap+"px"}),d},resize:function(){},populate:function(a){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_center_adapt",BI.FlexCenterLayout),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 a=this,b=this.options;return{type:"bi.flex_vertical",ref:function(b){a.wrapper=b},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:b.verticalAlign,rowSize:b.rowSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},resize:function(){},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_horizontal_adapt",BI.FlexHorizontalCenter),BI.shortcut("bi.flex_horizontal_center_adapt",BI.FlexHorizontalCenter),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 a=this.options;this.element.addClass("v-"+a.verticalAlign).addClass("h-"+a.horizontalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.columnSize[a]>0&&d.element.width(c.columnSize[a]),"fill"===c.columnSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-center-adapt-layout",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var a=this,b=this.options;return{type:"bi.flex_horizontal",ref:function(b){a.wrapper=b},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,hgap:b.hgap,items:b.items}},resize:function(){},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_vertical_adapt",BI.FlexVerticalCenter),BI.shortcut("bi.flex_vertical_center_adapt",BI.FlexVerticalCenter),BI.FlexVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-layout",horizontalAlign:BI.HorizontalAlign.Left,verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrolly:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalLayout.superclass.render.apply(this,arguments);var a=this.options;this.element.addClass("h-"+a.horizontalAlign).addClass("v-"+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=BI.FlexVerticalLayout.superclass._addElement.apply(this,arguments),d=this.options;return c.element.css({position:"relative","flex-shrink":"0"}),d.rowSize[a]>0&&c.element.height(d.rowSize[a]),"fill"===d.rowSize[a]&&c.element.css("flex","1"),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&c.element.css({"margin-top":(0===a?d.vgap:0)+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&c.element.css({"margin-left":d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&c.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&c.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},resize:function(){},populate:function(a){BI.FlexVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical",BI.FlexVerticalLayout),BI.FlexWrapperCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-center-adapt-layout clearfix",scrollable:!0})},render:function(){BI.FlexWrapperCenterLayout.superclass.render.apply(this,arguments),this.$wrapper=BI.Widget._renderEngine.createElement("
            ").addClass("flex-scrollable-center-adapt-layout-wrapper"),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperCenterLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","margin-left":(0===a?c.hgap:0)+"px","margin-right":c.hgap+"px","margin-top":c.vgap+"px","margin-bottom":c.vgap+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_center_adapt",BI.FlexWrapperCenterLayout),BI.FlexWrapperHorizontalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-center-adapt-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 a=this,b=this.options;return{type:"bi.flex_scrollable_vertical",ref:function(b){a.wrapper=b},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:b.verticalAlign,rowSize:b.rowSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_scrollable_horizontal_adapt",BI.FlexWrapperHorizontalCenter),BI.shortcut("bi.flex_scrollable_horizontal_center_adapt",BI.FlexWrapperHorizontalCenter),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 a=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("
            ").addClass("flex-scrollable-horizontal-layout-wrapper v-"+a.verticalAlign).addClass("h-"+a.horizontalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.columnSize[a]>0&&d.element.width(c.columnSize[a]),"fill"===c.columnSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_horizontal",BI.FlexWrapperHorizontalLayout),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 a=this,b=this.options;return{type:"bi.flex_scrollable_horizontal",ref:function(b){a.wrapper=b},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:b.horizontalAlign,columnSize:b.columnSize,scrollx:b.scrollx,scrolly:b.scrolly,scrollable:b.scrollable,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,items:b.items}},update:function(a){return this.wrapper.update(a)},populate:function(a){this.wrapper.populate(a)}}),BI.shortcut("bi.flex_scrollable_vertical_adapt",BI.FlexWrapperVerticalCenter),BI.shortcut("bi.flex_scrollable_vertical_center_adapt",BI.FlexWrapperVerticalCenter),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 a=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("
            ").addClass("flex-scrollable-vertical-layout-wrapper h-"+a.horizontalAlign).addClass("v-"+a.verticalAlign),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","flex-shrink":"0"}),c.rowSize[a]>0&&d.element.height(c.rowSize[a]),"fill"===c.rowSize[a]&&d.element.css("flex","1"),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":(0===a?c.vgap:0)+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},appendFragment:function(a){this.$wrapper.append(a),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(a){BI.FlexWrapperVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_vertical",BI.FlexWrapperVerticalLayout),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(a,b){var c=this.options,d=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),e=0,f=0,g=0,h=0; return BI.isNotNull(b.left)&&(d.element.css({left:b.left}),e+=b.left),BI.isNotNull(b.right)&&(d.element.css({right:b.right}),f+=b.right),BI.isNotNull(b.top)&&(d.element.css({top:b.top}),g+=b.top),BI.isNotNull(b.bottom)&&(d.element.css({bottom:b.bottom}),h+=b.bottom),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d.element.css({position:"absolute"}),d},resize:function(){this.stroke(this.options.items)},stroke:function(a){this.options.items=a||[];var b=this;BI.each(a,function(a,c){if(c){if(!BI.isWidget(c)&&!c.el)throw new Error("el must be exist");b._addElement(a,c)}})},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute",BI.AbsoluteLayout),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(a,b){var c=this.options,d=BI.AdaptiveLayout.superclass._addElement.apply(this,arguments);d.element.css({position:"relative"});var e=0,f=0,g=0,h=0;return BI.isNotNull(b.left)&&d.element.css({"margin-left":b.left}),BI.isNotNull(b.right)&&d.element.css({"margin-right":b.right}),BI.isNotNull(b.top)&&d.element.css({"margin-top":b.top}),BI.isNotNull(b.bottom)&&d.element.css({"margin-bottom":b.bottom}),BI.isNotNull(c.hgap)&&(e+=c.hgap,d.element.css({left:e}),f+=c.hgap,d.element.css({right:f})),BI.isNotNull(c.vgap)&&(g+=c.vgap,d.element.css({top:g}),h+=c.vgap,d.element.css({bottom:h})),BI.isNotNull(c.lgap)&&(e+=c.lgap,d.element.css({left:e})),BI.isNotNull(c.rgap)&&(f+=c.rgap,d.element.css({right:f})),BI.isNotNull(c.tgap)&&(g+=c.tgap,d.element.css({top:g})),BI.isNotNull(c.bgap)&&(h+=c.bgap,d.element.css({bottom:h})),BI.isNotNull(b.width)&&d.element.css({width:b.width}),BI.isNotNull(b.height)&&d.element.css({height:b.height}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.adaptive",BI.AdaptiveLayout),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(a){throw new Error("cannot be added")},stroke:function(a){var b,c=0,d=0,e=0,f=0;if("north"in a&&(b=a.north,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"north")){var g=BI.createWidget(b);this.addWidget(this.getName()+"north",g)}this.getWidgetByName(this.getName()+"north").element.height(b.height).css({position:"absolute",top:b.top||0,left:b.left||0,right:b.right||0,bottom:"initial"})}c=(b.height||0)+(b.top||0)+(b.bottom||0)}if("south"in a&&(b=a.south,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"south")){var g=BI.createWidget(b);this.addWidget(this.getName()+"south",g)}this.getWidgetByName(this.getName()+"south").element.height(b.height).css({position:"absolute",bottom:b.bottom||0,left:b.left||0,right:b.right||0,top:"initial"})}d=(b.height||0)+(b.top||0)+(b.bottom||0)}if("west"in a&&(b=a.west,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"west")){var g=BI.createWidget(b);this.addWidget(this.getName()+"west",g)}this.getWidgetByName(this.getName()+"west").element.width(b.width).css({position:"absolute",left:b.left||0,top:c,bottom:d,right:"initial"})}e=(b.width||0)+(b.left||0)+(b.right||0)}if("east"in a&&(b=a.east,null!=b)){if(b.el){if(!this.hasWidget(this.getName()+"east")){var g=BI.createWidget(b);this.addWidget(this.getName()+"east",g)}this.getWidgetByName(this.getName()+"east").element.width(b.width).css({position:"absolute",right:b.right||0,top:c,bottom:d,left:"initial"})}f=(b.width||0)+(b.left||0)+(b.right||0)}if("center"in a&&(b=a.center,null!=b)){if(!this.hasWidget(this.getName()+"center")){var g=BI.createWidget(b);this.addWidget(this.getName()+"center",g)}this.getWidgetByName(this.getName()+"center").element.css({position:"absolute",top:c,bottom:d,left:e,right:f})}},update:function(a){},populate:function(a){BI.BorderLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.border",BI.BorderLayout),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(a){var b=this,c=this.options;this.showIndex=void 0,BI.each(a,function(a,d){if(d){if(b.hasWidget(d.cardName))var e=b.getWidgetByName(d.cardName);else{var e=BI.createWidget(d);e.on(BI.Events.DESTROY,function(){var a=BI.findIndex(c.items,function(a,b){return b.cardName==d.cardName});a>-1&&c.items.splice(a,1)}),b.addWidget(d.cardName,e)}e.element.css({position:"absolute",top:"0",right:"0",bottom:"0",left:"0"}),e.setVisible(!1)}})},update:function(){},empty:function(){BI.CardLayout.superclass.empty.apply(this,arguments),this.options.items=[]},populate:function(a){BI.CardLayout.superclass.populate.apply(this,arguments),this._mount(),this.options.defaultShowName&&this.showCardByName(this.options.defaultShowName)},isCardExisted:function(a){return BI.some(this.options.items,function(b,c){return c.cardName==a&&c.el})},getCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");return this._children[a]},_deleteCardByName:function(a){delete this._children[a];var b=BI.findIndex(this.options.items,function(b,c){return c.cardName==a});b>-1&&this.options.items.splice(b,1)},deleteCardByName:function(a){if(!this.isCardExisted(a))throw new Error("cardName is not exist");var b=this._children[a];this._deleteCardByName(a),b&&b._destroy()},addCardByName:function(a,b){if(this.isCardExisted(a))throw new Error("cardName is already exist");var c=BI.createWidget(b,this);return c.element.css({position:"relative",top:"0",left:"0",width:"100%",height:"100%"}).appendTo(this.element),c.invisible(),this.addWidget(a,c),this.options.items.push({el:b,cardName:a}),c},showCardByName:function(a,b,c){var d=this,e=this.isCardExisted(a);null!=this.showIndex&&(this.lastShowIndex=this.showIndex),this.showIndex=a;var f=!1;BI.each(this.options.items,function(g,h){var i=d._children[h.cardName];i&&(a!=h.cardName?!f&&!e&&BI.Action&&b instanceof BI.Action?(b.actionBack(i),f=!0):i.invisible():BI.Action&&b instanceof BI.Action?b.actionPerformed(void 0,i,c):(i.visible(),c&&c()))})},showLastCard:function(){var a=this;this.showIndex=this.lastShowIndex,BI.each(this.options.items,function(b,c){a._children[c.cardName].setVisible(a.showIndex==b)})},setDefaultShowName:function(a){return this.options.defaultShowName=a,this},getDefaultShowName:function(){return this.options.defaultShowName},getAllCardNames:function(){return BI.map(this.options.items,function(a,b){return b.cardName})},getShowingCard:function(){if(BI.isKey(this.showIndex))return this.getWidgetByName(this.showIndex)},deleteAllCard:function(){var a=this;BI.each(this.getAllCardNames(),function(b,c){a.deleteCardByName(c)})},hideAllCard:function(){var a=this;BI.each(this.options.items,function(b,c){a._children[c.cardName].invisible()})},isAllCardHide:function(){var a=this,b=!0;return BI.some(this.options.items,function(c,d){if(a._children[d.cardName].isVisible())return b=!1,!1}),b},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._deleteCardByName(b)}}),BI.shortcut("bi.card",BI.CardLayout),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(a,b){var c=this.options,d=BI.DefaultLayout.superclass._addElement.apply(this,arguments);return c.vgap+c.tgap+(b.tgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+"px"}),d},resize:function(){},populate:function(a){BI.DefaultLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.default",BI.DefaultLayout),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(a){throw new Error("cannot be added")},stroke:function(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=BI.makeArray(f),i={},j={};BI.each(h,function(a){h[a]=BI.makeArray(g)}),BI.each(a,function(a,b){return BI.isArray(b)?void BI.each(b,function(c,d){i[a]=(i[a]||0)+b.width,j[c]=(j[c]||0)+b.height,h[a][c]=d}):(i[b.row]=(i[b.row]||0)+b.width,j[b.column]=(j[b.column]||0)+b.height,void(h[b.row][b.column]=b))});for(var k=0;k0){var p=this.getWidgetByName(this.getName()+k+"_"+(m-1));p.element.css({right:100-o+"%"})}m==e.columns-1&&n.element.css({right:"0%"}),d(n,k,m),l+=h[k][m].width}for(var m=0;m0){var p=this.getWidgetByName(this.getName()+(k-1)+"_"+m);p.element.css({bottom:100-r+"%"})}k==e.rows-1&&n.element.css({bottom:"0%"}),q+=h[k][m].height}},update:function(){},populate:function(a){BI.DivisionLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.division",BI.DivisionLayout),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(a,b){var c=this.options,d=BI.FloatLeftLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"left"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),BI.isNotNull(b.bottom)&&d.element.css({bottom:b.bottom}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){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(a,b){var c=this.options,d=BI.FloatRightLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative","float":"right"}),BI.isNotNull(b.left)&&d.element.css({left:b.left}),BI.isNotNull(b.right)&&d.element.css({right:b.right}),BI.isNotNull(b.top)&&d.element.css({top:b.top}),BI.isNotNull(b.bottom)&&d.element.css({bottom:b.bottom}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":(0===a?c.hgap:0)+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.FloatRightLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right",BI.FloatRightLayout),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(a){function b(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function c(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}for(var e=this.options,f=e.rows||e.items.length,g=e.columns||0|(e.items[0]&&e.items[0].length),h=100/g,i=100/f,j=[],k=0;k").attr({cellspacing:0,cellpadding:0}).css({position:"relative","white-space":"nowrap",height:a.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:a.horizontalAlign===BI.HorizontalAlign.Center||a.horizontalAlign===BI.HorizontalAlign.Stretch?"100%":"auto","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=BI.Widget._renderEngine.createElement("
            "),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(a,b){var c,d=this.options,e=d.columnSize[a]<=1?100*d.columnSize[a]+"%":d.columnSize[a];if(this.hasWidget(this._getChildName(a)))c=this.getWidgetByName(this._getChildName(a)),c.element.attr("width",e);else{var f=BI.createWidget(b);f.element.css({position:"relative",margin:"0px auto"}),c=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:e},items:[f]}),this.addWidget(this._getChildName(a),c)}return c.element.css({"max-width":d.columnSize[a]<=1?e:e+"px"}),0===a&&c.element.addClass("first-element"),c.element.css({position:"relative","vertical-align":d.verticalAlign,margin:"0",padding:"0",border:"none"}),d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-top":d.vgap+d.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),d.hgap+d.lgap+(b.lgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-left":(0===a?d.hgap:0)+d.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)!==0&&f.element.css({"margin-right":d.hgap+d.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)!==0&&f.element.css({"margin-bottom":d.vgap+d.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),c},appendFragment:function(a){this.$tr.append(a),this.element.append(this.$table)},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(a){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(a,b){var c=this.options,d=BI.HorizontalCellLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"table-cell","vertical-align":"middle"}),c.hgap+c.lgap>0&&d.element.css({"margin-left":c.hgap+c.lgap+"px"}),c.hgap+c.rgap>0&&d.element.css({"margin-right":c.hgap+c.rgap+"px"}),c.vgap+c.tgap>0&&d.element.css({"margin-top":c.vgap+c.tgap+"px"}),c.vgap+c.bgap>0&&d.element.css({"margin-bottom":c.vgap+c.bgap+"px"}),d},resize:function(){},populate:function(a){BI.HorizontalCellLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_cell",BI.HorizontalCellLayout),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(a,b){var c=this.options,d=BI.InlineLayout.superclass._addElement.apply(this,arguments);return d.element.css({position:"relative",display:"inline-block","*display":"inline","*zoom":1}),c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-top":c.vgap+c.tgap+(b.tgap||0)+(b.vgap||0)+"px"}),c.hgap+c.lgap+(b.lgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-left":(0===a?c.hgap:0)+c.lgap+(b.lgap||0)+(b.hgap||0)+"px"}),c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)!==0&&d.element.css({"margin-right":c.hgap+c.rgap+(b.rgap||0)+(b.hgap||0)+"px"}),c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)!==0&&d.element.css({"margin-bottom":c.vgap+c.bgap+(b.bgap||0)+(b.vgap||0)+"px"}),d},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.InlineLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline",BI.InlineLayout),BI.LatticeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LatticeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-lattice-layout clearfix"})},render:function(){BI.LatticeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(a,b){var c=this.options,d=BI.LatticeLayout.superclass._addElement.apply(this,arguments);if(c.columnSize&&c.columnSize[a])var e=c.columnSize[a]/BI.sum(c.columnSize)*100+"%";else var e=1/this.options.items.length*100+"%";return d.element.css({position:"relative","float":"left",width:e}),d},addItem:function(a){var b=BI.LatticeLayout.superclass.addItem.apply(this,arguments);return this.resize(),b},addItemAt:function(a){var b=BI.LatticeLayout.superclass.addItemAt.apply(this,arguments);return this.resize(),b},resize:function(){this.stroke(this.options.items)},populate:function(a){BI.LatticeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.lattice",BI.LatticeLayout),BI.TableLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-layout",scrolly:!0,columnSize:[200,200,"fill"],rowSize:30,hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TableLayout.superclass.render.apply(this,arguments),this.rows=0,this.populate(this.options.items)},_addElement:function(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}var f,g,h=this.options,i=[],j=0,k=0;for(f=0;ff;g--){if(!BI.isNumber(h.columnSize[g]))throw new Error("item with fill can only be one");e(b[g],this.rows,g),i.push(BI.extend({top:0,bottom:0,right:h.columnSize[g]<=1?100*k+"%":k,width:h.columnSize[g]<=1?100*h.columnSize[g]+"%":h.columnSize[g]},b[g])),k+=h.columnSize[g]+(h.columnSize[g]<1?0:h.hgap)}f>=0&&f0&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":h.vgap}),l.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,l),l},resize:function(){},addItem:function(a){if(!BI.isArray(a))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},update:function(){},populate:function(a){BI.TableLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table",BI.TableLayout),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(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",top:(d.vgap||0)+(d.tgap||0)+c.vgap+c.tgap+"px",bottom:(d.bgap||0)+(d.vgap||0)+c.vgap+c.bgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].width+(a[e-1].lgap||0)+2*(a[e-1].hgap||0)+c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({left:100*d[e]+"%",width:100*f.width+"%"}):g.element.css({left:d[e]+(f.lgap||0)+(f.hgap||0)+c.hgap+c.lgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].width+(a[d+1].rgap||0)+2*(a[d+1].hgap||0)+c.hgap+c.lgap+c.rgap),f.width<1&&f.width>=0?g.element.css({right:100*e[d]+"%",width:100*f.width+"%"}):g.element.css({right:e[d]+(f.rgap||0)+(f.hgap||0)+c.hgap+c.rgap+"px",width:BI.isNumber(f.width)?f.width:""}),!BI.isNumber(f.width))return!0})},update:function(){var a;return BI.each(this._children,function(b,c){a=c.update()||a}),a},populate:function(a){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(a){throw new Error("cannot be added")},stroke:function(a){var b=this,c=this.options;a=BI.compact(a),BI.each(a,function(a,d){if(b.hasWidget(b.getName()+a+""))e=b.getWidgetByName(b.getName()+a+"");else{var e=BI.createWidget(d);b.addWidget(b.getName()+a+"",e)}e.element.css({position:"absolute",left:(d.lgap||0)+(d.hgap||0)+c.hgap+c.lgap+"px",right:+(d.hgap||0)+(d.rgap||0)+c.hgap+c.rgap+"px"})});var d={},e={};d[0]=0,e[a.length-1]=0,BI.any(a,function(e,f){var g=b.getWidgetByName(b.getName()+e+"");if(BI.isNull(d[e])&&(d[e]=d[e-1]+a[e-1].height+(a[e-1].tgap||0)+2*(a[e-1].vgap||0)+c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({top:100*d[e]+"%",height:100*f.height+"%"}):g.element.css({top:d[e]+(f.vgap||0)+(f.tgap||0)+c.vgap+c.tgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0}),BI.backAny(a,function(d,f){var g=b.getWidgetByName(b.getName()+d+"");if(BI.isNull(e[d])&&(e[d]=e[d+1]+a[d+1].height+(a[d+1].bgap||0)+2*(a[d+1].vgap||0)+c.vgap+c.tgap+c.bgap),f.height<1&&f.height>=0?g.element.css({bottom:100*e[d]+"%",height:100*f.height+"%"}):g.element.css({bottom:e[d]+(f.vgap||0)+(f.bgap||0)+c.vgap+c.bgap+"px",height:BI.isNumber(f.height)?f.height:""}),!BI.isNumber(f.height))return!0})},update:function(){},populate:function(a){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout),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("
            ").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(a,b){function c(a,b,c){0===b&&a.addClass("first-row"),0===c&&a.addClass("first-col"),a.addClass(BI.isOdd(b+1)?"odd-row":"even-row"),a.addClass(BI.isOdd(c+1)?"odd-col":"even-col"),a.addClass("center-element")}function d(a,b,c){var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function e(a,b,e){a instanceof BI.Widget?c(a.element,b,e):a.el instanceof BI.Widget?c(a.el.element,b,e):a.el?d(a.el,b,e):d(a,b,e)}for(var f=this.options,g=BI.createWidget({type:"bi.default",tagName:"tr"}),h=0;h=0;f--){for(var g=0;g=0;g--){for(var f=0;f-1)return a.splice(c,1)}}function i(a){if(!X.test(a)){var b=a.split(".");return function(a){for(var c=0;cva&&qa[d].watcher.id>a.id;)d--;qa.splice(d+1,0,{watcher:a,options:b})}else qa.push({watcher:a,options:b});ta||(ta=!0,Y(v))}}function x(a){ya.clear(),y(a,ya)}function y(a,b){var c=void 0,d=void 0,e=_.isArray(a);if(e||_.isObject(a)){if(a.__ob__){var f=a.__ob__.dep.id;if(b.has(f))return;b.add(f)}if(e)for(c=a.length;c--;)y(a[c],b);else for(d=_.keys(a),c=d.length;c--;)y(a[d[c]],b)}}function z(a){for(var b="",c=0,d=a.length;c 0 Then","\t\t["+a+'] = [$vbsetter](Me, [$accessors],"'+a+'")',"\tEnd If","\tOn Error Goto 0","\tEnd Property"));for(a in c)f[a]||(f[a]=!0,e.push("\tPublic ["+a+"]"));e.push("\tPublic [hasOwnProperty]"),e.push("End Class");var g=e.join("\r\n"),h=ja[g];h||(h=d("VBClass"),window.parseVB("Class "+h+g),window.parseVB(["Function "+h+"Factory(acc, vbm)","\tDim o","\tSet o = (New "+h+")(acc, vbm)","\tSet "+h+"Factory = o","End Function"].join("\r\n")),ja[g]=h);var i=window[h+"Factory"](b,ka);return i}}var la,ma=ga,na=_.keys(da),oa={shouldConvert:!0},pa=function(){function a(b){if(_classCallCheck(this,a),this.value=b,this.dep=new aa,this.vmCount=0,_.isArray(b)){var c=S?m:n;c(b,da,na),this.model=this.observeArray(b)}else this.model=this.walk(b);V?this.model.__ob__=this:l(this.model,"__ob__",this)}return a.prototype.walk=function(a){return q(a,this)},a.prototype.observeArray=function(a){for(var b=0,c=a.length;b=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),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 a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(BI.isIE()&&BI.getIEVersion()<10?" hack":""),height:30,width:30,hgap:5,vgap:2.5,items:[{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),b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:c}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=c,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 a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(a,b){b||(b={});var c=this.options,d=this.getTipType()||(this.isEnabled()?"success":"warning"),e="success"===d?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(e)&&(BI.Tooltips.show(a,this.getName(),e,d,this,b),c.action&&BI.Actions.runAction(c.action,"hover",c,this),BI.Actions.runGlobalAction("hover",c,this))},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover({belowMouse:a.belowMouse,container:a.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(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(c){b._e=c,BI.isNotNull(b.showTimeout)&&(clearTimeout(b.showTimeout),b.showTimeout=null),BI.isNull(b.hideTimeout)&&(b.hideTimeout=BI.delay(function(){BI.isNotNull(b.hideTimeout)&&b._hideTooltip()},500)),b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&(BI.isNotNull(b.hideTimeout)&&(clearTimeout(b.hideTimeout),b.hideTimeout=null),b._showToolTip(b._e||c,a))},500)}),this.element.on("mouseleave.title"+this.getName(),function(a){b._e=null,b._clearTimeOut(),b._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(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.Tooltips.remove(this.getName())}}),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var c=this._getShowText();BI.isKey(c)?this.setText(c):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.doRedMark(b.keyword),b.highLight&&this.doHighLight()},_getShowText:function(){var a=this.options;return BI.isFunction(a.text)?a.text():a.text},doRedMark:function(a){var b=this.options;b.keyword=a,this.text.element.__textKeywordMarked__(this._getShowText()||b.value,a,b.py)},unRedMark:function(){var a=this.options;a.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){return BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(a)?a:"",BI.isIE9Below()?void this.text.element.html(BI.htmlEncode(this._getShowText())):void(/\s/.test(a)?this.text.element[0].innerHTML=BI.htmlEncode(this._getShowText()):this.text.element[0].textContent=this._getShowText()); +var d="";0===b&&(d+=" first-row"),0===c&&(d+=" first-col"),d+=BI.isOdd(b+1)?" odd-row":" even-row",d+=BI.isOdd(c+1)?" odd-col":" even-col",a.cls=(a.cls||"")+d+" center-element"}function d(a,d,e){a instanceof BI.Widget?b(a.element,d,e):a.el instanceof BI.Widget?b(a.el.element,d,e):a.el?c(a.el,d,e):c(a,d,e)}var e=this.options;BI.isNumber(e.rowSize)&&(e.rowSize=BI.makeArray(e.items.length,1/e.items.length)),BI.isNumber(e.columnSize)&&(e.columnSize=BI.makeArray(e.items[0].length,1/e.items[0].length));for(var f=0;f=0;f--){for(var g=0;g=0;g--){for(var f=0;f-1)return a.splice(c,1)}}function i(a){if(!X.test(a)){var b=a.split(".");return function(a){for(var c=0;cva&&qa[d].watcher.id>a.id;)d--;qa.splice(d+1,0,{watcher:a,options:b})}else qa.push({watcher:a,options:b});ta||(ta=!0,Y(v))}}function x(a){ya.clear(),y(a,ya)}function y(a,b){var c=void 0,d=void 0,e=_.isArray(a);if(e||_.isObject(a)){if(a.__ob__){var f=a.__ob__.dep.id;if(b.has(f))return;b.add(f)}if(e)for(c=a.length;c--;)y(a[c],b);else for(d=_.keys(a),c=d.length;c--;)y(a[d[c]],b)}}function z(a){for(var b="",c=0,d=a.length;c 0 Then","\t\t["+a+'] = [$vbsetter](Me, [$accessors],"'+a+'")',"\tEnd If","\tOn Error Goto 0","\tEnd Property"));for(a in c)f[a]||(f[a]=!0,e.push("\tPublic ["+a+"]"));e.push("\tPublic [hasOwnProperty]"),e.push("End Class");var g=e.join("\r\n"),h=ja[g];h||(h=d("VBClass"),window.parseVB("Class "+h+g),window.parseVB(["Function "+h+"Factory(acc, vbm)","\tDim o","\tSet o = (New "+h+")(acc, vbm)","\tSet "+h+"Factory = o","End Function"].join("\r\n")),ja[g]=h);var i=window[h+"Factory"](b,ka);return i}}var la,ma=ga,na=_.keys(da),oa={shouldConvert:!0},pa=function(){function a(b){if(_classCallCheck(this,a),this.value=b,this.dep=new aa,this.vmCount=0,_.isArray(b)){var c=S?m:n;c(b,da,na),this.model=this.observeArray(b)}else this.model=this.walk(b);V?this.model.__ob__=this:l(this.model,"__ob__",this)}return a.prototype.walk=function(a){return q(a,this)},a.prototype.observeArray=function(a){for(var b=0,c=a.length;b=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var a=h.length;a;)this.addEventListener(h[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=h.length;a;)this.removeEventListener(h[--a],b,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),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 a=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:a.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var a=this,b=this.options,c=BI.isIE(),d=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(c?" wave-loading hack":""),height:30,width:30,hgap:5,vgap:2.5,items:c?[]:[{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),b.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:d}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(a.getName())):BI.isNull(this._loading)&&(this._loading=d,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 a=this,b=this.options;BI.Layers.remove(a.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),b.onLoaded(),a.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(a){a===!0?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(a){this.options.items=a||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED",BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(a,b){b||(b={});var c=this.options,d=this.getTipType()||(this.isEnabled()?"success":"warning"),e="success"===d?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(e)&&(BI.Tooltips.show(a,this.getName(),e,d,this,b),c.action&&BI.Actions.runAction(c.action,"hover",c,this),BI.Actions.runGlobalAction("hover",c,this))},_hideTooltip:function(){var a=this,b=BI.Tooltips.get(this.getName());BI.isNotNull(b)&&b.element.fadeOut(200,function(){BI.Tooltips.remove(a.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var a=this.options;(BI.isKey(a.title)||BI.isKey(a.warningTitle)||BI.isFunction(a.title)||BI.isFunction(a.warningTitle))&&this.enableHover({belowMouse:a.belowMouse,container:a.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(a){a||(a={});var b=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(c){b._e=c,"warning"===b.getTipType()||BI.isKey(b.getWarningTitle())&&!b.isEnabled()?b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},200):("success"===b.getTipType()||b.isEnabled())&&(b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&b._showToolTip(b._e||c,a)},500))}),this.element.on("mousemove.title"+this.getName(),function(c){b._e=c,BI.isNotNull(b.showTimeout)&&(clearTimeout(b.showTimeout),b.showTimeout=null),BI.isNull(b.hideTimeout)&&(b.hideTimeout=BI.delay(function(){BI.isNotNull(b.hideTimeout)&&b._hideTooltip()},500)),b.showTimeout=BI.delay(function(){BI.isNotNull(b.showTimeout)&&(BI.isNotNull(b.hideTimeout)&&(clearTimeout(b.hideTimeout),b.hideTimeout=null),b._showToolTip(b._e||c,a))},500)}),this.element.on("mouseleave.title"+this.getName(),function(a){b._e=null,b._clearTimeOut(),b._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(a){this.items=a||[]},setTitle:function(a,b){this.options.title=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},setWarningTitle:function(a,b){this.options.warningTitle=a,BI.isKey(a)||BI.isFunction(a)?this.enableHover(b):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var a=this.options.title;return BI.isFunction(a)?a():a},getWarningTitle:function(){var a=this.options.warningTitle;return BI.isFunction(a)?a():a},setValue:function(a){this.options.readonly||(this.options.value=a)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.Tooltips.remove(this.getName())}}),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var c=this._getShowText();BI.isKey(c)?this.setText(c):BI.isKey(b.value)&&this.setText(b.value),BI.isKey(b.keyword)&&this.doRedMark(b.keyword),b.highLight&&this.doHighLight()},_getShowText:function(){var a=this.options;return BI.isFunction(a.text)?a.text():a.text},doRedMark:function(a){var b=this.options;b.keyword=a,this.text.element.__textKeywordMarked__(this._getShowText()||b.value,a,b.py)},unRedMark:function(){var a=this.options;a.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||a.value,"",a.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){return BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(a)?a:"",BI.isIE9Below()?void this.text.element.html(BI.htmlEncode(this._getShowText())):void(/\s/.test(a)?this.text.element[0].innerHTML=BI.htmlEncode(this._getShowText()):this.text.element[0].textContent=this._getShowText()); }}),BI.shortcut("bi.text",BI.Text),BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-basic-button"+(a.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 a=this.options;a.selected===!0&&BI.nextTick(BI.bind(function(){this.setSelected(a.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),a.shadow&&this._createShadow(),a.level&&this.element.addClass("button-"+a.level)},_createShadow:function(){var a=this,b=this.options,c=function(){a.$mask||(a.$mask=BI.createWidget(BI.isObject(b.shadow)?b.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),a.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:a,items:[{el:a.$mask,left:0,right:0,top:0,bottom:0}]}))};this.element.mouseup(function(){a._hover||b.isShadowShowingOnSelected||(c(),a.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(d){a.element.__isMouseInBounds__(d)&&(!a.isEnabled()||a._hover||!b.isShadowShowingOnSelected&&a.isSelected()||(c(),a.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(b){a.element.__isMouseInBounds__(b)||a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){a.isEnabled()&&!a._hover&&(c(),a.$mask.invisible())})},bindEvent:function(){function a(a){e.stopEvent&&a.stopEvent(),e.stopPropagation&&a.stopPropagation()}function b(b){if(a(b),!(!d.isEnabled()||d.isOnce()&&d.isSelected())){if(BI.isKey(e.bubble)||BI.isFunction(e.bubble)){if(BI.isNull(d.combo)){var f;BI.createWidget({type:"bi.absolute",element:d,items:[{el:{type:"bi.bubble_combo",trigger:"",ref:function(){d.combo=this},el:{type:"bi.layout",height:"100%"},popup:{type:"bi.text_bubble_bar_popup_view",text:c(),ref:function(){f=this},listeners:[{eventName:BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,action:function(a){d.combo.hideView(),a&&h.apply(d,arguments)}}]},listeners:[{eventName:BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,action:function(){f.populate(c())}}]},left:0,right:0,bottom:0,top:0}]})}return void(d.combo.isViewVisible()?d.combo.hideView():d.combo.showView())}h.apply(d,arguments)}}function c(){var a=d.options.bubble;return BI.isFunction(a)?a():a}var d=this,e=this.options,f=this.handle();if(f){f=f.element;var g=(e.trigger||"").split(",");BI.each(g,function(c,g){switch(g){case"mouseup":var h=!1;f.mousedown(function(){h=!0}),f.mouseup(function(c){h===!0&&b(c),h=!1,a(c)});break;case"mousedown":var h=!1,i=!1;f.mousedown(function(c){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){!BI.DOM.isExist(d)||f.__isMouseInBounds__(a)||h!==!0||i||d._trigger(),h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(d.isSelected()?i=!0:b(c),h=!0,a(c))}),f.mouseup(function(a){BI.DOM.isExist(d)&&h===!0&&i===!0&&b(a),h=!1,i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())});break;case"dblclick":f.dblclick(b);break;case"lclick":var j,h=!1;f.mousedown(function(b){BI.Widget._renderEngine.createElement(document).bind("mouseup."+d.getName(),function(a){j&&clearInterval(j),j=null,h=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+d.getName())}),h!==!0&&(!d.isEnabled()||d.isOnce()&&d.isSelected()||(j=setInterval(function(){d.isEnabled()&&d.doClick()},180),h=!0,a(b)))});break;default:(e.stopEvent||e.stopPropagation)&&f.mousedown(function(b){a(b)}),f.click(b)}});var h=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1})}},_trigger:function(a){var b=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())),this.isValid())){b.handler.call(this,this.getValue(),this,a);var c=this.getValue();this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,c,this,a),this.fireEvent(BI.BasicButton.EVENT_CHANGE,c,this),b.action&&BI.Actions.runAction(b.action,"click",b,this),BI.Actions.runGlobalAction("click",b,this)}},_doClick:function(a){this.isValid()&&this.beforeClick(a),this._trigger(a),this.isValid()&&this.doClick(a)},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(a){var b=this.options;b.selected=a,a?this.handle().element.addClass("active"):this.handle().element.removeClass("active"),b.shadow&&!b.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(a){this.options.text=a},getText:function(){return this.options.text},_setEnable:function(a){BI.BasicButton.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),a||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",BI.NodeButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.NodeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-node",open:!1})},_init:function(){BI.NodeButton.superclass._init.apply(this,arguments);var a=this;BI.nextTick(function(){a.setOpened(a.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(a){this.options.open=!!a},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))}}),BI.Tip=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Tip.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-tip",zIndex:BI.zIndex_tip})},_init:function(){BI.Tip.superclass._init.apply(this,arguments),this.element.css({zIndex:this.options.zIndex})}}),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 a=this.options,b={};BI.each(a.behaviors,function(a,c){b[a]=BI.BehaviorFactory.createBehavior(a,{rule:c})}),this.behaviors=b,this.populate(a.items),(BI.isKey(a.value)||BI.isNotEmptyArray(a.value))&&this.setValue(a.value)},_createBtns:function(a){this.options;return BI.createWidgets(BI.createItems(a,{type:"bi.text_button"}))},_btnsCreator:function(a){var b=this,c=Array.prototype.slice.call(arguments),d=this.options,e=this._createBtns(a);return c[0]=e,BI.each(this.behaviors,function(a,b){b.doBehavior.apply(b,c)}),BI.each(e,function(a,c){c.on(BI.Controller.EVENT_CHANGE,function(a,e,f){if(a===BI.Events.CLICK){switch(d.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:b.setValue(c.getValue());break;case BI.ButtonGroup.CHOOSE_TYPE_NONE:b.setValue([])}b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b.fireEvent(BI.ButtonGroup.EVENT_CHANGE,e,f)}else b.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),c.on(BI.Events.DESTROY,function(){BI.remove(b.buttons,c)})}),e},_packageBtns:function(a){for(var b=this.options,c=b.layouts.length-1;c>0;c--)a=BI.map(a,function(a,d){return BI.extend({},b.layouts[c],{items:[BI.extend({},b.layouts[c].el,{el:d})]})});return a},_packageSimpleItems:function(a){var b=this.options;return BI.map(b.items,function(b,c){return BI.stripEL(c)===c?a[b]:BI.extend({},c,{el:a[b]})})},_packageItems:function(a,b){return BI.createItems(BI.makeArrayByArray(a,{}),BI.clone(b))},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},_isSimpleLayout:function(){var a=this.options;return 1===a.layouts.length&&!BI.isArray(a.items[0])},doBehavior:function(){var a=Array.prototype.slice.call(arguments);a.unshift(this.buttons),BI.each(this.behaviors,function(b,c){c.doBehavior.apply(c,a)})},prependItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(b,this.buttons),this._isSimpleLayout()&&this.layouts&&this.layouts.prependItems?void this.layouts.prependItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.prependItems(this._packageLayout(a).items))},addItems:function(a){var b=(this.options,this._btnsCreator.apply(this,arguments));return this.buttons=BI.concat(this.buttons,b),this._isSimpleLayout()&&this.layouts&&this.layouts.addItems?void this.layouts.addItems(b):(a=this._packageItems(a,this._packageBtns(b)),void this.layouts.addItems(this._packageLayout(a).items))},removeItemAt:function(a){BI.removeAt(this.buttons,a),this.layouts.removeItemAt(a)},removeItems:function(a){a=BI.isArray(a)?a:[a];var b=[];BI.each(this.buttons,function(c,d){BI.deepContains(a,d.getValue())&&b.push(c)}),BI.removeAt(this.buttons,b),this.layouts.removeItemAt(b)},populate:function(a){a=a||[],this.empty(),this.options.items=a,this.buttons=this._btnsCreator.apply(this,arguments),a=this._isSimpleLayout()?this._packageSimpleItems(this.buttons):this._packageItems(a,this._packageBtns(this.buttons)),this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1)})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){BI.deepContains(a,c.getValue())?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue())}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},getAllButtons:function(){return this.buttons},getAllLeaves:function(){return this.buttons},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&c.isSelected()&&a.push(c)}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){c.isSelected&&!c.isSelected()&&a.push(c)}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.options.id===a)return b=d,!0}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()&&d.getValue()===a)return b=d,!0}),b},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),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(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!1):c.setSelected(!0)):void c.setNotSelectedValue(a)})},setEnabledValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setEnabledValue)?void c.setEnabledValue(a):void(BI.deepContains(a,c.getValue())?c.setEnable(!0):c.setEnable(!1))})},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(BI.deepContains(a,c.getValue())?c.setSelected(!0):c.setSelected(!1)):void c.setValue(a)})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getNotSelectedValue())):void(c.isEnabled()&&c.isSelected&&!c.isSelected()&&a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=BI.concat(a,c.getValue())):void(c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue()))}),a},getSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getSelectedButtons())):void(c.isSelected&&c.isSelected()&&a.push(c))}),a},getNotSelectedButtons:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getNotSelectedButtons())):void(c.isSelected&&!c.isSelected()&&a.push(c))}),a},getAllLeaves:function(){var a=[];return BI.each(this.buttons,function(b,c){return c.isEnabled()&&!BI.isFunction(c.setSelected)?void(a=a.concat(c.getAllLeaves())):void(c.isEnabled()&&a.push(c))}),a},getIndexByValue:function(a){var b=-1;return BI.any(this.buttons,function(c,d){var e=d.getValue();if(d.isEnabled()&&(e===a||BI.contains(e,a)))return b=c,!0}),b},getNodeById:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled()){if(d.attr("id")===a)return b=d,!0;if(BI.isFunction(d.getNodeById)&&(b=d.getNodeById(a)))return!0}}),b},getNodeByValue:function(a){var b;return BI.any(this.buttons,function(c,d){if(d.isEnabled())if(BI.isFunction(d.getNodeByValue)){if(b=d.getNodeByValue(a))return!0}else if(d.attr("value")===a)return b=d,!0}),b}}),BI.ButtonTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_tree",BI.ButtonTree),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 a=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(a.value)&&this.setSelectedValue(a.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:"
              "}),BI.createWidget({type:"bi.default",element:this.element,items:[this.tree]})},_selectTreeNode:function(a,b){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,b,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,b,this)},_configSetting:function(){function a(a,b,c){var d=c.checked,e=c.getCheckStatus();e.half===!0&&e.checked===!0&&(d=!1),l.nodes.checkNode(c,!d,!0,!0)}function b(a,b){var c=l._getParentValues(b);b.times=b.times||1;var d="id="+b.id+"×="+b.times++ +"&parentValues= "+_global.encodeURIComponent(BI.jsonEncode(c))+"&checkState="+_global.encodeURIComponent(BI.jsonEncode(b.getCheckStatus()));return"&"+d}function c(a,b){return b.isAjaxing?(BI.Msg.toast("Please Wait。","warning"),!1):(b.children||(b.times=1,f(b,"refresh")),!0)}function d(a,b,c,d){if(c.halfCheck=!1,d&&0!==d.length&&!/^[\s,\S]*<\/html>$/gi.test(d)&&!l._stop){var e=l.nodes,g=c.count||0;c.children.length>g?(c.count=c.children.length,BI.delay(function(){f(c)},n)):(e.updateNode(c),e.selectNode(c.children[0]))}}function e(a,b,c,d,e,f){l.nodes;BI.Msg.toast("Error!","warning")}function f(a,b){var c=l.nodes;"refresh"==b&&c.updateNode(a),c.reAsyncChildNodes(a,b,!0)}function g(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=l.nodes,e=d.getSelectedNodes();$.each(e,function(a,b){b.halfCheck=!1})}var f=b.getCheckStatus();f.half===!0&&f.checked===!0&&(b.checked=!1)}function h(a,b,c){l._selectTreeNode(b,c)}function i(a,b,c){c.halfCheck=!1}function j(a,b,c){}var k=this.options.paras,l=this,m={async:{enable:!0,url:b,autoParam:["id","name"],otherParam:BI.cjkEncodeDO(k)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:c,onAsyncSuccess:d,onAsyncError:e,beforeCheck:g,onCheck:h,onExpand:i,onCollapse:j,onClick:a}},n=100;return m},_getParentValues:function(a){if(!a.getParentNode())return[];var b=a.getParentNode(),c=this._getParentValues(b);return c=c.concat([this._getNodeValue(b)])},_getNodeValue:function(a){return null==a.value?BI.replaceAll(a.text.replace(/<[^>]+>/g,"")," "," "):a.value},_getHalfSelectedValues:function(a,b){var c=this,d=b.getCheckStatus();if(d.checked!==!1||d.half!==!1){if(BI.isNotEmptyArray(b.children)&&d.half===!0){var e=b.children;return void BI.each(e,function(b,d){c._getHalfSelectedValues(a,d)})}var f=b.parentValues||c._getParentValues(b),g=f.concat(this._getNodeValue(b));if(BI.isNotEmptyArray(b.children)||d.half===!1)return void this._buildTree(a,g);var h=BI.deepClone(this.options.paras.selectedValues),i=this._getTree(h,g);this._addTreeNode(a,f,this._getNodeValue(b),i)}},_getTree:function(a,b){var c=a;return BI.any(b,function(a,b){return null==c[b]||void(c=c[b])}),c},_addTreeNode:function(a,b,c,d){var e=a;BI.each(b,function(a,b){null==e[b]&&(e[b]={}),e=e[b]}),e[c]=d},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){null==c[b]&&(c[b]={}),c=c[b]})},_getSelectedValues:function(){function a(a){BI.each(a,function(a,d){var e=d.getCheckStatus();if(e.checked===!0||e.half===!0)if(e.half===!0)b._getHalfSelectedValues(c,d);else{var f=d.parentValues||b._getParentValues(d),g=f.concat([b._getNodeValue(d)]);b._buildTree(c,g)}})}var b=this,c={},d=this.nodes.getNodes();return a(d),c},_dealWidthNodes:function(a){var b=this.options,c=BI.Tree.arrayFormat(a);return BI.each(c,function(a,c){c.title=c.title||c.text||c.value,c.isParent=c.isParent||c.parent,BI.isKey(b.paras.keyword)?c.text=$("
              ").__textKeywordMarked__(c.text,b.paras.keyword,c.py).html():c.text=BI.htmlEncode(c.text+"")}),a},_loadMore:function(){var a=this,b=this.options;this.tip.setLoading();var c=BI.extend({},b.paras,{times:++this.times});b.itemsCreator(c,function(b){if(a._stop!==!0){var c=!!b.hasNext,d=b.items||[];c?a.tip.setLoaded():a.tip.setEnd(),d.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(d))}})},_initTree:function(a){var b=this,c=this.options;b.fireEvent(BI.Events.INIT),this.times=1;var d=this.tree;d.empty(),this.loading(),this.tip.setVisible(!1);var e=function(c){b._stop!==!0&&(b.nodes=$.fn.zTree.init(d.element,a,c))},f=BI.extend({},c.paras,{times:1});c.itemsCreator(f,function(a){if(b._stop!==!0){var c=!!a.hasNext,d=a.items||[];d.length>0&&e(b._dealWidthNodes(d)),b.setTipVisible(d.length<=0),b.loaded(),c?b.tip.setLoaded():b.tip.invisible(),1===f.times&&b.fireEvent(BI.Events.AFTERINIT)}})},initTree:function(a,b){var b=b||{async:{enable:!1},check:{enable:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=$.fn.zTree.init(this.tree.element,b,a)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._createTree(),this.start(),this._initTree(b)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){var a=this.nodes;return a.getCheckedNodes(!0).length>0},checkAll:function(a){function b(a){BI.each(a,function(a,c){c.halfCheck=!1,b(c.children)})}this.nodes&&(BI.each(this.nodes.getNodes(),function(a,c){c.halfCheck=!1,b(c.children)}),this.nodes.checkAllNodes(a))},expandAll:function(a){this.nodes&&this.nodes.expandAll(a)},setValue:function(a,b){this.checkAll(!1),this.updateValue(a,b),this.refresh()},setSelectedValue:function(a){this.options.paras.selectedValues=BI.deepClone(a||{})},updateValue:function(a,b){if(this.nodes){b||(b="value");var c=this.nodes;BI.each(a,function(a,d){var e=c.getNodesByParam(b,a,null);BI.each(e,function(a,b){BI.extend(b,{checked:!0},d),c.updateNode(b)})})}},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),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)},_configSetting:function(){function a(a,b,c){var d=$.fn.zTree.getZTreeObj(b),e=c.checked,f=c.getCheckStatus();f.half===!0&&f.checked===!0&&(e=!1),d.checkNode(c,!e,!0,!0)}function b(a,b){function c(a){BI.each(a,function(a,b){b.halfCheck===!0&&(b.halfCheck=!1,c(b.children))})}if(b.halfCheck=!1,b.checked===!0){c(b.children);var d=$.fn.zTree.getZTreeObj(a),e=d.getSelectedNodes();BI.each(e,function(a,b){b.halfCheck=!1})}var f=b.getCheckStatus();f.half===!0&&f.checked===!0&&(b.checked=!1)}function c(a,b){h._beforeExpandNode(a,b)}function d(a,b,c){h._selectTreeNode(b,c)}function e(a,b,c){c.halfCheck=!1}function f(a,b,c){c.halfCheck=!1}var g=this.options.paras,h=this,i={async:{enable:!1,otherParam:BI.cjkEncodeDO(g)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeCheck:b,onCheck:d,beforeExpand:c,onExpand:e,onCollapse:f,onClick:a}};return i},_selectTreeNode:function(a,b){var c=this,d=(this.options,BI.deepClone(b.parentValues||c._getParentValues(b))),e=this._getNodeValue(b);if(b.checked===!0);else{var f=b,g=this._getTree(this.options.paras.selectedValues,d);for(BI.isNotNull(g[e])&&delete g[e];null!=f&&BI.isEmpty(g);)d=d.slice(0,d.length-1),f=f.getParentNode(),null!=f&&(g=this._getTree(this.options.paras.selectedValues,d),e=this._getNodeValue(f),delete g[e])}BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b)),checkState:b.getCheckStatus()}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||setTimeout(function(){e.itemsCreator(g,h)},17)},_join:function(a,b){function c(a,b,f){BI.each(b,function(g,h){BI.isNull(f[g])?d._addTreeNode(e,a,g,h):BI.isEmpty(f[g])?d._addTreeNode(e,a,g,{}):c(a.concat([g]),b[g],f[g])})}var d=this,e={};return c([],a,b),c([],b,a),e},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.AsyncTree.superclass.hasChecked.apply(this,arguments)},_getJoinValue:function(){if(!this.nodes)return{};var a=this._getSelectedValues();return BI.isEmpty(a)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?a:this._join(a,this.options.paras.selectedValues)},getValue:function(){return this._getJoinValue()},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.async_tree",BI.AsyncTree),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 a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_selectTreeNode:function(a,b){var c=this,d=this.options,e=BI.deepClone(b.parentValues||c._getParentValues(b)),f=this._getNodeValue(b);if(b.checked===!0)this.options.paras.selectedValues=this._getJoinValue(),d.itemsCreator(BI.extend({},d.paras,{type:BI.TreeView.REQ_TYPE_ADJUST_DATA,curSelectedValue:f,parentValues:e}),function(a){c.options.paras.selectedValues=a,BI.AsyncTree.superclass._selectTreeNode.apply(c,arguments)});else{for(var g=this.options.paras.selectedValues,h=e.concat(f),i=0,j=h.length;i0?d._dealWidthNodes(g):[]),d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},getValue:function(){return BI.deepClone(this.options.paras.selectedValues||{})},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.part_tree",BI.PartTree),BI.ListTreeView=BI.inherit(BI.TreeView,{_constants:{SPLIT:"<|>"},_defaultConfig:function(){return BI.extend(BI.ListTreeView.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ListTreeView.superclass._init.apply(this,arguments);var a=this.options;this.storeValue=a.value||{}},_configSetting:function(){function a(a,b,d){var e=$.fn.zTree.getZTreeObj(b),f=d.checked;c._checkValue(d,!f),e.checkNode(d,!f,!0,!0)}function b(a,b,d){c._selectTreeNode(b,d)}var c=(this.options.paras,this),d={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:b,onClick:a}};return d},_selectTreeNode:function(a,b){this._checkValue(b,b.checked),BI.ListTreeView.superclass._selectTreeNode.apply(this,arguments)},_transArrayToMap:function(a){var b=this,c={};return BI.each(a,function(a,d){var e=d.join(b._constants.SPLIT);c[e]=!0}),c},_transMapToArray:function(a){var b=this,c=[];return BI.each(a,function(a){var d=a.split(b._constants.SPLIT);c.push(d)}),c},_checkValue:function(a,b){var c=BI.concat(this._getParentValues(a),this._getNodeValue(a)).join(this._constants.SPLIT);b?this.storeValue[c]=!0:delete this.storeValue[c]},setSelectedValue:function(a){this.options.paras.selectedValues=a||[],this.storeValue=this._transArrayToMap(a)},getValue:function(){return this._transMapToArray(this.storeValue)}}),BI.shortcut("bi.list_tree_view",BI.ListTreeView),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(){function a(a,b){b.half=!1}function b(a,b,c){var d=$.fn.zTree.getZTreeObj(b),e=c.checked;f._checkValue(c,!e),d.checkNode(c,!e,!0,!0)}function c(a,b){f._beforeExpandNode(a,b)}function d(a,b,c){f._selectTreeNode(b,c)}var e=this.options.paras,f=this,g={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:d,beforeExpand:c,beforeCheck:a,onClick:b}};return g},_beforeExpandNode:function(a,b){function c(a,c){d.nodes.addNodes(b,a),c===!0&&BI.delay(function(){i++,g.times=i,e.itemsCreator(g,h)},100)}var d=this,e=this.options,f=b.parentValues||d._getParentValues(b),g=BI.extend({},e.paras,{id:b.id,times:1,parentValues:f.concat(this._getNodeValue(b))}),h=function(a){var b=a.items||[];b.length>0&&c(d._dealWidthNodes(b),!!a.hasNext)},i=1;b.children||setTimeout(function(){e.itemsCreator(g,h)},17)},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.ListAsyncTree.superclass.hasChecked.apply(this,arguments)},stroke:function(a){delete this.options.keyword,BI.extend(this.options.paras,a);var b=this._configSetting();this._initTree(b)}}),BI.shortcut("bi.list_async_tree",BI.ListAsyncTree),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 a=this,b=this.options,c=BI.extend({},b.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),b.itemsCreator(c,function(c){var d=!!c.hasNext,e=c.items||[];b.paras.lastSearchValue=c.lastSearchValue,a._stop!==!0&&(d?a.tip.setLoaded():a.tip.setEnd(),e.length>0&&a.nodes.addNodes(null,a._dealWidthNodes(e)))})},_initTree:function(a,b){function c(b){d._stop!==!0&&(d.nodes=$.fn.zTree.init(f.element,a,b))}var d=this,e=this.options;this.times=1;var f=this.tree;f.empty(),d.tip.setVisible(!1),this.loading();var g=BI.extend({},e.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:this.times}),h=function(a){if(d._stop!==!0&&b==e.paras.keyword){var f=!!a.hasNext,g=a.items||[];e.paras.lastSearchValue=a.lastSearchValue,c(g.length>0?d._dealWidthNodes(g):[]), d.setTipVisible(g.length<=0),d.loaded(),f?d.tip.setLoaded():d.tip.invisible(),d.fireEvent(BI.Events.AFTERINIT)}};BI.delay(function(){e.itemsCreator(g,h)},100)},stroke:function(a){var b=this.options;delete b.paras.keyword,BI.extend(b.paras,a),delete b.paras.lastSearchValue;var c=this._configSetting();this._initTree(c,b.paras.keyword)}}),BI.shortcut("bi.list_part_tree",BI.ListPartTree),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}),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 a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.CollectionView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&(this._calculateSizeAndPositionData(),this._populate())},mounted:function(){var a=this.options;0===a.scrollLeft&&0===a.scrollTop||(this.element.scrollTop(a.scrollTop),this.element.scrollLeft(a.scrollLeft))},_calculateSizeAndPositionData:function(){for(var a=this.options,b=[],c=new BI.SectionManager,d=0,e=0,f=0,g=a.items.length;f0&&h>0){if(f>=this.renderRange.minY&&h<=this.renderRange.maxY&&e>=this.renderRange.minX&&g<=this.renderRange.maxX)return;for(var i=this._cellRenderers(h-f,g-e,e,f),j=[],k={},l={},m={},n={},o=0,p=i.length;o=0?(q.width!==this.renderedCells[A]._width&&(this.renderedCells[A]._width=q.width,this.renderedCells[A].el.setWidth(q.width)),q.height!==this.renderedCells[A]._height&&(this.renderedCells[A]._height=q.height,this.renderedCells[A].el.setHeight(q.height)),this.renderedCells[A]._left!==q.x&&this.renderedCells[A].el.element.css("left",q.x+"px"),this.renderedCells[A]._top!==q.y&&this.renderedCells[A].el.element.css("top",q.y+"px"),j.push(z=this.renderedCells[A])):(z=BI.createWidget(BI.extend({type:"bi.label",width:q.width,height:q.height},b.items[q.index],{cls:(b.items[q.index].cls||"")+" container-cell"+(0===q.y?" first-row":"")+(0===q.x?" first-col":""),_left:q.x,_top:q.y})),j.push({el:z,left:q.x,top:q.y,_left:q.x,_top:q.y,_width:q.width,_height:q.height}));for(var B=0|s[q.y],C=0|s[q.y+q.height],D=B;D<=C;D++){var E=n[D];x(t,E),y(u,E),t[E]=Math.min(t[E],q.x),u[E]=Math.max(u[E],q.x+q.width)}for(var F=0|r[q.x],G=0|r[q.x+q.width],D=F;D<=G;D++){var H=m[D];x(v,H),y(w,H),v[H]=Math.min(v[H],q.y),w[H]=Math.max(w[H],q.y+q.height)}k[q.index]=[q.index,o],l[o]=z}var I={},J={},K=[];BI.each(k,function(b,c){a.renderedKeys[b]?I[b]=c:J[b]=c}),BI.each(this.renderedKeys,function(a,b){I[a]||J[a]||K.push(b[1])}),BI.each(K,function(b,c){a.renderedCells[c].el._destroy()});var L=[];BI.each(J,function(a,b){L.push(j[b[1]])}),this.container.addItems(L),this.container._children=l,this.container.attr("items",j),this.renderedCells=j,this.renderedKeys=k;var M=BI.min(t),N=BI.max(u),O=BI.max(v),P=BI.min(w);this.renderRange={minX:M,minY:O,maxX:N,maxY:P}}},_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(a){var b=this.options;if(this._reRange(),a&&a!==this.options.items&&(this.options.items=a,this._calculateSizeAndPositionData()),b.items.length>0){this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender();try{this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)}catch(c){}}},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"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(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.CollectionView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.collection_view",BI.CollectionView),BI.Combo=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Combo.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Combo.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,d))}),a.element.on("mouseenter."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.addClass(b.hoverClass)}),a.element.on("mouseleave."+a.getName(),function(c){a.isEnabled()&&a.isValid()&&a.combo.isEnabled()&&a.combo.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(b.logic,{items:[{el:this.combo}]})))),b.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(){function a(){b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&c.toggle===!0&&(b._hideView(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",b.combo),b.fireEvent(BI.Combo.EVENT_COLLAPSE)),b.popupView&&b.popupView.element.off("mouseenter."+b.getName()).off("mouseleave."+b.getName()),f=!1}var b=this,c=this.options,d=(this.options.trigger||"").split(","),e=function(a){c.stopEvent&&a.stopEvent(),c.stopPropagation&&a.stopPropagation()},f=!1;BI.each(d,function(d,g){switch(g){case"hover":b.element.on("mouseenter."+b.getName(),function(a){b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(b._popupView(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND))}),b.element.on("mouseleave."+b.getName(),function(c){b.popupView&&(b.popupView.element.on("mouseenter."+b.getName(),function(c){f=!0,b.popupView.element.on("mouseleave."+b.getName(),function(b){a()}),b.popupView.element.off("mouseenter."+b.getName())}),BI.defer(function(){f||a()},50))});break;case"click":var h=BI.debounce(function(a){b.combo.element.__isMouseInBounds__(a)&&b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(c.toggle?b._toggle():b._popupView(),b.isViewVisible()?(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND)):(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",b.combo),b.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});b.element.off(g+"."+b.getName()).on(g+"."+b.getName(),function(a){h(a),e(a)});break;case"click-hover":var h=BI.debounce(function(a){b.combo.element.__isMouseInBounds__(a)&&b.isEnabled()&&b.isValid()&&b.combo.isEnabled()&&b.combo.isValid()&&(b._popupView(),b.isViewVisible()&&(b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",b.combo),b.fireEvent(BI.Combo.EVENT_EXPAND)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});b.element.off("click."+b.getName()).on("click."+b.getName(),function(a){h(a),e(a)}),b.element.on("mouseleave."+b.getName(),function(c){b.popupView&&(b.popupView.element.on("mouseenter."+b.getName(),function(c){f=!0,b.popupView.element.on("mouseleave."+b.getName(),function(b){a()}),b.popupView.element.off("mouseenter."+b.getName())}),BI.defer(function(){f||a()},50))})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var a=this,b=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view",value:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a.combo.setValue(a.getValue()),a.fireEvent(BI.Combo.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){a.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(a){if(this.element.find(a.target).length>0||this.popupView&&this.popupView.element.find(a.target).length>0||"CodeMirror-cursor"===a.target.className||BI.Widget._renderEngine.createElement(a.target).closest(".CodeMirror-hints").length>0){var b=this.options.direction.split(",");return void((BI.contains(b,"innerLeft")||BI.contains(b,"innerRight"))&&(this.adjustWidth(),this.adjustHeight()))}var c=this.options.hideChecker.apply(this,[a]);c!==!1&&this._hideView()},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),this.options.destroyWhenHide===!0?(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(a){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(a),this.adjustHeight(a),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(a){var b=this.options;if(this.popupView&&b.isNeedAdjustWidth===!0){this.resetListWidth("");var c=this.popupView.element.outerWidth(),d=this.element.outerWidth()||b.width;c>d+80?d+=80:c>d&&(d=c),this.resetListWidth(d<100?100:d)}},adjustHeight:function(a){var b=this.options,c={};if(this.popupView){var d=this.popupView.isVisible();this.popupView.visible();var e=BI.isNotNull(a)?{element:{offset:function(){return{left:a.pageX,top:a.pageY}},bounds:function(){return{x:a.offsetX,y:a.offsetY,width:0,height:24}},outerWidth:function(){return 0},outerHeight:function(){return 24}}}:this.combo;switch(b.direction){case"bottom":case"bottom,right":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["bottom","top","right","left"],b.offsetStyle);break;case"top":case"top,right":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["top","bottom","right","left"],b.offsetStyle);break;case"left":case"left,bottom":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["left","right","bottom","top"],b.offsetStyle);break;case"right":case"right,bottom":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","bottom","top"],b.offsetStyle);break;case"top,left":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["top","bottom","left","right"],b.offsetStyle);break;case"bottom,left":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight,["bottom","top","left","right"],b.offsetStyle);break;case"left,top":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["left","right","top","bottom"],b.offsetStyle);break;case"right,top":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","top","bottom"],b.offsetStyle);break;case"right,innerRight":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","innerRight","innerLeft","bottom","top"],b.offsetStyle);break;case"right,innerLeft":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["right","left","innerLeft","innerRight","bottom","top"],b.offsetStyle);break;case"innerRight":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["innerRight","innerLeft","right","left","bottom","top"],b.offsetStyle);break;case"innerLeft":c=BI.DOM.getComboPosition(e,this.popupView,b.adjustXOffset||b.adjustLength,b.adjustYOffset,b.isNeedAdjustHeight,["innerLeft","innerRight","left","right","bottom","top"],b.offsetStyle);break;case"top,custom":case"custom,top":c=BI.DOM.getTopAdaptPosition(e,this.popupView,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":c=BI.DOM.getBottomAdaptPosition(e,this.popupView,b.adjustYOffset||b.adjustLength,b.isNeedAdjustHeight);break;case"left,custom":case"custom,left":c=BI.DOM.getLeftAdaptPosition(e,this.popupView,b.adjustXOffset||b.adjustLength),delete c.top,delete c.adaptHeight;break;case"custom,right":case"right,custom":c=BI.DOM.getRightAdaptPosition(e,this.popupView,b.adjustXOffset||b.adjustLength),delete c.top,delete c.adaptHeight}"adaptHeight"in c&&this.resetListHeight(c.adaptHeight),"left"in c&&this.popupView.element.css({left:c.left}),"top"in c&&this.popupView.element.css({top:c.top}),this.position=c,this.popupView.setVisible(d)}},resetListHeight:function(a){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(a)},resetListWidth:function(a){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(a)},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate.apply(this.combo,arguments)},_setEnable:function(a){BI.Combo.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled"),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.combo.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},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(a){this.isEnabled()&&this.combo.isEnabled()&&!this.isViewVisible()&&this._popupView(a)},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())}}),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),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 a=this,b=this.options;this._expanded=!!b.el.open,this._initExpander(),this._initPullDownAction(),this.expander.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Expander.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Expander.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.expander}]}),b.isDefaultInit&&this._assertPopupView(),this.expander.isOpened()===!0&&this._popupView()},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND))},function(){a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.fireEvent(BI.Expander.EVENT_COLLAPSE))});break;case"click":d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.expander.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.isValid()&&a.expander.isEnabled()&&a.expander.isValid()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.expander),a.fireEvent(BI.Expander.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.expander),a.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 a=this,b=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:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Expander.EVENT_CHANGE,c,d)}),this.popupView.setVisible(this.isExpanded()),BI.nextTick(function(){a.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(a){this.popupView&&this.popupView.populate.apply(this.popupView,arguments),this.expander.populate.apply(this.expander,arguments)},_setEnable:function(a){BI.Expander.superclass._setEnable.apply(this,arguments),!a&&this.element.removeClass(this.options.hoverClass),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.expander.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},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(a){return this.expander.options.id===a?this.expander:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.expander.getValue()===a?this.expander:this.popupView&&this.popupView.getNodeByValue(a)},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),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(a){var b=this,c=this.options,d=c.children;if(BI.isEmpty(d))throw new Error("ComboGroup构造错误");BI.each(d,function(a,b){var d=BI.formatEL(b).el.children;b=BI.formatEL(b).el,BI.isEmpty(d)||(b.el=BI.clone(b),b.children=d,b.type="bi.combo_group",b.action=c.action,b.height=c.height,b.direction=c.direction,b.isDefaultInit=c.isDefaultInit,b.isNeedAdjustHeight=c.isNeedAdjustHeight,b.isNeedAdjustWidth=c.isNeedAdjustWidth,b.adjustLength=c.adjustLength,b.popup=c.popup)}),this.combo=BI.createWidget({type:"bi.combo",element:this,container:c.container,height:c.height,trigger:c.trigger,direction:c.direction,isDefaultInit:c.isDefaultInit,isNeedAdjustWidth:c.isNeedAdjustWidth,isNeedAdjustHeight:c.isNeedAdjustHeight,adjustLength:c.adjustLength,el:a,popup:BI.extend({},c.popup,{el:BI.extend({items:d},c.popup.el)})}),this.combo.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.ComboGroup.EVENT_CHANGE,d)})},getValue:function(){return this.combo.getValue()},setValue:function(a){this.combo.setValue(a)}}),BI.ComboGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.combo_group",BI.ComboGroup),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 a=this.options;this.populate(a.items),BI.isKey(a.value)&&this.setValue(a.value)},_packageBtns:function(a){for(var b=this.options,c=this.buttonMap={},d=b.layouts.length-1;d>0;d--)a=BI.map(a,function(a,e){var f=BI.stripEL(e);return BI.extend({},b.layouts[d],{items:[BI.extend({},b.layouts[d].el,{el:BI.extend({ref:function(a){BI.isKey(c[f.value])&&(c[f.value]=a)}},f)})]})});return a},_packageLayout:function(a){for(var b=this.options,c=BI.deepClone(b.layouts[0]),d=BI.formatEL(c).el;d&&d.items&&!BI.isEmpty(d.items);)d=BI.formatEL(d.items[0]).el;return d.items=a,c},addItems:function(a){this.layouts.addItems(a)},prependItems:function(a){this.layouts.prependItems(a)},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttonMap,function(b,c){c&&(a.deepContains(b)?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1))})},getNotSelectedValue:function(){var a=[];return BI.each(this.buttonMap,function(b,c){c&&(!c.isEnabled()||c.isSelected&&c.isSelected()||a.push(c.getValue()))}),a},getValue:function(){var a=[];return BI.each(this.buttonMap,function(b,c){c&&c.isEnabled()&&c.isSelected&&c.isSelected()&&a.push(c.getValue())}),a},populate:function(a){a=a||[],this.options.items=a,a=this._packageBtns(a),this.layouts?this.layouts.populate(a):this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(a)))}}),BI.VirtualGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.virtual_group",BI.VirtualGroup),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 a=this,b=this.options;this.prev.setLoading(),b.itemsCreator.apply(this,[{times:--this.times},function(){a.prev.setLoaded(),a.prependItems.apply(a,arguments)}])},_nextLoad:function(){var a=this,b=this.options;this.next.setLoading(),b.itemsCreator.apply(this,[{times:++this.times},function(){a.next.setLoaded(),a.addItems.apply(a,arguments)}])},_init:function(){BI.Loader.superclass._init.apply(this,arguments);var a=this,b=this.options;b.itemsCreator===!1&&(b.prev=!1,b.next=!1),b.prev!==!1&&(this.prev=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.prev)),this.prev.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._prevLoad()})),this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:0,items:b.items,behaviors:{},layouts:[{type:"bi.vertical"}],value:b.value}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Loader.EVENT_CHANGE,d)}),b.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},b.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a._nextLoad()})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.prev,this.button_group,this.next)})))),b.isDefaultInit&&BI.isEmpty(b.items)&&BI.nextTick(BI.bind(function(){b.isDefaultInit&&BI.isEmpty(b.items)&&this._populate()},this)),BI.isNotEmptyArray(b.items)&&this._populate(b.items)},hasPrev:function(){var a=this.options;return BI.isNumber(a.count)?this.count0&&f.push(c),BI.Maskers.show(a.getName()),a.popupView.populate.apply(a.popupView,f),b.isAutoSync&&b.adapter&&b.adapter.getValue&&a.popupView.setValue(b.adapter.getValue()),a.popupView.loaded&&a.popupView.loaded(),a.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},setAdapter:function(a){this.options.adapter=a,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(a){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(a){BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},getKeyword:function(){return this.editor.getValue()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var a=this.options;return a.isAutoSync&&a.adapter&&a.adapter.getValue?a.adapter.getValue():this.isSearching()?this.popupView.getValue():a.adapter&&a.adapter.getValue?a.adapter.getValue():BI.isNull(this.popupView)?a.popup.value:this.popupView.getValue()},populate:function(a,b,c){var d=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),d.isAutoSync&&d.adapter&&d.adapter.getValue&&this.popupView.setValue(d.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),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 a=this,b=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.isEnabled()&&a.isValid()&&(b===BI.Events.EXPAND&&a._popupView(),b===BI.Events.COLLAPSE&&a._hideView(),b===BI.Events.EXPAND&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.Switcher.EVENT_EXPAND)),b===BI.Events.COLLAPSE&&(a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.isViewVisible()&&a.fireEvent(BI.Switcher.EVENT_COLLAPSE)),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,c,d))}),this.element.hover(function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.addClass(b.hoverClass)},function(){a.isEnabled()&&a.switcher.isEnabled()&&a.element.removeClass(b.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),b.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var a=this,b=this.options,c=this.options.trigger.split(",");BI.each(c,function(c,d){switch(d){case"hover":a.element[d](function(b){a.isEnabled()&&a.switcher.isEnabled()&&(a._popupView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND))},function(){a.isEnabled()&&a.switcher.isEnabled()&&b.toggle&&(a._hideView(),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_COLLAPSE))});break;default:d&&a.element.off(d+"."+a.getName()).on(d+"."+a.getName(),BI.debounce(function(c){a.switcher.element.__isMouseInBounds__(c)&&a.isEnabled()&&a.switcher.isEnabled()&&(b.toggle?a._toggle():a._popupView(),a.isExpanded()?(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",a.switcher),a.fireEvent(BI.Switcher.EVENT_EXPAND)):(a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",a.switcher),a.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 a=this,b=this.options;this._created||(this.popupView=BI.createWidget(b.popup,{type:"bi.button_group",element:b.adapter&&BI.Maskers.create(this.getName(),b.adapter,BI.extend({container:this},b.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:b.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.Switcher.EVENT_CHANGE,c,d)}),b.direction===BI.Direction.Custom||b.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){a.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var a=this,b=this.options;b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),BI.nextTick(function(){b.adapter?BI.Maskers.hide(a.getName()):a.popupView&&a.popupView.setVisible(!1),a.element.removeClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var a=this,b=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),b.adapter?BI.Maskers.show(this.getName()):a.popupView.setVisible(!0),BI.nextTick(function(c){b.adapter?BI.Maskers.show(c):a.popupView.setVisible(!0),a.element.addClass(b.switcherClass),a.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(a){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(a){BI.Switcher.superclass._setEnable.apply(this,arguments),!a&&this.isViewVisible()&&this._hideView()},setValue:function(a){this.switcher.setValue(a),BI.isNull(this.popupView)?this.options.popup.value=a:this.popupView.setValue(a)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},setAdapter:function(a){this.options.adapter=a,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(a){return this.switcher.attr("id")===a?this.switcher:this.popupView&&this.popupView.getNodeById(a)},getNodeByValue:function(a){return this.switcher.getValue()===a?this.switcher:this.popupView&&this.popupView.getNodeByValue(a)},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Switcher.superclass.destroy.apply(this,arguments)}}),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),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(a){return BI.createWidget()}})},render:function(){var a=this,b=this.options;BI.isObject(b.tab)&&(this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.tab.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.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(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tab,this.layout)}))));var c=new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardCreator:function(c){var d=b.cardCreator.apply(a,arguments);return a.cardMap[c]=d,d},afterCardShow:function(b){a._deleteOtherCards(b),a.curr=b}});c.on(BI.ShowListener.EVENT_CHANGE,function(b){a.fireEvent(BI.Tab.EVENT_CHANGE,b,a)})},_deleteOtherCards:function(a){var b=this,c=this.options;c.single===!0&&BI.each(this.cardMap,function(c,d){c!==a+""&&(b.layout.deleteCardByName(c),delete b.cardMap[c])})},_assertCard:function(a){if(!this.layout.isCardExisted(a)){var b=this.options.cardCreator(a);this.cardMap[a]=b,this.layout.addCardByName(a,b)}},mounted:function(){var a=this.options;a.showIndex!==!1&&this.setSelect(a.showIndex)},setSelect:function(a){this.tab&&this.tab.setValue(a),this._assertCard(a),this.layout.showCardByName(a),this._deleteOtherCards(a),this.curr!==a&&(this.curr=a)},removeTab:function(a){var b=this;this.options;BI.any(this.cardMap,function(c,d){if(BI.isEqual(c,a+""))return b.layout.deleteCardByName(c),delete b.cardMap[c],!0})},getSelect:function(){return this.curr},getSelectedTab:function(){return this.layout.getShowingCard()},getTab:function(a){return this._assertCard(a),this.layout.getCardByName(a)},setValue:function(a){var b=this.layout.getShowingCard();b&&b.setValue(a)},getValue:function(){var a=this.layout.getShowingCard();if(a)return a.getValue()},populate:function(){var a=this.layout.getShowingCard();if(a)return a.populate&&a.populate.apply(a,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),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 a=this,b=this.options;this.ele=BI.createWidget(b.el),BI.createWidget(b.layout,{type:"bi.adaptive",element:this,items:[this.ele]}),this.ele.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.ele.setValue(a)},getValue:function(){return this.ele.getValue()},populate:function(){this.ele.populate.apply(this,arguments)}}),BI.shortcut("bi.el",BI.EL),BI.Msg=function(){var a,b,c,d=[];return{alert:function(a,b,c){this._show(!1,a,b,c)},confirm:function(a,b,c){this._show(!0,a,b,c)},prompt:function(a,b,c,d,e){},toast:function(a,b,c){b=b||{},c=c||BI.Widget._renderEngine.createElement("body");var e=b.level||"normal",f=!!BI.isNull(b.autoClose)||b.autoClose,g=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:e,autoClose:f,text:a,listeners:[{eventName:BI.Toast.EVENT_DESTORY,action:function(){BI.remove(d,g.element);var a=10;BI.each(d,function(b,c){c.css({top:a}),a+=c.outerHeight()+10})}}]}),h=10;BI.each(d,function(a,b){h+=b.outerHeight()+10}),BI.createWidget({type:"bi.absolute",element:c,items:[{el:g,left:"50%",top:h}]}),d.push(g.element),g.element.css({"margin-left":-1*g.element.outerWidth()/2}),g.element.removeClass("bi-message-leave").addClass("bi-message-enter"),f&&BI.delay(function(){g.element.removeClass("bi-message-enter").addClass("bi-message-leave"),g.destroy()},5e3)},_show:function(d,e,f,g){b=BI.Widget._renderEngine.createElement('
              ').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=BI.Widget._renderEngine.createElement('
              ').css({position:"absolute",zIndex:BI.zIndex_tip-1,top:0,left:0,right:0,bottom:0}).appendTo("body");var h=function(){a.destroy(),b.remove()},i=[];d===!0&&i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_Cancel"),level:"ignore",handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!1])}}}),i.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_OK"),handler:function(){h(),BI.isFunction(g)&&g.apply(null,[!0])}}});var j={element:c,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:e||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(){h(),BI.isFunction(g)&&g.apply(null,[!1])}},width:60}}},height:40},center:{el:{type:"bi.label",vgap:10,hgap:20,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",lgap:10,items:i},top:0,left:20,right:20,bottom:0}]},height:44}},width:450,height:200}]};a=BI.createWidget(j)}}}(),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 a=this,b=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){a._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){a._scrollLock!==!0&&(b.scrollLeft=a.element.scrollLeft(),b.scrollTop=a.element.scrollTop(),a._calculateChildrenToRender(),a.fireEvent(BI.GridView.EVENT_SCROLL,{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:b.overflowX===!0&&b.overflowY===!0,scrolly:b.overflowX===!1&&b.overflowY===!0,scrollx:b.overflowX===!0&&b.overflowY===!1,items:[this.container]}),b.items.length>0&&this._populate()},mounted:function(){var a=this.options;0===a.scrollLeft&&0===a.scrollTop||(this.element.scrollTop(a.scrollTop),this.element.scrollLeft(a.scrollLeft))},_getOverscanIndices:function(a,b,c,d){return{overscanStartIndex:Math.max(0,c-b),overscanStopIndex:Math.min(a-1,d+b)}},_calculateChildrenToRender:function(){var a=this,b=this.options,c=b.width,d=b.height,e=BI.clamp(b.scrollLeft,0,this._getMaxScrollLeft()),f=BI.clamp(b.scrollTop,0,this._getMaxScrollTop()),g=b.overscanColumnCount,h=b.overscanRowCount;if(d>0&&c>0){var i=this._columnSizeAndPositionManager.getVisibleCellRange(c,e),j=this._rowSizeAndPositionManager.getVisibleCellRange(d,f);if(BI.isEmpty(i)||BI.isEmpty(j))return;var k=this._columnSizeAndPositionManager.getOffsetAdjustment(c,e),l=this._rowSizeAndPositionManager.getOffsetAdjustment(d,f);this._renderedColumnStartIndex=i.start,this._renderedColumnStopIndex=i.stop,this._renderedRowStartIndex=j.start,this._renderedRowStopIndex=j.stop;var m=this._getOverscanIndices(this.columnCount,g,this._renderedColumnStartIndex,this._renderedColumnStopIndex),n=this._getOverscanIndices(this.rowCount,h,this._renderedRowStartIndex,this._renderedRowStopIndex),o=m.overscanStartIndex,p=m.overscanStopIndex,q=n.overscanStartIndex,r=n.overscanStopIndex,s=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(q),t=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(o),u=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(r),v=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(p),w=s.offset+l,x=t.offset+k,y=u.offset+l+u.size,z=v.offset+k+v.size;if(w>=this.renderRange.minY&&y<=this.renderRange.maxY&&x>=this.renderRange.minX&&z<=this.renderRange.maxX)return;for(var A=[],B={},C={},D=this._getMaxScrollLeft(),E=this._getMaxScrollTop(),F=0,G=0,H=0,I=q;I<=r;I++)for(var J=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(I),K=o;K<=p;K++){var L,M=I+"-"+K,N=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(K),O=this.renderedKeys[M]&&this.renderedKeys[M][2];O>=0?(N.size!==this.renderedCells[O]._width&&(this.renderedCells[O]._width=N.size,this.renderedCells[O].el.setWidth(N.size)),J.size!==this.renderedCells[O]._height&&(this.renderedCells[O]._height=J.size,this.renderedCells[O].el.setHeight(J.size)),this.renderedCells[O]._left!==N.offset+k&&this.renderedCells[O].el.element.css("left",N.offset+k+"px"),this.renderedCells[O]._top!==J.offset+l&&this.renderedCells[O].el.element.css("top",J.offset+l+"px"),A.push(L=this.renderedCells[O])):(L=BI.createWidget(BI.extend({type:"bi.label",width:N.size,height:J.size},b.items[I][K],{cls:(b.items[I][K].cls||"")+" grid-cell"+(0===I?" first-row":"")+(0===K?" first-col":""),_rowIndex:I,_columnIndex:K,_left:N.offset+k,_top:J.offset+l}),this),A.push({el:L,left:N.offset+k,top:J.offset+l,_left:N.offset+k,_top:J.offset+l,_width:N.size,_height:J.size})),D=Math.min(D,N.offset+k),F=Math.max(F,N.offset+k+N.size),E=Math.min(E,J.offset+l),G=Math.max(G,J.offset+l+J.size),B[M]=[I,K,H],C[H]=L,H++}var P={},Q={},R=[];BI.each(B,function(b,c){a.renderedKeys[b]?P[b]=c:Q[b]=c}),BI.each(this.renderedKeys,function(a,b){P[a]||Q[a]||R.push(b[2])}),BI.each(R,function(b,c){a.renderedCells[c].el._destroy()});var S=[];BI.each(Q,function(a,b){S.push(A[b[2]])}),this.container.addItems(S,this),this.container._children=C,this.container.attr("items",A),this.renderedCells=A,this.renderedKeys=B,this.renderRange={minX:D,minY:E,maxX:F,maxY:G}}},_getRealMaxScrollLeft:function(){var a=this.options,b=0;return BI.count(0,this.columnCount,function(c){b+=a.columnWidthGetter(c)}),Math.max(0,b-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(a){var b=this.options;this._reRange(),this.columnCount=0,this.rowCount=0,a&&a!==this.options.items&&(this.options.items=a),BI.isNumber(b.columnCount)?this.columnCount=b.columnCount:b.items.length>0&&(this.columnCount=b.items[0].length),BI.isNumber(b.rowCount)?this.rowCount=b.rowCount:this.rowCount=b.items.length,this.container.setWidth(this.columnCount*b.estimatedColumnSize),this.container.setHeight(this.rowCount*b.estimatedRowSize),this._columnSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.columnCount,b.columnWidthGetter,b.estimatedColumnSize),this._rowSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.rowCount,b.rowHeightGetter,b.estimatedRowSize),this._calculateChildrenToRender();try{this.element.scrollTop(b.scrollTop),this.element.scrollLeft(b.scrollLeft)}catch(c){}},setScrollLeft:function(a){this.options.scrollLeft!==a&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(a||0,0,this._getRealMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(a){this.options.scrollTop!==a&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(a||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setColumnCount:function(a){this.options.columnCount=a},setRowCount:function(a){this.options.rowCount=a},setOverflowX:function(a){var b=this;this.options.overflowX!==!!a&&(this.options.overflowX=!!a,BI.nextTick(function(){b.element.css({overflowX:a?"auto":"hidden"})}))},setOverflowY:function(a){var b=this;this.options.overflowY!==!!a&&(this.options.overflowY=!!a,BI.nextTick(function(){b.element.css({overflowY:a?"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(a){this.options.estimatedColumnSize=a},setEstimatedRowSize:function(a){this.options.estimatedRowSize=a},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(a,b){b.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(a){a&&a!==this.options.items&&this.restore(),this._populate(a)}}),BI.GridView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_view",BI.GridView),BI.Popover=BI.inherit(BI.Widget,{_constant:{SIZE:{SMALL:"small",NORMAL:"normal",BIG:"big"},HEADER_HEIGHT:40},_defaultConfig:function(){return BI.extend(BI.Popover.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-popover bi-card",size:"normal",logic:{dynamic:!1},header:null,body:null,footer:null,closable:!0})},render:function(){var a=this,b=this.options;this.startX=0,this.startY=0,this.tracker=new BI.MouseMoveTracker(function(b,c){var d=(a._calculateSize(),BI.Widget._renderEngine.createElement("body").width()),e=BI.Widget._renderEngine.createElement("body").height();a.startX+=b,a.startY+=c,a.element.css({left:BI.clamp(a.startX,0,d-a.element.width())+"px",top:BI.clamp(a.startY,0,e-a.element.height())+"px"}),BI.Resizers._resize()},function(){a.tracker.releaseMouseMoves()},_global);var c=[{el:{type:"bi.htape",cls:"bi-message-title bi-header-background",ref:function(b){a.dragger=b},items:[{type:"bi.absolute",items:[{el:BI.isPlainObject(b.header)?BI.createWidget(b.header,{extraCls:"bi-font-bold"}):{type:"bi.label",cls:"bi-font-bold",height:this._constant.HEADER_HEIGHT,text:b.header,textAlign:"left"},left:20,top:0,right:0,bottom:0}]},{el:b.closable?{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){a.close()}}:{type:"bi.layout"},width:56}],height:this._constant.HEADER_HEIGHT},height:this._constant.HEADER_HEIGHT},{el:b.logic.dynamic?{type:"bi.vertical",scrolly:!1,cls:"popover-body",ref:function(){a.body=this},hgap:20,tgap:10,items:[{el:BI.createWidget(b.body)}]}:{type:"bi.absolute",items:[{el:BI.createWidget(b.body),left:20,top:10,right:20,bottom:0}]}}];b.footer&&c.push({el:{type:"bi.absolute",items:[{el:BI.createWidget(b.footer),left:20,top:0,right:20,bottom:0}],height:44},height:44});var d=this._calculateSize();return BI.extend({type:b.logic.dynamic?"bi.vertical":"bi.vtape",items:c,width:d.width},b.logic.dynamic?{type:"bi.vertical",scrolly:!1}:{type:"bi.vtape",height:d.height})},mounted:function(){var a=this,b=this.options;if(this.dragger.element.mousedown(function(b){var c=a.element.offset();a.startX=c.left,a.startY=c.top,a.tracker.captureMouseMoves(b)}),b.logic.dynamic){var c=this._calculateSize(),d=this.element.height(),e=BI.clamp(d,c.height,600)-(b.footer?84:44);this.body.element.height(e)}},_calculateSize:function(){var a=this.options,b={};if(BI.isNotNull(a.size))switch(a.size){case this._constant.SIZE.SMALL:b.width=450,b.height=200;break;case this._constant.SIZE.BIG:b.width=900,b.height=500;break;default:b.width=550,b.height=500}return{width:a.width||b.width,height:a.height||b.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(a){this.element.css({"z-index":a})},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.i18nText("BI-Basic_Sure")),BI.i18nText(BI.i18nText("BI-Basic_Cancel"))]})},beforeCreate:function(){var a=this,b=this.options;b.footer||(b.footer={type:"bi.right_vertical_adapt", lgap:10,items:[{type:"bi.button",text:this.options.btns[1],value:1,level:"ignore",handler:function(b){a.fireEvent(BI.Popover.EVENT_CANCEL,b),a.close(b)}},{type:"bi.button",text:this.options.btns[0],warningTitle:b.warningTitle,value:0,handler:function(b){a.fireEvent(BI.Popover.EVENT_CONFIRM,b),a.close(b)}}]})}}),BI.shortcut("bi.bar_popover",BI.BarPopover),BI.Popover.EVENT_CLOSE="EVENT_CLOSE",BI.Popover.EVENT_OPEN="EVENT_OPEN",BI.Popover.EVENT_CANCEL="EVENT_CANCEL",BI.Popover.EVENT_CONFIRM="EVENT_CONFIRM",BI.PopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PopupView.superclass._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 a=this,b=this.options,c=function(a){a.stopPropagation()},d=function(a){return a.stopEvent(),!1};this.element.css({"z-index":BI.zIndex_popup,"min-width":b.minWidth+"px","max-width":b.maxWidth+"px"}).bind({click:c}),this.element.bind("mousewheel",c),b.stopPropagation&&this.element.bind({mousedown:c,mouseup:c,mouseover:c}),b.stopEvent&&this.element.bind({mousedown:d,mouseup:d,mouseover:d}),this.tool=this._createTool(),this.tab=this._createTab(),this.view=this._createView(),this.toolbar=this._createToolBar(),this.view.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.PopupView.EVENT_CHANGE)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{scrolly:!1,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap,items:BI.LogicFactory.createLogicItemsByDirection(b.direction,BI.extend({cls:"list-view-outer bi-card list-view-shadow"},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.tool,this.tab,this.view,this.toolbar)}))))}))))},_createView:function(){var a=this.options;return this.button_group=BI.createWidget(a.el,{type:"bi.button_group",value:a.value}),this.button_group.element.css({"min-height":a.minHeight+"px","padding-top":a.innerVGap+"px","padding-bottom":a.innerVGap+"px"}),this.button_group},_createTool:function(){var a=this.options;if(!1!==a.tool)return BI.createWidget(a.tool)},_createTab:function(){var a=this.options;if(0!==a.tabs.length)return BI.createWidget({type:"bi.center",cls:"list-view-tab",height:25,items:a.tabs,value:a.value})},_createToolBar:function(){var a=this.options;if(0!==a.buttons.length)return BI.createWidget({type:"bi.center",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.view},populate:function(a){this.view.populate.apply(this.view,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||24:0,c=this.tab?this.tab.attr("height")||24:0,d=(this.tool&&this.tool.attr("height")||24)*(this.tool&&this.tool.isVisible()?1:0),e=a-b-c-d-2*this.options.innerVGap;this.view.resetHeight?this.view.resetHeight(e):this.view.element.css({"max-height":e+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.view.setValue(a)},getValue:function(){return this.view.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView),BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.matcher=BI.createWidget(b.matcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:b.value}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),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(b.searcher,{type:"bi.button_group",chooseType:b.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:b.value}),this.searcher.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearcherView.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.matcher,this.spliter,this.searcher]})},startSearch:function(){},stopSearch:function(){},setValue:function(a){this.matcher.setValue(a),this.searcher.setValue(a)},getValue:function(){return this.matcher.getValue().concat(this.searcher.getValue())},populate:function(a,b,c){a||(a=[]),b||(b=[]),this.setTipVisible(a.length+b.length===0),this.spliter.setVisible(BI.isNotEmptyArray(b)&&BI.isNotEmptyArray(a)),this.matcher.populate(b,c),this.searcher.populate(a,c)},empty:function(){this.searcher.empty(),this.matcher.empty()},hasMatched:function(){return this.matcher.getAllButtons().length>0}}),BI.SearcherView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.searcher_view",BI.SearcherView),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 a=this,b=this.options;return{type:"bi.vertical",items:[BI.extend({type:"bi.vertical",scrolly:!1,ref:function(){a.container=this}},b.el)],element:this}},mounted:function(){var a=this,b=this.options;this._populate(),this.element.scroll(function(c){b.scrollTop=a.element.scrollTop(),a._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){a._calculateBlocksToRender()})},_renderMoreIf:function(){for(var a,b=this,c=this.options,d=this.element.height(),e=c.scrollTop+d+c.overscanHeight,f=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+c.blockSize||0,g=this.renderedIndex+1,h=function(){return b.container.element.height()};(a=h())e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.Pager.superclass.attr.apply(this,arguments),"curr"===a&&(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),BI.A=BI.inherit(BI.Text,{_defaultConfig:function(){var a=BI.A.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-a display-block",href:"",target:"_blank",el:null,tagName:"a"})},_init:function(){var a=this.options;BI.A.superclass._init.apply(this,arguments),this.element.attr({href:a.href,target:a.target}),a.el&&BI.createWidget(a.el,{element:this})}}),BI.shortcut("bi.a",BI.A),BI.LoadingBar=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.LoadingBar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-loading-bar bi-tips",height:30,handler:BI.emptyFn})},_init:function(){BI.LoadingBar.superclass._init.apply(this,arguments);var a=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(b){a.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 b=BI.createWidget({type:"bi.center_adapt",items:[this.loaded]}),c=BI.createWidget({type:"bi.center_adapt",items:[this.loading]});this.cardLayout=BI.createWidget({type:"bi.card",element:this,items:[{el:b,cardName:"loaded"},{el:c,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),BI.IconButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-icon-button horizon-center",iconWidth:null,iconHeight:null})},_init:function(){BI.IconButton.superclass._init.apply(this,arguments);var a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.ImageButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ImageButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-button",src:"",iconWidth:"100%",iconHeight:"100%"})},_init:function(){BI.ImageButton.superclass._init.apply(this,arguments);var a=this.options;this.image=BI.createWidget({type:"bi.img",width:a.iconWidth,height:a.iconHeight,src:a.src}),BI.isNumber(a.iconWidth)||BI.isNumber(a.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(a){BI.ImageButton.superclass.setWidth.apply(this,arguments),this.options.width=a},setHeight:function(a){BI.ImageButton.superclass.setHeight.apply(this,arguments),this.options.height=a},setImageWidth:function(a){this.image.setWidth(a)},setImageHeight:function(a){this.image.setHeight(a)},getImageWidth:function(){return this.image.element.width()},getImageHeight:function(){return this.image.element.height()},setSrc:function(a){this.options.src=a,this.image.setSrc(a)},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),BI.Button=BI.inherit(BI.BasicButton,{_defaultConfig:function(a){var b=BI.Button.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{baseCls:(b.baseCls||"")+" bi-button"+(BI.isIE()&&BI.isIE9Below()?" hack":""),minWidth:a.block===!0||a.clear===!0?0:80,height:24,shadow:a.clear!==!0,isShadowShowingOnSelected:!0,readonly:!0,iconCls:"",level:"common",block:!1,clear:!1,ghost:!1,textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:a.clear?0:10,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},_init:function(){BI.Button.superclass._init.apply(this,arguments);var a=this.options;!BI.isNumber(a.height)||a.clear||a.block?a.clear||a.block?this.element.css({lineHeight:a.height+"px"}):this.element.css({lineHeight:a.height-2+"px"}):this.element.css({height:a.height+"px",lineHeight:a.height-2+"px"}),BI.isKey(a.iconCls)?(this.icon=BI.createWidget({type:"bi.icon_label",cls:a.iconCls,width:18,height:a.height-2,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value,height:a.height-2}),BI.createWidget({type:"bi.center_adapt",element:this,hgap:a.hgap,vgap:a.vgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,element:this,text:a.text,value:a.value}),a.block===!0&&this.element.addClass("block"),a.clear===!0&&this.element.addClass("clear"),a.ghost===!0&&this.element.addClass("ghost"),a.minWidth>0&&this.element.css({"min-width":a.minWidth+"px"})},doClick:function(){BI.Button.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Button.EVENT_CHANGE,this)},setText:function(a){BI.Button.superclass.setText.apply(this,arguments),this.text.setText(a)},setValue:function(a){BI.Button.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},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",BI.TextButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-button",textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:0,lgap:0,rgap:0,text:"",py:""})},_init:function(){BI.TextButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textWidth:a.textWidth,textHeight:a.textHeight,width:a.width,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.rgap,text:a.text,value:a.value,py:a.py,keyword:a.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(a){BI.TextButton.superclass.setText.apply(this,arguments),a=BI.isArray(a)?a.join(","):a,this.text.setText(a)},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.TextButton.superclass.setValue.apply(this,arguments),this.isReadOnly()||(a=BI.isArray(a)?a.join(","):a,this.text.setValue(a))}}),BI.TextButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_button",BI.TextButton),BI.BlankIconIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=(this._const,BI.createWidget({type:"bi.layout",width:a.blankWidth,height:a.height}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,forceNotSelected:!0,width:a.height,height:a.height}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,forceNotSelected:!0,width:a.height,height:a.height}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,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(a){BI.BlankIconIconTextItem.superclass.setSelected.apply(this,arguments),this.icon1.setSelected(a),this.icon2.setSelected(a)},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),BI.BlankIconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.layout",width:a.blankWidth},b,this.text,{type:"bi.layout",width:a.height})}))))},doClick:function(){BI.BlankIconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.BlankIconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_icon_item",BI.BlankIconTextIconItem),BI.BlankIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.BlankIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=(this._const,BI.createWidget({type:"bi.layout",width:a.blankWidth}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.icon,this.text)}))))},doClick:function(){BI.BlankIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_item",BI.BlankIconTextItem),BI.IconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.leftIconWrapperWidth,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.rightIconWrapperWidth,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.IconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.iconWrapperWidth||a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend(a.logic,{ items:BI.LogicFactory.createLogicItemsByDirection(a.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),BI.TextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.TextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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),BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height});var b=BI.createWidget({type:"bi.icon_label",cls:a.iconCls1,width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),c=BI.createWidget({type:"bi.layout",width:a.height,height:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:a.iconCls2,width:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",b,this.text,c)}))))},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),BI.IconTextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:a.height,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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),BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:a.whiteSpace,textHeight:"nowrap"==a.whiteSpace?a.height:a.textHeight,height:a.height,hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,py:a.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),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"",root:!0,value:b.value,watermark:b.watermark,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,height:b.height-2*(b.vgap+b.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}}),this.watermark.element.bind("click",function(b){a.isEnabled()?a.editor.isEditing()||a.editor.focus():a.editor.isEditing()&&a.editor.blur(),b.stopEvent()}));var c=[];this.watermark&&c.push({el:this.watermark,left:3,right:3,top:0,bottom:0}),c.push({el:this.editor,left:0,right:0,top:0,bottom:0});var d=[{el:{type:"bi.absolute",items:c},left:b.hgap+b.lgap,right:b.hgap+b.rgap,top:b.vgap+b.tgap,bottom:b.vgap+b.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:d}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){a._checkError(),a.element.addClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){a._setErrorVisible(!1),a.element.removeClass("bi-editor-focus"),a.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){a.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){a.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(b){b.keyCode!==BI.KeyCode.TAB&&a.watermark&&a.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){a._checkWaterMark(),a._setErrorVisible(!1),a.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_ERROR,arguments),a._setErrorVisible(a.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){a._checkWaterMark();var b=a._setErrorVisible(!0);b&&b.element.fadeOut(100,function(){b.element.fadeIn(100)}),a.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){a._checkWaterMark(),a.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){a.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){a.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){a.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){a.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){a.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){a.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){a.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM,arguments)}),this.element.click(function(a){return a.stopPropagation(),!1}),BI.isKey(this.options.value)||BI.isEmptyString(this.options.value)?(this._checkError(),this._checkWaterMark()):this._checkWaterMark()},_checkToolTip:function(){var a=this.options,b=a.errorText;BI.isFunction(b)&&(b=b(this.editor.getValue())),BI.isKey(b)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(b))},_checkError:function(){this._setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(a){this.options.errorText=a},getErrorText:function(){return this.options.errorText},_setErrorVisible:function(a){var b=this.options,c=b.errorText;if(BI.isFunction(c)&&(c=c(BI.trim(this.editor.getValue()))),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,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(a){this.editor.onKeyDown(a)},setValue:function(a){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(a),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),BI.MultifileEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var a=this,b=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:b.name,url:b.url,multiple:b.multiple,accept:b.accept,maxSize:b.maxSize,title:b.title}),this.file.on(BI.File.EVENT_CHANGE,function(){a.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){a.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments)}),this.file.on(BI.File.EVENT_ERROR,function(){a.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){a.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){a.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),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},render:function(){var a=this.options,b=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:10,top:4,bottom:8}]}),this.content.element.on("input propertychange",function(a){b._checkWaterMark(),b.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){b.isValid()&&(b._focus(),b.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),BI.Widget._renderEngine.createElement(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&(BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&this.setValue(a.value),BI.isNotNull(a.style)&&this.setStyle(a.style),this._checkWaterMark()},_checkWaterMark:function(){var a=this,b=this.options,c=this.getValue();BI.isNotEmptyString(c)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(b.watermark)&&(this.watermark?(this.watermark.setText(b.watermark),this.watermark.setValid(!b.invalid),this.watermark.setEnable(!b.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark cursor-default",textAlign:"left",height:20,text:b.watermark,invalid:b.invalid,disabled:b.disabled}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){a.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:4,top:4,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(a){this.content.element.val(a),this._checkWaterMark()},setStyle:function(a){this.style=a,this.element.css(a),this.content.element.css(BI.extend({},a,{color:a.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(a.backgroundColor)?BI.DOM.rgb2hex(a.backgroundColor):a.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(a){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)},_setEnable:function(a){BI.TextAreaEditor.superclass._setEnable.apply(this,[a]),this.content&&(this.content.element[0].disabled=!a)}}),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),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 a=this,b=this.options;b.hgap+b.lgap>0&&this.element.css({"padding-left":b.hgap+b.lgap+"px"}),b.hgap+b.rgap>0&&this.element.css({"padding-right":b.hgap+b.rgap+"px"}),b.vgap+b.tgap>0&&this.element.css({"padding-top":b.vgap+b.tgap+"px"}),b.vgap+b.bgap>0&&this.element.css({"padding-bottom":b.vgap+b.bgap+"px"}),BI.isNumber(b.height)&&this.element.css({lineHeight:b.height+"px"}),BI.isNumber(b.lineHeight)&&this.element.css({lineHeight:b.lineHeight+"px"}),BI.isWidthOrHeight(b.maxWidth)&&this.element.css({maxWidth:b.maxWidth}),this.element.css({textAlign:b.textAlign,whiteSpace:b.whiteSpace,textOverflow:"nowrap"===b.whiteSpace?"ellipsis":"",overflow:"nowrap"===b.whiteSpace?"":"auto"}),b.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){b.handler(a.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(b.text)?this.setText(b.text):BI.isKey(b.value)&&this.setText(b.value),b.highLight&&this.doHighLight()},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(a){BI.Html.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(a)},setStyle:function(a){this.text.element.css(a)},setText:function(a){BI.Html.superclass.setText.apply(this,arguments),this.options.text=a,this.text.element.html(a)}}),BI.shortcut("bi.html",BI.Html),BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"i",baseCls:(a.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),BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"iframe",baseCls:(a.baseCls||"")+" bi-iframe",src:"",name:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.frameborder="0",a.attributes.src=a.src,a.attributes.name=a.name,BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src},setName:function(a){this.options.name=a,this.element.attr("name",a)},getName:function(){return this.options.name}}),BI.shortcut("bi.iframe",BI.Iframe),BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{tagName:"img",baseCls:(a.baseCls||"")+" bi-img display-block",src:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var a=this.options;a.attributes.src=a.src,BI.Img.superclass._init.apply(this,arguments)},setSrc:function(a){this.options.src=a,this.element.attr("src",a)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img),BI.ImageCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageCheckbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-image-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})}}),BI.ImageCheckbox.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_checkbox",BI.ImageCheckbox),BI.Checkbox=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-checkbox",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16},render:function(){var a=this,b=this.options;return{type:"bi.center_adapt",items:[{type:"bi.default",ref:function(b){a.checkbox=b},cls:"checkbox-content",width:b.iconWidth-2,height:b.iconHeight-2}]}},_setEnable:function(a){BI.Checkbox.superclass._setEnable.apply(this,arguments),a===!0?this.checkbox.element.removeClass("base-disabled disabled"):this.checkbox.element.addClass("base-disabled disabled")},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)},setSelected:function(a){BI.Checkbox.superclass.setSelected.apply(this,arguments),a?this.checkbox.element.addClass("bi-high-light-background"):this.checkbox.element.removeClass("bi-high-light-background")}}),BI.Checkbox.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox),function(document){var F=function(a){return function(b){var c=b.files||[b];return c.item||(c.item=a),c}}(function(a){return this[a]}),event={add:document.addEventListener?function(a,b,c){return a.addEventListener(b,c,!1),this}:function(a,b,c){return a.attachEvent("on"+b,c),this},del:document.removeEventListener?function(a,b,c){return a.removeEventListener(b,c,!1),this}:function(a,b,c){return a.detachEvent("on"+b,c),this},stop:function(a){return a?(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,a.preventDefault?a.preventDefault():a.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(a,b,c){return"--".concat(a,CRLF,'Content-Disposition: form-data; name="',b,'"; filename="',_global.encodeURIComponent(c.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,c.getAsBinary(),CRLF,"--",a,"--",CRLF)},isFunction=function(a){return"[object Function]"===toString.call(a)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(a,b,c,d){if(-1'),iframe=handler.iframe||(handler.iframe=document.createElement(''))}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(a){isFunction(handler.onerror)&&handler.onerror(rpe,a||_global.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loadedc.status||c.status>399?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void a.fireEvent(BI.File.EVENT_ERROR)):void a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url,c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d0&&b.fireEvent(BI.File.EVENT_CHANGE,{files:a.files}),c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){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(a){this.wrap&&this.wrap.upload(a)},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(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?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||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=!1,c=null,d=!1,e=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),f=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){d=!1,b=e.ctrlKey||e.metaKey,c=e.keyCode,a.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(b){c=null,d&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,e(b.keyCode))}).on("input propertychange",function(b){var f=b.originalEvent;(BI.isNull(f.propertyName)||"value"===f.propertyName)&&(c=null,d=!0,a._keydown_=!0,e(c))}).click(function(a){a.stopPropagation(),f()}).mousedown(function(b){a.element.val(a.element.val())}).focus(function(b){a._focusDebounce()}).focusout(function(b){a._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(){function a(){if(b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()){var a=b._lastValidValue;b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM),b._lastValidValue!==a&&b.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){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)&&(this._pause!==!0||/(\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))),a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN),BI.isEndWithBlank(this.getValue())&&BI.trim(this.getValue())===BI.trim(this._lastValue||"")?(this._pause=!0,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.PAUSE,"",this),this.fireEvent(BI.Input.EVENT_PAUSE),this._defaultState()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===this._lastValue||""===BI.trim(this._lastValue)?this._valueChange():(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_STOP),this._valueChange())},_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 a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastChangedValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(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(a){this.element.val(a),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(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),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),BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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),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 a=this,b=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(b){a.radio=b},width:b.iconWidth,height:b.iconHeight}]}},_setEnable:function(a){BI.Radio.superclass._setEnable.apply(this,arguments),a===!0?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(a){BI.Radio.superclass.setSelected.apply(this,arguments),a?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),BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(a){var b=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{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 a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();return b.textAlign="left",BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:"bi.center_adapt",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,maxWidth:"100%"}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(b,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var a=this.options,b="right"===a.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",c=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:b,height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(c)}]}):void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})),void("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}))):(c.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(c,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(c,{maxWidth:"100%"})),void BI.createWidget({type:b,element:this,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(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}}),BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var a=this.options;return{type:"bi.html",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel),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 a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.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),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),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 a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var a=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+a.level,text:a.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(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),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 a=this,b=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+b.level);var c=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:c,mousedown:c,mouseup:c,mouseover:c,mouseenter:c,mouseleave:c,mousemove:c});var d="close-font";switch(b.level){case"success":d="toast-success-font";break;case"error":d="toast-error-font";break;case"warning":d="toast-warning-font";break;case"normal":default:d="toast-message-font"}var e=[{type:"bi.icon_label",cls:d+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,textHeight:16,textAlign:"left"},rgap:b.autoClose?this._const.hgap:0}],f=[36,""];b.autoClose===!1&&(e.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){a.destroy()},width:36}),f.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:e,vgap:7,columnSize:f})},setText:function(a){this.text.setText(a)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:18})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,height:a.height,textHeight:a.height-2,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{value:e.value},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])},value:c.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},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(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),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(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[], -zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;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;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(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=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("")},makeDOMNodeMainBefore:function(a,b,c){a.push("
            • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
                "),c.push(d),c.push("
              ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={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"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0};return d},getTreeCheckedNodes:function(a,b,c,d){ -if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f=a.check.chkboxType,g=""===f.Y&&""===f.N;fullStyle="",b.chkDisabled===!0?fullStyle=d.DISABLED:b.halfCheck?fullStyle=d.PART:a.check.chkStyle==e.STYLE?fullStyle=b.check_Child_State<1?d.FULL:d.PART:fullStyle=b[c]?2===b.check_Child_State||b.check_Child_State===-1||g?d.FULL:d.PART:b.check_Child_State<1||g?d.FULL:d.PART;var h=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+fullStyle;return h=b.check_Focus&&b.chkDisabled!==!0?h+"_"+d.FOCUS:h,t.className.BUTTON+" "+d.DEFAULT+" "+h},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconCls,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconCls!==a&&(this.element.removeClass(b.iconCls).addClass(a),b.iconCls=a)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=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:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:b.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(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),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 a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconCls,once:b.once,iconWrapperWidth:b.iconWrapperWidth,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},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),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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,title:a.title||a.text,warningTitle:a.warningTitle,py:a.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(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 a=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:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var c=BI.createWidget({type:"bi.icon_label",width:24,cls:b.iconCls,iconWidth:b.iconWidth,iconHeight:b.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},{width:24,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},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(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,cls:"bi-list-item-none",id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.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(a){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=a?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),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),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 a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:24,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},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},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({ -type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),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 a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.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),BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:b.text,value:b.value,ref:function(){a.text=this}},left:b.lgap,right:b.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(a){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(a)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=BI.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=BI.Date._MD.slice(0);i[1]=BI.isLeapYear(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay();var j=(7-BI.StartOfWeek+e.FDay)%7;e.PDay=i[0===b?11:b-1]-j+1,e.NDay=1;var k=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=j&&a=0?c%12:(12+c%12)%12;return{year:BI.getDate().getFullYear()+d,month:e+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[],e=BI.parseDateTime(b.min,"%Y-%X-%d"),f=BI.parseDateTime(b.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var b={};BI.checkDateVoid(c+a,1,1,BI.print(BI.getDate(e.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(f.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(b.disabled=!0),b.text=c+a,d.push(b)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=BI.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=BI.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(a){var b=BI.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?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),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(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),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(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),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 a=this,b=this.options;this.editor=BI.createWidget(b.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.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(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:""})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:b.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(b){a.trigger=b},width:b.width,height:b.height},b.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(b){a.colorPicker=b},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){c(),a._isRGBColor(a.colorPicker.getValue())||a.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){c(),a.combo.hideView()}}]},b.popup),stopPropagation:!0,width:230},value:b.value});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var a=this,b=this.options;this.colorEditor=BI.createWidget(b.editor,{type:b.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:b.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a._dealStoreColors(),a.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:b.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:b.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:b.editor});var c=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:c}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),c.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a._dealStoreColors(),a.more.hideView(),a.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:!b.disabled,ref:function(){a.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_setEnable:function(a){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!a)},_dealStoreColors:function(){var a=this.getValue(),b=this._getStoreColors(),c=new BI.Queue(8);c.fromArray(b),c.remove(a),c.unshift(a);var d=c.toArray();BI.Cache.setItem("colors",BI.array2String(d)),this.setStoreColors(d)},_digestStoreColors:function(a){var b=BI.map(a,function(a,b){return{value:b}});return BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),b},_getStoreColors:function(){var a=this,b=this.options,c=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(c,function(c,d){return!b.simple||a._isRGBColor(d)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},setStoreColors:function(a){BI.isArray(a)&&this.storeColors.populate([this._digestStoreColors(a)])},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},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),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 a=this,b=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:b.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(a){this.popup.setStoreColors(a)},setValue:function(a){this.popup.setValue(a)},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),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:b.container,value:b.value,width:b.width,height:b.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_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 a=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:a,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var a=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(b){a.changeIcon=b},iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(b){a.label=b},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var b=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:b,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?(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"===a?(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":a}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),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:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{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 a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:b.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),d(a.storeValue.r)&&d(a.storeValue.g)&&d(a.storeValue.b)&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[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()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#ffffff"),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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()?(a.lastColor=a.getValue(),a.setValue("transparent")):("transparent"===a.lastColor&&(a.lastColor=""),a.setValue(a.lastColor||"#ffffff")),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){""===a?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===a?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":a}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(a){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){if("transparent"===a)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:""});a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.storeValue={r:BI.isNull(b.r)?"":b.r,g:BI.isNull(b.r)?"":b.g,b:BI.isNull(b.r)?"":b.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),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){this.colorShow.element.css({"background-color":a});var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.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),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 a=this;return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(b){a.colorWrapper=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(b){a.wheel=b}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(b){a.overlay=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.hMarker=b},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.slMarker=b},scrollable:!1,width:17,height:17}}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this.setValue(a.value)},_unpack:function(a){return 7===a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4===a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},_pack:function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},_setColor:function(a){var b=this._unpack(a);this.value!==a&&b&&(this.value=a,this.rgb=b,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(a){return this.hsl=a,this.rgb=this._HSLToRGB(a),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this._hueToRGB(b,c,d+.33333),this._hueToRGB(b,c,d),this._hueToRGB(b,c,d-.33333)]},_hueToRGB:function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},_RGBToHSL:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},_updateDisplay:function(){var a=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(a)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(a)*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(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var c=this._absolutePosition(a.offsetParent);b.x+=c.x,b.y+=c.y}return b},_widgetCoords:function(a){var b,c,d=a.target||a.srcElement,e=this.wheel.element[0];if("undefined"!=typeof a.offsetX){for(var f={x:a.offsetX,y:a.offsetY},g=d;g;)g.mouseX=f.x,g.mouseY=f.y,f.x+=g.offsetLeft,f.y+=g.offsetTop,g=g.offsetParent;for(var g=e,h={x:0,y:0};g;){if("undefined"!=typeof g.mouseX){b=g.mouseX-h.x,c=g.mouseY-h.y;break}h.x+=g.offsetLeft,h.y+=g.offsetTop,g=g.offsetParent}for(g=d;g;)g.mouseX=void 0,g.mouseY=void 0,g=g.offsetParent}else{var f=this._absolutePosition(e);b=(a.pageX||0)-f.x,c=(a.pageY||0)-f.y}return{x:b-this.constants.WIDTH/2,y:c-this.constants.WIDTH/2}},_doMouseMove:function(a){var b=this._widgetCoords(a);if(this.circleDrag){var c=Math.atan2(b.x,-b.y)/6.28;c<0&&(c+=1),this._setHSL([c,this.hsl[1],this.hsl[2]])}else{var d=Math.max(0,Math.min(1,-(b.x/this.constants.SQUARE)+.5)),e=Math.max(0,Math.min(1,-(b.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],d,e])}},doClick:function(a){var b=this._widgetCoords(a);return this.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>this.constants.SQUARE,this._doMouseMove(a),!1},setValue:function(a){this._setColor(a)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,container:b.container,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.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),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.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 a=this.options,b=this,c=[];return BI.each(a.buttons,function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:24,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:c}]})},_createView:function(){var a=this.options,b=BI.createWidget({type:"bi.button_group",items:[a.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return b.element.css("min-height",a.minHeight-44),b}}),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,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var a=this,b=this.options,c=BI.map(b.buttons,function(b,c){return BI.isWidget(c)?c:BI.extend({type:"bi.button",height:24,handler:function(b){a.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,b)}},c)});return{type:"bi.bubble_bar_popup_view",ref:function(){a.popup=this},el:{type:"bi.label",text:b.text,whiteSpace:"normal",textAlign:"left",ref:function(){a.text=this}},buttons:c}},populate:function(a){this.text.setText(a||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,value:b.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),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 a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconCls:b.iconCls,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,value:b.value}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),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 a=this.options,b="";BI.isKey(a.value)&&(b=this._digest(a.value,a.items)),this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b,disableSelected:!0,width:a.isShowDown?a.width-12:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight,selected:BI.isNotEmptyString(b)}),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(b)}),this.down.setVisible(a.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(a,b){var c="";return a=BI.isArray(a)?a[0]:a,BI.any(b,function(b,d){if(a===d.value)return c=d.iconCls,!0}),c},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c=this._digest(a,this.options.items);a=BI.isArray(a)?a[0]:a,BI.isNotEmptyString(c)?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:b.items,height:b.height,text:b.text,iconCls:b.iconCls,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth,title:b.title,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this.setValue(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:a.behaviors,value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a,b){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var c=this.options;a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:c.iconWrapperWidth,iconHeight:c.iconHeight,iconWidth:c.iconWidth}),this.popup.populate(a,b)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),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 a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,adjustLength:2,toggle:!1,ref:function(){a.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){a.trigger=this},items:b.items,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:b.value,items:b.items,ref:function(){a.popup=this,a.trigger.getSearcher().setAdapter(a.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:252},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){a.triggerBtn=this},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this._checkError(a.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.options.items=a,this.combo.populate(a)},setValue:function(a){this.combo.setValue(a),this._checkError(a)},getValue:function(){var a=this.combo.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo),BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var a=this,b=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){a.popup=this},items:BI.createItems(b.items,{type:"bi.single_select_item",textAlign:b.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,c,d)}}]}]}},mounted:function(){this.check()},populate:function(a,b,c){var d=BI.concat(a,b);BI.SearchTextValueComboPopup.superclass.populate.apply(this,d),d=BI.createItems(d,{type:"bi.single_select_item",height:24}),this.popup.populate(d,c)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup),BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value,b.items),value:b.value,height:b.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(a,c){var d=a.keyword,e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g,f)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(a){this.editor.setState(a)},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this._setState(this._digest(a,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),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options; -this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,value:b.value,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this._checkError(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),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 a=this,b=this.options;this._createValueMap();var c;BI.isNotNull(b.value)&&(c=this._digest(b.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:b.height,items:b.items,text:b.text,value:c}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,value:BI.isNull(c)?[]:[c],items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var b=a.combo.getValue()[0].value;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var b=a.combo.getValue()[0].childValue;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},_digest:function(a){return this.value=a,this.valueMap[a]},setValue:function(a){a=this._digest(a),this.combo.setValue([a]),this.trigger.setValue(a)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text,value:BI.isNull(a.value)?"":a.value.childValue||a.value.value})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a.childValue||a.value)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker,value:b.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(b.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:b.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]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.text.setStyle(a)},setValue:function(a){var b=this.options;this.editor.setValue(a),this._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(a.keyword)&&this.text.doRedMark(a.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text tip-text-style",textAlign:"left",height:b.height,text:b.text,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")},title:BI.isNotNull(b.tipText)?b.tipText:function(){var b="";return BI.isString(a.stateValue)&&(b=a.stateValue),BI.isArray(a.stateValue)&&1===a.stateValue.length&&(b=a.stateValue[0]),b},warningTitle:b.warningTitle,tipType:b.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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.options.disabled===!1&&(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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=a,BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text"))))},setTipType:function(a){this.text.options.tipType=a}}),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),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker, -quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text",textAlign:"left",text:b.text,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),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),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(c,{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(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.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:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded(),a.check()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.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(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{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(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 a=this,b=this.options;return[{type:"bi.label",text:b.text,height:b.height,value:b.value,hgap:b.hgap,ref:function(){a.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){a.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(a){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),a?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var a=this,b=this.options;return{type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.linear_segment_button",height:b.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){a.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.buttonGroup=this}}},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),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 a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(b.value)&&this.setValue(b.value)},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.allSelected=!!a,this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{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(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"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(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),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:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1),this.setPagerVisible(a>1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate(),this.setPagerVisible(this.options.pages>1)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),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 a=this.options;a.vertical,a.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 a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev column-pre-page-h-font"},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 direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev row-pre-page-h-font"},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 direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage, -lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},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(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[86,110,0,24],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),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),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 a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:a.height,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:b.value,items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},_setEnable:function(a){BI.Segment.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(a){return a.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.selected===!0,d=!b.selected&&b.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())},selected:c,invisible:d}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)},invisible:c||!d}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:b.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(a){this.checkbox.setSelected(!!a)},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this.halfSelected=!!a,a===!0?(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(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(b),!b&&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),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(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};BI.isKey(f.id)||(f.id=BI.UUID()),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.mid_plus_group_node",e===a.length-1&&(g.type="bi.last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a,b){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a,b)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),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(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),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(){function a(a,b){return!1}function b(a,b){return b.isLeaf?{}:{color:"#999999"}}var c={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:b},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return c},_dealWidthNodes:function(a){a=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),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 a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate(),BI.isNotNull(b.value)&&this.setValue(b.value)},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},_digest:function(a){a||(a=[]);var b=this,c={},d=[];return BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),BI.makeObject(a.concat(d))},setValue:function(a){this.tree.setValue(this._digest(a))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,title:function(){return a.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:b.triggerWidth||b.height},width:b.triggerWidth||b.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:24})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(b){a.wrapper=b},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.iconWrapperWidth||b.height},{el:this.text,lgap:BI.isEmptyString(b.iconCls)?5:0},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a)},setIcon:function(a){var b=this.options;this.icon.setIcon(a);var c=this.wrapper.attr("items")[0],d=this.wrapper.attr("items")[1];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,d.lgap=5,this.wrapper.resize()):c.width!==(b.iconWrapperWidth||b.height)&&(c.width=b.iconWrapperWidth||b.height,d.lgap=0,this.wrapper.resize())},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),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 a=this.options,b=this._digist(a.value,a.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:b.text,iconCls:b.iconCls,height:a.height,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth})},_digist:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d,e=BI.Tree.transformToArrayFormat(b);return BI.any(e,function(b,c){if(BI.deepContains(a,c.value))return d={text:c.text||c.value,iconCls:c.iconCls},!0}),BI.isNotNull(d)?{text:d.text,iconCls:d.iconCls}:{text:c.text,iconCls:c.iconCls}},setValue:function(a){var b=this._digist(a,this.options.items);this.trigger.setText(b.text),this.trigger.setIcon(b.iconCls)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text,title:function(){return a.text.getText()},tipType:b.tipType,warningTitle:b.warningTitle,hgap:c.hgap,readonly:b.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setText:function(a){this.text.setText(a)},setTipType:function(a){this.text.options.tipType=a}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),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 a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height,readonly:a.readonly,text:this._digest(a.value,a.items),tipType:a.tipType,warningTitle:a.warningTitle})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},setTipType:function(a){this.trigger.setTipType(a)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),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 a=this.options,b=this._digest(a.text,a.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2,text:b.text,cls:b.cls})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?{cls:"",text:d.join(",")}:{cls:"bi-water-mark",text:c.text}},setValue:function(a){var b=this._digest(a,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(b.cls),this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:a.triggerWidth||a.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:a.triggerWidth||a.height}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:b.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(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:b.behaviors,min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=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===a._month?a.setValue({year:a.year.getValue()-1,month:12}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._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===a._month?a.setValue({year:a.year.getValue()+1,month:1}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:b.behaviors,min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:b.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.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 a=this.options,b=!(1===this._month&&this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(12===this._month&&this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=BI.parseInt(a.year),this._month=BI.parseInt(a.month),this.year.setValue(a.year),this.month.setValue(a.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),BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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(){a.setValue(a.year.getValue()-1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._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(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,behaviors:b.behaviors,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.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:{type:"bi.horizontal_float",width:50,items:[{el:this.year}]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({ +appendChild(form),form.submit();return handler},xhr=null,sendFile}(Object.prototype.toString),sendFiles=function(a,b,c,d){var e=a.files.length,f=a.onload,g=a.onloadstart;for(a.current=0,a.total=0,a.sent=0;a.currentd.status||d.status>399)return BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void a.fireEvent(BI.File.EVENT_ERROR);var b=BI.some(c.attach_array,function(b,c){if(c.errorCode)return BI.Msg.toast(c.errorMsg,{level:"error"}),a.fireEvent(BI.File.EVENT_ERROR,c),!0});!b&&a.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},c.url=b.url,c.fileType=b.accept,c.attach_array=[],c.attach_names=[],c.attachNum=0},_events:function(a){var b=this;return event.add(a.dom.input,"change",function(){event.del(a.dom.input,"change",arguments.callee);for(var c=a.dom.input.cloneNode(!0),d=0,e=F(a.dom.input);d0&&b.fireEvent(BI.File.EVENT_CHANGE,{files:a.files}),c.value="",a.dom.input.parentNode.replaceChild(c,a.dom.input),a.dom.input=c,event.add(a.dom.input,"change",arguments.callee)}),a},_wrap:function(){var a=this.options,b=this.element[0];return a.multiple===!0&&this.element.attr("multiple","multiple"),b.value="",this._events({dom:{input:b,disabled:!1},name:b.name,maxSize:a.maxSize?a.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(a){if(a)for(var b in a)this[b]=a[b];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(a,b,c,d){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(a){this.wrap&&this.wrap.upload(a)},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(a){BI.File.superclass._setEnable.apply(this,arguments),a===!0?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||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=!1,c=null,d=!1,e=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),f=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){d=!1,b=e.ctrlKey||e.metaKey,c=e.keyCode,a.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(b){c=null,d&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,e(b.keyCode))}).on("input propertychange",function(b){var f=b.originalEvent;(BI.isNull(f.propertyName)||"value"===f.propertyName)&&(d=!0,a._keydown_=!0,e(c),c=null)}).click(function(a){a.stopPropagation(),f()}).mousedown(function(b){a.element.val(a.element.val())}).focus(function(b){a._focusDebounce()}).focusout(function(b){a._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(){function a(){if(b.isValid()||b.options.quitChecker.apply(b,[BI.trim(b.getValue())])===!1||(b.element.val(b._lastValidValue?b._lastValidValue:""),b._checkValidationOnValueChange(),b._defaultState()),b.element.removeClass("bi-input-focus"),b._isEditing=!1,b._start=!1,b.isValid()){var a=b._lastValidValue;b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM),b._lastValidValue!==a&&b.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){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)&&(this._pause!==!0||/(\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))),a==BI.KeyCode.ENTER&&(this.isValid()||this.options.quitChecker.apply(this,[BI.trim(this.getValue())])!==!1?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),a==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),a==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),a!=BI.KeyCode.BACKSPACE&&a!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN);var c=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()):a!==BI.KeyCode.BACKSPACE&&a!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===c||""===BI.trim(c)||(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 a=this.options,b=this.getValue();this.setValid(a.allowBlank===!0&&""==BI.trim(b)||BI.isNotEmptyString(BI.trim(b))&&(b===this._lastChangedValue||a.validationChecker.apply(this,[BI.trim(b)])!==!1))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!this._isEditing==!0&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");this._isEditing===!0&&(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(a){this.element.val(a),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(a){BI.Input.superclass._setEnable.apply(this,[a]),this.element[0].disabled=!a}}),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),BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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),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 a=this,b=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(b){a.radio=b},width:b.iconWidth,height:b.iconHeight}]}},_setEnable:function(a){BI.Radio.superclass._setEnable.apply(this,arguments),a===!0?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(a){BI.Radio.superclass.setSelected.apply(this,arguments),a?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),BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(a){var b=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(b,{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 a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();return b.textAlign="left",BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:"bi.center_adapt",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,maxWidth:"100%"}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.maxWidth=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})):"normal"==a.whiteSpace?(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),b.textAlign=a.textAlign,void(this.text=BI.createWidget(BI.extend(b,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(b,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var a=this.options,b="right"===a.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",c=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?void BI.createWidget({type:b,height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(c)}]}):void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})),void("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}))):(c.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(c.width=a.textWidth,void BI.createWidget({type:b,scrollable:"normal"===a.whiteSpace,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,element:this,items:[{el:this.text=BI.createWidget(c)}]})):BI.isNumber(a.height)&&a.height>0?("normal"!==a.whiteSpace&&this.element.css({"line-height":a.height-2*a.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(c,{element:this,hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap})))):(BI.extend(c,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.text=BI.createWidget(BI.extend(c,{maxWidth:"100%"})),void BI.createWidget({type:b,element:this,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(a){this.options.text=a,this.text.setText(a)},getText:function(){return this.options.text},setStyle:function(a){this.text.setStyle(a)},setValue:function(a){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}}),BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var a=this.options;return{type:"bi.html",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel),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 a=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:a.iconWidth,height:a.iconHeight}),BI.isNumber(a.height)&&a.height>0&&BI.isNull(a.iconWidth)&&BI.isNull(a.iconHeight)?(this.element.css("lineHeight",a.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),BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var a=this.options;return{type:"bi.text",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,value:a.value,py:a.py,keyword:a.keyword,highLight:a.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),BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var a=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var a=this.options;return{type:"bi.a",textAlign:a.textAlign,whiteSpace:a.whiteSpace,lineHeight:a.textHeight,text:a.text,keyword:a.keyword,value:a.value,py:a.py,href:a.href,target:a.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link),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 a=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:a,mousedown:a,mouseup:a,mouseover:a,mouseenter:a,mouseleave:a,mousemove:a}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var a=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+a.level,text:a.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(a){this.text.setText(a)}}),BI.shortcut("bi.bubble",BI.Bubble),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 a=this,b=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+b.level);var c=function(a){return a.stopPropagation(),a.stopEvent(),!1};this.element.bind({click:c,mousedown:c,mouseup:c,mouseover:c,mouseenter:c,mouseleave:c,mousemove:c});var d="close-font";switch(b.level){case"success":d="toast-success-font";break;case"error":d="toast-error-font";break;case"warning":d="toast-warning-font";break;case"normal":default:d="toast-message-font"}var e=[{type:"bi.icon_label",cls:d+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,textHeight:16,textAlign:"left"},rgap:b.autoClose?this._const.hgap:0}],f=[36,""];b.autoClose===!1&&(e.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){a.destroy()},width:36}),f.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:e,vgap:7,columnSize:f})},setText:function(a){this.text.setText(a)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:18})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var a=this.options;this.element.addClass("tooltip-"+a.level);var b=function(b){a.stopPropagation&&b.stopPropagation(),a.stopEvent&&b.stopEvent()};this.element.bind({click:b,mousedown:b,mouseup:b,mouseover:b,mouseenter:b,mouseleave:b,mousemove:b});var c=(a.text+"").split("\n");c.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(c,function(a,b){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:b,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,height:a.height,textHeight:a.height-2,hgap:this._const.hgap})},setWidth:function(a){this.element.width(a-2*this._const.hgap)},setText:function(a){this.text&&this.text.setText(a)},setLevel:function(a){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+a)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{value:e.value},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])},value:c.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},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(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),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(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent], +caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;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;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(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=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("
            • ")},makeDOMNodeMainBefore:function(a,b,c){a.push("
            • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
                "),c.push(d),c.push("
              ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c];if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={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"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0 +};return d},getTreeCheckedNodes:function(a,b,c,d){if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f=a.check.chkboxType,g=""===f.Y&&""===f.N;fullStyle="",b.chkDisabled===!0?fullStyle=d.DISABLED:b.halfCheck?fullStyle=d.PART:a.check.chkStyle==e.STYLE?fullStyle=b.check_Child_State<1?d.FULL:d.PART:fullStyle=b[c]?2===b.check_Child_State||b.check_Child_State===-1||g?d.FULL:d.PART:b.check_Child_State<1||g?d.FULL:d.PART;var h=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+fullStyle;return h=b.check_Focus&&b.chkDisabled!==!0?h+"_"+d.FOCUS:h,t.className.BUTTON+" "+d.DEFAULT+" "+h},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconCls,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconCls!==a&&(this.element.removeClass(b.iconCls).addClass(a),b.iconCls=a)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=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:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:b.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(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),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 a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconCls,once:b.once,iconWrapperWidth:b.iconWrapperWidth,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},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),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 a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,title:a.title||a.text,warningTitle:a.warningTitle,py:a.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(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 a=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:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.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.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var c=BI.createWidget({type:"bi.icon_label",width:24,cls:b.iconCls,iconWidth:b.iconWidth,iconHeight:b.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},{width:24,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},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(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=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:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,cls:"bi-list-item-none",id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.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(a){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=a?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),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),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 a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:24,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},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},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),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 a=this,b=this.options;this.checkbox=BI.createWidget({ +type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:12,el:{type:"bi.layout",cls:b.pNode&&b.pNode.isLastNode?"":"base-line-conn-background",width:12,height:b.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},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},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),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 a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:24,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,24),items:[c]})},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(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),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 a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.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),BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:b.text,value:b.value,ref:function(){a.text=this}},left:b.lgap,right:b.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(a){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(a)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=BI.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=BI.Date._MD.slice(0);i[1]=BI.isLeapYear(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay();var j=(7-BI.StartOfWeek+e.FDay)%7;e.PDay=i[0===b?11:b-1]-j+1,e.NDay=1;var k=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=j&&a=0?c%12:(12+c%12)%12;return{year:BI.getDate().getFullYear()+d,month:e+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[],e=BI.parseDateTime(b.min,"%Y-%X-%d"),f=BI.parseDateTime(b.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var b={};BI.checkDateVoid(c+a,1,1,BI.print(BI.getDate(e.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(f.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(b.disabled=!0),b.text=c+a,d.push(b)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=BI.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=BI.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(a){var b=BI.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?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),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(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),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(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),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 a=this,b=this.options;this.editor=BI.createWidget(b.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){a.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(a){this.editor.setValue(a),this.farbtastic.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:""})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:b.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(b){a.trigger=b},width:b.width,height:b.height},b.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(b){a.colorPicker=b},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){c(),a._isRGBColor(a.colorPicker.getValue())||a.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){c(),a.combo.hideView()}}]},b.popup),stopPropagation:!0,width:230},value:b.value});var c=function(){var b=a.colorPicker.getValue();a.trigger.setValue(b)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var a=this,b=this.options;this.colorEditor=BI.createWidget(b.editor,{type:b.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:b.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){a.setValue(this.getValue()),a._dealStoreColors(),a.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:b.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:b.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){a.setValue(this.getValue()[0]),a._dealStoreColors(),a.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:b.editor});var c=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:c}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a.customColorChooser.setValue(a.getValue())}),c.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.more.hideView();break;case 1:a.setValue(a.customColorChooser.getValue()),a._dealStoreColors(),a.more.hideView(),a.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:!b.disabled,ref:function(){a.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_setEnable:function(a){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!a)},_dealStoreColors:function(){var a=this.getValue(),b=this._getStoreColors(),c=new BI.Queue(8);c.fromArray(b),c.remove(a),c.unshift(a);var d=c.toArray();BI.Cache.setItem("colors",BI.array2String(d)),this.setStoreColors(d)},_digestStoreColors:function(a){var b=BI.map(a,function(a,b){return{value:b}});return BI.count(a.length,8,function(a){b.push({value:"",disabled:!0})}),b},_getStoreColors:function(){var a=this,b=this.options,c=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(c,function(c,d){return!b.simple||a._isRGBColor(d)})},_isRGBColor:function(a){return BI.isNotEmptyString(a)&&"transparent"!==a},setStoreColors:function(a){BI.isArray(a)&&this.storeColors.populate([this._digestStoreColors(a)])},setValue:function(a){this.colorEditor.setValue(a),this.colorPicker.setValue(a),this.storeColors.setValue(a)},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),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 a=this,b=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:b.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){a.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(a){this.popup.setStoreColors(a)},setValue:function(a){this.popup.setValue(a)},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),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:b.container,value:b.value,width:b.width,height:b.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser),BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_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 a=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:a,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(a){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===a?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":a}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger),BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var a=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-chooser-trigger bi-border",height:24})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var a=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(b){a.changeIcon=b},iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(b){a.label=b},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var b=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:b,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(a){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===a?(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"===a?(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":a}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger),BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var a=this,b=this.options;if(b.value){this.element.css("background-color",b.value);var c=this.getName();this.element.hover(function(){a._createMask(),a.isEnabled()&&BI.Maskers.show(c)},function(){a.isSelected()||BI.Maskers.hide(c)})}},_createMask:function(){var a=this.options,b=this.getName();if(this.isEnabled()&&!BI.Maskers.has(b)){var c=BI.Maskers.make(b,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}});c.element.addClass("color-picker-button-mask").css("background-color",a.value)}},setSelected:function(a){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),a&&this._createMask(),BI.Maskers[a?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton),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:"#bce2e8"},{value:"#85d3cd"},{value:"#bce2e8"},{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 a=this,b=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(b.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:b.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(a){var b=[].slice.call(arguments);b[0]=BI.createItems(a,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,b)},setValue:function(a){this.colors.setValue(a)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),d(a.storeValue.r)&&d(a.storeValue.g)&&d(a.storeValue.b)&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[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()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#ffffff"),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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()?(a.lastColor=a.getValue(),a.setValue("transparent")):("transparent"===a.lastColor&&(a.lastColor=""),a.setValue(a.lastColor||"#ffffff")),(a.R.isValid()&&a.G.isValid()&&a.B.isValid()||a._isEmptyRGB())&&(a.colorShow.element.css("background-color",a.getValue()),a.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:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){""===a?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===a?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":a}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(a){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){if("transparent"===a)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:""});a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.storeValue={r:BI.isNull(b.r)?"":b.r,g:BI.isNull(b.r)?"":b.g,b:BI.isNull(b.r)?"":b.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),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 a=this,b=(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 c=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),d=function(a){return BI.isNumeric(a)&&(0|a)>=0&&(0|a)<=255},e=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:d,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:b.REB_WIDTH,height:20});BI.each(e,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a._checkEditors(),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=e[0],this.G=e[1],this.B=e[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:c[0],width:20},{el:this.R,width:b.REB_WIDTH},{el:c[1],width:20},{el:this.G,width:b.REB_WIDTH},{el:c[2],width:20},{el:this.B,width:b.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(a){this.colorShow.element.css({"background-color":a});var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.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),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 a=this;return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(b){a.colorWrapper=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(b){a.wheel=b}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(b){a.overlay=b}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.hMarker=b},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(b){a.slMarker=b},scrollable:!1,width:17,height:17}}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this.setValue(a.value)},_unpack:function(a){return 7===a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4===a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},_pack:function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},_setColor:function(a){var b=this._unpack(a);this.value!==a&&b&&(this.value=a,this.rgb=b,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(a){return this.hsl=a,this.rgb=this._HSLToRGB(a),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this._hueToRGB(b,c,d+.33333),this._hueToRGB(b,c,d),this._hueToRGB(b,c,d-.33333)]},_hueToRGB:function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},_RGBToHSL:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},_updateDisplay:function(){var a=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(a)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(a)*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(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var c=this._absolutePosition(a.offsetParent);b.x+=c.x,b.y+=c.y}return b},_widgetCoords:function(a){var b,c,d=a.target||a.srcElement,e=this.wheel.element[0];if("undefined"!=typeof a.offsetX){for(var f={x:a.offsetX,y:a.offsetY},g=d;g;)g.mouseX=f.x,g.mouseY=f.y,f.x+=g.offsetLeft,f.y+=g.offsetTop,g=g.offsetParent;for(var g=e,h={x:0,y:0};g;){if("undefined"!=typeof g.mouseX){b=g.mouseX-h.x,c=g.mouseY-h.y;break}h.x+=g.offsetLeft,h.y+=g.offsetTop,g=g.offsetParent}for(g=d;g;)g.mouseX=void 0,g.mouseY=void 0,g=g.offsetParent}else{var f=this._absolutePosition(e);b=(a.pageX||0)-f.x,c=(a.pageY||0)-f.y}return{x:b-this.constants.WIDTH/2,y:c-this.constants.WIDTH/2}},_doMouseMove:function(a){var b=this._widgetCoords(a);if(this.circleDrag){var c=Math.atan2(b.x,-b.y)/6.28;c<0&&(c+=1),this._setHSL([c,this.hsl[1],this.hsl[2]])}else{var d=Math.max(0,Math.min(1,-(b.x/this.constants.SQUARE)+.5)),e=Math.max(0,Math.min(1,-(b.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],d,e])}},doClick:function(a){var b=this._widgetCoords(a);return this.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>this.constants.SQUARE,this._doMouseMove(a),!1},setValue:function(a){this._setColor(a)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),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 a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,container:b.container,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.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),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.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 a=this.options,b=this,c=[];return BI.each(a.buttons,function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:24,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:c}]})},_createView:function(){var a=this.options,b=BI.createWidget({type:"bi.button_group",items:[a.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return b.element.css("min-height",a.minHeight-44),b}}),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,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var a=this,b=this.options,c=BI.map(b.buttons,function(b,c){return BI.isWidget(c)?c:BI.extend({type:"bi.button",height:24,handler:function(b){a.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,b)}},c)});return{type:"bi.bubble_bar_popup_view",ref:function(){a.popup=this},el:{type:"bi.label",text:b.text,whiteSpace:"normal",textAlign:"left",ref:function(){a.text=this}},buttons:c}},populate:function(a){this.text.setText(a||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,value:b.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),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 a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconCls:b.iconCls,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,value:b.value}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),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 a=this.options,b="";BI.isKey(a.value)&&(b=this._digest(a.value,a.items)),this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b,disableSelected:!0,width:a.isShowDown?a.width-12:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight,selected:BI.isNotEmptyString(b)}),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(b)}),this.down.setVisible(a.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(a,b){var c="";return a=BI.isArray(a)?a[0]:a,BI.any(b,function(b,d){if(a===d.value)return c=d.iconCls,!0}),c},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c=this._digest(a,this.options.items);a=BI.isArray(a)?a[0]:a,BI.isNotEmptyString(c)?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:b.items,height:b.height,text:b.text,iconCls:b.iconCls,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth,title:b.title,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items,value:b.value,iconHeight:b.iconHeight,iconWidth:b.iconWidth,iconWrapperWidth:b.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this.setValue(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:a.behaviors,value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a,b){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var c=this.options;a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:c.iconWrapperWidth,iconHeight:c.iconHeight,iconWidth:c.iconWidth}),this.popup.populate(a,b)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),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 a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,adjustLength:2,toggle:!1,ref:function(){a.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){a.trigger=this},items:b.items,height:b.height-2,text:b.text,value:b.value,tipType:b.tipType,warningTitle:b.warningTitle,title:b.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:b.value,items:b.items,ref:function(){a.popup=this,a.trigger.getSearcher().setAdapter(a.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){a.setValue(this.getValue()),a.combo.hideView(),a.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:b.value,maxHeight:252},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){a.triggerBtn=this},width:b.height,height:b.height,handler:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var a=this.options;BI.isKey(a.value)&&this._checkError(a.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(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(a){this.options.items=a,this.combo.populate(a)},setValue:function(a){this.combo.setValue(a),this._checkError(a)},getValue:function(){var a=this.combo.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo),BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var a=this,b=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){a.popup=this},items:BI.createItems(b.items,{type:"bi.single_select_item",textAlign:b.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,c,d)}}]}]}},mounted:function(){this.check()},populate:function(a,b,c){var d=BI.concat(a,b);BI.SearchTextValueComboPopup.superclass.populate.apply(this,d),d=BI.createItems(d,{type:"bi.single_select_item",height:24}),this.popup.populate(d,c)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup),BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){a.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){a.editor=this},text:this._digest(b.value,b.items),value:b.value,height:b.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(a,c){var d=a.keyword,e=BI.Func.getSearchResult(b.items,d),f=e.match,g=e.find;c(g,f)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(a){this.editor.setState(a)},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(a){this.options.items=a},setValue:function(a){this._setState(this._digest(a,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),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments); +var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text,value:b.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items,value:b.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),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 a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:b.items,height:b.height,text:b.text,value:b.value,warningTitle:b.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,value:b.value,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}}),BI.isKey(b.value)&&this._checkError(b.value)},_checkError:function(a){if(BI.isNotNull(a)){a=BI.isArray(a)?a:[a];var b=BI.find(this.options.items,function(b,c){return BI.contains(a,c.value)});BI.isNull(b)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a),this._checkError(a)},getValue:function(){var a=this.popup.getValue();return BI.isNull(a)?[]:BI.isArray(a)?a:[a]},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:b.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:24}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}],value:a.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:24}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),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 a=this,b=this.options;this._createValueMap();var c;BI.isNotNull(b.value)&&(c=this._digest(b.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:b.height,items:b.items,text:b.text,value:c}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,value:BI.isNull(c)?[]:[c],items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var b=a.combo.getValue()[0].value;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var b=a.combo.getValue()[0].childValue;b!==a.value&&(a.setValue(b),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},_digest:function(a){return this.value=a,this.valueMap[a]},setValue:function(a){a=this._digest(a),this.combo.setValue([a]),this.trigger.setValue(a)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text,value:BI.isNull(a.value)?"":a.value.childValue||a.value.value})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a.childValue||a.value)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker,value:b.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(b.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:b.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]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.text.setStyle(a)},setValue:function(a){var b=this.options;this.editor.setValue(a),this._checkText(),BI.isKey(b.keyword)&&this.text.doRedMark(b.keyword)},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(a.keyword)&&this.text.doRedMark(a.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},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(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),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),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text tip-text-style",textAlign:"left",height:b.height,text:b.text,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")},title:BI.isNotNull(b.tipText)?b.tipText:function(){var b="";return BI.isString(a.stateValue)&&(b=a.stateValue),BI.isArray(a.stateValue)&&1===a.stateValue.length&&(b=a.stateValue[0]),b},warningTitle:b.warningTitle,tipType:b.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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.options.disabled===!1&&(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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=a,BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("state-editor-infinite-text"))))},setTipType:function(a){this.text.options.tipType=a}}),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),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value, +validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text",textAlign:"left",text:b.text,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.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(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(b.text)&&this.setState(b.text)},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()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},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(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){var b=this.options;return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(b.text),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),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),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{_baseCls:(a._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(c,{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(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.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:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded(),a.check()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.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(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{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(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 a=this,b=this.options;return[{type:"bi.label",text:b.text,height:b.height,value:b.value,hgap:b.hgap,ref:function(){a.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){a.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(a){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),a?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var a=this,b=this.options;return{type:"bi.button_group",items:BI.createItems(b.items,{type:"bi.linear_segment_button",height:b.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){a.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.buttonGroup=this}}},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),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 a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(b.value)&&this.setValue(b.value)},_checkAllSelected:function(){var a=this.list.getValue().length,b=this.getAllLeaves().length-a,c=this.list.hasNext(),d=this.toolbar.isSelected(),e=a>0&&(b>0||!d&&c);e=e||b>0&&c&&d,this.toolbar.setHalfSelected(e),!e&&this.toolbar.setSelected(a>0&&b<=0&&(!c||d))},setAllSelected:function(a){BI.each(this.getAllButtons(),function(b,c){(c.setSelected||c.setAllSelected).apply(c,[a])}),this.allSelected=!!a,this.toolbar.setSelected(a),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(a){this.toolbar.setVisible(a)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){var b=a.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(b),this.list[b?"setNotSelectedValue":"setValue"](a.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{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(a){this.toolbar.setVisible(!BI.isEmptyArray(a)),this.toolbar.setEnable(!BI.isEmptyArray(a)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(a){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(a)},resetHeight:function(a){var b=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(a-b):this.list.element.css({"max-height":a-b+"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(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),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:{}})},_init:function(){var a=this,b=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var c=b.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:b.el,itemsCreator:function(b,c){c(a._getNextItems(b))},hasNext:function(a){return a.count=1),this.setPagerVisible(a>1)},setValue:function(a){this.pager.setValue(a)},setVPage:function(a){this.pager.setValue(a)},setCount:function(a){this.rowCount.setText(a),this.rowCount.setTitle(a)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(a){this.editor.setVisible(a),this.allPages.setVisible(a),this.pager.setVisible(a)},populate:function(){this.pager.populate(),this.setPagerVisible(this.options.pages>1)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager),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 a=this.options;a.vertical,a.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 a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev column-pre-page-h-font"},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 direction-pager-next column-next-page-h-font"},hasPrev:c.hasPrev,hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.vlabel.setValue(this.getCurrentPage()),a.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var a=this,b=this.options,c=b.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:c.curr,title:c.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:c.pages,curr:c.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 direction-pager-prev row-pre-page-h-font"},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 direction-pager-next row-next-page-h-font"},hasPrev:c.hasPrev, +hasNext:c.hasNext,firstPage:c.firstPage,lastPage:c.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){a.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){a.hlabel.setValue(this.getCurrentPage()),a.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(a){this.vpager.setValue(a),this.vlabel.setValue(a),this.vlabel.setTitle(a)},setHPage:function(a){this.hpager.setValue(a),this.hlabel.setValue(a),this.hlabel.setTitle(a)},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(a){this.hpager.setVisible(a),this.hlabel.setVisible(a)},setVPagerVisible:function(a){this.vpager.setVisible(a),this.vlabel.setVisible(a)},populate:function(){this.vpager.populate(),this.hpager.populate();var a=!1,b=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),b=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),a=!0):this.setVPagerVisible(!1),this.setVisible(b||a);var c=[86,110,0,24],d=this.layout.attr("items");a===!0&&b===!0?(d[0].right=c[0],d[1].right=c[1],d[2].right=c[2],d[3].right=c[3]):a===!0?(d[0].right=c[2],d[1].right=c[3]):b===!0&&(d[2].right=c[2],d[3].right=c[3]),this.layout.attr("items",d),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),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 a=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){a._lock=!1},300),this._populate()},_populate:function(){var a=this,b=this.options,c=[],d={};this.empty();var e=BI.result(b,"pages"),f=BI.result(this,"currPage"),g=BI.result(b,"groups"),h=BI.result(b,"first"),i=BI.result(b,"last"),j=BI.result(b,"prev"),k=BI.result(b,"next");e===!1?(g=0,h=!1,i=!1):g>e&&(g=e),d.index=Math.ceil((f+(g>1&&g!==e?1:0))/(0===g?1:g)),(!b.dynamicShow&&!b.dynamicShowPrevNext||f>1)&&j!==!1&&(BI.isKey(j)?c.push({text:j,value:"prev",disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)}):c.push(BI.extend({disabled:e===!1?b.hasPrev(f)===!1:!(f>1&&j!==!1)},j))),(!b.dynamicShow&&!b.dynamicShowFirstLast||d.index>1&&0!==g)&&h&&(c.push({text:h,value:"first",disabled:!(d.index>1&&0!==g)}),d.index>1&&0!==g&&c.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),d.poor=Math.floor((g-1)/2),d.start=d.index>1?f-d.poor:1,d.end=d.index>1?function(){var a=f+(g-d.poor-1);return a>e?e:a}():g,d.end-d.start1&&0!==g&&e>g&&d.endg&&d.endg&&d.endg&&d.end1},hasNext:function(a){a||(a=1);var b=this.options,c=this.options.pages;return c===!1?b.hasNext(a):ac?c:(d=BI.result(b,"firstPage"),ab.pages?b.pages:a,this.currPage=a;this._populate()},getValue:function(){var a=this.button_group.getValue()[0];switch(a){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return a}},attr:function(a,b){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===a&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:a.height,whiteSpace:a.whiteSpace,text:a.text,value:a.value,hgap:a.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(a){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(a)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:b.value,items:BI.createItems(b.items,{type:"bi.segment_button",height:b.height-2,whiteSpace:b.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Segment.EVENT_CHANGE,b,c)})},_setEnable:function(a){BI.Segment.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},setValue:function(a){this.buttonGroup.setValue(a)},setEnabledValue:function(a){this.buttonGroup.setEnabledValue(a)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(a){return a.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.selected===!0,d=!b.selected&&b.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())},selected:c,invisible:d}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)},invisible:c||!d}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,a.isSelected(),a)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,a.isSelected(),a)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:b.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(a){this.checkbox.setSelected(!!a)},beforeClick:function(){var a=this.isHalfSelected(),b=this.isSelected();a===!0?this.setSelected(!0):this.setSelected(!b)},setSelected:function(a){this.checkbox.setSelected(a),this.setHalfSelected(!1)},setHalfSelected:function(a){this.halfSelected=!!a,a===!0?(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(a){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var b=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(b),!b&&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),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(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};BI.isKey(f.id)||(f.id=BI.UUID()),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.mid_plus_group_node",e===a.length-1&&(g.type="bi.last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_assertId:function(a){BI.each(a,function(a,b){BI.isKey(b.id)||(b.id=BI.UUID())})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},c.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},c.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.LevelTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.tree.stroke.apply(this.tree,arguments)},populate:function(a,b){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a,b)},setValue:function(a){this.tree.setValue(a)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),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(){function a(a,b){return!1}var b={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return b},_dealWidthNodes:function(a){a=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree),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(){function a(a,b){return!1}function b(a,b){return b.isLeaf?{}:{color:"#999999"}}var c={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:b},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:a}};return c},_dealWidthNodes:function(a){a=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(a,function(a,b){b.isParent=b.isParent||b.parent,null==b.text&&b.count>0&&(b.text=b.value+"("+BI.i18nText("BI-Basic_Altogether")+b.count+BI.i18nText("BI-Basic_Count")+")")}),a},initTree:function(a,b){var b=b||this._configSetting();this.nodes=$.fn.zTree.init(this.tree.element,b,a)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),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 a=this,b=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(c,d){var e=function(b){d({items:b}),a.structure.initTree(BI.Tree.transformToTreeFormat(b))};BI.isNotNull(b.items)?e(b.items):b.itemsCreator(c,e)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(b.items)&&this.populate(),BI.isNotNull(b.value)&&this.setValue(b.value)},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},_digest:function(a){a||(a=[]);var b=this,c={},d=[];return BI.each(a,function(a,e){var f=b.structure.search(e,"value");if(f){var g=f;for(g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++);g&&g.getChildrenLength()<=c[g.value];)d.push(g.value),g=g.getParent(),g&&(c[g.value]||(c[g.value]=0),c[g.value]++)}}),BI.makeObject(a.concat(d))},setValue:function(a){this.tree.setValue(this._digest(a))},_getValue:function(){var a=[],b=this.tree.getValue(),c=function(b){BI.each(b,function(b,d){BI.isEmpty(d)?a.push(b):c(d)})};return c(b),a},empty:function(){this.tree.empty()},getValue:function(){var a=this,b=[],c=this._getValue();return BI.each(c,function(c,d){var e=a.structure.search(d,"value");e&&a.structure._traverse(e,function(a){a.isLeaf()&&b.push(a.value)})}),b}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this,b=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText,title:function(){return a.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:b.triggerWidth||b.height},width:b.triggerWidth||b.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(a){this.editor.setValue(a)},setText:function(a){this.editor.setState(a)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-trigger",el:{},height:24})},_init:function(){var a=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(a.el,{type:"bi.trigger_icon_button",element:this,width:a.width,height:a.height})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(b){a.wrapper=b},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.iconWrapperWidth||b.height},{el:this.text,lgap:BI.isEmptyString(b.iconCls)?5:0},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a)},setIcon:function(a){var b=this.options;this.icon.setIcon(a);var c=this.wrapper.attr("items")[0],d=this.wrapper.attr("items")[1];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,d.lgap=5,this.wrapper.resize()):c.width!==(b.iconWrapperWidth||b.height)&&(c.width=b.iconWrapperWidth||b.height,d.lgap=0,this.wrapper.resize())},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger),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 a=this.options,b=this._digist(a.value,a.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:b.text,iconCls:b.iconCls,height:a.height,iconHeight:a.iconHeight,iconWidth:a.iconWidth,iconWrapperWidth:a.iconWrapperWidth})},_digist:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d,e=BI.Tree.transformToArrayFormat(b);return BI.any(e,function(b,c){if(BI.deepContains(a,c.value))return d={text:c.text||c.value,iconCls:c.iconCls},!0}),BI.isNotNull(d)?{text:d.text,iconCls:d.iconCls}:{text:c.text,iconCls:c.iconCls}},setValue:function(a){var b=this._digist(a,this.options.items);this.trigger.setText(b.text),this.trigger.setIcon(b.iconCls)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger),BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:24})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label",textAlign:"left",height:b.height,text:b.text,title:function(){return a.text.getText()},tipType:b.tipType,warningTitle:b.warningTitle,hgap:c.hgap,readonly:b.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:b.triggerWidth||b.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setText:function(a){this.text.setText(a)},setTipType:function(a){this.text.options.tipType=a}}),BI.shortcut("bi.text_trigger",BI.TextTrigger),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 a=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:a.height,readonly:a.readonly,text:this._digest(a.value,a.items),tipType:a.tipType,warningTitle:a.warningTitle})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):BI.isFunction(c.text)?c.text():c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},setTipType:function(a){this.trigger.setTipType(a)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger),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 a=this.options,b=this._digest(a.text,a.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2,text:b.text,cls:b.cls})},_digest:function(a,b){var c=this.options;a=BI.isArray(a)?a:[a];var d=[],e=BI.Tree.transformToArrayFormat(b);return BI.each(e,function(b,c){BI.deepContains(a,c.value)&&!BI.contains(d,c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?{cls:"",text:d.join(",")}:{cls:"bi-water-mark",text:c.text}},setValue:function(a){var b=this._digest(a,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(b.cls),this.trigger.setText(b.text)},populate:function(a){this.options.items=a}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger),BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var a=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:a.triggerWidth||a.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:a.triggerWidth||a.height}]})},setValue:function(a){this.text.setValue(a)},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:b.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(){a.combo.hideView(),a.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo),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 a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:b.behaviors,min:b.min,max:b.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.doBehavior()})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo),BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var a=this,b=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===a._month?a.setValue({year:a.year.getValue()-1,month:12}):a.setValue({year:a.year.getValue(),month:a.month.getValue()-1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._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===a._month?a.setValue({year:a.year.getValue()+1,month:1}):a.setValue({year:a.year.getValue(),month:a.month.getValue()+1}),a.fireEvent(BI.DatePicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:b.behaviors,min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:b.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){a.setValue({year:a.year.getValue(),month:a.month.getValue()}),a.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 a=this.options,b=!(1===this._month&&this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(12===this._month&&this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=BI.parseInt(a.year),this._month=BI.parseInt(a.month),this.year.setValue(a.year),this.month.setValue(a.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),BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=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(){a.setValue(a.year.getValue()-1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._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(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,behaviors:b.behaviors,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.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:{type:"bi.horizontal_float",width:50,items:[{el:this.year}]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({ type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:1});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.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(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.calendar,left:5,right:5},{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),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(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear();var c=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),d=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:[c,d]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();c.setEnable(!b.isFrontYear()),d.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;a=BI.parseInt(a);var c=BI.parseDateTime(b.min,"%Y-%X-%d"),d=BI.parseDateTime(b.max,"%Y-%X-%d");BI.checkDateVoid(a,1,1,BI.print(BI.getDate(c.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(d.getFullYear(),0,1),"%Y-%X-%d"))[0]?(a=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime={year:b.year,month:b.month},0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(b.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(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){this._setDatePicker(a),this._setCalendar(a)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDatePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDatePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateCombo.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options,c=BI.getDate();this.storeValue=BI.isNotNull(b.value)?b.value:{year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:b.minDate,max:b.maxDate,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value}),a.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){a.storeValue=a.popup.getValue(),a.setValue(a.storeValue),a.hidePopupView(),a.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.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(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var d=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});d.on(BI.IconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()||a.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:d,top:0,right:0}]}]})},setValue:function(a){this.storeValue=a,this.popup.setValue(a),this.trigger.setValue(a)},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),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 a=this,b=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(){a.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(){a.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.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(b){a.timeSelect=b}}]},height:50},{el:this.dateButton,height:30}]}),this.setValue(b.value)},setValue:function(a){var b,c=a;BI.isNull(c)?(b=BI.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}),this.timeSelect.setValue({hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()})):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.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),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 a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,width:a.width,hgap:b.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text},{el:BI.createWidget(),width:a.height}]}),this.setValue(a.value)},_printTime:function(a){return a<10?"0"+a:a},setValue:function(a){var b,c=a;if(BI.isNull(c))c=BI.getDate(),b=BI.print(c,"%Y-%X-%d %H:%M:%S");else{var d=BI.getDate(c.year,c.month-1,c.day,c.hour,c.minute,c.second);b=BI.print(d,"%Y-%X-%d %H:%M:%S")}this.text.setText(b),this.text.setTitle(b)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger),BI.StaticDateTimePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:b.behaviors,min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getMonthDays(BI.getDate(b.year,b.month-1,1)),d=a.selectedTime.day||0;d>c&&(d=c),a.selectedTime=BI.extend(a.selectedTime,{year:b.year,month:b.month,day:d}),0!==d&&(a.selectedTime.day=d),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime)),a.calendar.setValue(a.selectedTime),0!==d&&a.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(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.calendar.empty(),a.setValue(a.selectedTime),a.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(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){a.selectedTime=BI.extend(a.calendar.getValue(),a.timeSelect.getValue()),a.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(b.selectedTime)},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()+1}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=BI.extend({},this.timeSelect.getValue(),a)},_setDatePicker:function(a){BI.isNull(a)||BI.isNull(a.year)||BI.isNull(a.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(a)},_setCalendar:function(a){BI.isNull(a)||BI.isNull(a.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(a)},setValue:function(a){a=a||{},this._setDatePicker(a),this._setCalendar(a),this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_time_pane_card",BI.StaticDateTimePaneCard),BI.DynamicDateTimePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this,b=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 b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()});break;case BI.DynamicDateTimePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a.switcher=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDateTimePane.Static,cardCreator:function(c){switch(c){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",behaviors:b.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDateTimePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._checkValue(a.getValue())&&a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateTimePane.Static,c=a.value||a;switch(this.switcher.setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateTimePane.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateTimePane.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()+1})}else this.ymd.setValue(c)}},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}),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 a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:b.stopPropagation,maxHeight:1e3,minWidth:140}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(a){this.downlistcombo.showView(a)},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},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),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 a=this.options,b=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:a.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:a.value}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(a){this.downlistgroup.setValue(a)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup),BI.DownListItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this.options;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:a.textHgap,vgap:a.textVgap,lgap:a.textLgap,rgap:a.textRgap,text:a.text,value:a.value,keyword:a.keyword,height:a.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:36,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),BI.extend(a.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),BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var a=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.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 a=this.options,b=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:a.text,value:a.value,height:a.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:a.iconCls1,width:36,disableSelected:!0,selected:this._digest(a.value)}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:24,forceNotSelected:!0});var c=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(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,c)})))),this.element.hover(function(){b.isEnabled()&&b.hover()},function(){b.isEnabled()&&b.dishover()})},_digest:function(a){var b=this.options;return a=BI.isArray(a)?a:[a],BI.any(a,function(a,c){return BI.contains(b.childValues,c)})},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(a){this.icon1.setSelected(this._digest(a))}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem),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 a=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options,c=this._createChildren(this.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])?(d=a.childValueMap[b],a.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,d,a.fatherValueMap[b])):a.fireEvent(BI.DownListPopup.EVENT_CHANGE,d,c),!BI.contains(a.singleValues,d)){var e=a.getValue(),f=[];BI.each(e,function(a,b){b.value!=d&&f.push(b)}),a.setValue(f)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createChildren:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.isDefaultInit=!0,c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5,maxHeight:378},c.el.childValues=[],BI.each(c.children,function(a,d){var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value)})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=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});c.push(g)}}),c},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a0?1:0}},setValue:function(a){a=a||{},this.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT;var b=[],c=[];BI.isNotNull(a.year)&&(b.push(BI.DynamicDateCard.TYPE.YEAR),c.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))),BI.isNotNull(a.quarter)&&(b.push(BI.DynamicDateCard.TYPE.QUARTER),c.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))),BI.isNotNull(a.month)&&(b.push(BI.DynamicDateCard.TYPE.MONTH),c.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))),BI.isNotNull(a.week)&&(b.push(BI.DynamicDateCard.TYPE.WEEK),c.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,a.week))),BI.isNotNull(a.day)&&(b.push(BI.DynamicDateCard.TYPE.DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,a.day))),BI.isNotNull(a.workDay)&&(b.push(BI.DynamicDateCard.TYPE.WORK_DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,a.workDay))),this.checkgroup.setValue(b),this.workDayBox.setSelected(BI.isNotNull(a.workDay)),this.resultPane.populate(this._getParamJson(c,a.position))},getValue:function(){var a=this,b={},c=this.checkgroup.getValue(),d=this.resultPane.getAllButtons();if(0!==c.length&&BI.each(d,function(c,d){var e=d.getValue();switch(e.dateType){case BI.DynamicDateCard.TYPE.YEAR:b.year=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.QUARTER:b.quarter=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.MONTH:b.month=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.WEEK:b.week=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.DAY:b.day=0===e.offset?-e.value:e.value}BI.isNull(e.dateType)&&(b.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var e=d[0].getValue();b.workDay=0===e.offset?-e.value:e.value}return b}}),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}}),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 a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:b.minDate,max:b.maxDate,format:b.format,allowEdit:b.allowEdit,watermark:b.watermark,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate()}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.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:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},_defaultState:function(){},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(a){return BI.isNaturalNumber(a)},value:b.value,ref:function(){a.editor=this},errorText:function(a){return BI.isEmptyString(a)?BI.i18nText("BI-Basic_Please_Input_Content"):BI.i18nText("BI-Please_Input_Natural_Number")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:b.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(){a.offsetCombo=this},container:null,value:b.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var a="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:a=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:a=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:a=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:a=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:a=BI.i18nText("BI-Basic_Day");break;case BI.DynamicDateCard.TYPE.WORK_DAY:default:a=BI.i18nText("BI-Basic_Work_Day")}return a},setValue:function(a){a=a||{},a.value=a.value||0,a.offset=a.offset||0,this.editor.setValue(a.value),this.offsetCombo.setValue(a.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),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 a=this,b=this.options,c=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:c.buttonHeight-1,listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){a.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),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),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2]}}}a.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.getDate();e=BI.DynamicDateHelper.getCalculation(c);var f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[0,1,2],d=this._getFormatString().match(/%./g);BI.each(d,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":default:c[2]=a}});var e=BI.parseDateTime(a,this._getFormatString());BI.print(e,this._getFormatString())===a&&(a=BI.print(e,b.compareFormat),c=[0,1,2]);var f=a.match(/\d+/g),g=[];return BI.each(f,function(a){g[a]=f[c[a]]}),g.length===c.length&&2===g[0].length?BI.print(BI.parseDateTime(g.join("-"),b.compareFormat),b.compareFormat):g.join("-")},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,this._getFormatString()),this._const.compareFormat);return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,this._getFormatString()),c=BI.print(b,this._const.compareFormat);return b.getMonth()>=0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),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),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",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:b.height,height:b.height,ref:function(){a.changeIcon=this}},width:b.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:b.minDate,max:b.maxDate,allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,height:b.height,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){a.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:c.getFullYear(),month:c.getMonth()+1}},a.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:b.behaviors,min:b.minDate,max:b.maxDate,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1,day:b.getDate(),hour:0,minute:0,second:0}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var b=a.popup.getValue();a._checkValue(b)&&a.setValue(b),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:b.height,height:b.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(){a.triggerBtn=this}},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=this.options,c=null;switch(BI.isNotNull(a)&&(c=a.type),c){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=b.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(a){switch(a.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(a.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},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_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",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}),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 a=this,b=this.options,c=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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.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:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.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(c){switch(c){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",behaviors:b.behaviors,min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){a.timeSelect=this}},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate()}),a.timeSelect.setValue(),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%X-%d"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();return{type:a,value:a===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),BI.DynamicDateTimeSelect=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-select"},render:function(){var a=this;return{type:"bi.center_adapt",items:[{type:"bi.vertical_adapt",items:[{el:{type:"bi.number_editor",ref:function(){a.hour=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<24},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkHour(b),this.setValue(a._formatValueToDoubleDigit(b)),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.HOUR);this.setValue(b)}}],width:60,height:24}},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.minute=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkMinute(b),this.setValue(a._formatValueToDoubleDigit(b),BI.DynamicDateTimeSelect.MINUTE),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.MINUTE);this.setValue(b)}}],width:60,height:24},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.second=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(a){return BI.isNumeric(a)?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 b=this.getValue();a._checkSecond(b),this.setValue(a._formatValueToDoubleDigit(b)),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}}],width:60,height:24}]}]}},_checkBorder:function(a){a=a||{},this._checkHour(a.hour),this._checkMinute(a.minute),this._checkSecond(a.second)},_checkHour:function(a){this.hour.setDownEnable(BI.parseInt(a)>0),this.hour.setUpEnable(BI.parseInt(a)<23)},_checkMinute:function(a){this.minute.setDownEnable(BI.parseInt(a)>0),this.minute.setUpEnable(BI.parseInt(a)<59)},_checkSecond:function(a){this.second.setDownEnable(BI.parseInt(a)>0),this.second.setUpEnable(BI.parseInt(a)<59)},_autoSwitch:function(a,b){var c=0,d=a+"";switch(b){case BI.DynamicDateTimeSelect.HOUR:c=2;break;case BI.DynamicDateTimeSelect.MINUTE:c=5}if(1===d.length&&BI.parseInt(d)>c&&(d="0"+d),2===d.length)switch(b){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 d},_formatValueToDoubleDigit:function(a){(BI.isNull(a)||BI.isEmptyString(a))&&(a=0);var b=BI.parseInt(a);return b<10&&(b="0"+b),b},_assertValue:function(a){return a=a||{},a.hour=this._formatValueToDoubleDigit(a.hour)||"00",a.minute=this._formatValueToDoubleDigit(a.minute)||"00",a.second=this._formatValueToDoubleDigit(a.second)||"00",a},getValue:function(){return{hour:BI.parseInt(this.hour.getValue()),minute:BI.parseInt(this.minute.getValue()),second:BI.parseInt(this.second.getValue())}},setValue:function(a){a=this._assertValue(a),this.hour.setValue(a.hour),this.minute.setValue(a.minute),this.second.setValue(a.second),this._checkBorder(a)}}),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}),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 a=this,b=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(c){var d=a._getStandardDateStr(c),e=d.match(/\d+/g);return!BI.isKey(b.format)&&a._autoAppend(c,e),a._dateCheck(d)&&BI.checkDateLegal(d)&&a._checkVoid({year:0|e[0],month:0|e[1],day:0|e[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var c="";return BI.isKey(b.format)||(c=a.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),c},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.storeTriggerValue=a.getKey(),a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=a._getStandardDateStr(b),d=c.match(/\d+/g);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|d[0],month:0|d[1],day:0|d[2],hour:0|d[3],minute:0|d[4],second:0|d[5]}}}a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),!b.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(b.value)},_getTitle:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.DynamicDateHelper.getCalculation(c),f=BI.print(e,this._getFormatString());return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return BI.isNull(c)||BI.isNull(c.day)?"":BI.print(BI.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0),this._getFormatString())}},_getStandardDateStr:function(a){var b=this._const,c=[],d=!1,e=this._getFormatString().match(/%./g);BI.each(e,function(a,b){switch(b){case"%Y":case"%y":c[0]=a;break;case"%X":case"%x":c[1]=a;break;case"%d":case"%e":c[2]=a;break;case"%S":d=!0}});var f=BI.parseDateTime(a,this._getFormatString());BI.print(f,this._getFormatString())===a&&(a=BI.print(f,b.compareFormat),c=[0,1,2]);var g=a.match(/\d+/g),h=[];BI.each(g.slice(0,3),function(a){h[a]=g[c[a]]});var i=g.slice(3);BI.each(i,function(a,b){BI.isNumeric(b)&&1===b.length&&(i[a]="0"+b)}),2!==i.length||d||i.push("00");var j=i.join(":"),k=h.slice(0,3).join("-");return BI.isNotEmptyString(j)&&(k+=" "+j),k},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S"),"%Y-%x-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S"),"%Y-%x-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S"),"%Y-%X-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var c=a.split("-")[1];(BI.isNotNull(c)&&2===c.length||this._monthCheck(a))&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d"),c=BI.print(b,"%Y-%X-%d");return b.getMonth()>0&&(BI.print(BI.parseDateTime(a,"%Y-%X"),"%Y-%X")===a||BI.print(BI.parseDateTime(a,"%Y-%x"),"%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=BI.print(a,this._getFormatString());this.editor.setState(b),this.editor.setValue(b)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="",d="";return BI.isNotNull(a.year)&&(0!==BI.parseInt(a.year)&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&(0!==BI.parseInt(a.quarter)&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Single_Quarter"),a.position)),BI.isNotNull(a.month)&&(0!==BI.parseInt(a.month)&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&(0!==BI.parseInt(a.week)&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&(0!==BI.parseInt(a.day)&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),d=1===BI.size(a)?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==BI.parseInt(a.workDay)&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c+d},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue("");else{var f=BI.print(BI.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0),this._getFormatString());this.editor.setState(f),this.editor.setValue(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue},isValid:function(){return this.editor.isValid()}}),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),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,hgap:1,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"close-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CHANGE),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.icon_label",cls:"search-font"},width:24},{el:a.editor},{el:this.clear,width:24}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&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),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:20})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{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 a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,title:b.title,tipType:b.tipType,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:20})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.IntervalSlider=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""},render:function(){var a=this,b=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:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=a.valueOne,c=BI.parseFloat(this.getValue());a.valueOne=c;var d=a._getPercentByValue(c),e=BI.parseFloat(d.toFixed(1));a._setSliderOnePosition(e),a._setBlueTrack(),a._checkLabelPosition(b,a.valueTwo,a.valueOne,a.valueTwo),a.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:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=a.valueTwo,c=BI.parseFloat(this.getValue());a.valueTwo=c;var d=a._getPercentByValue(c),e=BI.parseFloat(d.toFixed(1));a._setSliderTwoPosition(e),a._setBlueTrack(),a._checkLabelPosition(a.valueOne,b,a.valueOne,a.valueTwo),a.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:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]}},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit);var g=this.valueOne,h=this.valueTwo;b?(this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f,this._checkLabelPosition(g,h,f,this.valueTwo)):(this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f,this._checkLabelPosition(g,h,this.valueOne,f)),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=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:a.EDITOR_R_GAP,height:a.SLIDER_HEIGHT},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=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:a.SLIDER_WIDTH_HALF,height:a.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(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_checkLabelPosition:function(a,b,c,d,e){if(a=BI.parseFloat(a),b=BI.parseFloat(b),c=BI.parseFloat(c),d=BI.parseFloat(d),a<=b&&c>d||a>=b&&c-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0:return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta); }function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this),_.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}),_.extend(BI,{pushArray:function(a,b){for(var c=0;c0){var h=Math.pow(10,f);c>d?(a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""))*h):(a=Number(a.toString().replace(".",""))*h,b=Number(b.toString().replace(".","")))}else a=Number(a.toString().replace(".","")),b=Number(b.toString().replace(".",""));return(a+b)/e}return c(b,a)},sub:function(a,b){function c(a,b){var c,d,e,f;try{c=a.toString().split(".")[1].length}catch(g){c=0}try{d=b.toString().split(".")[1].length}catch(g){d=0}return e=Math.pow(10,Math.max(c,d)),f=c>=d?c:d,((a*e-b*e)/e).toFixed(f)}return c(a,b)},mul:function(a,b){function c(a,b){var c=0,d=a.toString(),e=b.toString();try{c+=d.split(".")[1].length}catch(f){}try{c+=e.split(".")[1].length}catch(f){}return Number(d.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,c)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),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(a){return a.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getMonthDays:function(a,b){var c=a.getFullYear();return"undefined"==typeof b&&(b=a.getMonth()),0!=c%4||0==c%100&&0!=c%400||1!=b?BI.Date._MD[b]:29},getLastDateOfMonth:function(a){return BI.getDate(a.getFullYear(),a.getMonth(),BI.getMonthDays(a))},getDayOfYear:function(a){var b=BI.getDate(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),c=BI.getDate(a.getFullYear(),0,0,0,0,0),d=b-c;return Math.floor(d/BI.Date.DAY)},getWeekNumber:function(a){var b=BI.getDate(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),c=b.getDay(),d=BI.StartOfWeek%7,e=(d+3)%7;e=e||7;var f=ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}});var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["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"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;i1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f;