diff --git a/demo/js/case/combo/demo.icon_text_value_combo.js b/demo/js/case/combo/demo.icon_text_value_combo.js index 4a06b84b2..616e5d2bd 100644 --- a/demo/js/case/combo/demo.icon_text_value_combo.js +++ b/demo/js/case/combo/demo.icon_text_value_combo.js @@ -13,7 +13,7 @@ Demo.IconTextValueCombo = BI.inherit(BI.Widget, { type: "bi.icon_text_value_combo", text: "默认值", // defaultIconCls: "next-page-h-font", - value: 23, + value: 1, width: 300, iconHeight: 16, iconWidth: 16, diff --git a/demo/js/case/combo/demo.text_value_combo.js b/demo/js/case/combo/demo.text_value_combo.js index 55c0c5aa9..b31181509 100644 --- a/demo/js/case/combo/demo.text_value_combo.js +++ b/demo/js/case/combo/demo.text_value_combo.js @@ -8,7 +8,7 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, { render: function () { var combo; return { - type: "bi.horizontal_auto", + type: "bi.vertical", items: [{ type: "bi.text_value_combo", ref: function () { @@ -39,12 +39,15 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, { value: ["1", "2", "3"] } }, { - type: "bi.button", + type: "bi.popup_view", width: 90, height: 25, handler: function () { combo.setValue(3); } + }, { + type: 'bi.label', + height: 1000 }], vgap: 20 }; diff --git a/dist/_fineui.min.js b/dist/_fineui.min.js index bb2da2130..49e7a0366 100644 --- a/dist/_fineui.min.js +++ b/dist/_fineui.min.js @@ -18,8 +18,8 @@ direction:"bottom",logic:{dynamic:!1},single:!1,showIndex:!1,tab:!1,cardCreator: pf||nf&&9==of?setTimeout(function(){document.body.focus(),e.input.focus()},20):e.input.focus())});pf&&(e.scroller.draggable=!0),a.state.draggingText=g,e.scroller.dragDrop&&e.scroller.dragDrop(),xg(document,"mouseup",g),xg(e.scroller,"drop",g)}function Xb(a,b,c,d,e){function f(b){if(0!=Gf(q,b))if(q=b,"rect"==d){for(var e=[],f=a.options.tabSize,g=Gg(Vd(j,c.line).text,c.ch,f),h=Gg(Vd(j,b.line).text,b.ch,f),i=Math.min(g,h),n=Math.max(g,h),o=Math.min(c.line,b.line),p=Math.min(a.lastLine(),Math.max(c.line,b.line));o<=p;o++){var r=Vd(j,o).text,s=Ae(r,i,f);i==n?e.push(new ma(Ff(o,s),Ff(o,s))):r.length>s&&e.push(new ma(Ff(o,s),Ff(o,Ae(r,n,f))))}e.length||e.push(new ma(c,c)),Ba(j,na(m.ranges.slice(0,l).concat(e),l),{origin:"*mouse",scroll:!1}),a.scrollIntoView(b)}else{var t=k,u=t.anchor,v=b;if("single"!=d){if("double"==d)var w=a.findWordAt(b);else var w=new ma(Ff(b.line,0),qa(j,Ff(b.line+1,0)));Gf(w.anchor,u)>0?(v=w.head,u=X(t.from(),w.anchor)):(v=w.anchor,u=W(t.to(),w.head))}var e=m.ranges.slice(0);e[l]=new ma(qa(j,u),v),Ba(j,na(e,l),Eg)}}function g(b){var c=++s,e=Tb(a,b,!0,"rect"==d);if(e)if(0!=Gf(e,q)){a.curOp.focus=Pe(),f(e);var h=u(i,j);(e.line>=h.to||e.liner.bottom?20:0;k&&setTimeout(Db(a,function(){s==c&&(i.scroller.scrollTop+=k,g(b))}),50)}}function h(a){s=1/0,ug(a),i.input.focus(),yg(document,"mousemove",t),yg(document,"mouseup",v),j.history.lastSelOrigin=null}var i=a.display,j=a.doc;ug(b);var k,l,m=j.sel,n=m.ranges;if(e&&!b.shiftKey?(l=j.sel.contains(c),k=l>-1?n[l]:new ma(c,c)):(k=j.sel.primary(),l=j.sel.primIndex),b.altKey)d="rect",e||(k=new ma(c,c)),c=Tb(a,b,!0,!0),l=-1;else if("double"==d){var o=a.findWordAt(c);k=a.display.shift||j.extend?ua(j,k,o.anchor,o.head):o}else if("triple"==d){var p=new ma(Ff(c.line,0),qa(j,Ff(c.line+1,0)));k=a.display.shift||j.extend?ua(j,k,p.anchor,p.head):p}else k=ua(j,k,c);e?l==-1?(l=n.length,Ba(j,na(n.concat([k]),l),{scroll:!1,origin:"*mouse"})):n.length>1&&n[l].empty()&&"single"==d&&!b.shiftKey?(Ba(j,na(n.slice(0,l).concat(n.slice(l+1)),0)),m=j.sel):xa(j,l,k,Eg):(l=0,Ba(j,new la([k],0),Eg),m=j.sel);var q=c,r=i.wrapper.getBoundingClientRect(),s=0,t=Db(a,function(a){se(a)?g(a):h(a)}),v=Db(a,h);xg(document,"mousemove",t),xg(document,"mouseup",v)}function Yb(a,b,c,d,e){try{var f=b.clientX,g=b.clientY}catch(b){return!1}if(f>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&ug(b);var h=a.display,i=h.lineDiv.getBoundingClientRect();if(g>i.bottom||!xe(a,c))return qe(b);g-=i.top-h.viewOffset;for(var j=0;j=f){var l=$d(a.doc,g),m=a.options.gutters[j];return e(a,c,a,l,m,b),qe(b)}}}function Zb(a,b){return Yb(a,b,"gutterClick",!0,te)}function $b(a){var b=this;if(!ve(b,a)&&!Sb(b.display,a)){ug(a),nf&&(Of=+new Date);var c=Tb(b,a,!0),d=a.dataTransfer.files;if(c&&!Z(b))if(d&&d.length&&window.FileReader&&window.File)for(var e=d.length,f=Array(e),g=0,h=function(a,d){var h=new FileReader;h.onload=Db(b,function(){if(f[d]=h.result,++g==e){c=qa(b.doc,c);var a={from:c,to:c,text:Ug(f.join("\n")),origin:"paste"};wc(b.doc,a),Aa(b.doc,oa(c,Uf(a)))}}),h.readAsText(a)},i=0;i-1)return b.state.draggingText(a),void setTimeout(function(){b.display.input.focus()},20);try{var f=a.dataTransfer.getData("Text");if(f){if(b.state.draggingText&&!(yf?a.altKey:a.ctrlKey))var j=b.listSelections();if(Ca(b.doc,oa(c,c)),j)for(var i=0;ig.clientWidth||e&&g.scrollHeight>g.clientHeight){if(e&&yf&&pf)a:for(var h=b.target,i=f.view;h!=g;h=h.parentNode)for(var j=0;j=0;--e)xc(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else xc(a,b)}}function xc(a,b){if(1!=b.text.length||""!=b.text[0]||0!=Gf(b.from,b.to)){var c=sc(a,b);fe(a,b,c,a.cm?a.cm.curOp.id:NaN),Ac(a,b,c,bd(a,b));var d=[];Td(a,function(a,c){c||De(d,a.history)!=-1||(pe(a.history,b),d.push(a.history)),Ac(a,b,null,bd(a,b))})}}function yc(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var d,e=a.history,f=a.sel,g="undo"==b?e.done:e.undone,h="undo"==b?e.undone:e.done,i=0;i=0;--i){var l=d.changes[i];if(l.origin=b,k&&!vc(a,l,!1))return void(g.length=0);j.push(ce(a,l));var m=i?sc(a,l):Ce(g);Ac(a,l,m,dd(a,l)),!i&&a.cm&&a.cm.scrollIntoView({from:l.from,to:Uf(l)});var n=[];Td(a,function(a,b){b||De(n,a.history)!=-1||(pe(a.history,l),n.push(a.history)),Ac(a,l,null,dd(a,l))})}}}}function zc(a,b){if(0!=b&&(a.first+=b,a.sel=new la(Ee(a.sel.ranges,function(a){return new ma(Ff(a.anchor.line+b,a.anchor.ch),Ff(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Ib(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;da.lastLine())){if(b.from.linef&&(b={from:b.from,to:Ff(f,Vd(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=Wd(a,b.from,b.to),c||(c=sc(a,b)),a.cm?Bc(a.cm,b,d):Qd(a,b,d),Ca(a,c,Dg)}}function Bc(a,b,c){var d=a.doc,e=a.display,g=b.from,h=b.to,i=!1,j=g.line;a.options.lineWrapping||(j=Zd(od(Vd(d,g.line))),d.iter(j,h.line+1,function(a){if(a==e.maxLine)return i=!0,!0})),d.sel.contains(b.from,b.to)>-1&&we(a),Qd(d,b,c,f(a)),a.options.lineWrapping||(d.iter(j,g.line+b.text.length,function(a){var b=l(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,i=!1)}),i&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,g.line),Ma(a,400);var k=b.text.length-(h.line-g.line)-1;b.full?Ib(a):g.line!=h.line||1!=b.text.length||Pd(a.doc,b)?Ib(a,g.line,h.line+1,k):Jb(a,g.line,"text");var m=xe(a,"changes"),n=xe(a,"change");if(n||m){var o={from:g,to:h,text:b.text,removed:b.removed,origin:b.origin};n&&te(a,"change",a,o),m&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(o)}a.display.selForContextMenu=null}function Cc(a,b,c,d,e){if(d||(d=c),Gf(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=Ug(b)),wc(a,{from:c,to:d,text:b,origin:e})}function Dc(a,b){if(!ve(a,"scrollCursorIntoView")){var c=a.display,d=c.sizer.getBoundingClientRect(),e=null;if(b.top+d.top<0?e=!0:b.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!vf){var f=Me("div","​",null,"position: absolute; top: "+(b.top-c.viewOffset-Qa(a.display))+"px; height: "+(b.bottom-b.top+Ta(a)+c.barHeight)+"px; left: "+b.left+"px; width: 2px;");a.display.lineSpace.appendChild(f),f.scrollIntoView(e),a.display.lineSpace.removeChild(f)}}}function Ec(a,b,c,d){null==d&&(d=0);for(var e=0;e<5;e++){var f=!1,g=mb(a,b),h=c&&c!=b?mb(a,c):g,i=Gc(a,Math.min(g.left,h.left),Math.min(g.top,h.top)-d,Math.max(g.left,h.left),Math.max(g.bottom,h.bottom)+d),j=a.doc.scrollTop,k=a.doc.scrollLeft;if(null!=i.scrollTop&&(ac(a,i.scrollTop),Math.abs(a.doc.scrollTop-j)>1&&(f=!0)),null!=i.scrollLeft&&(bc(a,i.scrollLeft),Math.abs(a.doc.scrollLeft-k)>1&&(f=!0)),!f)break}return g}function Fc(a,b,c,d,e){var f=Gc(a,b,c,d,e);null!=f.scrollTop&&ac(a,f.scrollTop),null!=f.scrollLeft&&bc(a,f.scrollLeft)}function Gc(a,b,c,d,e){var f=a.display,g=rb(a.display);c<0&&(c=0);var h=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:f.scroller.scrollTop,i=Va(a),j={};e-c>i&&(e=c+i);var k=a.doc.height+Ra(f),l=ck-g;if(ch+i){var n=Math.min(c,(m?k:e)-i);n!=h&&(j.scrollTop=n)}var o=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:f.scroller.scrollLeft,p=Ua(a)-(a.options.fixedGutter?f.gutters.offsetWidth:0),q=d-b>p;return q&&(d=b+p),b<10?j.scrollLeft=0:bp+o-3&&(j.scrollLeft=d+(q?0:10)-p),j}function Hc(a,b,c){null==b&&null==c||Jc(a),null!=b&&(a.curOp.scrollLeft=(null==a.curOp.scrollLeft?a.doc.scrollLeft:a.curOp.scrollLeft)+b),null!=c&&(a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+c)}function Ic(a){Jc(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?Ff(b.line,b.ch-1):b,d=Ff(b.line,b.ch+1)),a.curOp.scrollToPos={from:c,to:d,margin:a.options.cursorScrollMargin,isCursor:!0}}function Jc(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=nb(a,b.from),d=nb(a,b.to),e=Gc(a,Math.min(c.left,d.left),Math.min(c.top,d.top)-b.margin,Math.max(c.right,d.right),Math.max(c.bottom,d.bottom)+b.margin);a.scrollTo(e.scrollLeft,e.scrollTop)}}function Kc(a,b,c,d){var e,f=a.doc;null==c&&(c="add"),"smart"==c&&(f.mode.indent?e=Pa(a,b):c="prev");var g=a.options.tabSize,h=Vd(f,b),i=Gg(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var j,k=h.text.match(/^\s*/)[0];if(d||/\S/.test(h.text)){if("smart"==c&&(j=f.mode.indent(e,h.text.slice(k.length),h.text),j==Cg||j>150)){if(!d)return;c="prev"}}else j=0,c="not";"prev"==c?j=b>f.first?Gg(Vd(f,b-1).text,null,g):0:"add"==c?j=i+a.options.indentUnit:"subtract"==c?j=i-a.options.indentUnit:"number"==typeof c&&(j=i+c),j=Math.max(0,j);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(j/g);n;--n)m+=g,l+="\t";if(m=0;b--)Cc(a.doc,"",d[b].from,d[b].to,"+delete");Ic(a)})}function Nc(a,b,c,d,e){function f(){var b=h+c;return b=a.first+a.size?l=!1:(h=b,k=Vd(a,b))}function g(a){var b=(e?hf:jf)(k,i,c,!0);if(null==b){if(a||!f())return l=!1;i=e?(c<0?af:_e)(k):c<0?k.text.length:0}else i=b;return!0}var h=b.line,i=b.ch,j=c,k=Vd(a,h),l=!0;if("char"==d)g();else if("column"==d)g(!0);else if("word"==d||"group"==d)for(var m=null,n="group"==d,o=a.cm&&a.cm.getHelper(b,"wordChars"),p=!0;!(c<0)||g(!p);p=!1){var q=k.text.charAt(i)||"\n",r=Je(q,o)?"w":n&&"\n"==q?"n":!n||/\s/.test(q)?null:"p";if(!n||p||r||(r="s"),m&&m!=r){c<0&&(c=1,g());break}if(r&&(m=r),c>0&&!g(!p))break}var s=Ga(a,Ff(h,i),j,!0);return l||(s.hitSide=!0),s}function Oc(a,b,c,d){var e,f=a.doc,g=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);e=b.top+c*(h-(c<0?1.5:.5)*rb(a.display))}else"line"==d&&(e=c>0?b.bottom+3:b.top-3);for(;;){var i=pb(a,g,e);if(!i.outside)break;if(c<0?e<=0:e>=f.height){i.hitSide=!0;break}e+=5*c}return i}function Pc(b,c,d,e){a.defaults[b]=c,d&&(Wf[b]=e?function(a,b,c){c!=Xf&&d(a,b,c)}:d)}function Qc(a){for(var b,c,d,e,f=a.split(/-(?!$)/),a=f[f.length-1],g=0;g0||0==g&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=Me("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(nd(a,b.line,b,c,f)||b.line!=c.line&&nd(a,c.line,b,c,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ef=!0}f.addToHistory&&fe(a,{from:b,to:c,origin:"markText"},a.sel,NaN);var h,i=b.line,j=a.cm;if(a.iter(i,c.line+1,function(a){j&&f.collapsed&&!j.options.lineWrapping&&od(a)==j.display.maxLine&&(h=!0),f.collapsed&&i!=b.line&&Yd(a,0),$c(a,new Xc(f,i==b.line?b.ch:null,i==c.line?c.ch:null)),++i}),f.collapsed&&a.iter(b.line,c.line+1,function(b){sd(a,b)&&Yd(b,0)}),f.clearOnEnter&&xg(f,"beforeCursorEnter",function(){f.clear()}),f.readOnly&&(Df=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory()),f.collapsed&&(f.id=++jg,f.atomic=!0),j){if(h&&(j.curOp.updateMaxLine=!0),f.collapsed)Ib(j,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle||f.css)for(var k=b.line;k<=c.line;k++)Jb(j,k,"text");f.atomic&&Ea(j.doc),te(j,"markerAdded",j,f)}return f}function Tc(a,b,c,d,e){d=He(d),d.shared=!1;var f=[Sc(a,b,c,d,e)],g=f[0],h=d.widgetNode;return Td(a,function(a){h&&(d.widgetNode=h.cloneNode(!0)),f.push(Sc(a,qa(a,b),qa(a,c),d,e));for(var i=0;i=b:f.to>b);(d||(d=[])).push(new Xc(g,f.from,i?null:f.to))}}return d}function ad(a,b,c){if(a)for(var d,e=0;e=b:f.to>b);if(h||f.from==b&&"bookmark"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from0&&h)for(var l=0;l0)){var k=[i,1],l=Gf(j.from,h.from),m=Gf(j.to,h.to);(l<0||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(m>0||!g.inclusiveRight&&!m)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-1}}return e}function fd(a){var b=a.markedSpans;if(b){for(var c=0;c=0&&l<=0||k<=0&&l>=0)&&(k<=0&&(Gf(j.to,c)>0||i.marker.inclusiveRight&&e.inclusiveLeft)||k>=0&&(Gf(j.from,d)<0||i.marker.inclusiveLeft&&e.inclusiveRight)))return!0}}}function od(a){for(var b;b=ld(a);)a=b.find(-1,!0).line;return a}function pd(a){for(var b,c;b=md(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function qd(a,b){var c=Vd(a,b),d=od(c);return c==d?b:Zd(d)}function rd(a,b){if(b>a.lastLine())return b;var c,d=Vd(a,b);if(!sd(a,d))return b;for(;c=md(d);)d=c.find(1,!0).line;return Zd(d)+1}function sd(a,b){var c=Ef&&b.markedSpans;if(c)for(var d,e=0;ec.start)return g}throw new Error("Mode "+b.name+" failed to advance stream.")}function Cd(a,b,c,d){function e(a){return{start:l.start,end:l.pos,string:l.current(),type:f||null,state:a?bg(g.mode,k):k}}var f,g=a.doc,h=g.mode;b=qa(g,b);var i,j=Vd(g,b.line),k=Pa(a,b.line,c),l=new ig(j.text,a.options.tabSize);for(d&&(i=[]);(d||l.posa.options.maxHighlightLength?(h=!1,g&&Gd(a,b,d,l.pos),l.pos=b.length,i=null):i=zd(Bd(c,l,d,m),f),m){var n=m[0].name;n&&(i="m-"+(i?n+" "+i:n))}if(!h||k!=i){for(;ja&&e.splice(i,1,a,e[i+1],d),i+=2,j=Math.min(a,d)}if(b)if(h.opaque)e.splice(c,i-c,a,"cm-overlay "+b),i=c+2;else for(;cj&&m.from<=j)break}if(m.to>=k)return a(c,d,e,f,g,h,i);a(c,d.slice(0,m.to-j),e,f,null,h,i),f=null,d=d.slice(m.to-j),j=m.to}}}function Nd(a,b,c,d){var e=!d&&c.widgetNode;e&&a.map.push(a.pos,a.pos+b,e),!d&&a.cm.display.input.needsContentAttribute&&(e||(e=a.content.appendChild(document.createElement("span"))),e.setAttribute("cm-marker",c.id)),e&&(a.cm.display.input.setUneditable(e),a.content.appendChild(e)),a.pos+=b}function Od(a,b,c){var d=a.markedSpans,e=a.text,f=0;if(d)for(var g,h,i,j,k,l,m,n=e.length,o=0,p=1,q="",r=0;;){if(r==o){i=j=k=l=h="",m=null,r=1/0;for(var s=[],t=0;to||v.collapsed&&u.to==o&&u.from==o)?(null!=u.to&&u.to!=o&&r>u.to&&(r=u.to,j=""),v.className&&(i+=" "+v.className),v.css&&(h=v.css),v.startStyle&&u.from==o&&(k+=" "+v.startStyle),v.endStyle&&u.to==r&&(j+=" "+v.endStyle),v.title&&!l&&(l=v.title),v.collapsed&&(!m||jd(m.marker,v)<0)&&(m=u)):u.from>o&&r>u.from&&(r=u.from)}if(m&&(m.from||0)==o){if(Nd(b,(null==m.to?n+1:m.to)-o,m.marker,null==m.from),null==m.to)return; m.to==o&&(m=!1)}if(!m&&s.length)for(var t=0;t=n)break;for(var w=Math.min(n,r);;){if(q){var x=o+q.length;if(!m){var y=x>w?q.slice(0,w-o):q;b.addToken(b,y,g?g+i:i,k,o+y.length==r?j:"",l,h)}if(x>=w){q=q.slice(w-o),o=w;break}o=x,k=""}q=e.slice(f,f=c[p++]),g=Hd(c[p++],b.cm.options)}}else for(var p=1;p1&&a.remove(h.line+1,o-1),a.insert(h.line+1,p)}te(a,"change",a,b)}function Rd(a){this.lines=a,this.parent=null;for(var b=0,c=0;b=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(b1&&!a.done[a.done.length-2].ranges?(a.done.pop(),Ce(a.done)):void 0}function fe(a,b,c,d){var e=a.history;e.undone.length=0;var f,g=+new Date;if((e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>g-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))&&(f=ee(e,e.lastOp==d))){var h=Ce(f.changes);0==Gf(b.from,b.to)&&0==Gf(b.from,h.to)?h.to=Uf(b):f.changes.push(ce(a,b))}else{var i=Ce(e.done);for(i&&i.ranges||ie(a.sel,e.done),f={changes:[ce(a,b)],generation:e.generation},e.done.push(f);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift()}e.done.push(c),e.generation=++e.maxGeneration,e.lastModTime=e.lastSelTime=g,e.lastOp=e.lastSelOp=d,e.lastOrigin=e.lastSelOrigin=b.origin,h||zg(a,"historyAdded")}function ge(a,b,c,d){var e=b.charAt(0);return"*"==e||"+"==e&&c.ranges.length==d.ranges.length&&c.somethingSelected()==d.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function he(a,b,c,d){var e=a.history,f=d&&d.origin;c==e.lastSelOp||f&&e.lastSelOrigin==f&&(e.lastModTime==e.lastSelTime&&e.lastOrigin==f||ge(a,f,Ce(e.done),b))?e.done[e.done.length-1]=b:ie(b,e.done),e.lastSelTime=+new Date,e.lastSelOrigin=f,e.lastSelOp=c,d&&d.clearRedo!==!1&&de(e.undone)}function ie(a,b){var c=Ce(b);c&&c.ranges&&c.equals(a)||b.push(a)}function je(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans),++f})}function ke(a){if(!a)return null;for(var b,c=0;c-1&&(Ce(h)[l]=k[l],delete k[l])}}}return e}function ne(a,b,c,d){c0}function ye(a){a.prototype.on=function(a,b){xg(this,a,b)},a.prototype.off=function(a,b){yg(this,a,b)}}function ze(){this.id=null}function Ae(a,b,c){for(var d=0,e=0;;){var f=a.indexOf("\t",d);f==-1&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}}function Be(a){for(;Hg.length<=a;)Hg.push(Ce(Hg)+" ");return Hg[a]}function Ce(a){return a[a.length-1]}function De(a,b){for(var c=0;c-1&&Lg(a))||b.test(a):Lg(a)}function Ke(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function Le(a){return a.charCodeAt(0)>=768&&Mg.test(a)}function Me(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f0;--b)a.removeChild(a.firstChild);return a}function Oe(a,b){return Ne(a).appendChild(b)}function Pe(){return document.activeElement}function Qe(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function Re(a,b){for(var c=a.split(" "),d=0;d2&&!(nf&&of<8))}var c=Og?Me("span","​"):Me("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}function We(a){if(null!=Pg)return Pg;var b=Oe(a,document.createTextNode("AخA")),c=Jg(b,0,1).getBoundingClientRect();if(!c||c.left==c.right)return!1;var d=Jg(b,1,2).getBoundingClientRect();return Pg=d.right-c.right<3}function Xe(a){if(null!=Xg)return Xg;var b=Oe(a,Me("span","x")),c=b.getBoundingClientRect(),d=Jg(b,0,1).getBoundingClientRect();return Xg=Math.abs(c.left-d.left)>1}function Ye(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;fb||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function Ze(a){return a.level%2?a.to:a.from}function $e(a){return a.level%2?a.from:a.to}function _e(a){var b=ae(a);return b?Ze(b[0]):0}function af(a){var b=ae(a);return b?$e(Ce(b)):a.text.length}function bf(a,b){var c=Vd(a.doc,b),d=od(c);d!=c&&(b=Zd(d));var e=ae(d),f=e?e[0].level%2?af(d):_e(d):0;return Ff(b,f)}function cf(a,b){for(var c,d=Vd(a.doc,b);c=md(d);)d=c.find(1,!0).line,b=null;var e=ae(d),f=e?e[0].level%2?_e(d):af(d):d.text.length;return Ff(null==b?Zd(d):b,f)}function df(a,b){var c=bf(a,b.line),d=Vd(a.doc,c.line),e=ae(d);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch;return Ff(c.line,g?0:f)}return c}function ef(a,b,c){var d=a[0].level;return b==d||c!=d&&bb)return d;if(e.from==b||e.to==b){if(null!=c)return ef(a,e.level,a[c].level)?(e.from!=e.to&&(Zg=c),d):(e.from!=e.to&&(Zg=d),c);c=d}}return c}function gf(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&Le(a.text.charAt(b)));return b}function hf(a,b,c,d){var e=ae(a);if(!e)return jf(a,b,c,d);for(var f=ff(e,b),g=e[f],h=gf(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?gf(a,g.to,-1,d):gf(a,g.from,1,d)}}function jf(a,b,c,d){var e=b+c;if(d)for(;e>0&&Le(a.text.charAt(e));)e+=c;return e<0||e>a.text.length?null:e}var kf=/gecko\/\d/i.test(navigator.userAgent),lf=/MSIE \d/.test(navigator.userAgent),mf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),nf=lf||mf,of=nf&&(lf?document.documentMode||6:mf[1]),pf=/WebKit\//.test(navigator.userAgent),qf=pf&&/Qt\/\d+\.\d+/.test(navigator.userAgent),rf=/Chrome\//.test(navigator.userAgent),sf=/Opera\//.test(navigator.userAgent),tf=/Apple Computer/.test(navigator.vendor),uf=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),vf=/PhantomJS/.test(navigator.userAgent),wf=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),xf=wf||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),yf=wf||/Mac/.test(navigator.platform),zf=/win/i.test(navigator.platform),Af=sf&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Af&&(Af=Number(Af[1])),Af&&Af>=15&&(sf=!1,pf=!0);var Bf=yf&&(qf||sf&&(null==Af||Af<12.11)),Cf=kf||nf&&of>=9,Df=!1,Ef=!1;p.prototype=He({update:function(a){var b=a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0";var e=a.viewHeight-(b?d:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+e)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(b){this.horiz.style.display="block",this.horiz.style.right=c?d+"px":"0",this.horiz.style.left=a.barLeft+"px";var f=a.viewWidth-a.barLeft-(c?d:0);this.horiz.firstChild.style.width=a.scrollWidth-a.clientWidth+f+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&a.clientHeight>0&&(0==d&&this.overlayHack(),this.checkedOverlay=!0),{right:c?d:0,bottom:b?d:0}},setScrollLeft:function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a)},setScrollTop:function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a)},overlayHack:function(){var a=yf&&!uf?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=a;var b=this,c=function(a){re(a)!=b.vert&&re(a)!=b.horiz&&Db(b.cm,Ub)(a)};xg(this.vert,"mousedown",c),xg(this.horiz,"mousedown",c)},clear:function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)}},p.prototype),q.prototype=He({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},q.prototype),a.scrollbarModel={"native":p,"null":q},z.prototype.signal=function(a,b){xe(a,b)&&this.events.push(arguments)},z.prototype.finish=function(){for(var a=0;a=9&&c.hasSelection&&(c.hasSelection=null),c.poll()}),xg(f,"paste",function(a){return!!_(a,d)||(d.state.pasteIncoming=!0,void c.fastPoll())}),xg(f,"cut",b),xg(f,"copy",b),xg(a.scroller,"paste",function(b){Sb(a,b)||(d.state.pasteIncoming=!0,c.focus())}),xg(a.lineSpace,"selectstart",function(b){Sb(a,b)||ug(b)}),xg(f,"compositionstart",function(){var a=d.getCursor("from");c.composing={start:a,range:d.markText(a,d.getCursor("to"),{className:"CodeMirror-composing"})}}),xg(f,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},prepareSelection:function(){var a=this.cm,b=a.display,c=a.doc,d=Ia(a);if(a.options.moveInputWithCursor){var e=mb(a,c.sel.primary().head,"div"),f=b.wrapper.getBoundingClientRect(),g=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,e.top+g.top-f.top)),d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,e.left+g.left-f.left))}return d},showSelection:function(a){var b=this.cm,c=b.display;Oe(c.cursorDiv,a.cursors),Oe(c.selectionDiv,a.selection),null!=a.teTop&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},reset:function(a){if(!this.contextMenuPending){var b,c,d=this.cm,e=d.doc;if(d.somethingSelected()){this.prevInput="";var f=e.sel.primary();b=Wg&&(f.to().line-f.from().line>100||(c=d.getSelection()).length>1e3);var g=b?"-":c||d.getSelection();this.textarea.value=g,d.state.focused&&Ig(this.textarea),nf&&of>=9&&(this.hasSelection=g)}else a||(this.prevInput=this.textarea.value="",nf&&of>=9&&(this.hasSelection=null));this.inaccurateSelection=b}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!xf||Pe()!=this.textarea))try{this.textarea.focus()}catch(a){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var a=this;a.pollingFast||a.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},fastPoll:function(){function a(){var d=c.poll();d||b?(c.pollingFast=!1,c.slowPoll()):(b=!0,c.polling.set(60,a))}var b=!1,c=this;c.pollingFast=!0,c.polling.set(20,a)},poll:function(){var a=this.cm,b=this.textarea,c=this.prevInput;if(this.contextMenuPending||!a.state.focused||Vg(b)&&!c||Z(a)||a.options.disableInput||a.state.keySeq)return!1;var d=b.value;if(d==c&&!a.somethingSelected())return!1;if(nf&&of>=9&&this.hasSelection===d||yf&&/[\uf700-\uf7ff]/.test(d))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var e=d.charCodeAt(0);if(8203!=e||c||(c="​"),8666==e)return this.reset(),this.cm.execCommand("undo")}for(var f=0,g=Math.min(c.length,d.length);f1e3||d.indexOf("\n")>-1?b.value=h.prevInput="":h.prevInput=d,h.composing&&(h.composing.range.clear(),h.composing.range=a.markText(h.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){nf&&of>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(a){function b(){if(null!=g.selectionStart){var a=e.somethingSelected(),b="​"+(a?g.value:"");g.value="⇚",g.value=b,d.prevInput=a?"":"​",g.selectionStart=1,g.selectionEnd=b.length,f.selForContextMenu=e.doc.sel}}function c(){if(d.contextMenuPending=!1,d.wrapper.style.position="relative",g.style.cssText=k,nf&&of<9&&f.scrollbars.setScrollTop(f.scroller.scrollTop=i),null!=g.selectionStart){(!nf||nf&&of<9)&&b();var a=0,c=function(){f.selForContextMenu==e.doc.sel&&0==g.selectionStart&&g.selectionEnd>0&&"​"==d.prevInput?Db(e,dg.selectAll)(e):a++<10?f.detectingSelectAll=setTimeout(c,500):f.input.reset()};f.detectingSelectAll=setTimeout(c,200)}}var d=this,e=d.cm,f=e.display,g=d.textarea,h=Tb(e,a),i=f.scroller.scrollTop;if(h&&!sf){var j=e.options.resetSelectionOnContextMenu;j&&e.doc.sel.contains(h)==-1&&Db(e,Ba)(e.doc,oa(h),Dg);var k=g.style.cssText;if(d.wrapper.style.position="absolute",g.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(a.clientY-5)+"px; left: "+(a.clientX-5)+"px; z-index: 1000; background: "+(nf?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",pf)var l=window.scrollY;if(f.input.focus(),pf&&window.scrollTo(null,l),f.input.reset(),e.somethingSelected()||(g.value=d.prevInput=" "),d.contextMenuPending=!0,f.selForContextMenu=e.doc.sel,clearTimeout(f.detectingSelectAll),nf&&of>=9&&b(),Cf){wg(a);var m=function(){yg(window,"mouseup",m),setTimeout(c,20)};xg(window,"mouseup",m)}else setTimeout(c,50)}},setUneditable:Fe,needsContentAttribute:!1},da.prototype),fa.prototype=He({init:function(a){function b(a){if(d.somethingSelected())Hf=d.getSelections(),"cut"==a.type&&d.replaceSelection("",null,"cut");else{if(!d.options.lineWiseCopyCut)return;var b=ba(d);Hf=b.text,"cut"==a.type&&d.operation(function(){d.setSelections(b.ranges,0,Dg),d.replaceSelection("",null,"cut")})}if(a.clipboardData&&!wf)a.preventDefault(),a.clipboardData.clearData(),a.clipboardData.setData("text/plain",Hf.join("\n"));else{var c=ea(),e=c.firstChild;d.display.lineSpace.insertBefore(c,d.display.lineSpace.firstChild),e.value=Hf.join("\n");var f=document.activeElement;Ig(e),setTimeout(function(){d.display.lineSpace.removeChild(c),f.focus()},50)}}var c=this,d=c.cm,e=c.div=a.lineDiv;e.contentEditable="true",ca(e),xg(e,"paste",function(a){_(a,d)}),xg(e,"compositionstart",function(a){var b=a.data;if(c.composing={sel:d.doc.sel,data:b,startData:b},b){var e=d.doc.sel.primary(),f=d.getLine(e.head.line),g=f.indexOf(b,Math.max(0,e.head.ch-b.length));g>-1&&g<=e.head.ch&&(c.composing.sel=oa(Ff(e.head.line,g),Ff(e.head.line,g+b.length)))}}),xg(e,"compositionupdate",function(a){c.composing.data=a.data}),xg(e,"compositionend",function(a){var b=c.composing;b&&(a.data==b.startData||/\u200b/.test(a.data)||(b.data=a.data),setTimeout(function(){b.handled||c.applyComposition(b),c.composing==b&&(c.composing=null)},50))}),xg(e,"touchstart",function(){c.forceCompositionEnd()}),xg(e,"input",function(){c.composing||c.pollContent()||Cb(c.cm,function(){Ib(d)})}),xg(e,"copy",b),xg(e,"cut",b)},prepareSelection:function(){var a=Ia(this.cm,!1);return a.focus=this.cm.state.focused,a},showSelection:function(a){a&&this.cm.display.view.length&&(a.focus&&this.showPrimarySelection(),this.showMultipleSelections(a))},showPrimarySelection:function(){var a=window.getSelection(),b=this.cm.doc.sel.primary(),c=ia(this.cm,a.anchorNode,a.anchorOffset),d=ia(this.cm,a.focusNode,a.focusOffset);if(!c||c.bad||!d||d.bad||0!=Gf(X(c,d),b.from())||0!=Gf(W(c,d),b.to())){var e=ga(this.cm,b.from()),f=ga(this.cm,b.to());if(e||f){var g=this.cm.display.view,h=a.rangeCount&&a.getRangeAt(0);if(e){if(!f){var i=g[g.length-1].measure,j=i.maps?i.maps[i.maps.length-1]:i.map;f={node:j[j.length-1],offset:j[j.length-2]-j[j.length-3]}}}else e={node:g[0].measure.map[2],offset:0};try{var k=Jg(e.node,e.offset,f.offset,f.node)}catch(l){}k&&(a.removeAllRanges(),a.addRange(k),h&&null==a.anchorNode?a.addRange(h):kf&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){a.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(a){Oe(this.cm.display.cursorDiv,a.cursors),Oe(this.cm.display.selectionDiv,a.selection)},rememberSelection:function(){var a=window.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},selectionInEditor:function(){var a=window.getSelection();if(!a.rangeCount)return!1;var b=a.getRangeAt(0).commonAncestorContainer;return Ng(this.div,b)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function a(){b.cm.state.focused&&(b.pollSelection(),b.polling.set(b.cm.options.pollInterval,a))}var b=this;this.selectionInEditor()?this.pollSelection():Cb(this.cm,function(){b.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,a)},selectionChanged:function(){var a=window.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var a=window.getSelection(),b=this.cm;this.rememberSelection();var c=ia(b,a.anchorNode,a.anchorOffset),d=ia(b,a.focusNode,a.focusOffset);c&&d&&Cb(b,function(){Ba(b.doc,oa(c,d),Dg),(c.bad||d.bad)&&(b.curOp.selectionChanged=!0)})}},pollContent:function(){var a=this.cm,b=a.display,c=a.doc.sel.primary(),d=c.from(),e=c.to();if(d.lineb.viewTo-1)return!1;var f;if(d.line==b.viewFrom||0==(f=Lb(a,d.line)))var g=Zd(b.view[0].line),h=b.view[0].node;else var g=Zd(b.view[f].line),h=b.view[f-1].node.nextSibling;var i=Lb(a,e.line);if(i==b.view.length-1)var j=b.viewTo-1,k=b.lineDiv.lastChild;else var j=Zd(b.view[i+1].line)-1,k=b.view[i+1].node.previousSibling;for(var l=Ug(ka(a,h,k,g,j)),m=Wd(a.doc,Ff(g,0),Ff(j,Vd(a.doc,j).text.length));l.length>1&&m.length>1;)if(Ce(l)==Ce(m))l.pop(),m.pop(),j--;else{if(l[0]!=m[0])break;l.shift(),m.shift(),g++}for(var n=0,o=0,p=l[0],q=m[0],r=Math.min(p.length,q.length);n1||l[0]||Gf(v,w)?(Cc(a.doc,l,v,w,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(a){a.data&&a.data!=a.startData&&Db(this.cm,$)(this.cm,a.data,0,a.sel)},setUneditable:function(a){a.setAttribute("contenteditable","false")},onKeyPress:function(a){a.preventDefault(),Db(this.cm,$)(this.cm,String.fromCharCode(null==a.charCode?a.keyCode:a.charCode),0)},onContextMenu:Fe,resetPosition:Fe,needsContentAttribute:!0},fa.prototype),a.inputStyles={textarea:da,contenteditable:fa},la.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b=0&&Gf(a,d.to())<=0)return c}return-1}},ma.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return W(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var If,Jf,Kf,Lf={left:0,right:0,top:0,bottom:0},Mf=null,Nf=0,Of=0,Pf=0,Qf=null;nf?Qf=-.53:kf?Qf=15:rf?Qf=-.7:tf&&(Qf=-1/3);var Rf=function(a){var b=a.wheelDeltaX,c=a.wheelDeltaY;return null==b&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(b=a.detail),null==c&&a.detail&&a.axis==a.VERTICAL_AXIS?c=a.detail:null==c&&(c=a.wheelDelta),{x:b,y:c}};a.wheelEventPixels=function(a){var b=Rf(a);return b.x*=Qf,b.y*=Qf,b};var Sf=new ze,Tf=null,Uf=a.changeEnd=function(a){return a.text?Ff(a.from.line+a.text.length-1,Ce(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(a,b){var c=this.options,d=c[a];c[a]==b&&"mode"!=a||(c[a]=b,Wf.hasOwnProperty(a)&&Db(this,Wf[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](Rc(a))},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;cc&&(Kc(this,e.head.line,a,!0),c=e.head.line,d==this.doc.sel.primIndex&&Ic(this));else{var f=e.from(),g=e.to(),h=Math.max(c,f.line);c=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var i=h;i0&&xa(this.doc,d,new ma(f,j[d].to()),Dg)}}}),getTokenAt:function(a,b){return Cd(this,a,b)},getLineTokens:function(a,b){return Cd(this,Ff(a),b,!0)},getTokenTypeAt:function(a){a=qa(this.doc,a);var b,c=Fd(this,Vd(this.doc,a.line)),d=0,e=(c.length-1)/2,f=a.ch;if(0==f)b=c[2];else for(;;){var g=d+e>>1;if((g?c[2*g-1]:0)>=f)e=g;else{if(!(c[2*g+1]e&&(a=e,d=!0),c=Vd(this.doc,a)}else c=a;return jb(this,c,{top:0,left:0},b||"page").top+(d?this.doc.height-_d(c):0)},defaultTextHeight:function(){return rb(this.display)},defaultCharWidth:function(){return sb(this.display)},setGutterMarker:Eb(function(a,b,c){return Lc(this.doc,a,"gutter",function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&Ke(d)&&(a.gutterMarkers=null),!0})}),clearGutter:Eb(function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,Jb(b,d,"gutter"),Ke(c.gutterMarkers)&&(c.gutterMarkers=null)),++d})}),lineInfo:function(a){if("number"==typeof a){if(!sa(this.doc,a))return null;var b=a;if(a=Vd(this.doc,a),!a)return null}else{var b=Zd(a);if(null==b)return null}return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=mb(this,qa(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",b.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(b), f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&Fc(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:Eb(ic),triggerOnKeyPress:Eb(lc),triggerOnKeyUp:kc,execCommand:function(a){if(dg.hasOwnProperty(a))return dg[a](this)},triggerElectric:Eb(function(a){aa(this,a)}),findPosH:function(a,b,c,d){var e=1;b<0&&(e=-1,b=-b);for(var f=0,g=qa(this.doc,a);f0&&h(c.charAt(d-1));)--d;for(;e.5)&&g(this),zg(this,"refresh",this)}),swapDoc:Eb(function(a){var b=this.doc;return b.cm=null,Ud(this,a),gb(this),this.display.input.reset(),this.scrollTo(a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,te(this,"swapDoc",this,b),b}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(a);var Vf=a.defaults={},Wf=a.optionHandlers={},Xf=a.Init={toString:function(){return"CodeMirror.Init"}};Pc("value","",function(a,b){a.setValue(b)},!0),Pc("mode",null,function(a,b){a.doc.modeOption=b,c(a)},!0),Pc("indentUnit",2,c,!0),Pc("indentWithTabs",!1),Pc("smartIndent",!0),Pc("tabSize",4,function(a){d(a),gb(a),Ib(a)},!0),Pc("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(b,c,d){b.state.specialChars=new RegExp(c.source+(c.test("\t")?"":"|\t"),"g"),d!=a.Init&&b.refresh()}),Pc("specialCharPlaceholder",Jd,function(a){a.refresh()},!0),Pc("electricChars",!0),Pc("inputStyle",xf?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Pc("rtlMoveVisually",!zf),Pc("wholeLineUpdateBefore",!0),Pc("theme","default",function(a){h(a),i(a)},!0),Pc("keyMap","default",function(b,c,d){var e=Rc(c),f=d!=a.Init&&Rc(d);f&&f.detach&&f.detach(b,e),e.attach&&e.attach(b,f||null)}),Pc("extraKeys",null),Pc("lineWrapping",!1,e,!0),Pc("gutters",[],function(a){n(a.options),i(a)},!0),Pc("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?y(a.display)+"px":"0",a.refresh()},!0),Pc("coverGutterNextToScrollbar",!1,function(a){s(a)},!0),Pc("scrollbarStyle","native",function(a){r(a),s(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),Pc("lineNumbers",!1,function(a){n(a.options),i(a)},!0),Pc("firstLineNumber",1,i,!0),Pc("lineNumberFormatter",function(a){return a},i,!0),Pc("showCursorWhenSelecting",!1,Ha,!0),Pc("resetSelectionOnContextMenu",!0),Pc("lineWiseCopyCut",!0),Pc("readOnly",!1,function(a,b){"nocursor"==b?(oc(a),a.display.input.blur(),a.display.disabled=!0):(a.display.disabled=!1,b||a.display.input.reset())}),Pc("disableInput",!1,function(a,b){b||a.display.input.reset()},!0),Pc("dragDrop",!0,Qb),Pc("cursorBlinkRate",530),Pc("cursorScrollMargin",0),Pc("cursorHeight",1,Ha,!0),Pc("singleCursorHeightPerLine",!0,Ha,!0),Pc("workTime",100),Pc("workDelay",100),Pc("flattenSpans",!0,d,!0),Pc("addModeClass",!1,d,!0),Pc("pollInterval",100),Pc("undoDepth",200,function(a,b){a.doc.history.undoDepth=b}),Pc("historyEventDelay",1250),Pc("viewportMargin",10,function(a){a.refresh()},!0),Pc("maxHighlightLength",1e4,d,!0),Pc("moveInputWithCursor",!0,function(a,b){b||a.display.input.resetPosition()}),Pc("tabindex",null,function(a,b){a.display.input.getField().tabIndex=b||""}),Pc("autofocus",null);var Yf=a.modes={},Zf=a.mimeModes={};a.defineMode=function(b,c){a.defaults.mode||"null"==b||(a.defaults.mode=b),arguments.length>2&&(c.dependencies=Array.prototype.slice.call(arguments,2)),Yf[b]=c},a.defineMIME=function(a,b){Zf[a]=b},a.resolveMode=function(b){if("string"==typeof b&&Zf.hasOwnProperty(b))b=Zf[b];else if(b&&"string"==typeof b.name&&Zf.hasOwnProperty(b.name)){var c=Zf[b.name];"string"==typeof c&&(c={name:c}),b=Ge(c,b),b.name=c.name}else if("string"==typeof b&&/^[\w\-]+\/[\w\-]+\+xml$/.test(b))return a.resolveMode("application/xml");return"string"==typeof b?{name:b}:b||{name:"null"}},a.getMode=function(b,c){var c=a.resolveMode(c),d=Yf[c.name];if(!d)return a.getMode(b,"text/plain");var e=d(b,c);if($f.hasOwnProperty(c.name)){var f=$f[c.name];for(var g in f)f.hasOwnProperty(g)&&(e.hasOwnProperty(g)&&(e["_"+g]=e[g]),e[g]=f[g])}if(e.name=c.name,c.helperType&&(e.helperType=c.helperType),c.modeProps)for(var g in c.modeProps)e[g]=c.modeProps[g];return e},a.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),a.defineMIME("text/plain","null");var $f=a.modeExtensions={};a.extendMode=function(a,b){var c=$f.hasOwnProperty(a)?$f[a]:$f[a]={};He(b,c)},a.defineExtension=function(b,c){a.prototype[b]=c},a.defineDocExtension=function(a,b){rg.prototype[a]=b},a.defineOption=Pc;var _f=[];a.defineInitHook=function(a){_f.push(a)};var ag=a.helpers={};a.registerHelper=function(b,c,d){ag.hasOwnProperty(b)||(ag[b]=a[b]={_global:[]}),ag[b][c]=d},a.registerGlobalHelper=function(b,c,d,e){a.registerHelper(b,c,e),ag[b]._global.push({pred:d,val:e})};var bg=a.copyState=function(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c},cg=a.startState=function(a,b,c){return!a.startState||a.startState(b,c)};a.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state,a=c.mode}return c||{mode:a,state:b}};var dg=a.commands={selectAll:function(a){a.setSelection(Ff(a.firstLine(),0),Ff(a.lastLine()),Dg)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Dg)},killLine:function(a){Mc(a,function(b){if(b.empty()){var c=Vd(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line0)e=new Ff(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),Ff(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var g=Vd(a.doc,e.line-1).text;g&&a.replaceRange(f.charAt(0)+"\n"+g.charAt(g.length-1),Ff(e.line-1,g.length-1),Ff(e.line,1),"+transpose")}c.push(new ma(e,e))}a.setSelections(c)})},newlineAndIndent:function(a){Cb(a,function(){for(var b=a.listSelections().length,c=0;c=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.posb},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);if(b>-1)return this.pos=b,!0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos0?null:(d&&b!==!1&&(this.pos+=d[0].length),d)}var e=function(a){return c?a.toLowerCase():a},f=this.string.substr(this.pos,a.length);if(e(f)==e(a))return b!==!1&&(this.pos+=a.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}};var jg=0,kg=a.TextMarker=function(a,b){this.lines=[],this.type=b,this.doc=a,this.id=++jg};ye(kg),kg.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;if(b&&tb(a),xe(this,"clear")){var c=this.find();c&&te(this,"clear",c.from,c.to)}for(var d=null,e=null,f=0;fa.display.maxLineLength&&(a.display.maxLine=i,a.display.maxLineLength=j,a.display.maxLineChanged=!0)}null!=d&&a&&this.collapsed&&Ib(a,d,e+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Ea(a.doc)),a&&te(a,"markerCleared",a,this),b&&vb(a),this.parent&&this.parent.clear()}},kg.prototype.find=function(a,b){null==a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;e1||!(this.children[0]instanceof Rd))){var h=[];this.collapse(h),this.children=[new Rd(h)],this.children[0].parent=this}},collapse:function(a){for(var b=0;b50){for(;e.lines.length>50;){var g=e.lines.splice(e.lines.length-25,25),h=new Rd(g);e.height-=h.height,this.children.splice(d+1,0,h),h.parent=this}this.maybeSpill()}break}a-=f}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new Sd(b);if(a.parent){a.size-=c.size,a.height-=c.height;var d=De(a.parent.children,a);a.parent.children.splice(d+1,0,c)}else{var e=new Sd(a.children);e.parent=a,a.children=[e,c],a=e}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0;d=0;f--)wc(this,d[f]);h?Aa(this,h):this.cm&&Ic(this.cm)}),undo:Fb(function(){yc(this,"undo")}),redo:Fb(function(){yc(this,"redo")}),undoSelection:Fb(function(){yc(this,"undo",!0)}),redoSelection:Fb(function(){yc(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=qa(this,a),b=qa(this,b);var d=[],e=a.line;return this.iter(a.line,b.line+1,function(f){var g=f.markedSpans;if(g)for(var h=0;hi.to||null==i.from&&e!=a.line||e==b.line&&i.from>b.ch||c&&!c(i.marker)||d.push(i.marker.parent||i.marker)}++e}),d},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;da?(b=a,!0):(a-=e,void++c)}),qa(this,Ff(c,b))},indexFromPos:function(a){a=qa(this,a);var b=a.ch;return a.lineb&&(b=a.from),null!=a.to&&a.to=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}},Hg=[""],Ig=function(a){a.select()};wf?Ig=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:nf&&(Ig=function(a){try{a.select()}catch(b){}});var Jg,Kg=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Lg=a.isWordChar=function(a){return/\w/.test(a)||a>"€"&&(a.toUpperCase()!=a.toLowerCase()||Kg.test(a))},Mg=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Jg=document.createRange?function(a,b,c,d){var e=document.createRange();return e.setEnd(d||a,c),e.setStart(a,b),e}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(e){return d}return d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d};var Ng=a.contains=function(a,b){if(3==b.nodeType&&(b=b.parentNode),a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)};nf&&of<11&&(Pe=function(){try{return document.activeElement}catch(a){return document.body}});var Og,Pg,Qg=a.rmClass=function(a,b){var c=a.className,d=Qe(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+(e?d[1]+e:"")}},Rg=a.addClass=function(a,b){var c=a.className;Qe(b).test(c)||(a.className+=(c?" ":"")+b)},Sg=!1,Tg=function(){if(nf&&of<9)return!1;var a=Me("div");return"draggable"in a||"dragDrop"in a}(),Ug=a.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;b<=d;){var e=a.indexOf("\n",b);e==-1&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");g!=-1?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},Vg=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return!(!b||b.parentElement()!=a)&&0!=b.compareEndPoints("StartToEnd",b)},Wg=function(){var a=Me("div");return"oncopy"in a||(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),Xg=null,Yg={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};a.keyNames=Yg,function(){for(var a=0;a<10;a++)Yg[a+48]=Yg[a+96]=String(a);for(var a=65;a<=90;a++)Yg[a]=String.fromCharCode(a);for(var a=1;a<=12;a++)Yg[a+111]=Yg[a+63235]="F"+a}();var Zg,$g=function(){function a(a){return a<=247?c.charAt(a):1424<=a&&a<=1524?"R":1536<=a&&a<=1773?d.charAt(a-1536):1774<=a&&a<=2220?"r":8192<=a&&a<=8203?"w":8204==a?"b":"L"}function b(a,b,c){this.level=a,this.from=b,this.to=c}var c="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",d="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,g=/[LRr]/,h=/[Lb1n]/,i=/[1n]/,j="L";return function(c){if(!e.test(c))return!1;for(var d,k=c.length,l=[],m=0;mf.ch&&(i.end=f.ch,i.string=i.string.slice(0,f.ch-i.start)):i={start:f.ch,end:f.ch,string:"",state:i.state,type:"."==i.string?"property":null};for(var j=i;"property"==j.type;){if(j=d(b,h(f.line,j.start)),"."!=j.string)return;if(j=d(b,h(f.line,j.start)),!k)var k=[];k.push(j)}return{list:g(i,k,c,e),from:h(f.line,i.start),to:h(f.line,i.end)}}}function e(){return BI.FormulaCollections}function f(a,b){return d(a,e(),function(a,b){return a.getTokenAt(b)},b)}function g(a,d,e,f){function g(a){0!=a.lastIndexOf(i,0)||c(h,a)||h.push(a)}var h=[],i=a.string;return i?(d&&d.length?d.pop():b(e,g),h):h}var h=a.Pos;a.registerHelper("hint","formula",f)}),function(a){a(CodeMirror)}(function(a){"use strict";a.defineMode("formula",function(){function a(a){for(var b={},c=0,d=a.length;c0){var y=w.bottom-w.top,z=q.top-(q.bottom-w.top);if(z-y>0)k.style.top=(s=q.top-y)+"px",t=!1;else if(y>v){k.style.height=v-5+"px",k.style.top=(s=q.bottom-w.top)+"px";var A=j.getCursor();f.from.ch!=A.ch&&(q=j.cursorCoords(A),k.style.left=(r=q.left)+"px",w=k.getBoundingClientRect())}}var B=w.right-u;if(B>0&&(w.right-w.left>u&&(k.style.width=u-5+"px",B-=w.right-w.left-u),k.style.left=(r=q.left-B)+"px"),j.addKeyMap(this.keyMap=d(b,{moveFocus:function(a,b){i.changeActive(i.selectedHint+a,b)},setFocus:function(a){i.changeActive(a)},menuSize:function(){return i.screenAmount()},length:l.length,close:function(){b.close()},pick:function(){i.pick()},data:f})),b.options.closeOnUnfocus){var C;j.on("blur",this.onBlur=function(){C=setTimeout(function(){b.close()},100)}),j.on("focus",this.onFocus=function(){clearTimeout(C)})}var D=j.getScrollInfo();return j.on("scroll",this.onScroll=function(){var a=j.getScrollInfo(),c=j.getWrapperElement().getBoundingClientRect(),d=s+D.top-a.top,e=d-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return t||(e+=k.offsetHeight),e<=c.top||e>=c.bottom?b.close():(k.style.top=d+"px",void(k.style.left=r+D.left-a.left+"px"))}),a.on(k,"dblclick",function(a){var b=e(k,a.target||a.srcElement);b&&null!=b.hintId&&(i.changeActive(b.hintId),i.pick())}),a.on(k,"click",function(a){var c=e(k,a.target||a.srcElement);c&&null!=c.hintId&&(i.changeActive(c.hintId),b.options.completeOnSingleClick&&i.pick())}),a.on(k,"mousedown",function(){setTimeout(function(){j.focus()},20)}),a.signal(f,"select",l[0],k.firstChild),!0}var g="CodeMirror-hint",h="CodeMirror-hint-active";a.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);var d={hint:b};if(c)for(var e in c)d[e]=c[e];return a.showHint(d)},a.defineExtension("showHint",function(c){if(!(this.listSelections().length>1||this.somethingSelected())){this.state.completionActive&&this.state.completionActive.close();var d=this.state.completionActive=new b(this,c);d.options.hint&&(a.signal(this,"startCompletion",this),d.update(!0))}});var i=window.requestAnimationFrame||function(a){return setTimeout(a,1e3/60)},j=window.cancelAnimationFrame||clearTimeout;b.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&a.signal(this.data,"close"),this.widget&&this.widget.close(),a.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(b,d){var e=b.list[d];if(e.hint)e.hint(this.cm,b,e);else if(this.cm.replaceRange(c(e),e.from||b.from,e.to||b.to,"complete"),e.isKeyword===!0);else{var f=this.cm.getCursor();this.cm.markText(e.from||b.from,f,{className:"#function",atomic:!0}),this.cm.replaceSelection("() "),f=this.cm.getCursor(),f.ch=f.ch-2,this.cm.setCursor(f),this.cm.focus()}a.signal(b,"pick",e),this.close()},cursorActivity:function(){this.debounce&&(j(this.debounce),this.debounce=0);var a=this.cm.getCursor(),b=this.cm.getLine(a.line);if(a.line!=this.startPos.line||b.length-a.ch!=this.startLen-this.startPos.ch||a.ch=this.data.list.length?b=c?this.data.list.length-1:0:b<0&&(b=c?0:this.data.list.length-1),this.selectedHint!=b){var d=this.hints.childNodes[this.selectedHint];d.className=d.className.replace(" "+h,""),d=this.hints.childNodes[this.selectedHint=b],d.className+=" "+h,d.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=d.offsetTop+d.offsetHeight-this.hints.clientHeight+3),a.signal(this.data,"select",this.data.list[this.selectedHint],d)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},a.registerHelper("hint","auto",function(b,c){var d,e=b.getHelpers(b.getCursor(),"hint");if(e.length)for(var f=0;f,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};a.defineOption("hintOptions",null)}),$.extend(BI,{Msg:function(){var a,b,c;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||$("body");var d=b.level||"normal",e=!!BI.isNull(b.autoClose)||b.autoClose,f=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:d,autoClose:e,text:a});BI.createWidget({type:"bi.absolute",element:c,items:[{el:f,left:"50%",top:10}]}),f.element.css({"margin-left":-1*f.element.outerWidth()/2}),f.element.removeClass("bi-message-leave").addClass("bi-message-enter"),e&&BI.delay(function(){f.element.removeClass("bi-message-enter").addClass("bi-message-leave"),BI.delay(function(){f.destroy()},1e3)},5e3)},_show:function(d,e,f,g){b=$('
').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=$('
').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-message-content bi-card",items:{north:{el:{type:"bi.border",cls:"bi-message-title bi-background",items:{center:{el:{type:"bi.label",text:e||BI.i18nText("BI-Basic_Prompt"),textAlign:"left",hgap:20,height:50}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",handler:function(){h()}},width:60}}},height:50},center:{el:{type:"bi.text",cls:"bi-message-text",tgap:60,hgap:20,lineHeight:30,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",hgap:5,items:i},top:0,left:20,right:20,bottom:0}]},height:60}},width:400,height:300}]};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(),0===b.scrollLeft&&0===b.scrollTop||BI.nextTick(function(){a.element.scrollTop(b.scrollTop),a.element.scrollLeft(b.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})),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.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",header:null,body:null,footer:null})},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(),e=$("body").width(),f=$("body").height();a.startX+=b,a.startY+=c,a.element.css({left:BI.clamp(a.startX,0,e-d.width)+"px",top:BI.clamp(a.startY,0,f-d.height)+"px"}),BI.Resizers._resize()},function(){a.tracker.releaseMouseMoves()},window);var c={north:{el:{type:"bi.border",cls:"bi-message-title bi-background",ref:function(b){a.dragger=b},items:{center:{el:{type:"bi.absolute",items:[{el:BI.isPlainObject(b.header)?BI.createWidget(b.header):{type:"bi.label",height:this._constant.HEADER_HEIGHT,text:b.header,title:b.header,textAlign:"left"},left:10,top:0,right:0,bottom:0}]}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){a.close()}},width:60}}},height:this._constant.HEADER_HEIGHT},center:{el:{type:"bi.absolute",items:[{el:BI.createWidget(b.body),left:20,top:10,right:20,bottom:0}]}}};b.footer&&(c.south={el:{type:"bi.absolute",items:[{el:BI.createWidget(b.footer),left:20,top:0,right:20,bottom:0}]},height:44});var d=this._calculateSize();return{type:"bi.border",items:c,width:d.width,height:d.height}},mounted:function(){var a=this;this.dragger.element.mousedown(function(b){var c=a.element.offset();a.startX=c.left,a.startY=c.top,a.tracker.captureMouseMoves(b)})},_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=220;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:25,lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap: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.button_group.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"}),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-border-top",height:30,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.button_group},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||30:0,c=this.tab?this.tab.attr("height")||25:0,d=(this.tool&&this.tool.attr("height")||25)*(this.tool&&this.tool.isVisible()?1:0);this.view.resetHeight?this.view.resetHeight(a-b-c-d-2):this.view.element.css({"max-height":a-b-c-d-2+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.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="IconButton.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="ImageButton.EVENT_CHANGE",BI.shortcut("bi.image_button",BI.ImageButton),function(a){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",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",forceCenter:!1,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?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",width:18,height:a.height-2}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value,height:a.height-2}),BI.createWidget({type:"bi.horizontal_auto",cls:a.iconCls,element:this,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:a.textAlign,whiteSpace:a.whiteSpace,forceCenter:a.forceCenter,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"}(jQuery),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",forceCenter:!1,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,forceCenter:a.forceCenter,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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),c=BI.createWidget({type:"bi.layout",width:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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},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.center_adapt",width:a.height,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(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", +}}),rg.prototype.eachLine=rg.prototype.iter;var sg="iter insert remove copy getEditor constructor".split(" ");for(var tg in rg.prototype)rg.prototype.hasOwnProperty(tg)&&De(sg,tg)<0&&(a.prototype[tg]=function(a){return function(){return a.apply(this.doc,arguments)}}(rg.prototype[tg]));ye(rg);var ug=a.e_preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},vg=a.e_stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},wg=a.e_stop=function(a){ug(a),vg(a)},xg=a.on=function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var d=a._handlers||(a._handlers={}),e=d[b]||(d[b]=[]);e.push(c)}},yg=a.off=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else{var d=a._handlers&&a._handlers[b];if(!d)return;for(var e=0;e=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}},Hg=[""],Ig=function(a){a.select()};wf?Ig=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:nf&&(Ig=function(a){try{a.select()}catch(b){}});var Jg,Kg=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Lg=a.isWordChar=function(a){return/\w/.test(a)||a>"€"&&(a.toUpperCase()!=a.toLowerCase()||Kg.test(a))},Mg=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Jg=document.createRange?function(a,b,c,d){var e=document.createRange();return e.setEnd(d||a,c),e.setStart(a,b),e}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(e){return d}return d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d};var Ng=a.contains=function(a,b){if(3==b.nodeType&&(b=b.parentNode),a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)};nf&&of<11&&(Pe=function(){try{return document.activeElement}catch(a){return document.body}});var Og,Pg,Qg=a.rmClass=function(a,b){var c=a.className,d=Qe(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+(e?d[1]+e:"")}},Rg=a.addClass=function(a,b){var c=a.className;Qe(b).test(c)||(a.className+=(c?" ":"")+b)},Sg=!1,Tg=function(){if(nf&&of<9)return!1;var a=Me("div");return"draggable"in a||"dragDrop"in a}(),Ug=a.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;b<=d;){var e=a.indexOf("\n",b);e==-1&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");g!=-1?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},Vg=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return!(!b||b.parentElement()!=a)&&0!=b.compareEndPoints("StartToEnd",b)},Wg=function(){var a=Me("div");return"oncopy"in a||(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),Xg=null,Yg={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};a.keyNames=Yg,function(){for(var a=0;a<10;a++)Yg[a+48]=Yg[a+96]=String(a);for(var a=65;a<=90;a++)Yg[a]=String.fromCharCode(a);for(var a=1;a<=12;a++)Yg[a+111]=Yg[a+63235]="F"+a}();var Zg,$g=function(){function a(a){return a<=247?c.charAt(a):1424<=a&&a<=1524?"R":1536<=a&&a<=1773?d.charAt(a-1536):1774<=a&&a<=2220?"r":8192<=a&&a<=8203?"w":8204==a?"b":"L"}function b(a,b,c){this.level=a,this.from=b,this.to=c}var c="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",d="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,g=/[LRr]/,h=/[Lb1n]/,i=/[1n]/,j="L";return function(c){if(!e.test(c))return!1;for(var d,k=c.length,l=[],m=0;mf.ch&&(i.end=f.ch,i.string=i.string.slice(0,f.ch-i.start)):i={start:f.ch,end:f.ch,string:"",state:i.state,type:"."==i.string?"property":null};for(var j=i;"property"==j.type;){if(j=d(b,h(f.line,j.start)),"."!=j.string)return;if(j=d(b,h(f.line,j.start)),!k)var k=[];k.push(j)}return{list:g(i,k,c,e),from:h(f.line,i.start),to:h(f.line,i.end)}}}function e(){return BI.FormulaCollections}function f(a,b){return d(a,e(),function(a,b){return a.getTokenAt(b)},b)}function g(a,d,e,f){function g(a){0!=a.lastIndexOf(i,0)||c(h,a)||h.push(a)}var h=[],i=a.string;return i?(d&&d.length?d.pop():b(e,g),h):h}var h=a.Pos;a.registerHelper("hint","formula",f)}),function(a){a(CodeMirror)}(function(a){"use strict";a.defineMode("formula",function(){function a(a){for(var b={},c=0,d=a.length;c0){var y=w.bottom-w.top,z=q.top-(q.bottom-w.top);if(z-y>0)k.style.top=(s=q.top-y)+"px",t=!1;else if(y>v){k.style.height=v-5+"px",k.style.top=(s=q.bottom-w.top)+"px";var A=j.getCursor();f.from.ch!=A.ch&&(q=j.cursorCoords(A),k.style.left=(r=q.left)+"px",w=k.getBoundingClientRect())}}var B=w.right-u;if(B>0&&(w.right-w.left>u&&(k.style.width=u-5+"px",B-=w.right-w.left-u),k.style.left=(r=q.left-B)+"px"),j.addKeyMap(this.keyMap=d(b,{moveFocus:function(a,b){i.changeActive(i.selectedHint+a,b)},setFocus:function(a){i.changeActive(a)},menuSize:function(){return i.screenAmount()},length:l.length,close:function(){b.close()},pick:function(){i.pick()},data:f})),b.options.closeOnUnfocus){var C;j.on("blur",this.onBlur=function(){C=setTimeout(function(){b.close()},100)}),j.on("focus",this.onFocus=function(){clearTimeout(C)})}var D=j.getScrollInfo();return j.on("scroll",this.onScroll=function(){var a=j.getScrollInfo(),c=j.getWrapperElement().getBoundingClientRect(),d=s+D.top-a.top,e=d-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return t||(e+=k.offsetHeight),e<=c.top||e>=c.bottom?b.close():(k.style.top=d+"px",void(k.style.left=r+D.left-a.left+"px"))}),a.on(k,"dblclick",function(a){var b=e(k,a.target||a.srcElement);b&&null!=b.hintId&&(i.changeActive(b.hintId),i.pick())}),a.on(k,"click",function(a){var c=e(k,a.target||a.srcElement);c&&null!=c.hintId&&(i.changeActive(c.hintId),b.options.completeOnSingleClick&&i.pick())}),a.on(k,"mousedown",function(){setTimeout(function(){j.focus()},20)}),a.signal(f,"select",l[0],k.firstChild),!0}var g="CodeMirror-hint",h="CodeMirror-hint-active";a.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);var d={hint:b};if(c)for(var e in c)d[e]=c[e];return a.showHint(d)},a.defineExtension("showHint",function(c){if(!(this.listSelections().length>1||this.somethingSelected())){this.state.completionActive&&this.state.completionActive.close();var d=this.state.completionActive=new b(this,c);d.options.hint&&(a.signal(this,"startCompletion",this),d.update(!0))}});var i=window.requestAnimationFrame||function(a){return setTimeout(a,1e3/60)},j=window.cancelAnimationFrame||clearTimeout;b.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&a.signal(this.data,"close"),this.widget&&this.widget.close(),a.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(b,d){var e=b.list[d];if(e.hint)e.hint(this.cm,b,e);else if(this.cm.replaceRange(c(e),e.from||b.from,e.to||b.to,"complete"),e.isKeyword===!0);else{var f=this.cm.getCursor();this.cm.markText(e.from||b.from,f,{className:"#function",atomic:!0}),this.cm.replaceSelection("() "),f=this.cm.getCursor(),f.ch=f.ch-2,this.cm.setCursor(f),this.cm.focus()}a.signal(b,"pick",e),this.close()},cursorActivity:function(){this.debounce&&(j(this.debounce),this.debounce=0);var a=this.cm.getCursor(),b=this.cm.getLine(a.line);if(a.line!=this.startPos.line||b.length-a.ch!=this.startLen-this.startPos.ch||a.ch=this.data.list.length?b=c?this.data.list.length-1:0:b<0&&(b=c?0:this.data.list.length-1),this.selectedHint!=b){var d=this.hints.childNodes[this.selectedHint];d.className=d.className.replace(" "+h,""),d=this.hints.childNodes[this.selectedHint=b],d.className+=" "+h,d.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=d.offsetTop+d.offsetHeight-this.hints.clientHeight+3),a.signal(this.data,"select",this.data.list[this.selectedHint],d)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},a.registerHelper("hint","auto",function(b,c){var d,e=b.getHelpers(b.getCursor(),"hint");if(e.length)for(var f=0;f,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};a.defineOption("hintOptions",null)}),$.extend(BI,{Msg:function(){var a,b,c;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||$("body");var d=b.level||"normal",e=!!BI.isNull(b.autoClose)||b.autoClose,f=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:d,autoClose:e,text:a});BI.createWidget({type:"bi.absolute",element:c,items:[{el:f,left:"50%",top:10}]}),f.element.css({"margin-left":-1*f.element.outerWidth()/2}),f.element.removeClass("bi-message-leave").addClass("bi-message-enter"),e&&BI.delay(function(){f.element.removeClass("bi-message-enter").addClass("bi-message-leave"),BI.delay(function(){f.destroy()},1e3)},5e3)},_show:function(d,e,f,g){b=$('
').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=$('
').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-message-content bi-card",items:{north:{el:{type:"bi.border",cls:"bi-message-title bi-background",items:{center:{el:{type:"bi.label",text:e||BI.i18nText("BI-Basic_Prompt"),textAlign:"left",hgap:20,height:50}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",handler:function(){h()}},width:60}}},height:50},center:{el:{type:"bi.text",cls:"bi-message-text",tgap:60,hgap:20,lineHeight:30,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",hgap:5,items:i},top:0,left:20,right:20,bottom:0}]},height:60}},width:400,height:300}]};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(),0===b.scrollLeft&&0===b.scrollTop||BI.nextTick(function(){a.element.scrollTop(b.scrollTop),a.element.scrollLeft(b.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})),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.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",header:null,body:null,footer:null})},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(),e=$("body").width(),f=$("body").height();a.startX+=b,a.startY+=c,a.element.css({left:BI.clamp(a.startX,0,e-d.width)+"px",top:BI.clamp(a.startY,0,f-d.height)+"px"}),BI.Resizers._resize()},function(){a.tracker.releaseMouseMoves()},window);var c={north:{el:{type:"bi.border",cls:"bi-message-title bi-background",ref:function(b){a.dragger=b},items:{center:{el:{type:"bi.absolute",items:[{el:BI.isPlainObject(b.header)?BI.createWidget(b.header):{type:"bi.label",height:this._constant.HEADER_HEIGHT,text:b.header,title:b.header,textAlign:"left"},left:10,top:0,right:0,bottom:0}]}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){a.close()}},width:60}}},height:this._constant.HEADER_HEIGHT},center:{el:{type:"bi.absolute",items:[{el:BI.createWidget(b.body),left:20,top:10,right:20,bottom:0}]}}};b.footer&&(c.south={el:{type:"bi.absolute",items:[{el:BI.createWidget(b.footer),left:20,top:0,right:20,bottom:0}]},height:44});var d=this._calculateSize();return{type:"bi.border",items:c,width:d.width,height:d.height}},mounted:function(){var a=this;this.dragger.element.mousedown(function(b){var c=a.element.offset();a.startX=c.left,a.startY=c.top,a.tracker.captureMouseMoves(b)})},_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=220;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:25,lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap: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.stopEvent()},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.button_group.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"}),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-border-top",height:30,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.button_group},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||30:0,c=this.tab?this.tab.attr("height")||25:0,d=(this.tool&&this.tool.attr("height")||25)*(this.tool&&this.tool.isVisible()?1:0);this.view.resetHeight?this.view.resetHeight(a-b-c-d-2):this.view.element.css({"max-height":a-b-c-d-2+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.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="IconButton.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="ImageButton.EVENT_CHANGE",BI.shortcut("bi.image_button",BI.ImageButton),function(a){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",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",forceCenter:!1,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?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",width:18,height:a.height-2}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value,height:a.height-2}),BI.createWidget({type:"bi.horizontal_auto",cls:a.iconCls,element:this,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:a.textAlign,whiteSpace:a.whiteSpace,forceCenter:a.forceCenter,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"}(jQuery),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",forceCenter:!1,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,forceCenter:a.forceCenter,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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),c=BI.createWidget({type:"bi.layout",width:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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},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.center_adapt",width:a.height,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(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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",cls:a.iconCls2,width:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.CodeEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(),{baseCls:"bi-code-editor",value:"",watermark:"",lineHeight:2,readOnly:!1,lineNumbers:!1,paramFormatter:function(a){return a}})},_init:function(){BI.CodeEditor.superclass._init.apply(this,arguments);var a=this.options,b=this,c={textWrapping:!0,lineWrapping:!0,lineNumbers:!1,readOnly:a.readOnly,specialChars:/[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/};a.readOnly&&(c.cursorBlinkRate=-1),this.editor=CodeMirror(this.element[0],c),1===a.lineHeight?this.element.addClass("codemirror-low-line-height"):this.element.addClass("codemirror-high-line-height"),this.editor.on("change",function(a,c){BI.nextTick(function(){b.fireEvent(BI.CodeEditor.EVENT_CHANGE)})}),this.editor.on("focus",function(){b.watermark.setVisible(!1),b.fireEvent(BI.CodeEditor.EVENT_FOCUS)}),this.editor.on("blur",function(){b.watermark.setVisible(BI.isEmptyString(b.getValue())),b.fireEvent(BI.CodeEditor.EVENT_BLUR)}),this.watermark=BI.createWidget({type:"bi.label",text:a.watermark,cls:"bi-water-mark",whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind("mousedown",function(a){b.insertString(""),b.editor.focus(),a.stopEvent()}),this.watermark.element.bind("click",function(a){b.editor.focus(),a.stopEvent()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,top:0,left:a.lineNumbers?35:5}]})},mounted:function(){var a=this.options;(BI.isNumber(a.value)||BI.isString(a.value))&&this.setValue(a.value),BI.isNotNull(a.style)&&this.setStyle(a.style)},_setEnable:function(a){BI.CodeEditor.superclass._setEnable.apply(this,arguments),this.editor.setOption("readOnly",a!==!0&&"nocursor")},_checkWaterMark:function(){var a=this.options;BI.isEmptyString(this.editor.getValue())&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},insertParam:function(a){var b=a;a=this.options.paramFormatter(a);var c=this.editor.getCursor();this.editor.replaceSelection("​"+a+"​");var d=this.editor.getCursor(),e={className:"param",atomic:!0};BI.isNotNull(a.match(/^$/))&&(e.className="error-param"),e.value=b,this.editor.markText(c,d,e),this.editor.replaceSelection(" "),this.editor.focus()},insertString:function(a){this.editor.replaceSelection(a),this.editor.focus()},getValue:function(){return this.editor.getValue("\n",function(a){var b=a.text,c=a.text,d=0;return c.text=b,_.forEach(_.sortBy(a.markedSpans,"from"),function(a,b){switch(a.marker.className){case"param":case"error-param":var e=a.to-a.from;c=c.substr(0,a.from+d)+"${"+a.marker.value+"}"+c.substr(a.to+d,c.length),d+=3,d+=a.marker.value.length-e}}),c})},_analyzeContent:function(a){var b=/\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]|\$[^\{]*[^\$\{]/g;return a.match(b)},setValue:function(a){var b,c=this;this.refresh(),c.editor.setValue(""),b=this._analyzeContent(a||""),BI.each(b,function(a,b){var d=/\$[\{][^\}]*[\}]/,e=b.match(d);BI.isNotEmptyArray(e)?c.insertParam(e[0].substring(2,b.length-1)):c.insertString(b)}),this._checkWaterMark()},focus:function(){this.editor.focus()},blur:function(){this.editor.getInputField().blur()},setStyle:function(a){this.style=a,this.element.css(a)},getStyle:function(){return this.style},refresh:function(){var a=this;BI.nextTick(function(){a.editor.refresh()})}}),BI.CodeEditor.EVENT_CHANGE="EVENT_CHANGE",BI.CodeEditor.EVENT_BLUR="EVENT_BLUR",BI.CodeEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.code_editor",BI.CodeEditor),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-editor",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,forceCenter:!0,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()}),this.watermark.element.css({position:"absolute",left:"3px",right:"3px",top:"0px",bottom:"0px"}));var c=[{el:{type:"bi.default",items:this.watermark?[this.editor,this.watermark]:[this.editor]},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:c}),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){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.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(this.editor.getValue())),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,this),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()},resetLastValidValue:function(){this.editor.resetLastValidValue()},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()}}),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_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="MultifileEditor.EVENT_CHANGE",BI.MultifileEditor.EVENT_UPLOADSTART="MultifileEditor.EVENT_UPLOADSTART",BI.MultifileEditor.EVENT_ERROR="MultifileEditor.EVENT_ERROR",BI.MultifileEditor.EVENT_PROGRESS="MultifileEditor.EVENT_PROGRESS",BI.MultifileEditor.EVENT_UPLOADED="MultifileEditor.EVENT_UPLOADED",BI.shortcut("bi.multifile_editor",BI.MultifileEditor),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},_init:function(){BI.TextAreaEditor.superclass._init.apply(this,arguments);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:0,right:3,top:0,bottom:5}]}),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)),$(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&($(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),$(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&b.setValue(a.value),BI.isNotNull(a.style)&&b.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",textAlign:"left",height:30,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:0,top:0,right:0}]})))},_focus:function(){this.content.element.addClass("textarea-editor-focus"),this._checkWaterMark()},_blur:function(){this.content.element.removeClass("textarea-editor-focus"),this._checkWaterMark()},focus:function(){this._focus(),this.content.element.focus()},blur:function(){this._blur(),this.content.element.blur()},getValue:function(){return this.content.element.val()},setValue:function(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)}}),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.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()&&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,{baseCls:(a.baseCls||"")+" bi-iframe",src:"",width:"100%",height:"100%"})},_init:function(){var a=this.options;this.options.element=$("'))}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||window.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loaded",name:"",url:"",multiple:!0,accept:"",maxSize:-1})},_init:function(){var a=this.options;BI.File.superclass._init.apply(this,arguments),a.multiple===!0&&this.element.attr("multiple","multiple"),this.element.attr("name",a.name||this.getName()),this.element.attr("title",a.title||"")},mounted:function(){var a=this,b=this.options,c=this.wrap=this._wrap(this.element[0],b.maxSize);c.onloadstart=function(b,c){a.fireEvent(BI.File.EVENT_UPLOADSTART,arguments)},c.onprogress=function(b,c){this.file.fileSize!==-1&&b.simulation,a.fireEvent(BI.File.EVENT_PROGRESS,{file:this.file,total:b.total,loaded:b.loaded,simulation:b.simulation})},c.onerror=function(){a.fireEvent(BI.File.EVENT_ERROR)},c.onload=function(b,c){var d=this;setTimeout(function(){d.clean(),d.hide(),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);d>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.dom.input).click()},upload:function(a){this.wrap.upload(a)},getValue:function(){return this.wrap.attach_array},reset:function(){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="BI.File.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)}(),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",element:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1})},_init:function(){BI.Input.superclass._init.apply(this,arguments);var a=this,b=!1,c=!1,d=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),e=BI.debounce(BI.bind(this._click,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(d){c=!1,b=d.ctrlKey,a.fireEvent(BI.Input.EVENT_QUICK_DOWN)}).keyup(function(b){c&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,d(b.keyCode))}).on("input propertychange",function(b){BI.isNotNull(b.keyCode)&&(c=!0,a._keydown_=!0,d(b.keyCode))}).click(function(a){a.stopPropagation(),e()}).mousedown(function(b){a.element.val(a.element.val())}).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(){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()&&(b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM)),b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this._focus(),this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){this.isValid()&&BI.trim(this._lastValidValue)===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))),b===!0&&86===a?this._valueChange():(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())?(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._lastValidValue||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._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},_setValid:function(){BI.Input.superclass._setValid.apply(this,arguments),this.isValid()?(this.element.removeClass("bi-input-error"),this.fireEvent(BI.Input.EVENT_VALID,BI.trim(this.getValue()),this)):(this._lastValidValue===this.getValue()&&(this._lastValidValue=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_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.Radio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.Radio.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.Radio.superclass._init.apply(this,arguments)},doClick:function(){BI.Radio.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Radio.EVENT_CHANGE)}}),BI.Radio.EVENT_CHANGE="Radio.EVENT_CHANGE",BI.shortcut("bi.radio",BI.Radio),BI.Label=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Label.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-label",textAlign:"center",whiteSpace:"nowrap",forceCenter:!1,textWidth:null,textHeight:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",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}},_init:function(){BI.Label.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();if(BI.isNumber(a.width)&&a.width>0){if(BI.isNumber(a.textWidth)&&a.textWidth>0){if(BI.isNumber(a.height)&&a.height>0){var c=(a.width-a.textWidth)/2;return BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:c+a.hgap+a.lgap,right:c+a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]}),void this.element.css({"line-height":a.height+"px"})}return b.width=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})}return"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",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:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.absolute",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(b.width=a.width-2*a.hgap,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}))}return BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=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?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?BI.isNumber(a.textHeight)&&a.textHeight>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.element.css({"line-height":a.height+"px"}),this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),a.forceCenter?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]})):(this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})))},_createNotCenterEl:function(){var a=this.options,b=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?(BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]}),void this.element.css({"line-height":a.height+"px"})):void BI.createWidget({type:"bi.vertical_adapt",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(b)}]})):"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",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:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.absolute",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(b.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:"bi.vertical_adapt",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(b)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=a.textWidth,void BI.createWidget({type:"bi.vertical_adapt",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(b)}]})):"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",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:[this.text]})):BI.isNumber(a.height)&&a.height>0?BI.isNumber(a.textHeight)&&a.textHeight>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.element.css({"line-height":a.height+"px"}),this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),a.forceCenter?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",element:this,items:[this.text]})):(this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})))},_setEnable:function(a){BI.Label.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},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.Label.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.Label.superclass.populate.apply(this,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:10,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.center_adapt",cls:d+" toast-icon",items:[{type:"bi.icon"}],width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,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:5,columnSize:f})},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:10},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:20})},_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:16}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,textHeight:20,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(){}}),function(a){a(CodeMirror)}(function(a){function b(a){return"[object Array]"==Object.prototype.toString.call(a)}function c(b){var c=b.doc.modeOption;return"sql"===c&&(c="text/x-sql"),a.resolveMode(c).keywords}function d(b){var c=b.doc.modeOption;return"sql"===c&&(c="text/x-sql"),a.resolveMode(c).identifierQuote||"`"}function e(a){return"string"==typeof a?a:a.text}function f(a,c){return b(c)&&(c={columns:c}),c.text||(c.text=a),c}function g(a){var c={};if(b(a))for(var d=a.length-1;d>=0;d--){var g=a[d];c[e(g).toUpperCase()]=f(e(g),g)}else if(a)for(var h in a)c[h.toUpperCase()]=f(h,a[h]);return c}function h(a){return q[a.toUpperCase()]}function i(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function j(a,b){if(BI.isNotEmptyString(a)&&b.length!==a.length){var c=a.length,d=e(b).substr(0,c);return a.toUpperCase()===d.toUpperCase()}}function k(a,c,d,e){if(b(d))for(var f=0;f0)&&w(m,i[n])<=0){j={start:l,end:i[n]};break}l=i[n]}for(var p=c.getRange(j.start,j.end,!1),n=0;nl.ch&&(m.end=l.ch,m.string=m.string.slice(0,l.ch-m.start)),m.string.match(/^[.`"\w@]\w*$/)?(w=m.string,o=m.start,u=m.end):(o=u=l.ch,w=""),"."==w.charAt(0)||w.charAt(0)==t?o=n(l,m,x,a):(k(x,w,q,function(a){return a}),k(x,w,r,function(a){return a}),f||k(x,w,s,function(a,b){var c=b47&&c.charCodeAt(0)<58)return a.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),n.decimallessFloat&&a.match(/^\.(?!\.)/),"number";if("?"==c&&(a.eatSpace()||a.eol()||a.eat(";")))return"variable-3";if("'"==c||'"'==c&&n.doubleQuote)return b.tokenize=e(c),b.tokenize(a,b);if((n.nCharCast&&("n"==c||"N"==c)||n.charsetCast&&"_"==c&&a.match(/[a-z][a-z0-9]*/i))&&("'"==a.peek()||'"'==a.peek()))return"keyword";if(/^[\(\),\;\[\]]/.test(c))return null;if(n.commentSlashSlash&&"/"==c&&a.eat("/"))return a.skipToEnd(),"comment";if(n.commentHash&&"#"==c||"-"==c&&a.eat("-")&&(!n.commentSpaceRequired||a.eat(" ")))return a.skipToEnd(),"comment";if("/"==c&&a.eat("*"))return b.tokenize=f(1),b.tokenize(a,b);if("."!=c){if(m.test(c))return a.eatWhile(m),null;if("{"==c&&(a.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||a.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";a.eatWhile(/^[_\w\d]/);var g=a.current().toLowerCase();return p.hasOwnProperty(g)&&(a.match(/^( )+'[^']*'/)||a.match(/^( )+"[^"]*"/))?"number":j.hasOwnProperty(g)?"atom":k.hasOwnProperty(g)?"builtin":q.hasOwnProperty(g)&&"("===a.peek()?"function":l.hasOwnProperty(g)?"keyword":i.hasOwnProperty(g)?"string-2":null}return n.zerolessFloat&&a.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":a.match(/^\.+/)?null:n.ODBCdotTable&&a.match(/^[\w\d_]+/)?"variable-2":void 0}function e(a){return function(b,c){for(var e,f=!1;null!=(e=b.next());){if(e==a&&!f){c.tokenize=d;break}f=!f&&"\\"==e}return"string"}}function f(a){return function(b,c){var e=b.match(/^.*?(\/\*|\*\/)/);return e?"/*"==e[1]?c.tokenize=f(a+1):a>1?c.tokenize=f(a-1):c.tokenize=d:b.skipToEnd(),"comment"}}function g(a,b,c){b.context={prev:b.context,indent:a.indentation(),col:a.column(),type:c}}function h(a){a.indent=a.context.indent,a.context=a.context.prev}var i=c.client||{},j=c.atoms||{"false":!0,"true":!0,"null":!0},k=c.builtin||{},l=c.keywords||{},m=c.operatorChars||/^[*+\-%<>!=&|~^]/,n=c.support||{},o=c.hooks||{},p=c.dateSQL||{date:!0,time:!0,timestamp:!0},q=c.functions||{};return{startState:function(){return{tokenize:d,context:null}},token:function(a,b){if(a.sol()&&b.context&&null==b.context.align&&(b.context.align=!1),b.tokenize==d&&a.eatSpace())return null;var c=b.tokenize(a,b);if("comment"==c)return c;b.context&&null==b.context.align&&(b.context.align=!0);var e=a.current();return"("==e?g(a,b,")"):"["==e?g(a,b,"]"):b.context&&b.context.type==e&&h(b),c},indent:function(c,d){var e=c.context;if(!e)return a.Pass;var f=d.charAt(0)==e.type;return e.align?e.col+(f?0:1):e.indent+(f?0:b.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:n.commentSlashSlash?"//":n.commentHash?"#":"--"}}),function(){function b(a){for(var b={},c=a.split(" "),d=0;d!=]/,dateSQL:b("date time timestamp"),support:b("ODBCdotTable doubleQuote binaryNumber hexNumber"),functions:BI.makeObject(BI.FormulaCollections,!0)})}()}),BI.SQLEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(),{baseCls:"bi-sql-editor",value:"",lineHeight:2,showHint:!0,supportFunction:!1,supportParam:!1})},_init:function(){BI.CodeEditor.superclass._init.apply(this,arguments);var a=this.options,b=this;this.editor=CodeMirror(this.element[0],{mode:"text/x-sql",textWrapping:!0,lineWrapping:!0,lineNumbers:!1}),1===a.lineHeight?this.element.addClass("codemirror-low-line-height"):this.element.addClass("codemirror-high-line-height"),this.editor.on("change",function(c,d){b._checkWaterMark(),a.showHint&&CodeMirror.showHint(c,CodeMirror.sqlHint,{completeSingle:!1,supportFunction:a.supportFunction}),BI.nextTick(function(){b.fireEvent(BI.FormulaEditor.EVENT_CHANGE)})}),this.editor.on("focus",function(){b._checkWaterMark(),b.fireEvent(BI.FormulaEditor.EVENT_FOCUS)}),this.editor.on("blur",function(){b.fireEvent(BI.FormulaEditor.EVENT_BLUR)}),this.watermark=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Please_Enter_SQL"),cls:"bi-water-mark",whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind("mousedown",function(a){b.insertString(""),b.editor.focus(),a.stopEvent()}),this.watermark.element.bind("click",function(a){b.editor.focus(),a.stopEvent()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,top:0,left:5}]}),BI.isKey(a.value)&&BI.nextTick(function(){b.setValue(a.value)})},insertString:function(a){this.editor.replaceSelection(a),this.editor.focus()},insertParam:function(a){var b=a,c=this.editor.getCursor();this.editor.replaceSelection(a);var d=this.editor.getCursor(),e={className:"param",atomic:!0};e.value=b,this.editor.markText(c,d,e),this.editor.replaceSelection(" "),this.editor.focus()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&BI.isEmptyString(this.editor.getValue())&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible(); },_analyzeContent:function(a){var b=/\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]/g;return a.match(b)},getValue:function(){var a=this.editor.getValue("\n",function(a){var b=a.text,c=a.text,d=0;return c.text=b,_.forEach(_.sortBy(a.markedSpans,"from"),function(a,b){switch(a.marker.className){case"param":case"error-param":var e=a.to-a.from;c=c.substr(0,a.from+d)+"${"+a.marker.value+"}"+c.substr(a.to+d,c.length),d+=3,d+=a.marker.value.length-e}}),c});return a.replaceAll("(\\$\\{.*?\\})\\s","$1")},setValue:function(a){var b,c=this,d=this.options;this.refresh(),c.editor.setValue(""),b=this._analyzeContent(a||""),BI.each(b,function(a,b){var e=/\$[\{][^\}]*[\}]/,f=b.match(e);BI.isNotEmptyArray(f)&&d.supportParam?c.insertParam(f[0].substring(2,b.length-1)):c.insertString(b)}),this._checkWaterMark()},refresh:function(){var a=this;BI.nextTick(function(){a.editor.refresh()})}}),BI.shortcut("bi.sql_editor",BI.SQLEditor),function(a,b){"function"==typeof define&&define.amd?define("eve",function(){return b()}):"object"==typeof exports?module.exports=b():a.eve=b()}(this,function(){var a,b,c="0.4.2",d="hasOwnProperty",e=/[\.\/]/,f="*",g=function(){},h=function(a,b){return a-b},i={n:{}},j=function(c,d){c=String(c);var e,f=b,g=Array.prototype.slice.call(arguments,2),i=j.listeners(c),k=0,l=[],m={},n=[],o=a;a=c,b=0;for(var p=0,q=i.length;p=1e3&&delete h[i.shift()],i.push(g),h[g]=a[C](b,f),c?c(h[g]):h[g])}return e}function f(){return this.hex}function g(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function h(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function i(a,b,c,d,e,f,g,i,j){null==j&&(j=1),j=j>1?1:j<0?0:j;for(var k=j/2,l=12,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;po;)m/=2,n+=(kN(e,g)||N(b,d)N(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+O(a,c).toFixed(2)||n>+N(a,c).toFixed(2)||n<+O(e,g).toFixed(2)||n>+N(e,g).toFixed(2)||o<+O(b,d).toFixed(2)||o>+N(b,d).toFixed(2)||o<+O(f,h).toFixed(2)||o>+N(f,h).toFixed(2)))return{x:l,y:m}}}}function l(a,c,d){var e=b.bezierBBox(a),f=b.bezierBBox(c);if(!b.isBBoxIntersect(e,f))return d?0:[];for(var g=i.apply(0,a),h=i.apply(0,c),j=N(~~(g/5),1),l=N(~~(h/5),1),m=[],n=[],o={},p=d?0:[],q=0;q=0&&A<=1.001&&B>=0&&B<=1.001&&(d?p++:p.push({x:z.x,y:z.y,t1:O(A,1),t2:O(B,1)}))}}return p}function m(a,c,d){a=b._path2curve(a),c=b._path2curve(c);for(var e,f,g,h,i,j,k,m,n,o,p=d?0:[],q=0,r=a.length;qd)return d;for(;cf?c=e:d=e,e=(d-c)/2+c}return e}var j=3*b,k=3*(d-b)-j,l=1-j-k,m=3*c,n=3*(e-c)-m,o=1-m-n;return h(a,1/(200*f))}function q(a,b){var c=[],d={};if(this.ms=b,this.times=1,a){for(var e in a)a[y](e)&&(d[$(e)]=a[e],c.push($(e)));c.sort(ka)}this.anim=d,this.top=c[c.length-1],this.percents=c}function r(c,d,e,f,g,h){e=$(e);var i,j,k,l,m,o,q=c.ms,r={},s={},t={};if(f)for(w=0,x=fb.length;wf*c.top){e=c.percents[w],m=c.percents[w-1]||0,q=q/c.top*(e-m),l=c.percents[w+1],i=c.anim[e];break}f&&d.attr(c.anim[c.percents[w]])}if(i){if(j)j.initstatus=f,j.start=new Date-j.ms*f;else{for(var z in i)if(i[y](z)&&(ca[y](z)||d.paper.customAttributes[y](z)))switch(r[z]=d.attr(z),null==r[z]&&(r[z]=ba[z]),s[z]=i[z],ca[z]){case S:t[z]=(s[z]-r[z])/q;break;case"colour":r[z]=b.getRGB(r[z]);var A=b.getRGB(s[z]);t[z]={r:(A.r-r[z].r)/q,g:(A.g-r[z].g)/q,b:(A.b-r[z].b)/q};break;case"path":var B=Ia(r[z],s[z]),C=B[1];for(r[z]=B[0],t[z]=[],w=0,x=r[z].length;w',qa=ra.firstChild,qa.style.behavior="url(#default#VML)",!qa||"object"!=typeof qa.adj)return b.type=F;ra=null}b.svg=!(b.vml="VML"==b.type),b._Paper=B,b.fn=u=B.prototype=b.prototype,b._id=0,b._oid=0,b.is=function(a,b){return b=L.call(b),"finite"==b?!X[y](+a):"array"==b?a instanceof Array:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||"array"==b&&Array.isArray&&Array.isArray(a)||V.call(a).slice(8,-1).toLowerCase()==b},b.angle=function(a,c,d,e,f,g){if(null==f){var h=a-d,i=c-e;return h||i?(180+180*M.atan2(-i,-h)/R+360)%360:0}return b.angle(a,c,f,g)-b.angle(d,e,f,g)},b.rad=function(a){return a%360*R/180},b.deg=function(a){return Math.round(180*a/R%360*1e3)/1e3},b.snapTo=function(a,c,d){if(d=b.is(d,"finite")?d:10,b.is(a,U)){for(var e=a.length;e--;)if(P(a[e]-c)<=d)return a[e]}else{a=+a;var f=c%a;if(fa-d)return c-f+a}return c};b.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=16*M.random()|0,c="x"==a?b:3&b|8;return c.toString(16)});b.setWindow=function(c){a("raphael.setWindow",b,z.win,c),z.win=c,z.doc=z.win.document,b._engine.initWin&&b._engine.initWin(z.win)};var sa=function(a){if(b.vml){var c,d=/^\s+|\s+$/g;try{var f=new ActiveXObject("htmlfile");f.write(""),f.close(),c=f.body}catch(g){c=createPopup().document.body}var h=c.createTextRange();sa=e(function(a){try{c.style.color=H(a).replace(d,F);var b=h.queryCommandValue("ForeColor");return b=(255&b)<<16|65280&b|(16711680&b)>>>16,"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=z.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",z.doc.body.appendChild(i),sa=e(function(a){return i.style.color=a,z.doc.defaultView.getComputedStyle(i,F).getPropertyValue("color")})}return sa(a)},ta=function(){return"hsb("+[this.h,this.s,this.b]+")"},ua=function(){return"hsl("+[this.h,this.s,this.l]+")"},va=function(){return this.hex},wa=function(a,c,d){if(null==c&&b.is(a,"object")&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,c=a.g,a=a.r),null==c&&b.is(a,T)){var e=b.getRGB(a);a=e.r,c=e.g,d=e.b}return(a>1||c>1||d>1)&&(a/=255,c/=255,d/=255),[a,c,d]},xa=function(a,c,d,e){a*=255,c*=255,d*=255;var f={r:a,g:c,b:d,hex:b.rgb(a,c,d),toString:va};return b.is(e,"finite")&&(f.opacity=e),f};b.color=function(a){var c;return b.is(a,"object")&&"h"in a&&"s"in a&&"b"in a?(c=b.hsb2rgb(a),a.r=c.r,a.g=c.g,a.b=c.b,a.hex=c.hex):b.is(a,"object")&&"h"in a&&"s"in a&&"l"in a?(c=b.hsl2rgb(a),a.r=c.r,a.g=c.g,a.b=c.b,a.hex=c.hex):(b.is(a,"string")&&(a=b.getRGB(a)),b.is(a,"object")&&"r"in a&&"g"in a&&"b"in a?(c=b.rgb2hsl(a),a.h=c.h,a.s=c.s,a.l=c.l,c=b.rgb2hsb(a),a.v=c.b):(a={hex:"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1)),a.toString=va,a},b.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,d=a.o,a=a.h),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-P(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],xa(e,f,g,d)},b.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,f,g,h,i;return a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-P(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],xa(e,f,g,d)},b.rgb2hsb=function(a,b,c){c=wa(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=N(a,b,c),g=f-O(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{h:d,s:e,b:f,toString:ta}},b.rgb2hsl=function(a,b,c){c=wa(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=N(a,b,c),h=O(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:f<.5?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:ua}},b._path2string=function(){return this.join(",").replace(fa,"$1")};b._preload=function(a,b){var c=z.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,z.doc.body.removeChild(this)},c.onerror=function(){z.doc.body.removeChild(this)},z.doc.body.appendChild(c),c.src=a};b.getRGB=e(function(a){if(!a||(a=H(a)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:f};if("none"==a)return{r:-1,g:-1,b:-1,hex:"none",toString:f};!(ea[y](a.toLowerCase().substring(0,2))||"#"==a.charAt())&&(a=sa(a));var c,d,e,g,h,i,j=a.match(W);return j?(j[2]&&(e=_(j[2].substring(5),16),d=_(j[2].substring(3,5),16),c=_(j[2].substring(1,3),16)),j[3]&&(e=_((h=j[3].charAt(3))+h,16),d=_((h=j[3].charAt(2))+h,16),c=_((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100)),j[5]?(i=j[5][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(c/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),b.hsb2rgb(c,d,e,g)):j[6]?(i=j[6][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(c/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),b.hsl2rgb(c,d,e,g)):(j={r:c,g:d,b:e,toString:f},j.hex="#"+(16777216|e|d<<8|c<<16).toString(16).slice(1),b.is(g,"finite")&&(j.opacity=g),j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:f}},b),b.hsb=e(function(a,c,d){return b.hsb2rgb(a,c,d).hex}),b.hsl=e(function(a,c,d){return b.hsl2rgb(a,c,d).hex}),b.rgb=e(function(a,b,c){function d(a){return a+.5|0}return"#"+(16777216|d(c)|d(b)<<8|d(a)<<16).toString(16).slice(1)}),b.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),c.hex},b.getColor.reset=function(){delete this.start},b.parsePathString=function(a){if(!a)return null;var c=ya(a);if(c.arr)return Aa(c.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[];return b.is(a,U)&&b.is(a[0],U)&&(e=Aa(a)),e.length||H(a).replace(ga,function(a,b,c){var f=[],g=b.toLowerCase();if(c.replace(ia,function(a,b){b&&f.push(+b)}),"m"==g&&f.length>2&&(e.push([b][D](f.splice(0,2))),g="l",b="m"==b?"l":"L"),"r"==g)e.push([b][D](f));else for(;f.length>=d[g]&&(e.push([b][D](f.splice(0,d[g]))),d[g]););}),e.toString=b._path2string,c.arr=Aa(e),e},b.parseTransformString=e(function(a){if(!a)return null;var c=[];return b.is(a,U)&&b.is(a[0],U)&&(c=Aa(a)),c.length||H(a).replace(ha,function(a,b,d){var e=[];L.call(b);d.replace(ia,function(a,b){b&&e.push(+b)}),c.push([b][D](e))}),c.toString=b._path2string,c});var ya=function(a){var b=ya.ps=ya.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[y](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]};b.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=Q(j,3),l=Q(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*M.atan2(q-s,r-t)/R;return(q>s||r=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},b.isBBoxIntersect=function(a,c){var d=b.isPointInsideBBox;return d(c,a.x,a.y)||d(c,a.x2,a.y)||d(c,a.x,a.y2)||d(c,a.x2,a.y2)||d(a,c.x,c.y)||d(a,c.x2,c.y)||d(a,c.x,c.y2)||d(a,c.x2,c.y2)||(a.xc.x||c.xa.x)&&(a.yc.y||c.ya.y)},b.pathIntersection=function(a,b){return m(a,b)},b.pathIntersectionNumber=function(a,b){return m(a,b,1)},b.isPointInsidePath=function(a,c,d){var e=b.pathBBox(a);return b.isPointInsideBBox(e,c,d)&&m(a,[["M",c,d],["H",e.x2+10]],1)%2==1},b._removedFactory=function(b){return function(){a("raphael.log",null,"Raphaël: you are calling to method “"+b+"” of removed object",b)}};var za=b.pathBBox=function(a){var b=ya(a);if(b.bbox)return c(b.bbox);if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=Ia(a);for(var d,e=0,f=0,g=[],h=[],i=0,j=a.length;i1&&(s=M.sqrt(s),c=s*c,d=s*d);var t=c*c,u=d*d,v=(g==h?-1:1)*M.sqrt(P((t*u-t*r*r-u*q*q)/(t*r*r+u*q*q))),w=v*c*r/d+(a+i)/2,x=v*-d*q/c+(b+j)/2,y=M.asin(((b-x)/d).toFixed(9)),z=M.asin(((j-x)/d).toFixed(9));y=az&&(y-=2*R),!h&&z>y&&(z-=2*R)}var A=z-y;if(P(A)>m){var B=z,C=i,E=j;z=y+m*(h&&z>y?1:-1),i=w+c*M.cos(z),j=x+d*M.sin(z),o=Fa(i,j,c,d,f,0,h,C,E,[z,B,w,x])}A=z-y;var F=M.cos(y),G=M.sin(y),H=M.cos(z),J=M.sin(z),K=M.tan(A/4),L=4/3*c*K,N=4/3*d*K,O=[a,b],Q=[a+L*G,b-N*F],S=[i+L*J,j-N*H],T=[i,j];if(Q[0]=2*O[0]-Q[0],Q[1]=2*O[1]-Q[1],k)return[Q,S,T][D](o);o=[Q,S,T][D](o).join()[I](",");for(var U=[],V=0,W=o.length;V"1e12"&&(m=.5),P(n)>"1e12"&&(n=.5),m>0&&m<1&&(i=Ga(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&n<1&&(i=Ga(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+M.sqrt(k*k-4*j*l))/2/j,n=(-k-M.sqrt(k*k-4*j*l))/2/j,P(m)>"1e12"&&(m=.5),P(n)>"1e12"&&(n=.5),m>0&&m<1&&(i=Ga(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&n<1&&(i=Ga(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{min:{x:O[C](0,p),y:O[C](0,o)},max:{x:N[C](0,p),y:N[C](0,o)}}}),Ia=b._path2curve=e(function(a,b){var c=!b&&ya(a);if(!b&&c.curve)return Aa(c.curve);for(var d=Ca(a),e=b&&Ca(b),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=(function(a,b,c){var d,e,f={T:1,Q:1};if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in f)&&(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][D](Fa[C](0,[b.x,b.y][D](a.slice(1))));break;case"S":"C"==c||"S"==c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e][D](a.slice(1));break;case"T":"Q"==c||"T"==c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"][D](Ea(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][D](Ea(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][D](Da(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][D](Da(b.x,b.y,a[1],b.y));break;case"V":a=["C"][D](Da(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][D](Da(b.x,b.y,b.X,b.Y))}return a}),i=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)k[b]="A",e&&(l[b]="A"),a.splice(b++,0,["C"][D](c.splice(0,6)));a.splice(b,1),p=N(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&"M"==a[g][0]&&"M"!=b[g][0]&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],p=N(d.length,e&&e.length||0))},k=[],l=[],m="",n="",o=0,p=N(d.length,e&&e.length||0);o0),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)},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()}}),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:30,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:5,right:74},{el:this.vlabel,top:5,right:111},{el:this.hpager,top:5,right:-9},{el:this.hlabel,top:5,right:28}]})},_createVPager:function(){var a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr,invisible:!0}),this.vpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],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:20,iconWidth:16,iconHeight:16,cls:"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:20,iconWidth:16,iconHeight:16,cls:"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:20,value:c.curr,title:c.curr,invisible:!0}),this.hpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],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:20,iconWidth:16,iconHeight:16,cls:"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:20,iconWidth:16,iconHeight:16,cls:"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=[74,111,-9,28],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.RichEditorAction=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RichEditorAction.superclass._defaultConfig.apply(this,arguments),{width:20,height:20,command:"",used:!0})},_init:function(){BI.RichEditorAction.superclass._init.apply(this,arguments);var a=this,b=this.options;b.editor.on(BI.NicEditor.EVENT_SELECTED,function(c){b.used===!0&&(a.setEnable(!0),a.checkNodes(c.target),a.key(c))}),b.editor.on(BI.NicEditor.EVENT_BLUR,function(){a.setEnable(!1)}),b.editor.on(BI.NicEditor.EVENT_KEYDOWN,BI.bind(this.keydown,this)),b.used===!1&&this.setEnable(!1)},checkNodes:function(a){if(!a)return!1;var b=a;do if(this.options.tags&&this.options.tags.contains(b.nodeName))return this.activate(),!0;while(b=b.parentNode&&b.className&&b.className.indexOf("bi-nic-editor")>=-1);for(b=a;3==b.nodeType;)b=b.parentNode;if(this.options.css)for(var c in this.options.css){if(null==this.options.css[c])return this.activate($(b).css(c)),!0;if($(b).css(c)==this.options.css[c])return this.activate(),!0}return this.deactivate(),!1},start:function(){},key:function(){},keydown:function(){},hideIf:function(a){},activate:function(){},deactivate:function(){},doCommand:function(a){this.options.command&&this.options.editor.nicCommand(this.options.command,a)}}),BI.RichEditorParamAction=BI.inherit(BI.RichEditorAction,{_defaultConfig:function(){return BI.extend(BI.RichEditorParamAction.superclass._defaultConfig.apply(this,arguments),{paramFormatter:function(a){return a}})},_init:function(){BI.RichEditorParamAction.superclass._init.apply(this,arguments)},addParam:function(a){var b=this.options,c=(b.editor.instance,new Image),d=BI.DOM.getImage(b.paramFormatter(a));c.src=d.src,c.alt=a,c.style=d.style,$(c).addClass("rich-editor-param"),this.options.editor.insertHTML($("
").append(c).html())}}),BI.RichEditorTextToolbar=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-rich-editor-text-toolbar bi-background",buttons:[{type:"bi.rich_editor_font_chooser"},{type:"bi.rich_editor_size_chooser"},{type:"bi.rich_editor_bold_button"},{type:"bi.rich_editor_italic_button"},{type:"bi.rich_editor_underline_button"},{type:"bi.rich_editor_color_chooser"},{type:"bi.rich_editor_background_color_chooser"},{type:"bi.rich_editor_align_left_button"},{type:"bi.rich_editor_align_center_button"},{type:"bi.rich_editor_align_right_button"},{type:"bi.rich_editor_param_button"}],height:28})},_init:function(){BI.RichEditorTextToolbar.superclass._init.apply(this,arguments);var a=this.options,b=BI.createWidgets(BI.map(a.buttons,function(b,c){return BI.extend(c,{editor:a.editor})}));this.element.mousedown(function(a){BI.each(b,function(b,c){c.hideIf(a)})}),BI.createWidget({type:"bi.left",element:this,items:b,hgap:3,vgap:3})},mounted:function(){var a=this;BI.isIE9Below()&&(this.element.mousedown(function(){a._noSelect(a.element[0])}),this._noSelect(this.element[0]))},_noSelect:function(a){a.setAttribute&&"input"!=a.nodeName.toLowerCase()&&"textarea"!=a.nodeName.toLowerCase()&&a.setAttribute("unselectable","on");for(var b=0;b0?a.getRangeAt(0):a.createRange()},selRng:function(a,b){window.getSelection?(b.removeAllRanges(),b.addRange(a)):a.select()},selElm:function(){var a=this.getRng();if(a){if(a.startContainer){var b=a.startContainer;if(1==a.cloneContents().childNodes.length)for(var c=0;c0&&this.colorchooser.hideView()},deactivate:function(){}}),BI.shortcut("bi.rich_editor_background_color_chooser",BI.RichEditorBackgroundColorChooser),BI.RichEditorColorChooser=BI.inherit(BI.RichEditorAction,{_defaultConfig:function(){return BI.extend(BI.RichEditorColorChooser.superclass._defaultConfig.apply(this,arguments),{width:20,height:20,command:"foreColor",css:{color:null}})},_init:function(){BI.RichEditorColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.colorchooser=BI.createWidget({type:"bi.color_chooser",element:this,width:b.width,height:b.height,el:{type:"bi.rich_editor_color_chooser_trigger",title:BI.i18nText("BI-Font_Colour"),cls:"text-toolbar-button"}}),this.colorchooser.on(BI.ColorChooser.EVENT_CHANGE,function(){a.doCommand(this.getValue())})},hideIf:function(a){!this.colorchooser.element.find(a.target).length>0&&this.colorchooser.hideView()},activate:function(a){this.colorchooser.setValue(BI.DOM.rgb2hex(a))},deactivate:function(){this.colorchooser.setValue("")}}),BI.shortcut("bi.rich_editor_color_chooser",BI.RichEditorColorChooser),BI.RichEditorFontChooser=BI.inherit(BI.RichEditorAction,{_defaultConfig:function(){return BI.extend(BI.RichEditorFontChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-rich-editor-font-chooser bi-border bi-card",command:"FontName",width:50,height:20})},_init:function(){BI.RichEditorSizeChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",readonly:!0,height:b.height,triggerWidth:16,text:BI.i18nText("BI-Font_Family")}),this.combo=BI.createWidget({type:"bi.combo",element:this,el:this.trigger,adjustLength:1,popup:{minWidth:70,el:{type:"bi.button_group",items:BI.createItems([{value:"MicrosoftYaHei",text:BI.i18nText("BI-Microsoft_YaHei")},{value:"PingFangSC-Light",text:BI.i18nText("BI-Apple_Light")},{value:"ArialMT",text:"Arial"},{value:"Verdana",text:"Verdana"}],{type:"bi.single_select_item"}),layouts:[{type:"bi.vertical"}]}}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){var b=this.getValue()[0];a.doCommand(b),this.hideView(),this.setValue([])})},hideIf:function(a){!this.combo.element.find(a.target).length>0&&this.combo.hideView()}}),BI.shortcut("bi.rich_editor_font_chooser",BI.RichEditorFontChooser),BI.RichEditorSizeChooser=BI.inherit(BI.RichEditorAction,{_defaultConfig:function(){return BI.extend(BI.RichEditorSizeChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-rich-editor-size-chooser bi-border bi-card",command:"FontSize",width:50,height:20})},_items:[{value:1,text:"1(8pt)"},{value:2,text:"2(10pt)"},{value:3,text:"3(12pt)"},{value:4,text:"4(14pt)"},{value:5,text:"5(18pt)"},{value:6,text:"6(24pt)"}],_init:function(){BI.RichEditorSizeChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",readonly:!0,height:b.height,triggerWidth:16,text:BI.i18nText("BI-Font_Size")}),this.combo=BI.createWidget({type:"bi.combo",element:this,el:this.trigger,adjustLength:1,popup:{maxWidth:70,minWidth:70,el:{type:"bi.button_group",items:BI.createItems(this._items,{type:"bi.single_select_item"}),layouts:[{type:"bi.vertical"}]}}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){var b=this.getValue()[0];a.doCommand(b),this.hideView(),this.setValue([])})},hideIf:function(a){!this.combo.element.find(a.target).length>0&&this.combo.hideView()}}),BI.shortcut("bi.rich_editor_size_chooser",BI.RichEditorSizeChooser),BI.RichEditor=BI.inherit(BI.Widget,{props:{baseCls:"bi-rich-editor bi-textarea",toolbar:{},readOnly:!1},render:function(){var a=this,b=this.options,c={type:"bi.nic_editor",width:b.width,height:b.height,readOnly:b.readOnly,ref:function(){a.editor=this},listeners:[{eventName:BI.NicEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.RichEditor.EVENT_CONFIRM)}},{eventName:BI.NicEditor.EVENT_FOCUS,action:function(){b.readOnly||a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.RichEditor.EVENT_FOCUS)}}]};return b.readOnly?c:(this.editor=BI.createWidget(c),{type:"bi.combo",toggle:!1,trigger:"click",direction:"top,right",isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,adjustLength:1,ref:function(){a.combo=this},el:this.editor,popup:{el:BI.extend({type:"bi.rich_editor_text_toolbar",editor:this.editor},b.toolbar),height:30,stopPropagation:!0,stopEvent:!0},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.fireEvent(BI.RichEditor.EVENT_AFTER_HIDEVIEW)}}]})},mounted:function(){var a=this.options;BI.isNull(a.value)&&this.editor.setValue(a.value)},focus:function(){this.editor.focus()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.RichEditor.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.RichEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.RichEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.rich_editor",BI.RichEditor),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-active",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,height:a.height-2,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)})},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.AdaptiveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.AdaptiveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.AdaptiveTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:c.columnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:c.regionColumnSize,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.columnSize=this.getColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_getFreezeColLength:function(){var a=this.options;return a.isNeedFreeze===!0?BI.clamp(a.freezeCols.length,0,a.columnSize.length):0},_digest:function(){var a=this.options,b=a.columnSize.slice(),c=a.regionColumnSize.slice(),d=a.freezeCols.slice(),e=a.regionColumnSize[0],f=this._getFreezeColLength();if(!e||e>a.width-10||e<10){var g=BI.sum(b,function(a,b){return a=b.length&&(d=[]),BI.isNumber(b[0])||(b=a.minColumnSize.slice());var h=0,i=0;return BI.each(b,function(a,b){a0&&(b[f-1]=BI.clamp(e-(h-b[f-1]),a.minColumnSize[f-1]||10,a.maxColumnSize[f-1]||Number.MAX_VALUE)),b.length>0&&(b[b.length-1]=BI.clamp(a.width-BI.GridTableScrollbar.SIZE-e-(i-h-b[b.length-1]),a.minColumnSize[b.length-1]||10,a.maxColumnSize[b.length-1]||Number.MAX_VALUE)),c[0]=e,{freezeCols:d,columnSize:b,regionColumnSize:c}},_populate:function(){var a=this.options,b=this._digest();a.regionColumnSize=b.regionColumnSize,a.columnSize=b.columnSize,this.table.setColumnSize(b.columnSize),this.table.setRegionColumnSize(b.regionColumnSize),this.table.attr("freezeCols",b.freezeCols)},setWidth:function(a){BI.AdaptiveTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.AdaptiveTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=BI.AdaptiveTable.superclass.attr.apply(this,arguments);return"freezeCols"===a?c:this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a){this.options;this._populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),BI.AdaptiveTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.adaptive_table",BI.AdaptiveTable),BI.DynamicSummaryLayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DynamicSummaryLayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-dynamic-summary-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))});var g=BI.isFunction(b.rowHeaderCreator)?b.rowHeaderCreator():b.rowHeaderCreator;if(c&&c.length>0){var h=this._formatColumns(c),i=this._getHDeep();i<=0?h.unshift(g||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):h[0]=g||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(h)}return f},_formatItems:function(a,b,c){function d(a,b){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=b;var c=[a];c=c.concat(a.values||[]),c.length>0&&f.push(c),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,c){d(c,b+1)})}var e=this.options,f=[];return BI.each(a,function(a,b){if(BI.each(b.children,function(a,b){d(b,0)}),BI.isArray(b.values)){var c=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return e.summaryCellStyleGetter(!0)}}].concat(b.values);f.push(c)}}),BI.DynamicSummaryTreeTable.formatSummaryItems(f,b,e.crossItems,1)},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a1)for(var c=0;c1)&&BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e1?g+=a.values.length:g++}var f=[],g=0;if(BI.each(c,function(a,b){e(b)}),f.length>0){var h=[],i=[];BI.each(b,function(a,b){var c=b.slice();BI.removeAt(c,f),h.push(c)}),BI.each(a,function(a,b){var c=b.slice();BI.removeAt(c,f),i.push(c)}),b=h,a=i}return{items:a,header:b,deletedCols:f}}}),BI.shortcut("bi.dynamic_summary_tree_table",BI.DynamicSummaryTreeTable),BI.LayerTreeTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table-cell",layer:0,text:""})},_init:function(){BI.LayerTreeTableCell.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget({type:"bi.label",element:this.element,textAlign:"left",whiteSpace:"nowrap",height:a.height,text:a.text,value:a.value,lgap:5+30*a.layer,rgap:5})}}),BI.shortcut("bi.layer_tree_table_cell",BI.LayerTreeTableCell),BI.LayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a){function b(a,c){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=c;var e=[a];e=e.concat(a.values||[]),e.length>0&&d.push(e),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,d){b(d,c+1)})}var c=this.options,d=[];return BI.each(a,function(a,e){if(BI.each(e.children,function(a,c){b(c,0)}),BI.isArray(e.values)){var f=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return c.summaryCellStyleGetter(!0)}}].concat(e.values);d.push(f)}}),d},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a0&&(c=BI.makeArray(b,a[0]/b)),c.concat(a.slice(1))},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.LayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;e.items=a||[],b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("freezeCols",f.freezeCols),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.LayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.layer_tree_table",BI.LayerTreeTable),BI.TableStyleCell=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-style-cell",styleGetter:BI.emptyFn})},_init:function(){BI.TableStyleCell.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,height:a.height,textAlign:"left",forceCenter:!0,hgap:5,text:a.text}),this._digestStyle()},_digestStyle:function(){var a=this.options,b=a.styleGetter();b&&this.text.element.css(b)},setText:function(a){this.text.setText(a)},populate:function(){this._digestStyle()}}),BI.shortcut("bi.table_style_cell",BI.TableStyleCell),BI.TableTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-tree",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){ -return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e0},halfSelected:!1})},_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:26,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)}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.BranchRelation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-relation-tree",items:[],centerOffset:0,direction:BI.Direction.Bottom,align:BI.VerticalAlign.Top})},_init:function(){BI.BranchRelation.superclass._init.apply(this,arguments),this.populate(this.options.items)},_stratification:function(){var a=[];return this.tree.recursion(function(b,c){b.leaf=b.isLeaf(),a[c.length-1]||(a[c.length-1]=[]),a[c.length-1].push(b)}),a},_calculateLeaves:function(){function a(b){var c=0;return b.isLeaf()?1:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),b.set("leaves",c),c)}var b=0;return b=a(this.tree.getRoot())},_translate:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse());var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},populate:function(a){var b=this.options;b.items=a||[],this.empty(),a=BI.Tree.transformToTreeFormat(b.items),this.tree=new BI.Tree,this.tree.initTree(a),this.svg=BI.createWidget({type:"bi.svg"});var c=this._stratification();if(this._isNeedAdjust()){var d=this._translate(c);d=this._adjust(d),this._createBranches(d)}else{var d=this._fill(c);this._createBranches(d)}var e=BI.createWidget({type:"bi.layout",width:this._isVertical()?this._calculateWidth():this._calculateHeight(),height:this._isVertical()?this._calculateHeight():this._calculateWidth()});BI.createWidget({type:"bi.absolute",element:e,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}),a=this._isVertical()?[{type:"bi.handstand_branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.horizontal_adapt",verticalAlign:b.align}]},items:a}]:[{type:"bi.branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.vertical"},{type:b.align===BI.HorizontalAlign.Left?"bi.left":"bi.right"}]},items:a}],BI.createWidget({type:"bi.adaptive",element:e,items:a}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[e]})}}),BI.BranchRelation.EVENT_CHANGE="BranchRelation.EVENT_CHANGE",BI.shortcut("bi.branch_relation",BI.BranchRelation),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),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.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),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){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.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){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),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.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}),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="BI.EditorTrigger.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,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:b.height,text:b.text,hgap:c.hgap}),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 "+b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.triggerWidth||b.height},{el:this.text},{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];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,this.wrapper.resize()):c.width!==(b.triggerWidth||b.height)&&(c.width=b.triggerWidth||b.height,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})},_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()},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)}}),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",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)})},_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)&&!d.contains(c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},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)&&!d.contains(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.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute", +return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e0},halfSelected:!1})},_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:26,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)}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.BranchRelation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-relation-tree",items:[],centerOffset:0,direction:BI.Direction.Bottom,align:BI.VerticalAlign.Top})},_init:function(){BI.BranchRelation.superclass._init.apply(this,arguments),this.populate(this.options.items)},_stratification:function(){var a=[];return this.tree.recursion(function(b,c){b.leaf=b.isLeaf(),a[c.length-1]||(a[c.length-1]=[]),a[c.length-1].push(b)}),a},_calculateLeaves:function(){function a(b){var c=0;return b.isLeaf()?1:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),b.set("leaves",c),c)}var b=0;return b=a(this.tree.getRoot())},_translate:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse());var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},populate:function(a){var b=this.options;b.items=a||[],this.empty(),a=BI.Tree.transformToTreeFormat(b.items),this.tree=new BI.Tree,this.tree.initTree(a),this.svg=BI.createWidget({type:"bi.svg"});var c=this._stratification();if(this._isNeedAdjust()){var d=this._translate(c);d=this._adjust(d),this._createBranches(d)}else{var d=this._fill(c);this._createBranches(d)}var e=BI.createWidget({type:"bi.layout",width:this._isVertical()?this._calculateWidth():this._calculateHeight(),height:this._isVertical()?this._calculateHeight():this._calculateWidth()});BI.createWidget({type:"bi.absolute",element:e,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}),a=this._isVertical()?[{type:"bi.handstand_branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.horizontal_adapt",verticalAlign:b.align}]},items:a}]:[{type:"bi.branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.vertical"},{type:b.align===BI.HorizontalAlign.Left?"bi.left":"bi.right"}]},items:a}],BI.createWidget({type:"bi.adaptive",element:e,items:a}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[e]})}}),BI.BranchRelation.EVENT_CHANGE="BranchRelation.EVENT_CHANGE",BI.shortcut("bi.branch_relation",BI.BranchRelation),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),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.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),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){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.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){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),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.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}),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="BI.EditorTrigger.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,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:b.height,text:b.text,hgap:c.hgap}),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.triggerWidth||b.height},{el:this.text},{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];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,this.wrapper.resize()):c.width!==(b.triggerWidth||b.height)&&(c.width=b.triggerWidth||b.height,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})},_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()},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)}}),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",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)})},_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)&&!d.contains(c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},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)&&!d.contains(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.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute", cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:this._getHeaderHeight()-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this.start=this.options.startSequence,this.cache={},this._nextState(),this._populate()},_getNextSequence:function(a){function b(a){c.cache[a.text||a.value]||(c.cache[a.text||a.value]=e),e++}var c=this,d=this.start,e=this.start;return BI.each(a,function(a,f){BI.isNotEmptyArray(f.children)&&BI.each(f.children,function(a,f){0===a&&c.cache[f.text||f.value]&&(d=e=c.cache[f.text||f.value]),b(f)})}),this.start=e,d},_getStart:function(a){var b=this,c=this.start;return BI.some(a,function(a,d){if(BI.isNotEmptyArray(d.children))return BI.some(d.children,function(a,d){if(0===a&&b.cache[d.text||d.value])return c=b.cache[d.text||d.value],!0})}),c},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d},_layout:function(){var a=this.options,b=this._getHeaderHeight()-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize();try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_getHeaderHeight:function(){var a=this.options;return a.headerRowSize*(a.crossHeader.length+(a.header.length>0?1:0))},_nextState:function(){var a=this.options;this._getNextSequence(a.items)},_prevState:function(){var a,b=this.options;BI.some(b.items,function(b,c){if(BI.isNotEmptyArray(c.children))return BI.some(c.children,function(b,c){return a=c,!0})}),a&&BI.isNotEmptyObject(this.cache)?this.start=this.cache[a.text||a.value]:this.start=1,this._nextState()},_getMaxScrollTop:function(a){var b=0;return BI.each(a,function(a,c){b+=c.cnt}),Math.max(0,b*this.options.rowSize-(this.options.height-this._getHeaderHeight())+BI.DOM.getScrollWidth())},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator()||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",height:this._getHeaderHeight()-2,styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){var a=this,b=this.options,c=[],d=[],e=this._formatNumber(b.items),f=BI.PrefixIntervalTree.uniform(e.length,0);BI.each(e,function(a,b){f.set(a,b.height)});for(var g=BI.clamp(b.scrollTop,0,this._getMaxScrollTop(e)),h=f.greatestLowerBound(g),i=-(g-(h>0?f.sumTo(h-1):0)),j=i,k=b.height-this._getHeaderHeight();j-1)e[f].height!==a.renderedCells[g]._height&&(a.renderedCells[g]._height=e[f].height,a.renderedCells[g].el.setHeight(e[f].height)),e[f].top!==a.renderedCells[g].top&&(a.renderedCells[g].top=e[f].top,a.renderedCells[g].el.element.css("top",e[f].top+"px")),c.push(a.renderedCells[g]);else{var h=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,styleGetter:e[f].isSummary===!0?function(){return b.summaryCellStyleGetter(!0)}:function(a){return function(){return b.sequenceCellStyleGetter(a)}}(e[f].index)},e[f]));c.push({el:h,left:0,top:e[f].top,_height:e[f].height})}});var l={},m={},n=[];BI.each(d,function(b,c){BI.deepContains(a.renderedKeys,c)?l[b]=c:m[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(l,b)||BI.deepContains(m,b)||n.push(a)}),BI.each(n,function(b,c){a.renderedCells[c].el.destroy()});var o=[];BI.each(m,function(a){o.push(c[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:o}),this.renderedCells=c,this.renderedKeys=d,this.container.setHeight(f.sumUntil(e.length))},_restore:function(){BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},_populate:function(){var a=this;BI.each(this.tasks,function(b,c){c.apply(a)}),this.tasks=[],this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a<=1?(this.cache={},this.start=this.options.startSequence,this._restore(),this.tasks.push(this._nextState)):a===this.vCurr+1?this.tasks.push(this._nextState):a===this.vCurr-1&&this.tasks.push(this._prevState),this.vCurr=a},setHPage:function(a){a!==this.hCurr&&this.tasks.push(this._prevState),this.hCurr=a},restore:function(){this._restore()},populate:function(a,b,c,d){var e=this.options;a&&a!==this.options.items&&(e.items=a,this._restore(),this.tasks.push(this._prevState)),b&&b!==this.options.header&&(e.header=b),c&&c!==this.options.crossItems&&(e.crossItems=c),d&&d!==this.options.crossHeader&&(e.crossHeader=d),this._populate()}}),BI.shortcut("bi.sequence_table_tree_number",BI.SequenceTableTreeNumber),BI.MonthDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.MonthDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",height:24})},_init:function(){BI.MonthDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup"}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",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)})},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})},_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,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,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 bi-background",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",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"}),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:[{type:"bi.horizontal",width:100,items:[this.year,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=a.year,this._month=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 bi-background",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:[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:this.selectedTime.day});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",min:b.min,max:b.max}),this.calendar=BI.createWidget({direction:"top",element:this,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)})},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-border-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),BI.checkDateVoid(a,1,1,b.min,b.max)[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}),this.icon=BI.createWidget({type:"bi.icon",width:b.iconWidth,height:b.iconHeight}),BI.createWidget({type:"bi.center_adapt",element:this,items:[{type:"bi.center_adapt",width:50,height:b.height,items:[this.text,this.icon]}]})},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",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getDate(b.year,b.month-1,1).getMonthDays(),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:"top",element:this,logic:{dynamic:!1},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)},_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;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",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,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border",width:200,height:24})},_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:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,width:this.constants.popupWidth,stopPropagation:!1}}),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 bi-border-right",width:24,height:24});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():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,left: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="BI.DateTimeCombo.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",forceCenter:!0,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",forceCenter:!0,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",min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.vertical_adapt",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.hour=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.minute=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.second=b}}]}),this.setValue(b.value),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},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.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.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.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),allowBlank:!1,errorText:function(a){return BI.isNumeric(a)?BI.i18nText("BI-Please_Input_Natural_Number"):BI.i18nText("BI-Numerical_Interval_Input_Data")},validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),athis.options.max&&(a=this.options.min),ac&&(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:"top",logic:{dynamic:!1},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,items:[this.calendar,{el:{type:"bi.dynamic_date_time_select",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}]}),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;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",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:!0,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(){this.downlistcombo.showView()},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.Single,{_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,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,height:b.height,text:b.text,value:b.value,logic:b.logic,selected:b.selected,disabled:b.disabled,iconHeight:b.iconHeight,iconWidth:b.iconWidth,textHgap:b.textHgap,textVgap:b.textVgap,textLgap:b.textLgap,textRgap:b.textRgap,father:b.father,bubble:b.bubble}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.IconTextItem.EVENT_CHANGE,function(){a.fireEvent(BI.DownListItem.EVENT_CHANGE)})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()}}),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:24,forceNotSelected:!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),!a.singleValues.contains(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]})},_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.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:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},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-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});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,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{baseCls:"bi-dynamic-date-combo bi-border",height:24},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:24,height:24,ref:function(){a.changeIcon=this}},width:24},{type:"bi.absolute",items:[{el:{type:"bi.combo",ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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},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:24,height:24,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}}]},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_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()}}),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="BI.DynamicDateCombo.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},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},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;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",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-high-light bi-border-top",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.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",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;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,b)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",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=a.print("%Y-%x-%e"),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},props:{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:0|c[0],month:0|c[1],day:0|c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")},title:function(){var b=a.storeValue||{},c=b.type||BI.DynamicDateCombo.Static,d=b.value;switch(c){case BI.DynamicDateCombo.Dynamic:var e=a._getText(d),f=BI.getDate();f=BI.DynamicDateHelper.getCalculation(d);var g=f.print("%Y-%x-%e");return BI.isEmptyString(e)?g:e+":"+g;case BI.DynamicDateCombo.Static:default:return BI.isNull(d)||BI.isNull(d.day)?"":BI.getDate(d.year,d.month-1,d.day).print("%Y-%X-%d")}}}),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=b.split("-");a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|c[0],month:0|c[1],day:0|c[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}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%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.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d"),c=b.print("%Y-%X-%d");return b.getMonth()>0&&(BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a||BI.parseDateTime(a,"%Y-%x").print("%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=a.print("%Y-%x-%e");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.getDate(c.year,c.month-1,c.day).print("%Y-%X-%d");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,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{baseCls:"bi-dynamic-date-combo bi-border",height:24},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:24,height:24,ref:function(){a.changeIcon=this}},width:24},{type:"bi.absolute",items:[{el:{type:"bi.combo",ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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)}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}}]},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_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},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;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",forceCenter:!0,cls:"bi-high-light bi-border-top",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",forceCenter:!0,cls:"bi-border-left bi-border-right bi-high-light bi-border-top",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",forceCenter:!0,cls:"bi-high-light bi-border-top",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;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,b)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",ref:function(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){}}]},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=a.print("%Y-%x-%e"),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 bi-border-top"},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},lgap:14},{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}return 1===a.length&&BI.parseInt(a)>c&&(d="0"+d),2===d.length&&(b===BI.DynamicDateTimeSelect.HOUR?this.minute.focus():this.second.focus()),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}),BI.DynamicDateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:6,yearFullMonthLength:7},props:{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:0|c[0],month:0|c[1],day:0|c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")},title:function(){var b=a.storeValue||{},c=b.type||BI.DynamicDateCombo.Static,d=b.value;switch(c){case BI.DynamicDateCombo.Dynamic:var e=a._getText(d),f=BI.DynamicDateHelper.getCalculation(d),g=f.print("%Y-%x-%e %H:%M:%S");return BI.isEmptyString(e)?g:e+":"+g;case BI.DynamicDateCombo.Static:default:return BI.isNull(d)||BI.isNull(d.day)?"":BI.getDate(d.year,d.month-1,d.day,d.hour||0,d.minute||0,d.second||0).print("%Y-%X-%d %H:%M:%S")}}}),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=b.split(/-|\s|:/);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|c[0],month:0|c[1],day:0|c[2],hour:0|c[3],minute:0|c[4],second:0|c[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}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S").print("%Y-%x-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S").print("%Y-%x-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S").print("%Y-%X-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%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.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d"),c=b.print("%Y-%X-%d");return b.getMonth()>0&&(BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a||BI.parseDateTime(a,"%Y-%x").print("%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=a.print("%Y-%x-%e %H:%M:%S");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.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0).print("%Y-%X-%d %H:%M:%S");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",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:"circle-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_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.center_adapt",cls:"search-font",items:[{el:{type:"bi.icon"}}]},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_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.getValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},getLastValidValue:function(){return this.editor.getLastValidValue()},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_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:24})},_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",hgap:4, diff --git a/dist/base.js b/dist/base.js index 689858286..3a80e9348 100644 --- a/dist/base.js +++ b/dist/base.js @@ -14648,7 +14648,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, { this.editor.replaceSelection("\u200b" + field + "\u200b"); var to = this.editor.getCursor(); this.editor.markText(from, to, {className: "fieldName", atomic: true, startStyle: "start", endStyle: "end"}); - this.editor.replaceSelection(" "); this.editor.focus(); }, @@ -15594,7 +15593,7 @@ BI.PopupView = BI.inherit(BI.Widget, { BI.PopupView.superclass._init.apply(this, arguments); var self = this, o = this.options; var fn = function (e) { - e.stopPropagation(); + e.stopEvent(); }, stop = function (e) { e.stopEvent(); return false; diff --git a/dist/bundle.css b/dist/bundle.css index eff5b27aa..993efaccb 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -394,6 +394,11 @@ textarea { .bi-border { border: 1px solid #d4dadd; } +.bi-border-radius { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} .bi-theme-dark .bi-border { border: 1px solid #525466; } @@ -741,7 +746,6 @@ textarea { } .bi-list-item-active.active { color: #3685f2; - background-color: #ffffff; } .bi-list-item-active.active .bi-input { color: #3685f2; diff --git a/dist/bundle.js b/dist/bundle.js index c6b198c4a..7c80f1cc2 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -50418,7 +50418,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, { this.editor.replaceSelection("\u200b" + field + "\u200b"); var to = this.editor.getCursor(); this.editor.markText(from, to, {className: "fieldName", atomic: true, startStyle: "start", endStyle: "end"}); - this.editor.replaceSelection(" "); this.editor.focus(); }, @@ -51364,7 +51363,7 @@ BI.PopupView = BI.inherit(BI.Widget, { BI.PopupView.superclass._init.apply(this, arguments); var self = this, o = this.options; var fn = function (e) { - e.stopPropagation(); + e.stopEvent(); }, stop = function (e) { e.stopEvent(); return false; @@ -87288,7 +87287,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { items: [{ el: { type: "bi.icon_change_button", - cls: "icon-combo-trigger-icon " + o.iconCls, + cls: "icon-combo-trigger-icon", + iconCls: o.iconCls, ref: function (_ref) { self.icon = _ref; }, @@ -87296,7 +87296,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { iconWidth: o.iconWidth, disableSelected: true }, - width: BI.isEmptyString(o.iconCls)? 0 : (o.triggerWidth || o.height) + width: BI.isEmptyString(o.iconCls) ? 0 : (o.triggerWidth || o.height) }, { el: this.text diff --git a/dist/bundle.min.css b/dist/bundle.min.css index 58f77a611..b5f3bab7b 100644 --- a/dist/bundle.min.css +++ b/dist/bundle.min.css @@ -1 +1 @@ -/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.cm-em,dfn{font-style:italic}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.b-font,body,i{-moz-osx-font-smoothing:grayscale}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}button,html,input,select,textarea{font-family:sans-serif}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#9ea6b2!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}.bi-search-editor .circle-close-font,.bi-search-editor .search-font,.bi-search-text-value-combo .trigger-icon-button{font-size:16px}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{outline:0;text-decoration:none}a:focus{outline:0}input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-ms-clear{display:none}input,textarea{margin:0;padding:0;outline:0;border:1px solid #d4dadd}ul{list-style:disc}li{list-style-type:none}i{-webkit-font-smoothing:antialiased}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#f7f8fa;color:#3d4d66}.bi-background .bi-input,.bi-background .bi-textarea{color:#3d4d66}.bi-theme-dark .bi-background{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#3d4d66}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea{color:#9ea6b2}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#c4c9d1}.bi-border{border:1px solid #d4dadd}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#faaa39}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3685f2}.bi-error,.bi-error .bi-input,.bi-error .bi-textarea{color:#ff4949}.bi-error-background,.bi-error-background .bi-input,.bi-error-background .bi-textarea,.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-background{background-color:#3685f2;color:#fff}.bi-error-background{background-color:#ff4949}.bi-high-light-border{border-color:#3685f2}.bi-water-mark{color:#c4c9d1;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#c4c9d1}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(54,133,242,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d3685f2, endColorstr=#0d3685f2)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #3685f2}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3685f2}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(54,133,242,.06);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2, endColorstr=#0f3685f2)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-list-item-active:active{color:#3685f2}.bi-list-item-active.active{background-color:#fff}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3685f2;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3685f2;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3685f2;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(54,133,242,.06);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2, endColorstr=#0f3685f2)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3685f2}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.button-success.active,.bi-list-item-select.button-success:active{color:#fff;background-color:#13cd66}.bi-list-item-select.button-success.active .bi-high-light,.bi-list-item-select.button-success.active .bi-input,.bi-list-item-select.button-success.active .bi-textarea,.bi-list-item-select.button-success:active .bi-high-light,.bi-list-item-select.button-success:active .bi-input,.bi-list-item-select.button-success:active .bi-textarea{color:#fff}.bi-list-item-select.button-warning,.bi-list-item-select.button-warning .bi-high-light,.bi-list-item-select.button-warning .bi-input,.bi-list-item-select.button-warning .bi-textarea,.bi-list-item-select.button-warning.hover .bi-high-light,.bi-list-item-select.button-warning.hover .bi-input,.bi-list-item-select.button-warning.hover .bi-textarea,.bi-list-item-select.button-warning:hover .bi-high-light,.bi-list-item-select.button-warning:hover .bi-input,.bi-list-item-select.button-warning:hover .bi-textarea{color:#ff4949}.bi-list-item-select.button-success.active.bi-high-light-border,.bi-list-item-select.button-success:active.bi-high-light-border{border-color:#13cd66}.bi-list-item-select.button-warning.active.bi-high-light-border,.bi-list-item-select.button-warning.bi-high-light-border,.bi-list-item-select.button-warning.hover.bi-high-light-border,.bi-list-item-select.button-warning:active.bi-high-light-border,.bi-list-item-select.button-warning:hover.bi-high-light-border{border-color:#e85050}.bi-list-item-select.button-warning.hover,.bi-list-item-select.button-warning:hover{color:#ff4949;background-color:#ffecec}.bi-list-item-select.button-warning.active,.bi-list-item-select.button-warning:active{color:#fff;background-color:#ff4949}.bi-list-item-select.button-warning.active .bi-high-light,.bi-list-item-select.button-warning.active .bi-input,.bi-list-item-select.button-warning.active .bi-textarea,.bi-list-item-select.button-warning:active .bi-high-light,.bi-list-item-select.button-warning:active .bi-input,.bi-list-item-select.button-warning:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-select.disabled.bi-high-light-border,.bi-list-item-select.disabled:active.bi-high-light-border,.bi-list-item-select.disabled:hover.bi-high-light-border{border-color:#ccc}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3685f2}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.CodeMirror-crosshair,.farbtastic *{cursor:crosshair}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-center{text-align:center}.horizon-left{text-align:left}.border-sizing{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-flex-align:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-ms-flex-align:end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-vertical-center.stretch{-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-ms-flex-align:stretch;-o-align-items:stretch;align-items:stretch}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper.stretch{width:100%;-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-o-align-items:stretch;align-items:stretch}.bi-inline-center-adapt-layout:after,.bi-inline-vertical-adapt-layout:after{display:inline-block;width:0;min-height:100%;vertical-align:middle;content:' '}.bi-theme-dark{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-search-text-value-combo.combo-error .bi-search-text-value-trigger .bi-text-button,.bi-text-value-combo.combo-error .bi-select-text-trigger .select-text-label{color:#ff4949}.bi-color-chooser-popup .disable-mask{opacity:.5;filter:alpha(opacity=50);background-color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.farbtastic{position:relative}.farbtastic *{position:absolute}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{width:195px;height:195px}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important;z-index:10000000}.bi-bubble-combo .bubble-combo-triangle-left{z-index:1;position:absolute;width:5px;height:16px;border-left:1px solid #f5f5f5}.bi-bubble-combo .bubble-combo-triangle-left:before{position:absolute;left:0;top:0;right:0;border-left:7px solid #ccc;border-top:8px solid transparent;border-bottom:8px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-left:after{position:absolute;top:1px;left:1px;right:0;border-bottom:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-right:after,.bi-bubble-combo .bubble-combo-triangle-right:before{right:0;border-top:7px solid transparent;border-bottom:8px solid transparent;content:"";position:absolute;top:0;bottom:0}.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;position:absolute;width:7px;height:16px}.bi-bubble-combo .bubble-combo-triangle-right:before{border-right:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-right:after{border-right:7px solid #fff}.bi-bubble-combo .bubble-combo-triangle-top{z-index:1;position:absolute;width:16px;height:10px;border-top:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-top:after{position:absolute;right:1px;top:0;border-top:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-bottom:before,.bi-bubble-combo .bubble-combo-triangle-top:before{border-left:8px solid transparent;border-right:8px solid transparent;content:"";position:absolute}.bi-bubble-combo .bubble-combo-triangle-top:before{border-top:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom{z-index:1;position:absolute;width:16px;height:5px;border-bottom:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-bottom:before{top:0;right:0;bottom:0;border-bottom:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-combo.bi-combo-popup{display:block!important;visibility:visible!important}.bi-search-text-value-combo .trigger-up{display:none}.bi-search-text-value-combo .trigger-down,.bi-search-text-value-combo.combo-show .trigger-up{display:block}.bi-search-text-value-combo.combo-show .trigger-down{display:none}.bi-search-editor{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.bi-display-tree .ztree li a:hover,.ztree li a{text-decoration:none}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{display:inline-block;color:#fff;background:#3685f2;padding:0 5px;margin:1px}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3685f2}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;z-index:1000000000}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:14px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-close,.bi-message-content{font-size:16px}.bi-message-animate{-webkit-transition:opacity .3s,transform .4s,-webkit-transform .4s;-moz-transition:opacity .3s,transform .4s,-webkit-transform .4s;-o-transition:opacity .3s,transform .4s,-webkit-transform .4s;transition:opacity .3s,transform .4s,-webkit-transform .4s}.bi-message-enter{opacity:1}.bi-message-leave{opacity:0;transform:translateY(-100%)}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title{background-color:#F2F4F7}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev,.bi-rich-editor-text-toolbar .text-toolbar-button{font-size:16px}.bi-sortable-holder{border:1px dashed #d4dadd}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-rich-editor .rich-editor-param{-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}#body .bi-button,body .bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #3685f2;background-color:#3685f2;text-align:center;vertical-align:middle;cursor:pointer}#body .bi-button.clear,#body .bi-button.ghost,body .bi-button.clear,body .bi-button.ghost{font-size:inherit;background-color:transparent}#body .bi-button.block,body .bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}#body .bi-button.clear,body .bi-button.clear{border-width:0}#body .bi-button.clear:hover,body .bi-button.clear:hover{opacity:.9;filter:alpha(opacity=90)}#body .bi-button.clear:active,body .bi-button.clear:active{opacity:.8;filter:alpha(opacity=80)}#body .bi-button.button-common,#body .bi-button.button-common .b-font:before,body .bi-button.button-common,body .bi-button.button-common .b-font:before{color:#fff}#body .bi-button.button-common.clear,#body .bi-button.button-common.clear .b-font:before,#body .bi-button.button-common.ghost,#body .bi-button.button-common.ghost .b-font:before,body .bi-button.button-common.clear,body .bi-button.button-common.clear .b-font:before,body .bi-button.button-common.ghost,body .bi-button.button-common.ghost .b-font:before{color:#3685f2}#body .bi-button.button-common.ghost:hover,body .bi-button.button-common.ghost:hover{color:#fff;background-color:#3685f2}#body .bi-button.button-common.ghost:active,body .bi-button.button-common.ghost:active{background-color:#3685f2}#body .bi-button.button-ignore,body .bi-button.button-ignore{background-color:#fff;border-color:#3685f2}#body .bi-button.button-ignore,#body .bi-button.button-ignore .b-font:before,body .bi-button.button-ignore,body .bi-button.button-ignore .b-font:before{color:#3685f2}#body .bi-button.button-ignore.clear,body .bi-button.button-ignore.clear{background-color:transparent;border-width:0}#body .bi-button.button-success,body .bi-button.button-success{background-color:#13cd66;border-color:#13cd66}#body .bi-button.button-success,#body .bi-button.button-success .b-font:before,body .bi-button.button-success,body .bi-button.button-success .b-font:before{color:#fff}#body .bi-button.button-success.clear,body .bi-button.button-success.clear{background-color:transparent;border-width:0}#body .bi-button.button-success.clear,#body .bi-button.button-success.clear .b-font:before,body .bi-button.button-success.clear,body .bi-button.button-success.clear .b-font:before{color:#13cd66}#body .bi-button.button-warning,body .bi-button.button-warning{background-color:#faaa39;border-color:#fbb03b}#body .bi-button.button-warning,#body .bi-button.button-warning .b-font:before,body .bi-button.button-warning,body .bi-button.button-warning .b-font:before{color:#fff}#body .bi-button.button-warning.clear,body .bi-button.button-warning.clear{background-color:transparent;border-width:0}#body .bi-button.button-warning.clear,#body .bi-button.button-warning.clear .b-font:before,body .bi-button.button-warning.clear,body .bi-button.button-warning.clear .b-font:before{color:#faaa39}#body .bi-button.button-error,body .bi-button.button-error{background-color:#ff4949;border-color:#e85050}#body .bi-button.button-error,#body .bi-button.button-error .b-font:before,body .bi-button.button-error,body .bi-button.button-error .b-font:before{color:#fff}#body .bi-button.button-error.clear,body .bi-button.button-error.clear{background-color:transparent;border-width:0}#body .bi-button.button-error.clear,#body .bi-button.button-error.clear .b-font:before,body .bi-button.button-error.clear,body .bi-button.button-error.clear .b-font:before{color:#ff4949}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled .b-font:before,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-common.disabled.base-disabled .b-font:before,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled .b-font:before,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-error.disabled.base-disabled .b-font:before,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled .b-font:before,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-success.disabled.base-disabled .b-font:before,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled .b-font:before,#body .bi-button.button-warning.disabled.base-disabled,#body .bi-button.button-warning.disabled.base-disabled .b-font:before,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled .b-font:before,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-common.disabled.base-disabled .b-font:before,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled .b-font:before,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-error.disabled.base-disabled .b-font:before,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled .b-font:before,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-success.disabled.base-disabled .b-font:before,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled .b-font:before,body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-common.disabled.clear .b-font:before,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-error.disabled.clear .b-font:before,#body .bi-button.button-ignore.disabled,#body .bi-button.button-ignore.disabled .b-font:before,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-ignore.disabled.clear .b-font:before,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-success.disabled.clear .b-font:before,#body .bi-button.button-warning.disabled.clear,#body .bi-button.button-warning.disabled.clear .b-font:before,body .bi-button.button-common.disabled.clear,body .bi-button.button-common.disabled.clear .b-font:before,body .bi-button.button-error.disabled.clear,body .bi-button.button-error.disabled.clear .b-font:before,body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled .b-font:before,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-ignore.disabled.clear .b-font:before,body .bi-button.button-success.disabled.clear,body .bi-button.button-success.disabled.clear .b-font:before,body .bi-button.button-warning.disabled.clear,body .bi-button.button-warning.disabled.clear .b-font:before{color:#9ea6b2!important}#body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-warning.disabled.clear,body .bi-button.button-common.disabled.clear,body .bi-button.button-error.disabled.clear,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-success.disabled.clear,body .bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}#body .bi-button.button-common.disabled.clear:active,#body .bi-button.button-common.disabled.clear:hover,#body .bi-button.button-error.disabled.clear:active,#body .bi-button.button-error.disabled.clear:hover,#body .bi-button.button-ignore.disabled.clear:active,#body .bi-button.button-ignore.disabled.clear:hover,#body .bi-button.button-success.disabled.clear:active,#body .bi-button.button-success.disabled.clear:hover,#body .bi-button.button-warning.disabled.clear:active,#body .bi-button.button-warning.disabled.clear:hover,body .bi-button.button-common.disabled.clear:active,body .bi-button.button-common.disabled.clear:hover,body .bi-button.button-error.disabled.clear:active,body .bi-button.button-error.disabled.clear:hover,body .bi-button.button-ignore.disabled.clear:active,body .bi-button.button-ignore.disabled.clear:hover,body .bi-button.button-success.disabled.clear:active,body .bi-button.button-success.disabled.clear:hover,body .bi-button.button-warning.disabled.clear:active,body .bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-warning.disabled.ghost,body .bi-button.button-common.disabled.ghost,body .bi-button.button-error.disabled.ghost,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-success.disabled.ghost,body .bi-button.button-warning.disabled.ghost{background:0 0!important;border-color:#3685f2!important;opacity:.5;filter:alpha(opacity=50)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-common.disabled.ghost .b-font:before,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-error.disabled.ghost .b-font:before,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost .b-font:before,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-success.disabled.ghost .b-font:before,#body .bi-button.button-warning.disabled.ghost,#body .bi-button.button-warning.disabled.ghost .b-font:before,body .bi-button.button-common.disabled.ghost,body .bi-button.button-common.disabled.ghost .b-font:before,body .bi-button.button-error.disabled.ghost,body .bi-button.button-error.disabled.ghost .b-font:before,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-ignore.disabled.ghost .b-font:before,body .bi-button.button-success.disabled.ghost,body .bi-button.button-success.disabled.ghost .b-font:before,body .bi-button.button-warning.disabled.ghost,body .bi-button.button-warning.disabled.ghost .b-font:before{color:#3685f2!important}.bi-basic-button.button-common:hover .bi-button-mask,.bi-basic-button.button-error:hover .bi-button-mask,.bi-basic-button.button-ignore:hover .bi-button-mask,.bi-basic-button.button-success:hover .bi-button-mask,.bi-basic-button.button-warning:hover .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#fff}.bi-basic-button.button-common:active .bi-button-mask,.bi-basic-button.button-error:active .bi-button-mask,.bi-basic-button.button-ignore:active .bi-button-mask,.bi-basic-button.button-success:active .bi-button-mask,.bi-basic-button.button-warning:active .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#1a1a1a}.bi-basic-button .popup-content{font-size:14px}.bi-theme-dark #body .bi-button.button-common.ghost,.bi-theme-dark #body .bi-button.button-common.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.ghost,.bi-theme-dark body .bi-button.button-common.ghost .b-font:before{color:#fff;border-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:hover,.bi-theme-dark body .bi-button.button-common.ghost:hover{color:#3d4d66;background-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:active,.bi-theme-dark body .bi-button.button-common.ghost:active{background-color:rgba(255,255,255,.9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#e6ffffff, endColorstr=#e6ffffff)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost{background:0 0!important;border-color:#fff!important;opacity:.5;filter:alpha(opacity=50)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark #body .bi-button.button-common.disabled.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost .b-font:before{color:#fff!important}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3685f2}.bi-switch{-webkit-border-radius:40px 40px 40px 40px;-moz-border-radius:40px;border-radius:40px;background-color:#d4dadd}.bi-switch.active,.bi-switch:active{background-color:#3685f2}.bi-switch .circle-button{-webkit-border-radius:9px 9px 9px 9px;-moz-border-radius:9px;border-radius:9px}.bi-code-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3685f2;display:inline-block}.bi-code-editor .error-param{color:#ff4949;padding:0 5px;margin:1px;display:inline-block}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-dynamic-date-combo .date-font,.bi-toast .toast-icon,.bi-trigger .bi-trigger-icon-button{font-size:16px}.x-icon.b-font{margin:auto;width:100%}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input,.bi-textarea{border:none;outline:0;background-color:transparent;padding:0;margin:0;width:100%;height:100%}.bi-input.bi-input-focus,.bi-textarea.bi-input-focus{border:none}.bi-input.bi-input-error,.bi-textarea.bi-input-error{border:none;color:#ff4949!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px}.bi-bubble .bubble-error{background:#ffecec;color:#ff4949}.bi-bubble .bubble-common{background:#eaf2fd;color:#3685f2}.bi-bubble .bubble-success{background:#e1f4e7;color:#13cd66}.bi-bubble .bubble-warning{background:#feeed7;color:#faaa39}.bi-tip{position:fixed!important}.bi-toast{color:#fff;max-width:400px;min-width:150px;border-radius:2px}.bi-toast.toast-success{background:#13cd66}.bi-toast.toast-warning{background:#faaa39}.bi-toast.toast-error{background:#ff4949}.bi-toast.toast-normal{background:#3685f2}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px;color:#fff}.bi-tooltip.tooltip-success{background:#647185;border:1px solid #647185}.bi-tooltip.tooltip-warning{background:#ff4949;border:1px solid #e85050}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-sql-editor .cm-s-default .cm-function,.bi-sql-editor .cm-s-default .cm-keyword,.bi-sql-editor .cm-s-default span[class*="#"]{color:#3685f2}.bi-sql-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3685f2;display:inline-block}.CodeMirror-hints .sql-fr-function,.CodeMirror-hints .sql-keyword{color:#3685f2}.bi-collection-table-cell{box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3685f2}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#13cd66}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3685f2}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#13cd66}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3685f2}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-filter-expander>table,.bi-filter-pane,.bi-multilayer-select-level-tree .tree-view,.bi-multilayer-single-level-tree .tree-view{min-width:100%}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.ztree li a,.ztree li span.button{cursor:pointer;display:inline-block}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li a{padding:1px 3px 0 0;margin:0;height:24px;background-color:transparent;vertical-align:top}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;border:0;outline:0;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll}.bi-popup-view .list-view-toolbar,.bi-year-popup .year-popup-navigation{line-height:30px}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.noline_docu,.ztree li span.button.root_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;display:inline-block;padding:0;margin:2px 0 0 1px;border:0;position:absolute;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-110px -80px}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}body,html{height:100%}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)}.bi-trigger .trigger-up{display:none}.bi-combo-popup>.bi-trigger .trigger-up,.bi-trigger .trigger-down{display:block}.bi-combo-popup>.bi-trigger .trigger-down,.bi-multi-select-combo .trigger-up{display:none}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-date-trigger,.bi-filter-pane{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-popup-view .list-view-shadow{-webkit-box-shadow:0 1px 5px 0 rgba(26,26,26,.2);-moz-box-shadow:0 1px 5px 0 rgba(26,26,26,.2);box-shadow:0 1px 5px 0 rgba(26,26,26,.2)}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-date-trigger{border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text,.bi-down-list-popup .list-group-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#f7f8fa;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191B2B;color:#999}.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf{border:1px dashed #3685f2;background:#eaf2fd}.bi-filter-expander{min-width:100%;border-right:0;border-bottom:0}.bi-filter-expander>.filter-item-empty-item{border-top:0;border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-filter-expander>table>tbody>tr>td.first-element{width:20px;border-right:1px solid #d4dadd!important;border-bottom:1px solid #d4dadd!important}.bi-theme-dark .bi-filter-expander>.filter-item-empty-item{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-filter-expander>table>tbody>tr>td.first-element{border-right:1px solid #525466!important;border-bottom:1px solid #525466!important}.bi-filter-operation .operation-trigger.hover,.bi-filter-operation .operation-trigger:hover{color:#13cd66}.bi-filter-pane{border-radius:2px}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#faaa39}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-interval-slider-label{min-height:50px}.bi-interval-slider{min-height:70px}.bi-month-trigger,.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .multidate-popup-label{color:#3685f2;font-size:14px}.bi-multidate-popup .multidate-popup-item.active,.bi-multidate-popup .multidate-popup-item:active{background-color:#3685f2;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .multidate-popup-button{color:#3685f2;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-select-insert-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-multi-select-combo .trigger-down,.bi-multi-select-combo.combo-show .trigger-up{display:block}.bi-multi-select-combo.combo-show .trigger-down,.bi-multi-select-insert-combo .trigger-up{display:none}.bi-multi-select-insert-combo .trigger-down,.bi-multi-select-insert-combo.combo-show .trigger-up{display:block}.bi-multi-select-insert-combo.combo-show .trigger-down,.bi-multi-tree-combo .trigger-up{display:none}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#ff4949}.bi-multi-select-check-selected-button{z-index:1;min-width:16px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3685f2}.bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-combo .trigger-down,.bi-multi-tree-combo.combo-show .trigger-up{display:block}.bi-multi-tree-combo.combo-show .trigger-down,.bi-search-multi-text-value-combo .trigger-up{display:none}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3685f2;z-index:1}.bi-number-editor{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-number-interval .number-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-number-interval .number-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-search-multi-text-value-combo .multi-select-trigger-icon-button,.bi-single-select-combo .single-select-trigger-icon-button{font-size:16px}.bi-number-interval.number-error .bi-input{color:#ff4949!important}.bi-date-interval.time-error .bi-input,.bi-date-interval.time-error .sign-editor-text,.bi-search-multi-text-value-combo.combo-error .bi-multi-select-searcher .tip-text-style,.bi-time-interval.time-error .bi-date-time-trigger .bi-input,.bi-time-interval.time-error .bi-date-time-trigger .sign-editor-text,.bi-year-month-interval.time-error .bi-input,.bi-year-month-interval.time-error .sign-editor-text{color:#ff4949}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#f7f8fa}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191B2B}.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-search-multi-text-value-combo .trigger-down,.bi-search-multi-text-value-combo.combo-show .trigger-up{display:block}.bi-search-multi-text-value-combo.combo-show .trigger-down,.bi-single-select-combo .trigger-up{display:none}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-select-combo .trigger-down,.bi-single-select-combo.combo-show .trigger-up{display:block}.bi-single-select-combo.combo-show .trigger-down{display:none}.bi-single-slider-label{min-height:50px}.bi-single-slider-normal{min-height:30px}.bi-single-slider{min-height:50px}.bi-single-slider-button .slider-button{cursor:ew-resize;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider-track .gray-track{background-color:#F2F4F7;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-slider-track .blue-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-slider-track .disabled-blue-track{background-color:#d0d4da;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-time-interval .bi-date-time-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}html{overflow:hidden}body{position:absolute;width:100%;margin:0;padding:0;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#3d4d66;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;text-decoration:none;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.farbtastic .wheel{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/wheel.png) center center no-repeat}.farbtastic .overlay{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/mask.png) center center no-repeat}.farbtastic .marker{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/marker.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.center_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.roots_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.bottom_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.root_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.ztree li span.button.root_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.ztree li span.button.roots_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.ztree li span.button.roots_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.ztree li span.button.center_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.ztree li span.button.center_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.ztree li span.button.bottom_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.ztree li span.button.bottom_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.ztree li span.button.roots_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.ztree li span.button.center_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.ztree li span.button.bottom_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.ztree li span.button.ico_loading{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.loading-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/auto_color.png) center center no-repeat}.auto-color-normal-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/auto_color_normal.png) center center no-repeat}.trans-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/trans_color.png) center center no-repeat}@font-face{font-family:bi;src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot);src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot?#iefix) format('embedded-opentype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.woff) format('woff'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.ttf) format('truetype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:hover .b-font:before{content:"\e6d0";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e6d0";color:#3f8ce8}.close-ha-font.disabled .b-font:before{content:"\e6d0";color:inherit}.circle-close-font .b-font:before,.circle-close-font.disabled .b-font:before{content:"\e6d5";color:inherit}.search-close-h-font .b-font:before{content:"\e6d0";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e6d0";color:#ff4949}.search-close-h-font.disabled .b-font:before{content:"\e6d0";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e70d";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e70c";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before{content:"\e6dc";color:inherit}.date-font .b-font:before,.date-font.disabled .b-font:before{content:"\e733";color:inherit}.date-change-h-font .b-font:before,.date-change-h-font.disabled .b-font:before,.date-change-h-font.hover .b-font:before,.date-change-h-font:hover .b-font:before{content:"\e72f";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-h-font .b-font:before{content:"\e762";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:hover .b-font:before{content:"\e762";color:inherit}.dot-h-font.disabled .b-font:before{content:"\e762";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e762";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e762";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before{content:"\e762";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:hover .b-font:before{content:"\e762";color:#999}.dot-e-font:active .b-font:before{content:"\e762";color:#3685f2}.dot-e-font.active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font.disabled .b-font:before{content:"\e762";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e70c";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before{content:"\e70c";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before{content:"\e70c";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-h-font .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-h-font.disabled .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font.disabled .b-font:before{content:"\e6bd";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e6cf";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before{content:"\e6cf";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before{content:"\e6cf";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6d9";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6d8";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6d6";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6d7";color:inherit}.expander-right-font .b-font:before,.expander-right-font.disabled .b-font:before{content:"\e6d8";color:inherit}.expander-down-font .b-font:before,.expander-down-font.disabled .b-font:before{content:"\e6d7";color:inherit}.solid-triangle-top-font .b-font:before,.solid-triangle-top-font.disabled .b-font:before,.solid-triangle-top-font.hover .b-font:before,.solid-triangle-top-font:hover .b-font:before{content:"\e6d6";color:inherit}.solid-triangle-bottom-font .b-font:before,.solid-triangle-bottom-font.disabled .b-font:before,.solid-triangle-bottom-font.hover .b-font:before,.solid-triangle-bottom-font:hover .b-font:before{content:"\e6d7";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e64e";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e64e";color:#3685f2}.trigger-triangle-font.disabled .b-font:before{content:"\e64e";color:#999}.pull-up-font .b-font:before,.pull-up-font.disabled .b-font:before{content:"\e70a";color:inherit}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-h-font .b-font:before{content:"\e70b";color:#647185}.pull-down-h-font.hover .b-font:before,.pull-down-h-font:hover .b-font:before{content:"\e70b";color:inherit}.pull-down-h-font.disabled .b-font:before,.pull-down-ha-font .b-font:before{content:"\e70b";color:#647185}.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e70b";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e70b";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before{content:"\e70b";color:#647185}.check-font .b-font:before,.check-font.disabled .b-font:before{content:"\e6cf";color:#3685f2}.item-check-font .b-font:before{content:"\e6cf";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:hover .b-font:before{content:"\e6cf";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.item-check-font.disabled .b-font:before{content:"\e6cf";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font:hover .b-font:before{content:"\e740";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before{content:"\e6d0";color:#faaa39}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:hover .b-font:before{content:"\e75e";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e75e";color:#3f8ce8}.less-font.disabled .b-font:before{content:"\e75e";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:hover .b-font:before{content:"\e761";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e761";color:#3f8ce8}.less-equal-font.disabled .b-font:before{content:"\e761";color:inherit}.text-bold-font .b-font:before,.text-bold-font.disabled .b-font:before{content:"\e75b";color:inherit}.text-italic-font .b-font:before,.text-italic-font.disabled .b-font:before{content:"\e75c";color:inherit}.text-underline-font .b-font:before,.text-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-color-font .b-font:before,.text-color-font.disabled .b-font:before{content:"\e75a";color:inherit}.text-background-font .b-font:before,.text-background-font.disabled .b-font:before{content:"\e758";color:inherit}.text-color-underline-font .b-font:before,.text-color-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-align-left-font .b-font:before,.text-align-left-font.disabled .b-font:before{content:"\e6ca";color:inherit}.text-align-center-font .b-font:before,.text-align-center-font.disabled .b-font:before{content:"\e6bf";color:inherit}.text-align-right-font .b-font:before,.text-align-right-font.disabled .b-font:before{content:"\e6c8";color:inherit}.toast-error-font .b-font:before,.toast-error-font.disabled .b-font:before{content:"\e757";color:inherit}.toast-success-font .b-font:before,.toast-success-font.disabled .b-font:before{content:"\e756";color:inherit}.toast-warning-font .b-font:before,.toast-warning-font.disabled .b-font:before{content:"\e755";color:inherit}.toast-message-font .b-font:before,.toast-message-font.disabled .b-font:before{content:"\e74b";color:inherit}.text-add-tip-font .b-font:before,.text-add-tip-font.disabled .b-font:before{content:"\e6dd";color:#13cd66}.tree-collapse-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_1.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_1.png) center center no-repeat}.tree-collapse-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_2.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_2.png) center center no-repeat}.tree-collapse-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_3.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_3.png) center center no-repeat}.tree-collapse-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_4.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_4.png) center center no-repeat}.tree-expand-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_1.png) center center no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_1.png) center center no-repeat}.tree-expand-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_2.png) center center no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_2.png) center center no-repeat}.tree-expand-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_3.png) center center no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_3.png) center center no-repeat}.tree-expand-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_4.png) center center no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_4.png) center center no-repeat}.tree-vertical-line-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.tree-vertical-line-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.tree-vertical-line-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.check-box-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_active.png) center center no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png) center center no-repeat}.check-box-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_disable.png) center center no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_disable.png) center center no-repeat}.check-box-icon.disabled.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_disable2.png) center center no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_disable2.png) center center no-repeat}.radio-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.hover .x-icon,.radio-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_active.png) center center no-repeat;background-size:contain}.radio-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_active.png) center center no-repeat}.radio-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_disable.png) center center no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_disable.png) center center no-repeat}.radio-icon.disabled.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_disable2.png) center center no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_disable2.png) center center no-repeat}.check-half-select-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) center center no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) center center no-repeat}.slider-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/slider_normal_small.png) center center no-repeat}.slider-icon.hover .x-icon,.slider-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_active_small.png) center center no-repeat;background-size:contain}.slider-icon.hover .x-icon.hack,.slider-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/slider_active_small.png) center center no-repeat}.slider-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/slider_normal_small.png) center center no-repeat}.auto-color-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/auto_normal.png) center center no-repeat;background-size:contain}.auto-color-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/auto_normal.png) center center no-repeat}.auto-color-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/auto_select.png) center center no-repeat;background-size:contain}.auto-color-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/auto_select.png) center center no-repeat}.auto-color-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/auto_disable.png) center center no-repeat;background-size:contain}.auto-color-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/auto_disable.png) center center no-repeat}.trans-color-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/trans_normal.png) center center no-repeat;background-size:contain}.trans-color-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/trans_normal.png) center center no-repeat}.trans-color-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/trans_select.png) center center no-repeat;background-size:contain}.trans-color-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/trans_select.png) center center no-repeat}.trans-color-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/trans_disable.png) center center no-repeat;background-size:contain}.trans-color-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/trans_disable.png) center center no-repeat} \ No newline at end of file +/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.cm-em,dfn{font-style:italic}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.b-font,body,i{-moz-osx-font-smoothing:grayscale}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}button,html,input,select,textarea{font-family:sans-serif}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#9ea6b2!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}.bi-search-editor .circle-close-font,.bi-search-editor .search-font,.bi-search-text-value-combo .trigger-icon-button{font-size:16px}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{outline:0;text-decoration:none}a:focus{outline:0}input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-ms-clear{display:none}input,textarea{margin:0;padding:0;outline:0;border:1px solid #d4dadd}ul{list-style:disc}li{list-style-type:none}i{-webkit-font-smoothing:antialiased}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#f7f8fa;color:#3d4d66}.bi-background .bi-input,.bi-background .bi-textarea{color:#3d4d66}.bi-theme-dark .bi-background{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#3d4d66}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea{color:#9ea6b2}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#c4c9d1}.bi-border{border:1px solid #d4dadd}.bi-border-radius{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#faaa39}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3685f2}.bi-error,.bi-error .bi-input,.bi-error .bi-textarea{color:#ff4949}.bi-error-background,.bi-error-background .bi-input,.bi-error-background .bi-textarea,.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-background{background-color:#3685f2;color:#fff}.bi-error-background{background-color:#ff4949}.bi-high-light-border{border-color:#3685f2}.bi-water-mark{color:#c4c9d1;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#c4c9d1}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(54,133,242,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d3685f2, endColorstr=#0d3685f2)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #3685f2}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3685f2}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(54,133,242,.06);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2, endColorstr=#0f3685f2)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3685f2;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3685f2;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3685f2;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(54,133,242,.06);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2, endColorstr=#0f3685f2)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3685f2}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.button-success.active,.bi-list-item-select.button-success:active{color:#fff;background-color:#13cd66}.bi-list-item-select.button-success.active .bi-high-light,.bi-list-item-select.button-success.active .bi-input,.bi-list-item-select.button-success.active .bi-textarea,.bi-list-item-select.button-success:active .bi-high-light,.bi-list-item-select.button-success:active .bi-input,.bi-list-item-select.button-success:active .bi-textarea{color:#fff}.bi-list-item-select.button-warning,.bi-list-item-select.button-warning .bi-high-light,.bi-list-item-select.button-warning .bi-input,.bi-list-item-select.button-warning .bi-textarea,.bi-list-item-select.button-warning.hover .bi-high-light,.bi-list-item-select.button-warning.hover .bi-input,.bi-list-item-select.button-warning.hover .bi-textarea,.bi-list-item-select.button-warning:hover .bi-high-light,.bi-list-item-select.button-warning:hover .bi-input,.bi-list-item-select.button-warning:hover .bi-textarea{color:#ff4949}.bi-list-item-select.button-success.active.bi-high-light-border,.bi-list-item-select.button-success:active.bi-high-light-border{border-color:#13cd66}.bi-list-item-select.button-warning.active.bi-high-light-border,.bi-list-item-select.button-warning.bi-high-light-border,.bi-list-item-select.button-warning.hover.bi-high-light-border,.bi-list-item-select.button-warning:active.bi-high-light-border,.bi-list-item-select.button-warning:hover.bi-high-light-border{border-color:#e85050}.bi-list-item-select.button-warning.hover,.bi-list-item-select.button-warning:hover{color:#ff4949;background-color:#ffecec}.bi-list-item-select.button-warning.active,.bi-list-item-select.button-warning:active{color:#fff;background-color:#ff4949}.bi-list-item-select.button-warning.active .bi-high-light,.bi-list-item-select.button-warning.active .bi-input,.bi-list-item-select.button-warning.active .bi-textarea,.bi-list-item-select.button-warning:active .bi-high-light,.bi-list-item-select.button-warning:active .bi-input,.bi-list-item-select.button-warning:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-select.disabled.bi-high-light-border,.bi-list-item-select.disabled:active.bi-high-light-border,.bi-list-item-select.disabled:hover.bi-high-light-border{border-color:#ccc}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3685f2}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.CodeMirror-crosshair,.farbtastic *{cursor:crosshair}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-center{text-align:center}.horizon-left{text-align:left}.border-sizing{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-flex-align:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-ms-flex-align:end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-vertical-center.stretch{-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-ms-flex-align:stretch;-o-align-items:stretch;align-items:stretch}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper.stretch{width:100%;-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-o-align-items:stretch;align-items:stretch}.bi-inline-center-adapt-layout:after,.bi-inline-vertical-adapt-layout:after{display:inline-block;width:0;min-height:100%;vertical-align:middle;content:' '}.bi-theme-dark{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-search-text-value-combo.combo-error .bi-search-text-value-trigger .bi-text-button,.bi-text-value-combo.combo-error .bi-select-text-trigger .select-text-label{color:#ff4949}.bi-color-chooser-popup .disable-mask{opacity:.5;filter:alpha(opacity=50);background-color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.farbtastic{position:relative}.farbtastic *{position:absolute}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{width:195px;height:195px}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important;z-index:10000000}.bi-bubble-combo .bubble-combo-triangle-left{z-index:1;position:absolute;width:5px;height:16px;border-left:1px solid #f5f5f5}.bi-bubble-combo .bubble-combo-triangle-left:before{position:absolute;left:0;top:0;right:0;border-left:7px solid #ccc;border-top:8px solid transparent;border-bottom:8px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-left:after{position:absolute;top:1px;left:1px;right:0;border-bottom:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-right:after,.bi-bubble-combo .bubble-combo-triangle-right:before{right:0;border-top:7px solid transparent;border-bottom:8px solid transparent;content:"";position:absolute;top:0;bottom:0}.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;position:absolute;width:7px;height:16px}.bi-bubble-combo .bubble-combo-triangle-right:before{border-right:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-right:after{border-right:7px solid #fff}.bi-bubble-combo .bubble-combo-triangle-top{z-index:1;position:absolute;width:16px;height:10px;border-top:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-top:after{position:absolute;right:1px;top:0;border-top:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-bottom:before,.bi-bubble-combo .bubble-combo-triangle-top:before{border-left:8px solid transparent;border-right:8px solid transparent;content:"";position:absolute}.bi-bubble-combo .bubble-combo-triangle-top:before{border-top:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom{z-index:1;position:absolute;width:16px;height:5px;border-bottom:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-bottom:before{top:0;right:0;bottom:0;border-bottom:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-combo.bi-combo-popup{display:block!important;visibility:visible!important}.bi-search-text-value-combo .trigger-up{display:none}.bi-search-text-value-combo .trigger-down,.bi-search-text-value-combo.combo-show .trigger-up{display:block}.bi-search-text-value-combo.combo-show .trigger-down{display:none}.bi-search-editor{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.bi-display-tree .ztree li a:hover,.ztree li a{text-decoration:none}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{display:inline-block;color:#fff;background:#3685f2;padding:0 5px;margin:1px}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3685f2}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;z-index:1000000000}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:14px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-close,.bi-message-content{font-size:16px}.bi-message-animate{-webkit-transition:opacity .3s,transform .4s,-webkit-transform .4s;-moz-transition:opacity .3s,transform .4s,-webkit-transform .4s;-o-transition:opacity .3s,transform .4s,-webkit-transform .4s;transition:opacity .3s,transform .4s,-webkit-transform .4s}.bi-message-enter{opacity:1}.bi-message-leave{opacity:0;transform:translateY(-100%)}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title{background-color:#F2F4F7}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev,.bi-rich-editor-text-toolbar .text-toolbar-button{font-size:16px}.bi-sortable-holder{border:1px dashed #d4dadd}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-rich-editor .rich-editor-param{-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}#body .bi-button,body .bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #3685f2;background-color:#3685f2;text-align:center;vertical-align:middle;cursor:pointer}#body .bi-button.clear,#body .bi-button.ghost,body .bi-button.clear,body .bi-button.ghost{font-size:inherit;background-color:transparent}#body .bi-button.block,body .bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}#body .bi-button.clear,body .bi-button.clear{border-width:0}#body .bi-button.clear:hover,body .bi-button.clear:hover{opacity:.9;filter:alpha(opacity=90)}#body .bi-button.clear:active,body .bi-button.clear:active{opacity:.8;filter:alpha(opacity=80)}#body .bi-button.button-common,#body .bi-button.button-common .b-font:before,body .bi-button.button-common,body .bi-button.button-common .b-font:before{color:#fff}#body .bi-button.button-common.clear,#body .bi-button.button-common.clear .b-font:before,#body .bi-button.button-common.ghost,#body .bi-button.button-common.ghost .b-font:before,body .bi-button.button-common.clear,body .bi-button.button-common.clear .b-font:before,body .bi-button.button-common.ghost,body .bi-button.button-common.ghost .b-font:before{color:#3685f2}#body .bi-button.button-common.ghost:hover,body .bi-button.button-common.ghost:hover{color:#fff;background-color:#3685f2}#body .bi-button.button-common.ghost:active,body .bi-button.button-common.ghost:active{background-color:#3685f2}#body .bi-button.button-ignore,body .bi-button.button-ignore{background-color:#fff;border-color:#3685f2}#body .bi-button.button-ignore,#body .bi-button.button-ignore .b-font:before,body .bi-button.button-ignore,body .bi-button.button-ignore .b-font:before{color:#3685f2}#body .bi-button.button-ignore.clear,body .bi-button.button-ignore.clear{background-color:transparent;border-width:0}#body .bi-button.button-success,body .bi-button.button-success{background-color:#13cd66;border-color:#13cd66}#body .bi-button.button-success,#body .bi-button.button-success .b-font:before,body .bi-button.button-success,body .bi-button.button-success .b-font:before{color:#fff}#body .bi-button.button-success.clear,body .bi-button.button-success.clear{background-color:transparent;border-width:0}#body .bi-button.button-success.clear,#body .bi-button.button-success.clear .b-font:before,body .bi-button.button-success.clear,body .bi-button.button-success.clear .b-font:before{color:#13cd66}#body .bi-button.button-warning,body .bi-button.button-warning{background-color:#faaa39;border-color:#fbb03b}#body .bi-button.button-warning,#body .bi-button.button-warning .b-font:before,body .bi-button.button-warning,body .bi-button.button-warning .b-font:before{color:#fff}#body .bi-button.button-warning.clear,body .bi-button.button-warning.clear{background-color:transparent;border-width:0}#body .bi-button.button-warning.clear,#body .bi-button.button-warning.clear .b-font:before,body .bi-button.button-warning.clear,body .bi-button.button-warning.clear .b-font:before{color:#faaa39}#body .bi-button.button-error,body .bi-button.button-error{background-color:#ff4949;border-color:#e85050}#body .bi-button.button-error,#body .bi-button.button-error .b-font:before,body .bi-button.button-error,body .bi-button.button-error .b-font:before{color:#fff}#body .bi-button.button-error.clear,body .bi-button.button-error.clear{background-color:transparent;border-width:0}#body .bi-button.button-error.clear,#body .bi-button.button-error.clear .b-font:before,body .bi-button.button-error.clear,body .bi-button.button-error.clear .b-font:before{color:#ff4949}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled .b-font:before,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-common.disabled.base-disabled .b-font:before,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled .b-font:before,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-error.disabled.base-disabled .b-font:before,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled .b-font:before,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-success.disabled.base-disabled .b-font:before,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled .b-font:before,#body .bi-button.button-warning.disabled.base-disabled,#body .bi-button.button-warning.disabled.base-disabled .b-font:before,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled .b-font:before,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-common.disabled.base-disabled .b-font:before,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled .b-font:before,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-error.disabled.base-disabled .b-font:before,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled .b-font:before,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-success.disabled.base-disabled .b-font:before,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled .b-font:before,body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-common.disabled.clear .b-font:before,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-error.disabled.clear .b-font:before,#body .bi-button.button-ignore.disabled,#body .bi-button.button-ignore.disabled .b-font:before,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-ignore.disabled.clear .b-font:before,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-success.disabled.clear .b-font:before,#body .bi-button.button-warning.disabled.clear,#body .bi-button.button-warning.disabled.clear .b-font:before,body .bi-button.button-common.disabled.clear,body .bi-button.button-common.disabled.clear .b-font:before,body .bi-button.button-error.disabled.clear,body .bi-button.button-error.disabled.clear .b-font:before,body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled .b-font:before,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-ignore.disabled.clear .b-font:before,body .bi-button.button-success.disabled.clear,body .bi-button.button-success.disabled.clear .b-font:before,body .bi-button.button-warning.disabled.clear,body .bi-button.button-warning.disabled.clear .b-font:before{color:#9ea6b2!important}#body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-warning.disabled.clear,body .bi-button.button-common.disabled.clear,body .bi-button.button-error.disabled.clear,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-success.disabled.clear,body .bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}#body .bi-button.button-common.disabled.clear:active,#body .bi-button.button-common.disabled.clear:hover,#body .bi-button.button-error.disabled.clear:active,#body .bi-button.button-error.disabled.clear:hover,#body .bi-button.button-ignore.disabled.clear:active,#body .bi-button.button-ignore.disabled.clear:hover,#body .bi-button.button-success.disabled.clear:active,#body .bi-button.button-success.disabled.clear:hover,#body .bi-button.button-warning.disabled.clear:active,#body .bi-button.button-warning.disabled.clear:hover,body .bi-button.button-common.disabled.clear:active,body .bi-button.button-common.disabled.clear:hover,body .bi-button.button-error.disabled.clear:active,body .bi-button.button-error.disabled.clear:hover,body .bi-button.button-ignore.disabled.clear:active,body .bi-button.button-ignore.disabled.clear:hover,body .bi-button.button-success.disabled.clear:active,body .bi-button.button-success.disabled.clear:hover,body .bi-button.button-warning.disabled.clear:active,body .bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-warning.disabled.ghost,body .bi-button.button-common.disabled.ghost,body .bi-button.button-error.disabled.ghost,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-success.disabled.ghost,body .bi-button.button-warning.disabled.ghost{background:0 0!important;border-color:#3685f2!important;opacity:.5;filter:alpha(opacity=50)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-common.disabled.ghost .b-font:before,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-error.disabled.ghost .b-font:before,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost .b-font:before,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-success.disabled.ghost .b-font:before,#body .bi-button.button-warning.disabled.ghost,#body .bi-button.button-warning.disabled.ghost .b-font:before,body .bi-button.button-common.disabled.ghost,body .bi-button.button-common.disabled.ghost .b-font:before,body .bi-button.button-error.disabled.ghost,body .bi-button.button-error.disabled.ghost .b-font:before,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-ignore.disabled.ghost .b-font:before,body .bi-button.button-success.disabled.ghost,body .bi-button.button-success.disabled.ghost .b-font:before,body .bi-button.button-warning.disabled.ghost,body .bi-button.button-warning.disabled.ghost .b-font:before{color:#3685f2!important}.bi-basic-button.button-common:hover .bi-button-mask,.bi-basic-button.button-error:hover .bi-button-mask,.bi-basic-button.button-ignore:hover .bi-button-mask,.bi-basic-button.button-success:hover .bi-button-mask,.bi-basic-button.button-warning:hover .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#fff}.bi-basic-button.button-common:active .bi-button-mask,.bi-basic-button.button-error:active .bi-button-mask,.bi-basic-button.button-ignore:active .bi-button-mask,.bi-basic-button.button-success:active .bi-button-mask,.bi-basic-button.button-warning:active .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#1a1a1a}.bi-basic-button .popup-content{font-size:14px}.bi-theme-dark #body .bi-button.button-common.ghost,.bi-theme-dark #body .bi-button.button-common.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.ghost,.bi-theme-dark body .bi-button.button-common.ghost .b-font:before{color:#fff;border-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:hover,.bi-theme-dark body .bi-button.button-common.ghost:hover{color:#3d4d66;background-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:active,.bi-theme-dark body .bi-button.button-common.ghost:active{background-color:rgba(255,255,255,.9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#e6ffffff, endColorstr=#e6ffffff)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost{background:0 0!important;border-color:#fff!important;opacity:.5;filter:alpha(opacity=50)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark #body .bi-button.button-common.disabled.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost .b-font:before{color:#fff!important}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3685f2}.bi-switch{-webkit-border-radius:40px 40px 40px 40px;-moz-border-radius:40px;border-radius:40px;background-color:#d4dadd}.bi-switch.active,.bi-switch:active{background-color:#3685f2}.bi-switch .circle-button{-webkit-border-radius:9px 9px 9px 9px;-moz-border-radius:9px;border-radius:9px}.bi-code-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3685f2;display:inline-block}.bi-code-editor .error-param{color:#ff4949;padding:0 5px;margin:1px;display:inline-block}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-dynamic-date-combo .date-font,.bi-toast .toast-icon,.bi-trigger .bi-trigger-icon-button{font-size:16px}.x-icon.b-font{margin:auto;width:100%}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input,.bi-textarea{border:none;outline:0;background-color:transparent;padding:0;margin:0;width:100%;height:100%}.bi-input.bi-input-focus,.bi-textarea.bi-input-focus{border:none}.bi-input.bi-input-error,.bi-textarea.bi-input-error{border:none;color:#ff4949!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px}.bi-bubble .bubble-error{background:#ffecec;color:#ff4949}.bi-bubble .bubble-common{background:#eaf2fd;color:#3685f2}.bi-bubble .bubble-success{background:#e1f4e7;color:#13cd66}.bi-bubble .bubble-warning{background:#feeed7;color:#faaa39}.bi-tip{position:fixed!important}.bi-toast{color:#fff;max-width:400px;min-width:150px;border-radius:2px}.bi-toast.toast-success{background:#13cd66}.bi-toast.toast-warning{background:#faaa39}.bi-toast.toast-error{background:#ff4949}.bi-toast.toast-normal{background:#3685f2}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px;color:#fff}.bi-tooltip.tooltip-success{background:#647185;border:1px solid #647185}.bi-tooltip.tooltip-warning{background:#ff4949;border:1px solid #e85050}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-sql-editor .cm-s-default .cm-function,.bi-sql-editor .cm-s-default .cm-keyword,.bi-sql-editor .cm-s-default span[class*="#"]{color:#3685f2}.bi-sql-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3685f2;display:inline-block}.CodeMirror-hints .sql-fr-function,.CodeMirror-hints .sql-keyword{color:#3685f2}.bi-collection-table-cell{box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3685f2}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#13cd66}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3685f2}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#13cd66}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3685f2}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-filter-expander>table,.bi-filter-pane,.bi-multilayer-select-level-tree .tree-view,.bi-multilayer-single-level-tree .tree-view{min-width:100%}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.ztree li a,.ztree li span.button{cursor:pointer;display:inline-block}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li a{padding:1px 3px 0 0;margin:0;height:24px;background-color:transparent;vertical-align:top}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;border:0;outline:0;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll}.bi-popup-view .list-view-toolbar,.bi-year-popup .year-popup-navigation{line-height:30px}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.noline_docu,.ztree li span.button.root_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;display:inline-block;padding:0;margin:2px 0 0 1px;border:0;position:absolute;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-110px -80px}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}body,html{height:100%}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)}.bi-trigger .trigger-up{display:none}.bi-combo-popup>.bi-trigger .trigger-up,.bi-trigger .trigger-down{display:block}.bi-combo-popup>.bi-trigger .trigger-down,.bi-multi-select-combo .trigger-up{display:none}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-date-trigger,.bi-filter-pane{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-popup-view .list-view-shadow{-webkit-box-shadow:0 1px 5px 0 rgba(26,26,26,.2);-moz-box-shadow:0 1px 5px 0 rgba(26,26,26,.2);box-shadow:0 1px 5px 0 rgba(26,26,26,.2)}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-date-trigger{border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text,.bi-down-list-popup .list-group-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#f7f8fa;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191B2B;color:#999}.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf{border:1px dashed #3685f2;background:#eaf2fd}.bi-filter-expander{min-width:100%;border-right:0;border-bottom:0}.bi-filter-expander>.filter-item-empty-item{border-top:0;border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-filter-expander>table>tbody>tr>td.first-element{width:20px;border-right:1px solid #d4dadd!important;border-bottom:1px solid #d4dadd!important}.bi-theme-dark .bi-filter-expander>.filter-item-empty-item{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-filter-expander>table>tbody>tr>td.first-element{border-right:1px solid #525466!important;border-bottom:1px solid #525466!important}.bi-filter-operation .operation-trigger.hover,.bi-filter-operation .operation-trigger:hover{color:#13cd66}.bi-filter-pane{border-radius:2px}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#faaa39}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-interval-slider-label{min-height:50px}.bi-interval-slider{min-height:70px}.bi-month-trigger,.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .multidate-popup-label{color:#3685f2;font-size:14px}.bi-multidate-popup .multidate-popup-item.active,.bi-multidate-popup .multidate-popup-item:active{background-color:#3685f2;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .multidate-popup-button{color:#3685f2;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-select-insert-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-multi-select-combo .trigger-down,.bi-multi-select-combo.combo-show .trigger-up{display:block}.bi-multi-select-combo.combo-show .trigger-down,.bi-multi-select-insert-combo .trigger-up{display:none}.bi-multi-select-insert-combo .trigger-down,.bi-multi-select-insert-combo.combo-show .trigger-up{display:block}.bi-multi-select-insert-combo.combo-show .trigger-down,.bi-multi-tree-combo .trigger-up{display:none}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#ff4949}.bi-multi-select-check-selected-button{z-index:1;min-width:16px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3685f2}.bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-combo .trigger-down,.bi-multi-tree-combo.combo-show .trigger-up{display:block}.bi-multi-tree-combo.combo-show .trigger-down,.bi-search-multi-text-value-combo .trigger-up{display:none}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3685f2;z-index:1}.bi-number-editor{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-number-interval .number-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-number-interval .number-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-search-multi-text-value-combo .multi-select-trigger-icon-button,.bi-single-select-combo .single-select-trigger-icon-button{font-size:16px}.bi-number-interval.number-error .bi-input{color:#ff4949!important}.bi-date-interval.time-error .bi-input,.bi-date-interval.time-error .sign-editor-text,.bi-search-multi-text-value-combo.combo-error .bi-multi-select-searcher .tip-text-style,.bi-time-interval.time-error .bi-date-time-trigger .bi-input,.bi-time-interval.time-error .bi-date-time-trigger .sign-editor-text,.bi-year-month-interval.time-error .bi-input,.bi-year-month-interval.time-error .sign-editor-text{color:#ff4949}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#f7f8fa}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191B2B}.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-search-multi-text-value-combo .trigger-down,.bi-search-multi-text-value-combo.combo-show .trigger-up{display:block}.bi-search-multi-text-value-combo.combo-show .trigger-down,.bi-single-select-combo .trigger-up{display:none}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-select-combo .trigger-down,.bi-single-select-combo.combo-show .trigger-up{display:block}.bi-single-select-combo.combo-show .trigger-down{display:none}.bi-single-slider-label{min-height:50px}.bi-single-slider-normal{min-height:30px}.bi-single-slider{min-height:50px}.bi-single-slider-button .slider-button{cursor:ew-resize;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider-track .gray-track{background-color:#F2F4F7;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-slider-track .blue-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-slider-track .disabled-blue-track{background-color:#d0d4da;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-time-interval .bi-date-time-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}html{overflow:hidden}body{position:absolute;width:100%;margin:0;padding:0;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#3d4d66;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;text-decoration:none;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.farbtastic .wheel{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/wheel.png) center center no-repeat}.farbtastic .overlay{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/mask.png) center center no-repeat}.farbtastic .marker{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/marker.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.center_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.roots_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.bottom_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.root_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.ztree li span.button.root_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.ztree li span.button.roots_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.ztree li span.button.roots_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.ztree li span.button.center_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.ztree li span.button.center_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.ztree li span.button.bottom_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.ztree li span.button.bottom_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.ztree li span.button.roots_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.ztree li span.button.center_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.ztree li span.button.bottom_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.ztree li span.button.ico_loading{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.loading-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/auto_color.png) center center no-repeat}.auto-color-normal-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/auto_color_normal.png) center center no-repeat}.trans-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/trans_color.png) center center no-repeat}@font-face{font-family:bi;src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot);src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot?#iefix) format('embedded-opentype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.woff) format('woff'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.ttf) format('truetype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:hover .b-font:before{content:"\e6d0";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e6d0";color:#3f8ce8}.close-ha-font.disabled .b-font:before{content:"\e6d0";color:inherit}.circle-close-font .b-font:before,.circle-close-font.disabled .b-font:before{content:"\e6d5";color:inherit}.search-close-h-font .b-font:before{content:"\e6d0";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e6d0";color:#ff4949}.search-close-h-font.disabled .b-font:before{content:"\e6d0";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e70d";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e70c";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before{content:"\e6dc";color:inherit}.date-font .b-font:before,.date-font.disabled .b-font:before{content:"\e733";color:inherit}.date-change-h-font .b-font:before,.date-change-h-font.disabled .b-font:before,.date-change-h-font.hover .b-font:before,.date-change-h-font:hover .b-font:before{content:"\e72f";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-h-font .b-font:before{content:"\e762";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:hover .b-font:before{content:"\e762";color:inherit}.dot-h-font.disabled .b-font:before{content:"\e762";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e762";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e762";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before{content:"\e762";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:hover .b-font:before{content:"\e762";color:#999}.dot-e-font:active .b-font:before{content:"\e762";color:#3685f2}.dot-e-font.active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font.disabled .b-font:before{content:"\e762";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e70c";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before{content:"\e70c";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before{content:"\e70c";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-h-font .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-h-font.disabled .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font.disabled .b-font:before{content:"\e6bd";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e6cf";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before{content:"\e6cf";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before{content:"\e6cf";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6d9";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6d8";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6d6";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6d7";color:inherit}.expander-right-font .b-font:before,.expander-right-font.disabled .b-font:before{content:"\e6d8";color:inherit}.expander-down-font .b-font:before,.expander-down-font.disabled .b-font:before{content:"\e6d7";color:inherit}.solid-triangle-top-font .b-font:before,.solid-triangle-top-font.disabled .b-font:before,.solid-triangle-top-font.hover .b-font:before,.solid-triangle-top-font:hover .b-font:before{content:"\e6d6";color:inherit}.solid-triangle-bottom-font .b-font:before,.solid-triangle-bottom-font.disabled .b-font:before,.solid-triangle-bottom-font.hover .b-font:before,.solid-triangle-bottom-font:hover .b-font:before{content:"\e6d7";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e64e";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e64e";color:#3685f2}.trigger-triangle-font.disabled .b-font:before{content:"\e64e";color:#999}.pull-up-font .b-font:before,.pull-up-font.disabled .b-font:before{content:"\e70a";color:inherit}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-h-font .b-font:before{content:"\e70b";color:#647185}.pull-down-h-font.hover .b-font:before,.pull-down-h-font:hover .b-font:before{content:"\e70b";color:inherit}.pull-down-h-font.disabled .b-font:before,.pull-down-ha-font .b-font:before{content:"\e70b";color:#647185}.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e70b";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e70b";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before{content:"\e70b";color:#647185}.check-font .b-font:before,.check-font.disabled .b-font:before{content:"\e6cf";color:#3685f2}.item-check-font .b-font:before{content:"\e6cf";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:hover .b-font:before{content:"\e6cf";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.item-check-font.disabled .b-font:before{content:"\e6cf";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font:hover .b-font:before{content:"\e740";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before{content:"\e6d0";color:#faaa39}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:hover .b-font:before{content:"\e75e";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e75e";color:#3f8ce8}.less-font.disabled .b-font:before{content:"\e75e";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:hover .b-font:before{content:"\e761";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e761";color:#3f8ce8}.less-equal-font.disabled .b-font:before{content:"\e761";color:inherit}.text-bold-font .b-font:before,.text-bold-font.disabled .b-font:before{content:"\e75b";color:inherit}.text-italic-font .b-font:before,.text-italic-font.disabled .b-font:before{content:"\e75c";color:inherit}.text-underline-font .b-font:before,.text-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-color-font .b-font:before,.text-color-font.disabled .b-font:before{content:"\e75a";color:inherit}.text-background-font .b-font:before,.text-background-font.disabled .b-font:before{content:"\e758";color:inherit}.text-color-underline-font .b-font:before,.text-color-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-align-left-font .b-font:before,.text-align-left-font.disabled .b-font:before{content:"\e6ca";color:inherit}.text-align-center-font .b-font:before,.text-align-center-font.disabled .b-font:before{content:"\e6bf";color:inherit}.text-align-right-font .b-font:before,.text-align-right-font.disabled .b-font:before{content:"\e6c8";color:inherit}.toast-error-font .b-font:before,.toast-error-font.disabled .b-font:before{content:"\e757";color:inherit}.toast-success-font .b-font:before,.toast-success-font.disabled .b-font:before{content:"\e756";color:inherit}.toast-warning-font .b-font:before,.toast-warning-font.disabled .b-font:before{content:"\e755";color:inherit}.toast-message-font .b-font:before,.toast-message-font.disabled .b-font:before{content:"\e74b";color:inherit}.text-add-tip-font .b-font:before,.text-add-tip-font.disabled .b-font:before{content:"\e6dd";color:#13cd66}.tree-collapse-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_1.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_1.png) center center no-repeat}.tree-collapse-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_2.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_2.png) center center no-repeat}.tree-collapse-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_3.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_3.png) center center no-repeat}.tree-collapse-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_4.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_4.png) center center no-repeat}.tree-expand-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_1.png) center center no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_1.png) center center no-repeat}.tree-expand-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_2.png) center center no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_2.png) center center no-repeat}.tree-expand-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_3.png) center center no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_3.png) center center no-repeat}.tree-expand-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_4.png) center center no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_4.png) center center no-repeat}.tree-vertical-line-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.tree-vertical-line-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.tree-vertical-line-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.check-box-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_active.png) center center no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png) center center no-repeat}.check-box-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_disable.png) center center no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_disable.png) center center no-repeat}.check-box-icon.disabled.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_disable2.png) center center no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_disable2.png) center center no-repeat}.radio-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.hover .x-icon,.radio-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_active.png) center center no-repeat;background-size:contain}.radio-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_active.png) center center no-repeat}.radio-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_disable.png) center center no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_disable.png) center center no-repeat}.radio-icon.disabled.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_disable2.png) center center no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_disable2.png) center center no-repeat}.check-half-select-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) center center no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) center center no-repeat}.slider-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/slider_normal_small.png) center center no-repeat}.slider-icon.hover .x-icon,.slider-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_active_small.png) center center no-repeat;background-size:contain}.slider-icon.hover .x-icon.hack,.slider-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/slider_active_small.png) center center no-repeat}.slider-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/slider_normal_small.png) center center no-repeat}.auto-color-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/auto_normal.png) center center no-repeat;background-size:contain}.auto-color-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/auto_normal.png) center center no-repeat}.auto-color-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/auto_select.png) center center no-repeat;background-size:contain}.auto-color-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/auto_select.png) center center no-repeat}.auto-color-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/auto_disable.png) center center no-repeat;background-size:contain}.auto-color-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/auto_disable.png) center center no-repeat}.trans-color-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/trans_normal.png) center center no-repeat;background-size:contain}.trans-color-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/trans_normal.png) center center no-repeat}.trans-color-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/trans_select.png) center center no-repeat;background-size:contain}.trans-color-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/trans_select.png) center center no-repeat}.trans-color-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/trans_disable.png) center center no-repeat;background-size:contain}.trans-color-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/trans_disable.png) center center no-repeat} \ No newline at end of file diff --git a/dist/bundle.min.js b/dist/bundle.min.js index 061aae135..0758e7608 100644 --- a/dist/bundle.min.js +++ b/dist/bundle.min.js @@ -18,9 +18,9 @@ direction:"bottom",logic:{dynamic:!1},single:!1,showIndex:!1,tab:!1,cardCreator: pf||nf&&9==of?setTimeout(function(){document.body.focus(),e.input.focus()},20):e.input.focus())});pf&&(e.scroller.draggable=!0),a.state.draggingText=g,e.scroller.dragDrop&&e.scroller.dragDrop(),xg(document,"mouseup",g),xg(e.scroller,"drop",g)}function Xb(a,b,c,d,e){function f(b){if(0!=Gf(q,b))if(q=b,"rect"==d){for(var e=[],f=a.options.tabSize,g=Gg(Vd(j,c.line).text,c.ch,f),h=Gg(Vd(j,b.line).text,b.ch,f),i=Math.min(g,h),n=Math.max(g,h),o=Math.min(c.line,b.line),p=Math.min(a.lastLine(),Math.max(c.line,b.line));o<=p;o++){var r=Vd(j,o).text,s=Ae(r,i,f);i==n?e.push(new ma(Ff(o,s),Ff(o,s))):r.length>s&&e.push(new ma(Ff(o,s),Ff(o,Ae(r,n,f))))}e.length||e.push(new ma(c,c)),Ba(j,na(m.ranges.slice(0,l).concat(e),l),{origin:"*mouse",scroll:!1}),a.scrollIntoView(b)}else{var t=k,u=t.anchor,v=b;if("single"!=d){if("double"==d)var w=a.findWordAt(b);else var w=new ma(Ff(b.line,0),qa(j,Ff(b.line+1,0)));Gf(w.anchor,u)>0?(v=w.head,u=X(t.from(),w.anchor)):(v=w.anchor,u=W(t.to(),w.head))}var e=m.ranges.slice(0);e[l]=new ma(qa(j,u),v),Ba(j,na(e,l),Eg)}}function g(b){var c=++s,e=Tb(a,b,!0,"rect"==d);if(e)if(0!=Gf(e,q)){a.curOp.focus=Pe(),f(e);var h=u(i,j);(e.line>=h.to||e.liner.bottom?20:0;k&&setTimeout(Db(a,function(){s==c&&(i.scroller.scrollTop+=k,g(b))}),50)}}function h(a){s=1/0,ug(a),i.input.focus(),yg(document,"mousemove",t),yg(document,"mouseup",v),j.history.lastSelOrigin=null}var i=a.display,j=a.doc;ug(b);var k,l,m=j.sel,n=m.ranges;if(e&&!b.shiftKey?(l=j.sel.contains(c),k=l>-1?n[l]:new ma(c,c)):(k=j.sel.primary(),l=j.sel.primIndex),b.altKey)d="rect",e||(k=new ma(c,c)),c=Tb(a,b,!0,!0),l=-1;else if("double"==d){var o=a.findWordAt(c);k=a.display.shift||j.extend?ua(j,k,o.anchor,o.head):o}else if("triple"==d){var p=new ma(Ff(c.line,0),qa(j,Ff(c.line+1,0)));k=a.display.shift||j.extend?ua(j,k,p.anchor,p.head):p}else k=ua(j,k,c);e?l==-1?(l=n.length,Ba(j,na(n.concat([k]),l),{scroll:!1,origin:"*mouse"})):n.length>1&&n[l].empty()&&"single"==d&&!b.shiftKey?(Ba(j,na(n.slice(0,l).concat(n.slice(l+1)),0)),m=j.sel):xa(j,l,k,Eg):(l=0,Ba(j,new la([k],0),Eg),m=j.sel);var q=c,r=i.wrapper.getBoundingClientRect(),s=0,t=Db(a,function(a){se(a)?g(a):h(a)}),v=Db(a,h);xg(document,"mousemove",t),xg(document,"mouseup",v)}function Yb(a,b,c,d,e){try{var f=b.clientX,g=b.clientY}catch(b){return!1}if(f>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&ug(b);var h=a.display,i=h.lineDiv.getBoundingClientRect();if(g>i.bottom||!xe(a,c))return qe(b);g-=i.top-h.viewOffset;for(var j=0;j=f){var l=$d(a.doc,g),m=a.options.gutters[j];return e(a,c,a,l,m,b),qe(b)}}}function Zb(a,b){return Yb(a,b,"gutterClick",!0,te)}function $b(a){var b=this;if(!ve(b,a)&&!Sb(b.display,a)){ug(a),nf&&(Of=+new Date);var c=Tb(b,a,!0),d=a.dataTransfer.files;if(c&&!Z(b))if(d&&d.length&&window.FileReader&&window.File)for(var e=d.length,f=Array(e),g=0,h=function(a,d){var h=new FileReader;h.onload=Db(b,function(){if(f[d]=h.result,++g==e){c=qa(b.doc,c);var a={from:c,to:c,text:Ug(f.join("\n")),origin:"paste"};wc(b.doc,a),Aa(b.doc,oa(c,Uf(a)))}}),h.readAsText(a)},i=0;i-1)return b.state.draggingText(a),void setTimeout(function(){b.display.input.focus()},20);try{var f=a.dataTransfer.getData("Text");if(f){if(b.state.draggingText&&!(yf?a.altKey:a.ctrlKey))var j=b.listSelections();if(Ca(b.doc,oa(c,c)),j)for(var i=0;ig.clientWidth||e&&g.scrollHeight>g.clientHeight){if(e&&yf&&pf)a:for(var h=b.target,i=f.view;h!=g;h=h.parentNode)for(var j=0;j=0;--e)xc(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else xc(a,b)}}function xc(a,b){if(1!=b.text.length||""!=b.text[0]||0!=Gf(b.from,b.to)){var c=sc(a,b);fe(a,b,c,a.cm?a.cm.curOp.id:NaN),Ac(a,b,c,bd(a,b));var d=[];Td(a,function(a,c){c||De(d,a.history)!=-1||(pe(a.history,b),d.push(a.history)),Ac(a,b,null,bd(a,b))})}}function yc(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var d,e=a.history,f=a.sel,g="undo"==b?e.done:e.undone,h="undo"==b?e.undone:e.done,i=0;i=0;--i){var l=d.changes[i];if(l.origin=b,k&&!vc(a,l,!1))return void(g.length=0);j.push(ce(a,l));var m=i?sc(a,l):Ce(g);Ac(a,l,m,dd(a,l)),!i&&a.cm&&a.cm.scrollIntoView({from:l.from,to:Uf(l)});var n=[];Td(a,function(a,b){b||De(n,a.history)!=-1||(pe(a.history,l),n.push(a.history)),Ac(a,l,null,dd(a,l))})}}}}function zc(a,b){if(0!=b&&(a.first+=b,a.sel=new la(Ee(a.sel.ranges,function(a){return new ma(Ff(a.anchor.line+b,a.anchor.ch),Ff(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Ib(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;da.lastLine())){if(b.from.linef&&(b={from:b.from,to:Ff(f,Vd(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=Wd(a,b.from,b.to),c||(c=sc(a,b)),a.cm?Bc(a.cm,b,d):Qd(a,b,d),Ca(a,c,Dg)}}function Bc(a,b,c){var d=a.doc,e=a.display,g=b.from,h=b.to,i=!1,j=g.line;a.options.lineWrapping||(j=Zd(od(Vd(d,g.line))),d.iter(j,h.line+1,function(a){if(a==e.maxLine)return i=!0,!0})),d.sel.contains(b.from,b.to)>-1&&we(a),Qd(d,b,c,f(a)),a.options.lineWrapping||(d.iter(j,g.line+b.text.length,function(a){var b=l(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,i=!1)}),i&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,g.line),Ma(a,400);var k=b.text.length-(h.line-g.line)-1;b.full?Ib(a):g.line!=h.line||1!=b.text.length||Pd(a.doc,b)?Ib(a,g.line,h.line+1,k):Jb(a,g.line,"text");var m=xe(a,"changes"),n=xe(a,"change");if(n||m){var o={from:g,to:h,text:b.text,removed:b.removed,origin:b.origin};n&&te(a,"change",a,o),m&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(o)}a.display.selForContextMenu=null}function Cc(a,b,c,d,e){if(d||(d=c),Gf(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=Ug(b)),wc(a,{from:c,to:d,text:b,origin:e})}function Dc(a,b){if(!ve(a,"scrollCursorIntoView")){var c=a.display,d=c.sizer.getBoundingClientRect(),e=null;if(b.top+d.top<0?e=!0:b.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!vf){var f=Me("div","​",null,"position: absolute; top: "+(b.top-c.viewOffset-Qa(a.display))+"px; height: "+(b.bottom-b.top+Ta(a)+c.barHeight)+"px; left: "+b.left+"px; width: 2px;");a.display.lineSpace.appendChild(f),f.scrollIntoView(e),a.display.lineSpace.removeChild(f)}}}function Ec(a,b,c,d){null==d&&(d=0);for(var e=0;e<5;e++){var f=!1,g=mb(a,b),h=c&&c!=b?mb(a,c):g,i=Gc(a,Math.min(g.left,h.left),Math.min(g.top,h.top)-d,Math.max(g.left,h.left),Math.max(g.bottom,h.bottom)+d),j=a.doc.scrollTop,k=a.doc.scrollLeft;if(null!=i.scrollTop&&(ac(a,i.scrollTop),Math.abs(a.doc.scrollTop-j)>1&&(f=!0)),null!=i.scrollLeft&&(bc(a,i.scrollLeft),Math.abs(a.doc.scrollLeft-k)>1&&(f=!0)),!f)break}return g}function Fc(a,b,c,d,e){var f=Gc(a,b,c,d,e);null!=f.scrollTop&&ac(a,f.scrollTop),null!=f.scrollLeft&&bc(a,f.scrollLeft)}function Gc(a,b,c,d,e){var f=a.display,g=rb(a.display);c<0&&(c=0);var h=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:f.scroller.scrollTop,i=Va(a),j={};e-c>i&&(e=c+i);var k=a.doc.height+Ra(f),l=ck-g;if(ch+i){var n=Math.min(c,(m?k:e)-i);n!=h&&(j.scrollTop=n)}var o=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:f.scroller.scrollLeft,p=Ua(a)-(a.options.fixedGutter?f.gutters.offsetWidth:0),q=d-b>p;return q&&(d=b+p),b<10?j.scrollLeft=0:bp+o-3&&(j.scrollLeft=d+(q?0:10)-p),j}function Hc(a,b,c){null==b&&null==c||Jc(a),null!=b&&(a.curOp.scrollLeft=(null==a.curOp.scrollLeft?a.doc.scrollLeft:a.curOp.scrollLeft)+b),null!=c&&(a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+c)}function Ic(a){Jc(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?Ff(b.line,b.ch-1):b,d=Ff(b.line,b.ch+1)),a.curOp.scrollToPos={from:c,to:d,margin:a.options.cursorScrollMargin,isCursor:!0}}function Jc(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=nb(a,b.from),d=nb(a,b.to),e=Gc(a,Math.min(c.left,d.left),Math.min(c.top,d.top)-b.margin,Math.max(c.right,d.right),Math.max(c.bottom,d.bottom)+b.margin);a.scrollTo(e.scrollLeft,e.scrollTop)}}function Kc(a,b,c,d){var e,f=a.doc;null==c&&(c="add"),"smart"==c&&(f.mode.indent?e=Pa(a,b):c="prev");var g=a.options.tabSize,h=Vd(f,b),i=Gg(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var j,k=h.text.match(/^\s*/)[0];if(d||/\S/.test(h.text)){if("smart"==c&&(j=f.mode.indent(e,h.text.slice(k.length),h.text),j==Cg||j>150)){if(!d)return;c="prev"}}else j=0,c="not";"prev"==c?j=b>f.first?Gg(Vd(f,b-1).text,null,g):0:"add"==c?j=i+a.options.indentUnit:"subtract"==c?j=i-a.options.indentUnit:"number"==typeof c&&(j=i+c),j=Math.max(0,j);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(j/g);n;--n)m+=g,l+="\t";if(m=0;b--)Cc(a.doc,"",d[b].from,d[b].to,"+delete");Ic(a)})}function Nc(a,b,c,d,e){function f(){var b=h+c;return b=a.first+a.size?l=!1:(h=b,k=Vd(a,b))}function g(a){var b=(e?hf:jf)(k,i,c,!0);if(null==b){if(a||!f())return l=!1;i=e?(c<0?af:_e)(k):c<0?k.text.length:0}else i=b;return!0}var h=b.line,i=b.ch,j=c,k=Vd(a,h),l=!0;if("char"==d)g();else if("column"==d)g(!0);else if("word"==d||"group"==d)for(var m=null,n="group"==d,o=a.cm&&a.cm.getHelper(b,"wordChars"),p=!0;!(c<0)||g(!p);p=!1){var q=k.text.charAt(i)||"\n",r=Je(q,o)?"w":n&&"\n"==q?"n":!n||/\s/.test(q)?null:"p";if(!n||p||r||(r="s"),m&&m!=r){c<0&&(c=1,g());break}if(r&&(m=r),c>0&&!g(!p))break}var s=Ga(a,Ff(h,i),j,!0);return l||(s.hitSide=!0),s}function Oc(a,b,c,d){var e,f=a.doc,g=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);e=b.top+c*(h-(c<0?1.5:.5)*rb(a.display))}else"line"==d&&(e=c>0?b.bottom+3:b.top-3);for(;;){var i=pb(a,g,e);if(!i.outside)break;if(c<0?e<=0:e>=f.height){i.hitSide=!0;break}e+=5*c}return i}function Pc(b,c,d,e){a.defaults[b]=c,d&&(Wf[b]=e?function(a,b,c){c!=Xf&&d(a,b,c)}:d)}function Qc(a){for(var b,c,d,e,f=a.split(/-(?!$)/),a=f[f.length-1],g=0;g0||0==g&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=Me("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(nd(a,b.line,b,c,f)||b.line!=c.line&&nd(a,c.line,b,c,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ef=!0}f.addToHistory&&fe(a,{from:b,to:c,origin:"markText"},a.sel,NaN);var h,i=b.line,j=a.cm;if(a.iter(i,c.line+1,function(a){j&&f.collapsed&&!j.options.lineWrapping&&od(a)==j.display.maxLine&&(h=!0),f.collapsed&&i!=b.line&&Yd(a,0),$c(a,new Xc(f,i==b.line?b.ch:null,i==c.line?c.ch:null)),++i}),f.collapsed&&a.iter(b.line,c.line+1,function(b){sd(a,b)&&Yd(b,0)}),f.clearOnEnter&&xg(f,"beforeCursorEnter",function(){f.clear()}),f.readOnly&&(Df=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory()),f.collapsed&&(f.id=++jg,f.atomic=!0),j){if(h&&(j.curOp.updateMaxLine=!0),f.collapsed)Ib(j,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle||f.css)for(var k=b.line;k<=c.line;k++)Jb(j,k,"text");f.atomic&&Ea(j.doc),te(j,"markerAdded",j,f)}return f}function Tc(a,b,c,d,e){d=He(d),d.shared=!1;var f=[Sc(a,b,c,d,e)],g=f[0],h=d.widgetNode;return Td(a,function(a){h&&(d.widgetNode=h.cloneNode(!0)),f.push(Sc(a,qa(a,b),qa(a,c),d,e));for(var i=0;i=b:f.to>b);(d||(d=[])).push(new Xc(g,f.from,i?null:f.to))}}return d}function ad(a,b,c){if(a)for(var d,e=0;e=b:f.to>b);if(h||f.from==b&&"bookmark"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from0&&h)for(var l=0;l0)){var k=[i,1],l=Gf(j.from,h.from),m=Gf(j.to,h.to);(l<0||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(m>0||!g.inclusiveRight&&!m)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-1}}return e}function fd(a){var b=a.markedSpans;if(b){for(var c=0;c=0&&l<=0||k<=0&&l>=0)&&(k<=0&&(Gf(j.to,c)>0||i.marker.inclusiveRight&&e.inclusiveLeft)||k>=0&&(Gf(j.from,d)<0||i.marker.inclusiveLeft&&e.inclusiveRight)))return!0}}}function od(a){for(var b;b=ld(a);)a=b.find(-1,!0).line;return a}function pd(a){for(var b,c;b=md(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function qd(a,b){var c=Vd(a,b),d=od(c);return c==d?b:Zd(d)}function rd(a,b){if(b>a.lastLine())return b;var c,d=Vd(a,b);if(!sd(a,d))return b;for(;c=md(d);)d=c.find(1,!0).line;return Zd(d)+1}function sd(a,b){var c=Ef&&b.markedSpans;if(c)for(var d,e=0;ec.start)return g}throw new Error("Mode "+b.name+" failed to advance stream.")}function Cd(a,b,c,d){function e(a){return{start:l.start,end:l.pos,string:l.current(),type:f||null,state:a?bg(g.mode,k):k}}var f,g=a.doc,h=g.mode;b=qa(g,b);var i,j=Vd(g,b.line),k=Pa(a,b.line,c),l=new ig(j.text,a.options.tabSize);for(d&&(i=[]);(d||l.posa.options.maxHighlightLength?(h=!1,g&&Gd(a,b,d,l.pos),l.pos=b.length,i=null):i=zd(Bd(c,l,d,m),f),m){var n=m[0].name;n&&(i="m-"+(i?n+" "+i:n))}if(!h||k!=i){for(;ja&&e.splice(i,1,a,e[i+1],d),i+=2,j=Math.min(a,d)}if(b)if(h.opaque)e.splice(c,i-c,a,"cm-overlay "+b),i=c+2;else for(;cj&&m.from<=j)break}if(m.to>=k)return a(c,d,e,f,g,h,i);a(c,d.slice(0,m.to-j),e,f,null,h,i),f=null,d=d.slice(m.to-j),j=m.to}}}function Nd(a,b,c,d){var e=!d&&c.widgetNode;e&&a.map.push(a.pos,a.pos+b,e),!d&&a.cm.display.input.needsContentAttribute&&(e||(e=a.content.appendChild(document.createElement("span"))),e.setAttribute("cm-marker",c.id)),e&&(a.cm.display.input.setUneditable(e),a.content.appendChild(e)),a.pos+=b}function Od(a,b,c){var d=a.markedSpans,e=a.text,f=0;if(d)for(var g,h,i,j,k,l,m,n=e.length,o=0,p=1,q="",r=0;;){if(r==o){i=j=k=l=h="",m=null,r=1/0;for(var s=[],t=0;to||v.collapsed&&u.to==o&&u.from==o)?(null!=u.to&&u.to!=o&&r>u.to&&(r=u.to,j=""),v.className&&(i+=" "+v.className),v.css&&(h=v.css),v.startStyle&&u.from==o&&(k+=" "+v.startStyle),v.endStyle&&u.to==r&&(j+=" "+v.endStyle),v.title&&!l&&(l=v.title),v.collapsed&&(!m||jd(m.marker,v)<0)&&(m=u)):u.from>o&&r>u.from&&(r=u.from)}if(m&&(m.from||0)==o){if(Nd(b,(null==m.to?n+1:m.to)-o,m.marker,null==m.from),null==m.to)return; m.to==o&&(m=!1)}if(!m&&s.length)for(var t=0;t=n)break;for(var w=Math.min(n,r);;){if(q){var x=o+q.length;if(!m){var y=x>w?q.slice(0,w-o):q;b.addToken(b,y,g?g+i:i,k,o+y.length==r?j:"",l,h)}if(x>=w){q=q.slice(w-o),o=w;break}o=x,k=""}q=e.slice(f,f=c[p++]),g=Hd(c[p++],b.cm.options)}}else for(var p=1;p1&&a.remove(h.line+1,o-1),a.insert(h.line+1,p)}te(a,"change",a,b)}function Rd(a){this.lines=a,this.parent=null;for(var b=0,c=0;b=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(b1&&!a.done[a.done.length-2].ranges?(a.done.pop(),Ce(a.done)):void 0}function fe(a,b,c,d){var e=a.history;e.undone.length=0;var f,g=+new Date;if((e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>g-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))&&(f=ee(e,e.lastOp==d))){var h=Ce(f.changes);0==Gf(b.from,b.to)&&0==Gf(b.from,h.to)?h.to=Uf(b):f.changes.push(ce(a,b))}else{var i=Ce(e.done);for(i&&i.ranges||ie(a.sel,e.done),f={changes:[ce(a,b)],generation:e.generation},e.done.push(f);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift()}e.done.push(c),e.generation=++e.maxGeneration,e.lastModTime=e.lastSelTime=g,e.lastOp=e.lastSelOp=d,e.lastOrigin=e.lastSelOrigin=b.origin,h||zg(a,"historyAdded")}function ge(a,b,c,d){var e=b.charAt(0);return"*"==e||"+"==e&&c.ranges.length==d.ranges.length&&c.somethingSelected()==d.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function he(a,b,c,d){var e=a.history,f=d&&d.origin;c==e.lastSelOp||f&&e.lastSelOrigin==f&&(e.lastModTime==e.lastSelTime&&e.lastOrigin==f||ge(a,f,Ce(e.done),b))?e.done[e.done.length-1]=b:ie(b,e.done),e.lastSelTime=+new Date,e.lastSelOrigin=f,e.lastSelOp=c,d&&d.clearRedo!==!1&&de(e.undone)}function ie(a,b){var c=Ce(b);c&&c.ranges&&c.equals(a)||b.push(a)}function je(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans),++f})}function ke(a){if(!a)return null;for(var b,c=0;c-1&&(Ce(h)[l]=k[l],delete k[l])}}}return e}function ne(a,b,c,d){c0}function ye(a){a.prototype.on=function(a,b){xg(this,a,b)},a.prototype.off=function(a,b){yg(this,a,b)}}function ze(){this.id=null}function Ae(a,b,c){for(var d=0,e=0;;){var f=a.indexOf("\t",d);f==-1&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}}function Be(a){for(;Hg.length<=a;)Hg.push(Ce(Hg)+" ");return Hg[a]}function Ce(a){return a[a.length-1]}function De(a,b){for(var c=0;c-1&&Lg(a))||b.test(a):Lg(a)}function Ke(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function Le(a){return a.charCodeAt(0)>=768&&Mg.test(a)}function Me(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f0;--b)a.removeChild(a.firstChild);return a}function Oe(a,b){return Ne(a).appendChild(b)}function Pe(){return document.activeElement}function Qe(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function Re(a,b){for(var c=a.split(" "),d=0;d2&&!(nf&&of<8))}var c=Og?Me("span","​"):Me("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}function We(a){if(null!=Pg)return Pg;var b=Oe(a,document.createTextNode("AخA")),c=Jg(b,0,1).getBoundingClientRect();if(!c||c.left==c.right)return!1;var d=Jg(b,1,2).getBoundingClientRect();return Pg=d.right-c.right<3}function Xe(a){if(null!=Xg)return Xg;var b=Oe(a,Me("span","x")),c=b.getBoundingClientRect(),d=Jg(b,0,1).getBoundingClientRect();return Xg=Math.abs(c.left-d.left)>1}function Ye(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;fb||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function Ze(a){return a.level%2?a.to:a.from}function $e(a){return a.level%2?a.from:a.to}function _e(a){var b=ae(a);return b?Ze(b[0]):0}function af(a){var b=ae(a);return b?$e(Ce(b)):a.text.length}function bf(a,b){var c=Vd(a.doc,b),d=od(c);d!=c&&(b=Zd(d));var e=ae(d),f=e?e[0].level%2?af(d):_e(d):0;return Ff(b,f)}function cf(a,b){for(var c,d=Vd(a.doc,b);c=md(d);)d=c.find(1,!0).line,b=null;var e=ae(d),f=e?e[0].level%2?_e(d):af(d):d.text.length;return Ff(null==b?Zd(d):b,f)}function df(a,b){var c=bf(a,b.line),d=Vd(a.doc,c.line),e=ae(d);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch;return Ff(c.line,g?0:f)}return c}function ef(a,b,c){var d=a[0].level;return b==d||c!=d&&bb)return d;if(e.from==b||e.to==b){if(null!=c)return ef(a,e.level,a[c].level)?(e.from!=e.to&&(Zg=c),d):(e.from!=e.to&&(Zg=d),c);c=d}}return c}function gf(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&Le(a.text.charAt(b)));return b}function hf(a,b,c,d){var e=ae(a);if(!e)return jf(a,b,c,d);for(var f=ff(e,b),g=e[f],h=gf(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?gf(a,g.to,-1,d):gf(a,g.from,1,d)}}function jf(a,b,c,d){var e=b+c;if(d)for(;e>0&&Le(a.text.charAt(e));)e+=c;return e<0||e>a.text.length?null:e}var kf=/gecko\/\d/i.test(navigator.userAgent),lf=/MSIE \d/.test(navigator.userAgent),mf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),nf=lf||mf,of=nf&&(lf?document.documentMode||6:mf[1]),pf=/WebKit\//.test(navigator.userAgent),qf=pf&&/Qt\/\d+\.\d+/.test(navigator.userAgent),rf=/Chrome\//.test(navigator.userAgent),sf=/Opera\//.test(navigator.userAgent),tf=/Apple Computer/.test(navigator.vendor),uf=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),vf=/PhantomJS/.test(navigator.userAgent),wf=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),xf=wf||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),yf=wf||/Mac/.test(navigator.platform),zf=/win/i.test(navigator.platform),Af=sf&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Af&&(Af=Number(Af[1])),Af&&Af>=15&&(sf=!1,pf=!0);var Bf=yf&&(qf||sf&&(null==Af||Af<12.11)),Cf=kf||nf&&of>=9,Df=!1,Ef=!1;p.prototype=He({update:function(a){var b=a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0";var e=a.viewHeight-(b?d:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+e)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(b){this.horiz.style.display="block",this.horiz.style.right=c?d+"px":"0",this.horiz.style.left=a.barLeft+"px";var f=a.viewWidth-a.barLeft-(c?d:0);this.horiz.firstChild.style.width=a.scrollWidth-a.clientWidth+f+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&a.clientHeight>0&&(0==d&&this.overlayHack(),this.checkedOverlay=!0),{right:c?d:0,bottom:b?d:0}},setScrollLeft:function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a)},setScrollTop:function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a)},overlayHack:function(){var a=yf&&!uf?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=a;var b=this,c=function(a){re(a)!=b.vert&&re(a)!=b.horiz&&Db(b.cm,Ub)(a)};xg(this.vert,"mousedown",c),xg(this.horiz,"mousedown",c)},clear:function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)}},p.prototype),q.prototype=He({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},q.prototype),a.scrollbarModel={"native":p,"null":q},z.prototype.signal=function(a,b){xe(a,b)&&this.events.push(arguments)},z.prototype.finish=function(){for(var a=0;a=9&&c.hasSelection&&(c.hasSelection=null),c.poll()}),xg(f,"paste",function(a){return!!_(a,d)||(d.state.pasteIncoming=!0,void c.fastPoll())}),xg(f,"cut",b),xg(f,"copy",b),xg(a.scroller,"paste",function(b){Sb(a,b)||(d.state.pasteIncoming=!0,c.focus())}),xg(a.lineSpace,"selectstart",function(b){Sb(a,b)||ug(b)}),xg(f,"compositionstart",function(){var a=d.getCursor("from");c.composing={start:a,range:d.markText(a,d.getCursor("to"),{className:"CodeMirror-composing"})}}),xg(f,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},prepareSelection:function(){var a=this.cm,b=a.display,c=a.doc,d=Ia(a);if(a.options.moveInputWithCursor){var e=mb(a,c.sel.primary().head,"div"),f=b.wrapper.getBoundingClientRect(),g=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,e.top+g.top-f.top)),d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,e.left+g.left-f.left))}return d},showSelection:function(a){var b=this.cm,c=b.display;Oe(c.cursorDiv,a.cursors),Oe(c.selectionDiv,a.selection),null!=a.teTop&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},reset:function(a){if(!this.contextMenuPending){var b,c,d=this.cm,e=d.doc;if(d.somethingSelected()){this.prevInput="";var f=e.sel.primary();b=Wg&&(f.to().line-f.from().line>100||(c=d.getSelection()).length>1e3);var g=b?"-":c||d.getSelection();this.textarea.value=g,d.state.focused&&Ig(this.textarea),nf&&of>=9&&(this.hasSelection=g)}else a||(this.prevInput=this.textarea.value="",nf&&of>=9&&(this.hasSelection=null));this.inaccurateSelection=b}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!xf||Pe()!=this.textarea))try{this.textarea.focus()}catch(a){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var a=this;a.pollingFast||a.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},fastPoll:function(){function a(){var d=c.poll();d||b?(c.pollingFast=!1,c.slowPoll()):(b=!0,c.polling.set(60,a))}var b=!1,c=this;c.pollingFast=!0,c.polling.set(20,a)},poll:function(){var a=this.cm,b=this.textarea,c=this.prevInput;if(this.contextMenuPending||!a.state.focused||Vg(b)&&!c||Z(a)||a.options.disableInput||a.state.keySeq)return!1;var d=b.value;if(d==c&&!a.somethingSelected())return!1;if(nf&&of>=9&&this.hasSelection===d||yf&&/[\uf700-\uf7ff]/.test(d))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var e=d.charCodeAt(0);if(8203!=e||c||(c="​"),8666==e)return this.reset(),this.cm.execCommand("undo")}for(var f=0,g=Math.min(c.length,d.length);f1e3||d.indexOf("\n")>-1?b.value=h.prevInput="":h.prevInput=d,h.composing&&(h.composing.range.clear(),h.composing.range=a.markText(h.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){nf&&of>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(a){function b(){if(null!=g.selectionStart){var a=e.somethingSelected(),b="​"+(a?g.value:"");g.value="⇚",g.value=b,d.prevInput=a?"":"​",g.selectionStart=1,g.selectionEnd=b.length,f.selForContextMenu=e.doc.sel}}function c(){if(d.contextMenuPending=!1,d.wrapper.style.position="relative",g.style.cssText=k,nf&&of<9&&f.scrollbars.setScrollTop(f.scroller.scrollTop=i),null!=g.selectionStart){(!nf||nf&&of<9)&&b();var a=0,c=function(){f.selForContextMenu==e.doc.sel&&0==g.selectionStart&&g.selectionEnd>0&&"​"==d.prevInput?Db(e,dg.selectAll)(e):a++<10?f.detectingSelectAll=setTimeout(c,500):f.input.reset()};f.detectingSelectAll=setTimeout(c,200)}}var d=this,e=d.cm,f=e.display,g=d.textarea,h=Tb(e,a),i=f.scroller.scrollTop;if(h&&!sf){var j=e.options.resetSelectionOnContextMenu;j&&e.doc.sel.contains(h)==-1&&Db(e,Ba)(e.doc,oa(h),Dg);var k=g.style.cssText;if(d.wrapper.style.position="absolute",g.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(a.clientY-5)+"px; left: "+(a.clientX-5)+"px; z-index: 1000; background: "+(nf?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",pf)var l=window.scrollY;if(f.input.focus(),pf&&window.scrollTo(null,l),f.input.reset(),e.somethingSelected()||(g.value=d.prevInput=" "),d.contextMenuPending=!0,f.selForContextMenu=e.doc.sel,clearTimeout(f.detectingSelectAll),nf&&of>=9&&b(),Cf){wg(a);var m=function(){yg(window,"mouseup",m),setTimeout(c,20)};xg(window,"mouseup",m)}else setTimeout(c,50)}},setUneditable:Fe,needsContentAttribute:!1},da.prototype),fa.prototype=He({init:function(a){function b(a){if(d.somethingSelected())Hf=d.getSelections(),"cut"==a.type&&d.replaceSelection("",null,"cut");else{if(!d.options.lineWiseCopyCut)return;var b=ba(d);Hf=b.text,"cut"==a.type&&d.operation(function(){d.setSelections(b.ranges,0,Dg),d.replaceSelection("",null,"cut")})}if(a.clipboardData&&!wf)a.preventDefault(),a.clipboardData.clearData(),a.clipboardData.setData("text/plain",Hf.join("\n"));else{var c=ea(),e=c.firstChild;d.display.lineSpace.insertBefore(c,d.display.lineSpace.firstChild),e.value=Hf.join("\n");var f=document.activeElement;Ig(e),setTimeout(function(){d.display.lineSpace.removeChild(c),f.focus()},50)}}var c=this,d=c.cm,e=c.div=a.lineDiv;e.contentEditable="true",ca(e),xg(e,"paste",function(a){_(a,d)}),xg(e,"compositionstart",function(a){var b=a.data;if(c.composing={sel:d.doc.sel,data:b,startData:b},b){var e=d.doc.sel.primary(),f=d.getLine(e.head.line),g=f.indexOf(b,Math.max(0,e.head.ch-b.length));g>-1&&g<=e.head.ch&&(c.composing.sel=oa(Ff(e.head.line,g),Ff(e.head.line,g+b.length)))}}),xg(e,"compositionupdate",function(a){c.composing.data=a.data}),xg(e,"compositionend",function(a){var b=c.composing;b&&(a.data==b.startData||/\u200b/.test(a.data)||(b.data=a.data),setTimeout(function(){b.handled||c.applyComposition(b),c.composing==b&&(c.composing=null)},50))}),xg(e,"touchstart",function(){c.forceCompositionEnd()}),xg(e,"input",function(){c.composing||c.pollContent()||Cb(c.cm,function(){Ib(d)})}),xg(e,"copy",b),xg(e,"cut",b)},prepareSelection:function(){var a=Ia(this.cm,!1);return a.focus=this.cm.state.focused,a},showSelection:function(a){a&&this.cm.display.view.length&&(a.focus&&this.showPrimarySelection(),this.showMultipleSelections(a))},showPrimarySelection:function(){var a=window.getSelection(),b=this.cm.doc.sel.primary(),c=ia(this.cm,a.anchorNode,a.anchorOffset),d=ia(this.cm,a.focusNode,a.focusOffset);if(!c||c.bad||!d||d.bad||0!=Gf(X(c,d),b.from())||0!=Gf(W(c,d),b.to())){var e=ga(this.cm,b.from()),f=ga(this.cm,b.to());if(e||f){var g=this.cm.display.view,h=a.rangeCount&&a.getRangeAt(0);if(e){if(!f){var i=g[g.length-1].measure,j=i.maps?i.maps[i.maps.length-1]:i.map;f={node:j[j.length-1],offset:j[j.length-2]-j[j.length-3]}}}else e={node:g[0].measure.map[2],offset:0};try{var k=Jg(e.node,e.offset,f.offset,f.node)}catch(l){}k&&(a.removeAllRanges(),a.addRange(k),h&&null==a.anchorNode?a.addRange(h):kf&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){a.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(a){Oe(this.cm.display.cursorDiv,a.cursors),Oe(this.cm.display.selectionDiv,a.selection)},rememberSelection:function(){var a=window.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},selectionInEditor:function(){var a=window.getSelection();if(!a.rangeCount)return!1;var b=a.getRangeAt(0).commonAncestorContainer;return Ng(this.div,b)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function a(){b.cm.state.focused&&(b.pollSelection(),b.polling.set(b.cm.options.pollInterval,a))}var b=this;this.selectionInEditor()?this.pollSelection():Cb(this.cm,function(){b.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,a)},selectionChanged:function(){var a=window.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var a=window.getSelection(),b=this.cm;this.rememberSelection();var c=ia(b,a.anchorNode,a.anchorOffset),d=ia(b,a.focusNode,a.focusOffset);c&&d&&Cb(b,function(){Ba(b.doc,oa(c,d),Dg),(c.bad||d.bad)&&(b.curOp.selectionChanged=!0)})}},pollContent:function(){var a=this.cm,b=a.display,c=a.doc.sel.primary(),d=c.from(),e=c.to();if(d.lineb.viewTo-1)return!1;var f;if(d.line==b.viewFrom||0==(f=Lb(a,d.line)))var g=Zd(b.view[0].line),h=b.view[0].node;else var g=Zd(b.view[f].line),h=b.view[f-1].node.nextSibling;var i=Lb(a,e.line);if(i==b.view.length-1)var j=b.viewTo-1,k=b.lineDiv.lastChild;else var j=Zd(b.view[i+1].line)-1,k=b.view[i+1].node.previousSibling;for(var l=Ug(ka(a,h,k,g,j)),m=Wd(a.doc,Ff(g,0),Ff(j,Vd(a.doc,j).text.length));l.length>1&&m.length>1;)if(Ce(l)==Ce(m))l.pop(),m.pop(),j--;else{if(l[0]!=m[0])break;l.shift(),m.shift(),g++}for(var n=0,o=0,p=l[0],q=m[0],r=Math.min(p.length,q.length);n1||l[0]||Gf(v,w)?(Cc(a.doc,l,v,w,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(a){a.data&&a.data!=a.startData&&Db(this.cm,$)(this.cm,a.data,0,a.sel)},setUneditable:function(a){a.setAttribute("contenteditable","false")},onKeyPress:function(a){a.preventDefault(),Db(this.cm,$)(this.cm,String.fromCharCode(null==a.charCode?a.keyCode:a.charCode),0)},onContextMenu:Fe,resetPosition:Fe,needsContentAttribute:!0},fa.prototype),a.inputStyles={textarea:da,contenteditable:fa},la.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b=0&&Gf(a,d.to())<=0)return c}return-1}},ma.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return W(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var If,Jf,Kf,Lf={left:0,right:0,top:0,bottom:0},Mf=null,Nf=0,Of=0,Pf=0,Qf=null;nf?Qf=-.53:kf?Qf=15:rf?Qf=-.7:tf&&(Qf=-1/3);var Rf=function(a){var b=a.wheelDeltaX,c=a.wheelDeltaY;return null==b&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(b=a.detail),null==c&&a.detail&&a.axis==a.VERTICAL_AXIS?c=a.detail:null==c&&(c=a.wheelDelta),{x:b,y:c}};a.wheelEventPixels=function(a){var b=Rf(a);return b.x*=Qf,b.y*=Qf,b};var Sf=new ze,Tf=null,Uf=a.changeEnd=function(a){return a.text?Ff(a.from.line+a.text.length-1,Ce(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(a,b){var c=this.options,d=c[a];c[a]==b&&"mode"!=a||(c[a]=b,Wf.hasOwnProperty(a)&&Db(this,Wf[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](Rc(a))},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;cc&&(Kc(this,e.head.line,a,!0),c=e.head.line,d==this.doc.sel.primIndex&&Ic(this));else{var f=e.from(),g=e.to(),h=Math.max(c,f.line);c=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var i=h;i0&&xa(this.doc,d,new ma(f,j[d].to()),Dg)}}}),getTokenAt:function(a,b){return Cd(this,a,b)},getLineTokens:function(a,b){return Cd(this,Ff(a),b,!0)},getTokenTypeAt:function(a){a=qa(this.doc,a);var b,c=Fd(this,Vd(this.doc,a.line)),d=0,e=(c.length-1)/2,f=a.ch;if(0==f)b=c[2];else for(;;){var g=d+e>>1;if((g?c[2*g-1]:0)>=f)e=g;else{if(!(c[2*g+1]e&&(a=e,d=!0),c=Vd(this.doc,a)}else c=a;return jb(this,c,{top:0,left:0},b||"page").top+(d?this.doc.height-_d(c):0)},defaultTextHeight:function(){return rb(this.display)},defaultCharWidth:function(){return sb(this.display)},setGutterMarker:Eb(function(a,b,c){return Lc(this.doc,a,"gutter",function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&Ke(d)&&(a.gutterMarkers=null),!0})}),clearGutter:Eb(function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,Jb(b,d,"gutter"),Ke(c.gutterMarkers)&&(c.gutterMarkers=null)),++d})}),lineInfo:function(a){if("number"==typeof a){if(!sa(this.doc,a))return null;var b=a;if(a=Vd(this.doc,a),!a)return null}else{var b=Zd(a);if(null==b)return null}return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=mb(this,qa(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",b.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(b), f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&Fc(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:Eb(ic),triggerOnKeyPress:Eb(lc),triggerOnKeyUp:kc,execCommand:function(a){if(dg.hasOwnProperty(a))return dg[a](this)},triggerElectric:Eb(function(a){aa(this,a)}),findPosH:function(a,b,c,d){var e=1;b<0&&(e=-1,b=-b);for(var f=0,g=qa(this.doc,a);f0&&h(c.charAt(d-1));)--d;for(;e.5)&&g(this),zg(this,"refresh",this)}),swapDoc:Eb(function(a){var b=this.doc;return b.cm=null,Ud(this,a),gb(this),this.display.input.reset(),this.scrollTo(a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,te(this,"swapDoc",this,b),b}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(a);var Vf=a.defaults={},Wf=a.optionHandlers={},Xf=a.Init={toString:function(){return"CodeMirror.Init"}};Pc("value","",function(a,b){a.setValue(b)},!0),Pc("mode",null,function(a,b){a.doc.modeOption=b,c(a)},!0),Pc("indentUnit",2,c,!0),Pc("indentWithTabs",!1),Pc("smartIndent",!0),Pc("tabSize",4,function(a){d(a),gb(a),Ib(a)},!0),Pc("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(b,c,d){b.state.specialChars=new RegExp(c.source+(c.test("\t")?"":"|\t"),"g"),d!=a.Init&&b.refresh()}),Pc("specialCharPlaceholder",Jd,function(a){a.refresh()},!0),Pc("electricChars",!0),Pc("inputStyle",xf?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Pc("rtlMoveVisually",!zf),Pc("wholeLineUpdateBefore",!0),Pc("theme","default",function(a){h(a),i(a)},!0),Pc("keyMap","default",function(b,c,d){var e=Rc(c),f=d!=a.Init&&Rc(d);f&&f.detach&&f.detach(b,e),e.attach&&e.attach(b,f||null)}),Pc("extraKeys",null),Pc("lineWrapping",!1,e,!0),Pc("gutters",[],function(a){n(a.options),i(a)},!0),Pc("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?y(a.display)+"px":"0",a.refresh()},!0),Pc("coverGutterNextToScrollbar",!1,function(a){s(a)},!0),Pc("scrollbarStyle","native",function(a){r(a),s(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),Pc("lineNumbers",!1,function(a){n(a.options),i(a)},!0),Pc("firstLineNumber",1,i,!0),Pc("lineNumberFormatter",function(a){return a},i,!0),Pc("showCursorWhenSelecting",!1,Ha,!0),Pc("resetSelectionOnContextMenu",!0),Pc("lineWiseCopyCut",!0),Pc("readOnly",!1,function(a,b){"nocursor"==b?(oc(a),a.display.input.blur(),a.display.disabled=!0):(a.display.disabled=!1,b||a.display.input.reset())}),Pc("disableInput",!1,function(a,b){b||a.display.input.reset()},!0),Pc("dragDrop",!0,Qb),Pc("cursorBlinkRate",530),Pc("cursorScrollMargin",0),Pc("cursorHeight",1,Ha,!0),Pc("singleCursorHeightPerLine",!0,Ha,!0),Pc("workTime",100),Pc("workDelay",100),Pc("flattenSpans",!0,d,!0),Pc("addModeClass",!1,d,!0),Pc("pollInterval",100),Pc("undoDepth",200,function(a,b){a.doc.history.undoDepth=b}),Pc("historyEventDelay",1250),Pc("viewportMargin",10,function(a){a.refresh()},!0),Pc("maxHighlightLength",1e4,d,!0),Pc("moveInputWithCursor",!0,function(a,b){b||a.display.input.resetPosition()}),Pc("tabindex",null,function(a,b){a.display.input.getField().tabIndex=b||""}),Pc("autofocus",null);var Yf=a.modes={},Zf=a.mimeModes={};a.defineMode=function(b,c){a.defaults.mode||"null"==b||(a.defaults.mode=b),arguments.length>2&&(c.dependencies=Array.prototype.slice.call(arguments,2)),Yf[b]=c},a.defineMIME=function(a,b){Zf[a]=b},a.resolveMode=function(b){if("string"==typeof b&&Zf.hasOwnProperty(b))b=Zf[b];else if(b&&"string"==typeof b.name&&Zf.hasOwnProperty(b.name)){var c=Zf[b.name];"string"==typeof c&&(c={name:c}),b=Ge(c,b),b.name=c.name}else if("string"==typeof b&&/^[\w\-]+\/[\w\-]+\+xml$/.test(b))return a.resolveMode("application/xml");return"string"==typeof b?{name:b}:b||{name:"null"}},a.getMode=function(b,c){var c=a.resolveMode(c),d=Yf[c.name];if(!d)return a.getMode(b,"text/plain");var e=d(b,c);if($f.hasOwnProperty(c.name)){var f=$f[c.name];for(var g in f)f.hasOwnProperty(g)&&(e.hasOwnProperty(g)&&(e["_"+g]=e[g]),e[g]=f[g])}if(e.name=c.name,c.helperType&&(e.helperType=c.helperType),c.modeProps)for(var g in c.modeProps)e[g]=c.modeProps[g];return e},a.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),a.defineMIME("text/plain","null");var $f=a.modeExtensions={};a.extendMode=function(a,b){var c=$f.hasOwnProperty(a)?$f[a]:$f[a]={};He(b,c)},a.defineExtension=function(b,c){a.prototype[b]=c},a.defineDocExtension=function(a,b){rg.prototype[a]=b},a.defineOption=Pc;var _f=[];a.defineInitHook=function(a){_f.push(a)};var ag=a.helpers={};a.registerHelper=function(b,c,d){ag.hasOwnProperty(b)||(ag[b]=a[b]={_global:[]}),ag[b][c]=d},a.registerGlobalHelper=function(b,c,d,e){a.registerHelper(b,c,e),ag[b]._global.push({pred:d,val:e})};var bg=a.copyState=function(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c},cg=a.startState=function(a,b,c){return!a.startState||a.startState(b,c)};a.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state,a=c.mode}return c||{mode:a,state:b}};var dg=a.commands={selectAll:function(a){a.setSelection(Ff(a.firstLine(),0),Ff(a.lastLine()),Dg)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Dg)},killLine:function(a){Mc(a,function(b){if(b.empty()){var c=Vd(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line0)e=new Ff(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),Ff(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var g=Vd(a.doc,e.line-1).text;g&&a.replaceRange(f.charAt(0)+"\n"+g.charAt(g.length-1),Ff(e.line-1,g.length-1),Ff(e.line,1),"+transpose")}c.push(new ma(e,e))}a.setSelections(c)})},newlineAndIndent:function(a){Cb(a,function(){for(var b=a.listSelections().length,c=0;c=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.posb},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);if(b>-1)return this.pos=b,!0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos0?null:(d&&b!==!1&&(this.pos+=d[0].length),d)}var e=function(a){return c?a.toLowerCase():a},f=this.string.substr(this.pos,a.length);if(e(f)==e(a))return b!==!1&&(this.pos+=a.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}};var jg=0,kg=a.TextMarker=function(a,b){this.lines=[],this.type=b,this.doc=a,this.id=++jg};ye(kg),kg.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;if(b&&tb(a),xe(this,"clear")){var c=this.find();c&&te(this,"clear",c.from,c.to)}for(var d=null,e=null,f=0;fa.display.maxLineLength&&(a.display.maxLine=i,a.display.maxLineLength=j,a.display.maxLineChanged=!0)}null!=d&&a&&this.collapsed&&Ib(a,d,e+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Ea(a.doc)),a&&te(a,"markerCleared",a,this),b&&vb(a),this.parent&&this.parent.clear()}},kg.prototype.find=function(a,b){null==a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;e1||!(this.children[0]instanceof Rd))){var h=[];this.collapse(h),this.children=[new Rd(h)],this.children[0].parent=this}},collapse:function(a){for(var b=0;b50){for(;e.lines.length>50;){var g=e.lines.splice(e.lines.length-25,25),h=new Rd(g);e.height-=h.height,this.children.splice(d+1,0,h),h.parent=this}this.maybeSpill()}break}a-=f}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new Sd(b);if(a.parent){a.size-=c.size,a.height-=c.height;var d=De(a.parent.children,a);a.parent.children.splice(d+1,0,c)}else{var e=new Sd(a.children);e.parent=a,a.children=[e,c],a=e}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0;d=0;f--)wc(this,d[f]);h?Aa(this,h):this.cm&&Ic(this.cm)}),undo:Fb(function(){yc(this,"undo")}),redo:Fb(function(){yc(this,"redo")}),undoSelection:Fb(function(){yc(this,"undo",!0)}),redoSelection:Fb(function(){yc(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=qa(this,a),b=qa(this,b);var d=[],e=a.line;return this.iter(a.line,b.line+1,function(f){var g=f.markedSpans;if(g)for(var h=0;hi.to||null==i.from&&e!=a.line||e==b.line&&i.from>b.ch||c&&!c(i.marker)||d.push(i.marker.parent||i.marker)}++e}),d},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;da?(b=a,!0):(a-=e,void++c)}),qa(this,Ff(c,b))},indexFromPos:function(a){a=qa(this,a);var b=a.ch;return a.lineb&&(b=a.from),null!=a.to&&a.to=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}},Hg=[""],Ig=function(a){a.select()};wf?Ig=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:nf&&(Ig=function(a){try{a.select()}catch(b){}});var Jg,Kg=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Lg=a.isWordChar=function(a){return/\w/.test(a)||a>"€"&&(a.toUpperCase()!=a.toLowerCase()||Kg.test(a))},Mg=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Jg=document.createRange?function(a,b,c,d){var e=document.createRange();return e.setEnd(d||a,c),e.setStart(a,b),e}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(e){return d}return d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d};var Ng=a.contains=function(a,b){if(3==b.nodeType&&(b=b.parentNode),a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)};nf&&of<11&&(Pe=function(){try{return document.activeElement}catch(a){return document.body}});var Og,Pg,Qg=a.rmClass=function(a,b){var c=a.className,d=Qe(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+(e?d[1]+e:"")}},Rg=a.addClass=function(a,b){var c=a.className;Qe(b).test(c)||(a.className+=(c?" ":"")+b)},Sg=!1,Tg=function(){if(nf&&of<9)return!1;var a=Me("div");return"draggable"in a||"dragDrop"in a}(),Ug=a.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;b<=d;){var e=a.indexOf("\n",b);e==-1&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");g!=-1?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},Vg=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return!(!b||b.parentElement()!=a)&&0!=b.compareEndPoints("StartToEnd",b)},Wg=function(){var a=Me("div");return"oncopy"in a||(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),Xg=null,Yg={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};a.keyNames=Yg,function(){for(var a=0;a<10;a++)Yg[a+48]=Yg[a+96]=String(a);for(var a=65;a<=90;a++)Yg[a]=String.fromCharCode(a);for(var a=1;a<=12;a++)Yg[a+111]=Yg[a+63235]="F"+a}();var Zg,$g=function(){function a(a){return a<=247?c.charAt(a):1424<=a&&a<=1524?"R":1536<=a&&a<=1773?d.charAt(a-1536):1774<=a&&a<=2220?"r":8192<=a&&a<=8203?"w":8204==a?"b":"L"}function b(a,b,c){this.level=a,this.from=b,this.to=c}var c="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",d="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,g=/[LRr]/,h=/[Lb1n]/,i=/[1n]/,j="L";return function(c){if(!e.test(c))return!1;for(var d,k=c.length,l=[],m=0;mf.ch&&(i.end=f.ch,i.string=i.string.slice(0,f.ch-i.start)):i={start:f.ch,end:f.ch,string:"",state:i.state,type:"."==i.string?"property":null};for(var j=i;"property"==j.type;){if(j=d(b,h(f.line,j.start)),"."!=j.string)return;if(j=d(b,h(f.line,j.start)),!k)var k=[];k.push(j)}return{list:g(i,k,c,e),from:h(f.line,i.start),to:h(f.line,i.end)}}}function e(){return BI.FormulaCollections}function f(a,b){return d(a,e(),function(a,b){return a.getTokenAt(b)},b)}function g(a,d,e,f){function g(a){0!=a.lastIndexOf(i,0)||c(h,a)||h.push(a)}var h=[],i=a.string;return i?(d&&d.length?d.pop():b(e,g),h):h}var h=a.Pos;a.registerHelper("hint","formula",f)}),function(a){a(CodeMirror)}(function(a){"use strict";a.defineMode("formula",function(){function a(a){for(var b={},c=0,d=a.length;c0){var y=w.bottom-w.top,z=q.top-(q.bottom-w.top);if(z-y>0)k.style.top=(s=q.top-y)+"px",t=!1;else if(y>v){k.style.height=v-5+"px",k.style.top=(s=q.bottom-w.top)+"px";var A=j.getCursor();f.from.ch!=A.ch&&(q=j.cursorCoords(A),k.style.left=(r=q.left)+"px",w=k.getBoundingClientRect())}}var B=w.right-u;if(B>0&&(w.right-w.left>u&&(k.style.width=u-5+"px",B-=w.right-w.left-u),k.style.left=(r=q.left-B)+"px"),j.addKeyMap(this.keyMap=d(b,{moveFocus:function(a,b){i.changeActive(i.selectedHint+a,b)},setFocus:function(a){i.changeActive(a)},menuSize:function(){return i.screenAmount()},length:l.length,close:function(){b.close()},pick:function(){i.pick()},data:f})),b.options.closeOnUnfocus){var C;j.on("blur",this.onBlur=function(){C=setTimeout(function(){b.close()},100)}),j.on("focus",this.onFocus=function(){clearTimeout(C)})}var D=j.getScrollInfo();return j.on("scroll",this.onScroll=function(){var a=j.getScrollInfo(),c=j.getWrapperElement().getBoundingClientRect(),d=s+D.top-a.top,e=d-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return t||(e+=k.offsetHeight),e<=c.top||e>=c.bottom?b.close():(k.style.top=d+"px",void(k.style.left=r+D.left-a.left+"px"))}),a.on(k,"dblclick",function(a){var b=e(k,a.target||a.srcElement);b&&null!=b.hintId&&(i.changeActive(b.hintId),i.pick())}),a.on(k,"click",function(a){var c=e(k,a.target||a.srcElement);c&&null!=c.hintId&&(i.changeActive(c.hintId),b.options.completeOnSingleClick&&i.pick())}),a.on(k,"mousedown",function(){setTimeout(function(){j.focus()},20)}),a.signal(f,"select",l[0],k.firstChild),!0}var g="CodeMirror-hint",h="CodeMirror-hint-active";a.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);var d={hint:b};if(c)for(var e in c)d[e]=c[e];return a.showHint(d)},a.defineExtension("showHint",function(c){if(!(this.listSelections().length>1||this.somethingSelected())){this.state.completionActive&&this.state.completionActive.close();var d=this.state.completionActive=new b(this,c);d.options.hint&&(a.signal(this,"startCompletion",this),d.update(!0))}});var i=window.requestAnimationFrame||function(a){return setTimeout(a,1e3/60)},j=window.cancelAnimationFrame||clearTimeout;b.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&a.signal(this.data,"close"),this.widget&&this.widget.close(),a.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(b,d){var e=b.list[d];if(e.hint)e.hint(this.cm,b,e);else if(this.cm.replaceRange(c(e),e.from||b.from,e.to||b.to,"complete"),e.isKeyword===!0);else{var f=this.cm.getCursor();this.cm.markText(e.from||b.from,f,{className:"#function",atomic:!0}),this.cm.replaceSelection("() "),f=this.cm.getCursor(),f.ch=f.ch-2,this.cm.setCursor(f),this.cm.focus()}a.signal(b,"pick",e),this.close()},cursorActivity:function(){this.debounce&&(j(this.debounce),this.debounce=0);var a=this.cm.getCursor(),b=this.cm.getLine(a.line);if(a.line!=this.startPos.line||b.length-a.ch!=this.startLen-this.startPos.ch||a.ch=this.data.list.length?b=c?this.data.list.length-1:0:b<0&&(b=c?0:this.data.list.length-1),this.selectedHint!=b){var d=this.hints.childNodes[this.selectedHint];d.className=d.className.replace(" "+h,""),d=this.hints.childNodes[this.selectedHint=b],d.className+=" "+h,d.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=d.offsetTop+d.offsetHeight-this.hints.clientHeight+3),a.signal(this.data,"select",this.data.list[this.selectedHint],d)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},a.registerHelper("hint","auto",function(b,c){var d,e=b.getHelpers(b.getCursor(),"hint");if(e.length)for(var f=0;f,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};a.defineOption("hintOptions",null)}),BI.FormulaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.FormulaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-formula-editor",watermark:"",value:"",fieldTextValueMap:{},showHint:!0,lineHeight:2})},_init:function(){BI.FormulaEditor.superclass._init.apply(this,arguments);var a=this.options,b=this;if(this.editor=CodeMirror(this.element[0],{textWrapping:!0,lineWrapping:!0,lineNumbers:!1,mode:"formula",specialChars:/[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/}),1===a.lineHeight?this.element.addClass("codemirror-low-line-height"):this.element.addClass("codemirror-high-line-height"),this.editor.on("change",function(c,d){b._checkWaterMark(),a.showHint&&CodeMirror.showHint(c,CodeMirror.formulaHint,{completeSingle:!1}),BI.nextTick(function(){b.fireEvent(BI.FormulaEditor.EVENT_CHANGE)})}),this.editor.on("focus",function(){b._checkWaterMark(),b.fireEvent(BI.FormulaEditor.EVENT_FOCUS)}),this.editor.on("blur",function(){b.fireEvent(BI.FormulaEditor.EVENT_BLUR)}),this.editor.on("keyup",function(a,c){b.fireEvent(BI.FormulaEditor.EVENT_KEY_UP,c.key)}),BI.isKey(this.options.watermark)){var b=this;this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,whiteSpace:"nowrap",textAlign:"left"}),BI.createWidget({type:"bi.absolute",element:b,items:[{el:b.watermark,left:0,top:0}]}),this.watermark.element.bind("mousedown",function(a){b.insertString(""),b.editor.focus(),a.stopEvent()}),this.watermark.element.bind("click",function(a){b.editor.focus(),a.stopEvent()}),this.watermark.element.css({position:"absolute",left:3,right:3,top:6,bottom:0})}},mounted:function(){var a=this.options;BI.isNotNull(a.value)&&this.setValue(a.value)},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&BI.isEmptyString(this.editor.getValue())&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},disableWaterMark:function(){this.disabledWaterMark=!0,this._checkWaterMark()},focus:function(){this.editor.focus()},insertField:function(a){var b=this.editor.getCursor();this.editor.replaceSelection("​"+a+"​");var c=this.editor.getCursor();this.editor.markText(b,c,{className:"fieldName",atomic:!0,startStyle:"start",endStyle:"end"}),this.editor.replaceSelection(" "),this.editor.focus()},insertFunction:function(a){var b=this.editor.getCursor();this.editor.replaceSelection(a);var c=this.editor.getCursor();this.editor.markText(b,c,{className:"#function",atomic:!0}),this.editor.replaceSelection("() "),c=this.editor.getCursor(),c.ch=c.ch-2,this.editor.setCursor(c),this.editor.focus()},insertOperator:function(a){var b=this.editor.getCursor();this.editor.replaceSelection(a);var c=this.editor.getCursor();this.editor.markText(b,c,{className:"%operator",atomic:!0}),this.editor.replaceSelection(" "),this.editor.focus()},setFunction:function(a){var b=this.editor.getCursor();this.editor.replaceSelection(a);var c=this.editor.getCursor();this.editor.markText(b,c,{className:"#function",atomic:!0})},insertString:function(a){this.editor.replaceSelection(a),this.editor.focus()},getFormulaString:function(){return this.editor.getValue()},getUsedFields:function(){var a=this.options.fieldTextValueMap,b=[];return this.editor.getValue(!0,function(c){var d=c.text;_.forEach(c.markedSpans,function(c,e){switch(c.marker.className){case"fieldName":var f=a[d.substr(c.from+1,c.to-c.from-2)];b.contains(f)||b.push(f)}})}),b},getCheckString:function(){return this.editor.getValue(!0,function(a){var b=a.text,c=a.text,d=0;return c.text=b,_.forEach(a.markedSpans,function(a,b){switch(a.marker.className){case"fieldName":var e=a.to-a.from;c=c.substr(0,a.from+d)+"$a"+c.substr(a.to+d,c.length),d=d+2-e}}),c})},getValue:function(){var a=this.options.fieldTextValueMap,b=this.editor.getValue("\n",function(b){var c=b.text,d=b.text,e=0;return d.text=c,_.forEach(b.markedSpans,function(b,c){switch(b.marker.className){case"fieldName":var f=b.to-b.from,g=b.from+e+1,h=f-2,i=a[d.substr(g,h)];d=d.substr(0,b.from+e)+"${"+i+"}"+d.substr(b.to+e,d.length),e+=i.length-f+3}}),d});return b.replaceAll("(\\$\\{.*?\\})\\s","$1")},setValue:function(a){this.editor.setValue(a)},setFieldTextValueMap:function(a){this.options.fieldTextValueMap=a},refresh:function(){var a=this;BI.nextTick(function(){a.editor.refresh()})}}),BI.FormulaEditor.EVENT_CHANGE="EVENT_CHANGE",BI.FormulaEditor.EVENT_BLUR="EVENT_BLUR",BI.FormulaEditor.EVENT_FOCUS="EVENT_FOCUS",BI.FormulaEditor.EVENT_KEY_UP="EVENT_KEY_UP",BI.shortcut("bi.formula_editor",BI.FormulaEditor),$.extend(BI,{Msg:function(){var a,b,c;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||$("body");var d=b.level||"normal",e=!!BI.isNull(b.autoClose)||b.autoClose,f=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:d,autoClose:e,text:a});BI.createWidget({type:"bi.absolute",element:c,items:[{el:f,left:"50%",top:10}]}),f.element.css({"margin-left":-1*f.element.outerWidth()/2}),f.element.removeClass("bi-message-leave").addClass("bi-message-enter"),e&&BI.delay(function(){f.element.removeClass("bi-message-enter").addClass("bi-message-leave"),BI.delay(function(){f.destroy()},1e3)},5e3)},_show:function(d,e,f,g){b=$('
').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=$('
').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-message-content bi-card",items:{north:{el:{type:"bi.border",cls:"bi-message-title bi-background",items:{center:{el:{type:"bi.label",text:e||BI.i18nText("BI-Basic_Prompt"),textAlign:"left",hgap:20,height:50}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",handler:function(){h()}},width:60}}},height:50},center:{el:{type:"bi.text",cls:"bi-message-text",tgap:60,hgap:20,lineHeight:30,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",hgap:5,items:i},top:0,left:20,right:20,bottom:0}]},height:60}},width:400,height:300}]};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(),0===b.scrollLeft&&0===b.scrollTop||BI.nextTick(function(){a.element.scrollTop(b.scrollTop),a.element.scrollLeft(b.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})),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.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",header:null,body:null,footer:null})},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(),e=$("body").width(),f=$("body").height();a.startX+=b,a.startY+=c,a.element.css({left:BI.clamp(a.startX,0,e-d.width)+"px",top:BI.clamp(a.startY,0,f-d.height)+"px"}),BI.Resizers._resize()},function(){a.tracker.releaseMouseMoves()},window);var c={north:{el:{type:"bi.border",cls:"bi-message-title bi-background",ref:function(b){a.dragger=b},items:{center:{el:{type:"bi.absolute",items:[{el:BI.isPlainObject(b.header)?BI.createWidget(b.header):{type:"bi.label",height:this._constant.HEADER_HEIGHT,text:b.header,title:b.header,textAlign:"left"},left:10,top:0,right:0,bottom:0}]}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){a.close()}},width:60}}},height:this._constant.HEADER_HEIGHT},center:{el:{type:"bi.absolute",items:[{el:BI.createWidget(b.body),left:20,top:10,right:20,bottom:0}]}}};b.footer&&(c.south={el:{type:"bi.absolute",items:[{el:BI.createWidget(b.footer),left:20,top:0,right:20,bottom:0}]},height:44});var d=this._calculateSize();return{type:"bi.border",items:c,width:d.width,height:d.height}},mounted:function(){var a=this;this.dragger.element.mousedown(function(b){var c=a.element.offset();a.startX=c.left,a.startY=c.top,a.tracker.captureMouseMoves(b)})},_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=220;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:25,lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap: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.button_group.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"}),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-border-top",height:30,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.button_group},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||30:0,c=this.tab?this.tab.attr("height")||25:0,d=(this.tool&&this.tool.attr("height")||25)*(this.tool&&this.tool.isVisible()?1:0);this.view.resetHeight?this.view.resetHeight(a-b-c-d-2):this.view.element.css({"max-height":a-b-c-d-2+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.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="IconButton.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="ImageButton.EVENT_CHANGE",BI.shortcut("bi.image_button",BI.ImageButton),function(a){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",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",forceCenter:!1,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?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",width:18,height:a.height-2}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value,height:a.height-2}),BI.createWidget({type:"bi.horizontal_auto",cls:a.iconCls,element:this,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:a.textAlign,whiteSpace:a.whiteSpace,forceCenter:a.forceCenter,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"}(jQuery),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",forceCenter:!1,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,forceCenter:a.forceCenter,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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),c=BI.createWidget({type:"bi.layout",width:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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},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.center_adapt",width:a.height,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(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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",cls:a.iconCls2,width:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.CodeEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(),{baseCls:"bi-code-editor",value:"",watermark:"",lineHeight:2,readOnly:!1,lineNumbers:!1,paramFormatter:function(a){return a}})},_init:function(){BI.CodeEditor.superclass._init.apply(this,arguments);var a=this.options,b=this,c={textWrapping:!0,lineWrapping:!0,lineNumbers:!1,readOnly:a.readOnly,specialChars:/[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/};a.readOnly&&(c.cursorBlinkRate=-1),this.editor=CodeMirror(this.element[0],c),1===a.lineHeight?this.element.addClass("codemirror-low-line-height"):this.element.addClass("codemirror-high-line-height"),this.editor.on("change",function(a,c){BI.nextTick(function(){b.fireEvent(BI.CodeEditor.EVENT_CHANGE)})}),this.editor.on("focus",function(){b.watermark.setVisible(!1),b.fireEvent(BI.CodeEditor.EVENT_FOCUS)}),this.editor.on("blur",function(){b.watermark.setVisible(BI.isEmptyString(b.getValue())),b.fireEvent(BI.CodeEditor.EVENT_BLUR)}),this.watermark=BI.createWidget({type:"bi.label",text:a.watermark,cls:"bi-water-mark",whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind("mousedown",function(a){b.insertString(""),b.editor.focus(),a.stopEvent()}),this.watermark.element.bind("click",function(a){b.editor.focus(),a.stopEvent()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,top:0,left:a.lineNumbers?35:5}]})},mounted:function(){var a=this.options;(BI.isNumber(a.value)||BI.isString(a.value))&&this.setValue(a.value),BI.isNotNull(a.style)&&this.setStyle(a.style)},_setEnable:function(a){BI.CodeEditor.superclass._setEnable.apply(this,arguments),this.editor.setOption("readOnly",a!==!0&&"nocursor")},_checkWaterMark:function(){var a=this.options;BI.isEmptyString(this.editor.getValue())&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},insertParam:function(a){var b=a;a=this.options.paramFormatter(a);var c=this.editor.getCursor();this.editor.replaceSelection("​"+a+"​");var d=this.editor.getCursor(),e={className:"param",atomic:!0};BI.isNotNull(a.match(/^$/))&&(e.className="error-param"),e.value=b,this.editor.markText(c,d,e),this.editor.replaceSelection(" "),this.editor.focus()},insertString:function(a){this.editor.replaceSelection(a),this.editor.focus()},getValue:function(){return this.editor.getValue("\n",function(a){var b=a.text,c=a.text,d=0;return c.text=b,_.forEach(_.sortBy(a.markedSpans,"from"),function(a,b){switch(a.marker.className){case"param":case"error-param":var e=a.to-a.from;c=c.substr(0,a.from+d)+"${"+a.marker.value+"}"+c.substr(a.to+d,c.length),d+=3,d+=a.marker.value.length-e}}),c})},_analyzeContent:function(a){var b=/\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]|\$[^\{]*[^\$\{]/g;return a.match(b)},setValue:function(a){var b,c=this;this.refresh(),c.editor.setValue(""),b=this._analyzeContent(a||""),BI.each(b,function(a,b){var d=/\$[\{][^\}]*[\}]/,e=b.match(d);BI.isNotEmptyArray(e)?c.insertParam(e[0].substring(2,b.length-1)):c.insertString(b)}),this._checkWaterMark()},focus:function(){this.editor.focus()},blur:function(){this.editor.getInputField().blur()},setStyle:function(a){this.style=a,this.element.css(a)},getStyle:function(){return this.style},refresh:function(){var a=this;BI.nextTick(function(){a.editor.refresh()})}}),BI.CodeEditor.EVENT_CHANGE="EVENT_CHANGE",BI.CodeEditor.EVENT_BLUR="EVENT_BLUR",BI.CodeEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.code_editor",BI.CodeEditor),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-editor",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,forceCenter:!0,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()}),this.watermark.element.css({position:"absolute",left:"3px",right:"3px",top:"0px",bottom:"0px"}));var c=[{el:{type:"bi.default",items:this.watermark?[this.editor,this.watermark]:[this.editor]},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:c}),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){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.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(this.editor.getValue())),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,this),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()},resetLastValidValue:function(){this.editor.resetLastValidValue()},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()}}),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_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="MultifileEditor.EVENT_CHANGE",BI.MultifileEditor.EVENT_UPLOADSTART="MultifileEditor.EVENT_UPLOADSTART",BI.MultifileEditor.EVENT_ERROR="MultifileEditor.EVENT_ERROR",BI.MultifileEditor.EVENT_PROGRESS="MultifileEditor.EVENT_PROGRESS",BI.MultifileEditor.EVENT_UPLOADED="MultifileEditor.EVENT_UPLOADED",BI.shortcut("bi.multifile_editor",BI.MultifileEditor),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},_init:function(){BI.TextAreaEditor.superclass._init.apply(this,arguments);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:0,right:3,top:0,bottom:5}]}),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)),$(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&($(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),$(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&b.setValue(a.value),BI.isNotNull(a.style)&&b.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",textAlign:"left",height:30,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:0,top:0,right:0}]})))},_focus:function(){this.content.element.addClass("textarea-editor-focus"),this._checkWaterMark()},_blur:function(){this.content.element.removeClass("textarea-editor-focus"),this._checkWaterMark()},focus:function(){this._focus(),this.content.element.focus()},blur:function(){this._blur(),this.content.element.blur()},getValue:function(){return this.content.element.val()},setValue:function(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)}}),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.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()&&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,{baseCls:(a.baseCls||"")+" bi-iframe",src:"",width:"100%",height:"100%"})},_init:function(){var a=this.options;this.options.element=$("'))}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||window.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loaded",name:"",url:"",multiple:!0,accept:"",maxSize:-1})},_init:function(){var a=this.options;BI.File.superclass._init.apply(this,arguments),a.multiple===!0&&this.element.attr("multiple","multiple"),this.element.attr("name",a.name||this.getName()),this.element.attr("title",a.title||"")},mounted:function(){var a=this,b=this.options,c=this.wrap=this._wrap(this.element[0],b.maxSize);c.onloadstart=function(b,c){a.fireEvent(BI.File.EVENT_UPLOADSTART,arguments)},c.onprogress=function(b,c){this.file.fileSize!==-1&&b.simulation,a.fireEvent(BI.File.EVENT_PROGRESS,{file:this.file,total:b.total,loaded:b.loaded,simulation:b.simulation})},c.onerror=function(){a.fireEvent(BI.File.EVENT_ERROR)},c.onload=function(b,c){var d=this;setTimeout(function(){d.clean(),d.hide(),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);d>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.dom.input).click()},upload:function(a){this.wrap.upload(a)},getValue:function(){return this.wrap.attach_array},reset:function(){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="BI.File.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)}(),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",element:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1})},_init:function(){BI.Input.superclass._init.apply(this,arguments);var a=this,b=!1,c=!1,d=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),e=BI.debounce(BI.bind(this._click,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(d){c=!1,b=d.ctrlKey,a.fireEvent(BI.Input.EVENT_QUICK_DOWN)}).keyup(function(b){c&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,d(b.keyCode))}).on("input propertychange",function(b){BI.isNotNull(b.keyCode)&&(c=!0,a._keydown_=!0,d(b.keyCode))}).click(function(a){a.stopPropagation(),e()}).mousedown(function(b){a.element.val(a.element.val())}).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(){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()&&(b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM)),b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this._focus(),this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){this.isValid()&&BI.trim(this._lastValidValue)===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))),b===!0&&86===a?this._valueChange():(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())?(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._lastValidValue||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._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},_setValid:function(){BI.Input.superclass._setValid.apply(this,arguments),this.isValid()?(this.element.removeClass("bi-input-error"),this.fireEvent(BI.Input.EVENT_VALID,BI.trim(this.getValue()),this)):(this._lastValidValue===this.getValue()&&(this._lastValidValue=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_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.Radio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.Radio.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.Radio.superclass._init.apply(this,arguments)},doClick:function(){BI.Radio.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Radio.EVENT_CHANGE)}}),BI.Radio.EVENT_CHANGE="Radio.EVENT_CHANGE",BI.shortcut("bi.radio",BI.Radio),BI.Label=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Label.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-label",textAlign:"center",whiteSpace:"nowrap",forceCenter:!1,textWidth:null,textHeight:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",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}},_init:function(){BI.Label.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();if(BI.isNumber(a.width)&&a.width>0){if(BI.isNumber(a.textWidth)&&a.textWidth>0){if(BI.isNumber(a.height)&&a.height>0){var c=(a.width-a.textWidth)/2;return BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:c+a.hgap+a.lgap,right:c+a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]}),void this.element.css({"line-height":a.height+"px"})}return b.width=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})}return"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",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:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.absolute",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(b.width=a.width-2*a.hgap,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}))}return BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=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?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?BI.isNumber(a.textHeight)&&a.textHeight>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.element.css({"line-height":a.height+"px"}),this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),a.forceCenter?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]})):(this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})))},_createNotCenterEl:function(){var a=this.options,b=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?(BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]}),void this.element.css({"line-height":a.height+"px"})):void BI.createWidget({type:"bi.vertical_adapt",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(b)}]})):"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",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:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.absolute",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(b.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:"bi.vertical_adapt",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(b)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=a.textWidth,void BI.createWidget({type:"bi.vertical_adapt",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(b)}]})):"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",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:[this.text]})):BI.isNumber(a.height)&&a.height>0?BI.isNumber(a.textHeight)&&a.textHeight>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.element.css({"line-height":a.height+"px"}),this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),a.forceCenter?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",element:this,items:[this.text]})):(this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})))},_setEnable:function(a){BI.Label.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},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.Label.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.Label.superclass.populate.apply(this,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:10,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.center_adapt",cls:d+" toast-icon",items:[{type:"bi.icon"}],width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,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:5,columnSize:f})},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:10},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:20})},_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:16}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,textHeight:20,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(){}}),function(a){a(CodeMirror)}(function(a){function b(a){return"[object Array]"==Object.prototype.toString.call(a)}function c(b){var c=b.doc.modeOption;return"sql"===c&&(c="text/x-sql"),a.resolveMode(c).keywords}function d(b){var c=b.doc.modeOption;return"sql"===c&&(c="text/x-sql"),a.resolveMode(c).identifierQuote||"`"}function e(a){return"string"==typeof a?a:a.text}function f(a,c){return b(c)&&(c={columns:c}),c.text||(c.text=a),c}function g(a){var c={};if(b(a))for(var d=a.length-1;d>=0;d--){var g=a[d];c[e(g).toUpperCase()]=f(e(g),g)}else if(a)for(var h in a)c[h.toUpperCase()]=f(h,a[h]);return c}function h(a){return q[a.toUpperCase()]}function i(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function j(a,b){if(BI.isNotEmptyString(a)&&b.length!==a.length){var c=a.length,d=e(b).substr(0,c);return a.toUpperCase()===d.toUpperCase()}}function k(a,c,d,e){if(b(d))for(var f=0;f0)&&w(m,i[n])<=0){j={start:l,end:i[n]};break}l=i[n]}for(var p=c.getRange(j.start,j.end,!1),n=0;nl.ch&&(m.end=l.ch,m.string=m.string.slice(0,l.ch-m.start)),m.string.match(/^[.`"\w@]\w*$/)?(w=m.string,o=m.start,u=m.end):(o=u=l.ch,w=""),"."==w.charAt(0)||w.charAt(0)==t?o=n(l,m,x,a):(k(x,w,q,function(a){return a}),k(x,w,r,function(a){return a}),f||k(x,w,s,function(a,b){var c=b47&&c.charCodeAt(0)<58)return a.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),n.decimallessFloat&&a.match(/^\.(?!\.)/),"number";if("?"==c&&(a.eatSpace()||a.eol()||a.eat(";")))return"variable-3";if("'"==c||'"'==c&&n.doubleQuote)return b.tokenize=e(c),b.tokenize(a,b);if((n.nCharCast&&("n"==c||"N"==c)||n.charsetCast&&"_"==c&&a.match(/[a-z][a-z0-9]*/i))&&("'"==a.peek()||'"'==a.peek()))return"keyword";if(/^[\(\),\;\[\]]/.test(c))return null;if(n.commentSlashSlash&&"/"==c&&a.eat("/"))return a.skipToEnd(),"comment";if(n.commentHash&&"#"==c||"-"==c&&a.eat("-")&&(!n.commentSpaceRequired||a.eat(" ")))return a.skipToEnd(),"comment";if("/"==c&&a.eat("*"))return b.tokenize=f(1),b.tokenize(a,b);if("."!=c){if(m.test(c))return a.eatWhile(m),null;if("{"==c&&(a.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||a.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";a.eatWhile(/^[_\w\d]/);var g=a.current().toLowerCase(); return p.hasOwnProperty(g)&&(a.match(/^( )+'[^']*'/)||a.match(/^( )+"[^"]*"/))?"number":j.hasOwnProperty(g)?"atom":k.hasOwnProperty(g)?"builtin":q.hasOwnProperty(g)&&"("===a.peek()?"function":l.hasOwnProperty(g)?"keyword":i.hasOwnProperty(g)?"string-2":null}return n.zerolessFloat&&a.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":a.match(/^\.+/)?null:n.ODBCdotTable&&a.match(/^[\w\d_]+/)?"variable-2":void 0}function e(a){return function(b,c){for(var e,f=!1;null!=(e=b.next());){if(e==a&&!f){c.tokenize=d;break}f=!f&&"\\"==e}return"string"}}function f(a){return function(b,c){var e=b.match(/^.*?(\/\*|\*\/)/);return e?"/*"==e[1]?c.tokenize=f(a+1):a>1?c.tokenize=f(a-1):c.tokenize=d:b.skipToEnd(),"comment"}}function g(a,b,c){b.context={prev:b.context,indent:a.indentation(),col:a.column(),type:c}}function h(a){a.indent=a.context.indent,a.context=a.context.prev}var i=c.client||{},j=c.atoms||{"false":!0,"true":!0,"null":!0},k=c.builtin||{},l=c.keywords||{},m=c.operatorChars||/^[*+\-%<>!=&|~^]/,n=c.support||{},o=c.hooks||{},p=c.dateSQL||{date:!0,time:!0,timestamp:!0},q=c.functions||{};return{startState:function(){return{tokenize:d,context:null}},token:function(a,b){if(a.sol()&&b.context&&null==b.context.align&&(b.context.align=!1),b.tokenize==d&&a.eatSpace())return null;var c=b.tokenize(a,b);if("comment"==c)return c;b.context&&null==b.context.align&&(b.context.align=!0);var e=a.current();return"("==e?g(a,b,")"):"["==e?g(a,b,"]"):b.context&&b.context.type==e&&h(b),c},indent:function(c,d){var e=c.context;if(!e)return a.Pass;var f=d.charAt(0)==e.type;return e.align?e.col+(f?0:1):e.indent+(f?0:b.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:n.commentSlashSlash?"//":n.commentHash?"#":"--"}}),function(){function b(a){for(var b={},c=a.split(" "),d=0;d!=]/,dateSQL:b("date time timestamp"),support:b("ODBCdotTable doubleQuote binaryNumber hexNumber"),functions:BI.makeObject(BI.FormulaCollections,!0)})}()}),BI.SQLEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(),{baseCls:"bi-sql-editor",value:"",lineHeight:2,showHint:!0,supportFunction:!1,supportParam:!1})},_init:function(){BI.CodeEditor.superclass._init.apply(this,arguments);var a=this.options,b=this;this.editor=CodeMirror(this.element[0],{mode:"text/x-sql",textWrapping:!0,lineWrapping:!0,lineNumbers:!1}),1===a.lineHeight?this.element.addClass("codemirror-low-line-height"):this.element.addClass("codemirror-high-line-height"),this.editor.on("change",function(c,d){b._checkWaterMark(),a.showHint&&CodeMirror.showHint(c,CodeMirror.sqlHint,{completeSingle:!1,supportFunction:a.supportFunction}),BI.nextTick(function(){b.fireEvent(BI.FormulaEditor.EVENT_CHANGE)})}),this.editor.on("focus",function(){b._checkWaterMark(),b.fireEvent(BI.FormulaEditor.EVENT_FOCUS)}),this.editor.on("blur",function(){b.fireEvent(BI.FormulaEditor.EVENT_BLUR)}),this.watermark=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Please_Enter_SQL"),cls:"bi-water-mark",whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind("mousedown",function(a){b.insertString(""),b.editor.focus(),a.stopEvent()}),this.watermark.element.bind("click",function(a){b.editor.focus(),a.stopEvent()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,top:0,left:5}]}),BI.isKey(a.value)&&BI.nextTick(function(){b.setValue(a.value)})},insertString:function(a){this.editor.replaceSelection(a),this.editor.focus()},insertParam:function(a){var b=a,c=this.editor.getCursor();this.editor.replaceSelection(a);var d=this.editor.getCursor(),e={className:"param",atomic:!0};e.value=b,this.editor.markText(c,d,e),this.editor.replaceSelection(" "),this.editor.focus()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&BI.isEmptyString(this.editor.getValue())&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},_analyzeContent:function(a){var b=/\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]/g;return a.match(b)},getValue:function(){var a=this.editor.getValue("\n",function(a){var b=a.text,c=a.text,d=0;return c.text=b,_.forEach(_.sortBy(a.markedSpans,"from"),function(a,b){switch(a.marker.className){case"param":case"error-param":var e=a.to-a.from;c=c.substr(0,a.from+d)+"${"+a.marker.value+"}"+c.substr(a.to+d,c.length),d+=3,d+=a.marker.value.length-e}}),c});return a.replaceAll("(\\$\\{.*?\\})\\s","$1")},setValue:function(a){var b,c=this,d=this.options;this.refresh(),c.editor.setValue(""),b=this._analyzeContent(a||""),BI.each(b,function(a,b){var e=/\$[\{][^\}]*[\}]/,f=b.match(e);BI.isNotEmptyArray(f)&&d.supportParam?c.insertParam(f[0].substring(2,b.length-1)):c.insertString(b)}),this._checkWaterMark()},refresh:function(){var a=this;BI.nextTick(function(){a.editor.refresh()})}}),BI.shortcut("bi.sql_editor",BI.SQLEditor),function(a,b){"function"==typeof define&&define.amd?define("eve",function(){return b()}):"object"==typeof exports?module.exports=b():a.eve=b()}(this,function(){var a,b,c="0.4.2",d="hasOwnProperty",e=/[\.\/]/,f="*",g=function(){},h=function(a,b){return a-b},i={n:{}},j=function(c,d){c=String(c);var e,f=b,g=Array.prototype.slice.call(arguments,2),i=j.listeners(c),k=0,l=[],m={},n=[],o=a;a=c,b=0;for(var p=0,q=i.length;p=1e3&&delete h[i.shift()],i.push(g),h[g]=a[C](b,f),c?c(h[g]):h[g])}return e}function f(){return this.hex}function g(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function h(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function i(a,b,c,d,e,f,g,i,j){null==j&&(j=1),j=j>1?1:j<0?0:j;for(var k=j/2,l=12,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;po;)m/=2,n+=(kN(e,g)||N(b,d)N(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+O(a,c).toFixed(2)||n>+N(a,c).toFixed(2)||n<+O(e,g).toFixed(2)||n>+N(e,g).toFixed(2)||o<+O(b,d).toFixed(2)||o>+N(b,d).toFixed(2)||o<+O(f,h).toFixed(2)||o>+N(f,h).toFixed(2)))return{x:l,y:m}}}}function l(a,c,d){var e=b.bezierBBox(a),f=b.bezierBBox(c);if(!b.isBBoxIntersect(e,f))return d?0:[];for(var g=i.apply(0,a),h=i.apply(0,c),j=N(~~(g/5),1),l=N(~~(h/5),1),m=[],n=[],o={},p=d?0:[],q=0;q=0&&A<=1.001&&B>=0&&B<=1.001&&(d?p++:p.push({x:z.x,y:z.y,t1:O(A,1),t2:O(B,1)}))}}return p}function m(a,c,d){a=b._path2curve(a),c=b._path2curve(c);for(var e,f,g,h,i,j,k,m,n,o,p=d?0:[],q=0,r=a.length;qd)return d;for(;cf?c=e:d=e,e=(d-c)/2+c}return e}var j=3*b,k=3*(d-b)-j,l=1-j-k,m=3*c,n=3*(e-c)-m,o=1-m-n;return h(a,1/(200*f))}function q(a,b){var c=[],d={};if(this.ms=b,this.times=1,a){for(var e in a)a[y](e)&&(d[$(e)]=a[e],c.push($(e)));c.sort(ka)}this.anim=d,this.top=c[c.length-1],this.percents=c}function r(c,d,e,f,g,h){e=$(e);var i,j,k,l,m,o,q=c.ms,r={},s={},t={};if(f)for(w=0,x=fb.length;wf*c.top){e=c.percents[w],m=c.percents[w-1]||0,q=q/c.top*(e-m),l=c.percents[w+1],i=c.anim[e];break}f&&d.attr(c.anim[c.percents[w]])}if(i){if(j)j.initstatus=f,j.start=new Date-j.ms*f;else{for(var z in i)if(i[y](z)&&(ca[y](z)||d.paper.customAttributes[y](z)))switch(r[z]=d.attr(z),null==r[z]&&(r[z]=ba[z]),s[z]=i[z],ca[z]){case S:t[z]=(s[z]-r[z])/q;break;case"colour":r[z]=b.getRGB(r[z]);var A=b.getRGB(s[z]);t[z]={r:(A.r-r[z].r)/q,g:(A.g-r[z].g)/q,b:(A.b-r[z].b)/q};break;case"path":var B=Ia(r[z],s[z]),C=B[1];for(r[z]=B[0],t[z]=[],w=0,x=r[z].length;w',qa=ra.firstChild,qa.style.behavior="url(#default#VML)",!qa||"object"!=typeof qa.adj)return b.type=F;ra=null}b.svg=!(b.vml="VML"==b.type),b._Paper=B,b.fn=u=B.prototype=b.prototype,b._id=0,b._oid=0,b.is=function(a,b){return b=L.call(b),"finite"==b?!X[y](+a):"array"==b?a instanceof Array:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||"array"==b&&Array.isArray&&Array.isArray(a)||V.call(a).slice(8,-1).toLowerCase()==b},b.angle=function(a,c,d,e,f,g){if(null==f){var h=a-d,i=c-e;return h||i?(180+180*M.atan2(-i,-h)/R+360)%360:0}return b.angle(a,c,f,g)-b.angle(d,e,f,g)},b.rad=function(a){return a%360*R/180},b.deg=function(a){return Math.round(180*a/R%360*1e3)/1e3},b.snapTo=function(a,c,d){if(d=b.is(d,"finite")?d:10,b.is(a,U)){for(var e=a.length;e--;)if(P(a[e]-c)<=d)return a[e]}else{a=+a;var f=c%a;if(fa-d)return c-f+a}return c};b.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=16*M.random()|0,c="x"==a?b:3&b|8;return c.toString(16)});b.setWindow=function(c){a("raphael.setWindow",b,z.win,c),z.win=c,z.doc=z.win.document,b._engine.initWin&&b._engine.initWin(z.win)};var sa=function(a){if(b.vml){var c,d=/^\s+|\s+$/g;try{var f=new ActiveXObject("htmlfile");f.write(""),f.close(),c=f.body}catch(g){c=createPopup().document.body}var h=c.createTextRange();sa=e(function(a){try{c.style.color=H(a).replace(d,F);var b=h.queryCommandValue("ForeColor");return b=(255&b)<<16|65280&b|(16711680&b)>>>16,"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=z.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",z.doc.body.appendChild(i),sa=e(function(a){return i.style.color=a,z.doc.defaultView.getComputedStyle(i,F).getPropertyValue("color")})}return sa(a)},ta=function(){return"hsb("+[this.h,this.s,this.b]+")"},ua=function(){return"hsl("+[this.h,this.s,this.l]+")"},va=function(){return this.hex},wa=function(a,c,d){if(null==c&&b.is(a,"object")&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,c=a.g,a=a.r),null==c&&b.is(a,T)){var e=b.getRGB(a);a=e.r,c=e.g,d=e.b}return(a>1||c>1||d>1)&&(a/=255,c/=255,d/=255),[a,c,d]},xa=function(a,c,d,e){a*=255,c*=255,d*=255;var f={r:a,g:c,b:d,hex:b.rgb(a,c,d),toString:va};return b.is(e,"finite")&&(f.opacity=e),f};b.color=function(a){var c;return b.is(a,"object")&&"h"in a&&"s"in a&&"b"in a?(c=b.hsb2rgb(a),a.r=c.r,a.g=c.g,a.b=c.b,a.hex=c.hex):b.is(a,"object")&&"h"in a&&"s"in a&&"l"in a?(c=b.hsl2rgb(a),a.r=c.r,a.g=c.g,a.b=c.b,a.hex=c.hex):(b.is(a,"string")&&(a=b.getRGB(a)),b.is(a,"object")&&"r"in a&&"g"in a&&"b"in a?(c=b.rgb2hsl(a),a.h=c.h,a.s=c.s,a.l=c.l,c=b.rgb2hsb(a),a.v=c.b):(a={hex:"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1)),a.toString=va,a},b.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,d=a.o,a=a.h),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-P(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],xa(e,f,g,d)},b.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,f,g,h,i;return a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-P(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],xa(e,f,g,d)},b.rgb2hsb=function(a,b,c){c=wa(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=N(a,b,c),g=f-O(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{h:d,s:e,b:f,toString:ta}},b.rgb2hsl=function(a,b,c){c=wa(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=N(a,b,c),h=O(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:f<.5?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:ua}},b._path2string=function(){return this.join(",").replace(fa,"$1")};b._preload=function(a,b){var c=z.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,z.doc.body.removeChild(this)},c.onerror=function(){z.doc.body.removeChild(this)},z.doc.body.appendChild(c),c.src=a};b.getRGB=e(function(a){if(!a||(a=H(a)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:f};if("none"==a)return{r:-1,g:-1,b:-1,hex:"none",toString:f};!(ea[y](a.toLowerCase().substring(0,2))||"#"==a.charAt())&&(a=sa(a));var c,d,e,g,h,i,j=a.match(W);return j?(j[2]&&(e=_(j[2].substring(5),16),d=_(j[2].substring(3,5),16),c=_(j[2].substring(1,3),16)),j[3]&&(e=_((h=j[3].charAt(3))+h,16),d=_((h=j[3].charAt(2))+h,16),c=_((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100)),j[5]?(i=j[5][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(c/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),b.hsb2rgb(c,d,e,g)):j[6]?(i=j[6][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(c/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),b.hsl2rgb(c,d,e,g)):(j={r:c,g:d,b:e,toString:f},j.hex="#"+(16777216|e|d<<8|c<<16).toString(16).slice(1),b.is(g,"finite")&&(j.opacity=g),j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:f}},b),b.hsb=e(function(a,c,d){return b.hsb2rgb(a,c,d).hex}),b.hsl=e(function(a,c,d){return b.hsl2rgb(a,c,d).hex}),b.rgb=e(function(a,b,c){function d(a){return a+.5|0}return"#"+(16777216|d(c)|d(b)<<8|d(a)<<16).toString(16).slice(1)}),b.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),c.hex},b.getColor.reset=function(){delete this.start},b.parsePathString=function(a){if(!a)return null;var c=ya(a);if(c.arr)return Aa(c.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[];return b.is(a,U)&&b.is(a[0],U)&&(e=Aa(a)),e.length||H(a).replace(ga,function(a,b,c){var f=[],g=b.toLowerCase();if(c.replace(ia,function(a,b){b&&f.push(+b)}),"m"==g&&f.length>2&&(e.push([b][D](f.splice(0,2))),g="l",b="m"==b?"l":"L"),"r"==g)e.push([b][D](f));else for(;f.length>=d[g]&&(e.push([b][D](f.splice(0,d[g]))),d[g]););}),e.toString=b._path2string,c.arr=Aa(e),e},b.parseTransformString=e(function(a){if(!a)return null;var c=[];return b.is(a,U)&&b.is(a[0],U)&&(c=Aa(a)),c.length||H(a).replace(ha,function(a,b,d){var e=[];L.call(b);d.replace(ia,function(a,b){b&&e.push(+b)}),c.push([b][D](e))}),c.toString=b._path2string,c});var ya=function(a){var b=ya.ps=ya.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[y](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]};b.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=Q(j,3),l=Q(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*M.atan2(q-s,r-t)/R;return(q>s||r=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},b.isBBoxIntersect=function(a,c){var d=b.isPointInsideBBox;return d(c,a.x,a.y)||d(c,a.x2,a.y)||d(c,a.x,a.y2)||d(c,a.x2,a.y2)||d(a,c.x,c.y)||d(a,c.x2,c.y)||d(a,c.x,c.y2)||d(a,c.x2,c.y2)||(a.xc.x||c.xa.x)&&(a.yc.y||c.ya.y)},b.pathIntersection=function(a,b){return m(a,b)},b.pathIntersectionNumber=function(a,b){return m(a,b,1)},b.isPointInsidePath=function(a,c,d){var e=b.pathBBox(a);return b.isPointInsideBBox(e,c,d)&&m(a,[["M",c,d],["H",e.x2+10]],1)%2==1},b._removedFactory=function(b){return function(){a("raphael.log",null,"Raphaël: you are calling to method “"+b+"” of removed object",b)}};var za=b.pathBBox=function(a){var b=ya(a);if(b.bbox)return c(b.bbox);if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=Ia(a);for(var d,e=0,f=0,g=[],h=[],i=0,j=a.length;i1&&(s=M.sqrt(s),c=s*c,d=s*d);var t=c*c,u=d*d,v=(g==h?-1:1)*M.sqrt(P((t*u-t*r*r-u*q*q)/(t*r*r+u*q*q))),w=v*c*r/d+(a+i)/2,x=v*-d*q/c+(b+j)/2,y=M.asin(((b-x)/d).toFixed(9)),z=M.asin(((j-x)/d).toFixed(9));y=az&&(y-=2*R),!h&&z>y&&(z-=2*R); }var A=z-y;if(P(A)>m){var B=z,C=i,E=j;z=y+m*(h&&z>y?1:-1),i=w+c*M.cos(z),j=x+d*M.sin(z),o=Fa(i,j,c,d,f,0,h,C,E,[z,B,w,x])}A=z-y;var F=M.cos(y),G=M.sin(y),H=M.cos(z),J=M.sin(z),K=M.tan(A/4),L=4/3*c*K,N=4/3*d*K,O=[a,b],Q=[a+L*G,b-N*F],S=[i+L*J,j-N*H],T=[i,j];if(Q[0]=2*O[0]-Q[0],Q[1]=2*O[1]-Q[1],k)return[Q,S,T][D](o);o=[Q,S,T][D](o).join()[I](",");for(var U=[],V=0,W=o.length;V"1e12"&&(m=.5),P(n)>"1e12"&&(n=.5),m>0&&m<1&&(i=Ga(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&n<1&&(i=Ga(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+M.sqrt(k*k-4*j*l))/2/j,n=(-k-M.sqrt(k*k-4*j*l))/2/j,P(m)>"1e12"&&(m=.5),P(n)>"1e12"&&(n=.5),m>0&&m<1&&(i=Ga(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&n<1&&(i=Ga(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{min:{x:O[C](0,p),y:O[C](0,o)},max:{x:N[C](0,p),y:N[C](0,o)}}}),Ia=b._path2curve=e(function(a,b){var c=!b&&ya(a);if(!b&&c.curve)return Aa(c.curve);for(var d=Ca(a),e=b&&Ca(b),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=(function(a,b,c){var d,e,f={T:1,Q:1};if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in f)&&(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][D](Fa[C](0,[b.x,b.y][D](a.slice(1))));break;case"S":"C"==c||"S"==c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e][D](a.slice(1));break;case"T":"Q"==c||"T"==c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"][D](Ea(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][D](Ea(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][D](Da(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][D](Da(b.x,b.y,a[1],b.y));break;case"V":a=["C"][D](Da(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][D](Da(b.x,b.y,b.X,b.Y))}return a}),i=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)k[b]="A",e&&(l[b]="A"),a.splice(b++,0,["C"][D](c.splice(0,6)));a.splice(b,1),p=N(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&"M"==a[g][0]&&"M"!=b[g][0]&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],p=N(d.length,e&&e.length||0))},k=[],l=[],m="",n="",o=0,p=N(d.length,e&&e.length||0);oe){if(c&&!m.start){if(k=_a(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),l+=["C"+k.start.x,k.start.y,k.m.x,k.m.y,k.x,k.y],f)return l;m.start=l,l=["M"+k.x,k.y+"C"+k.n.x,k.n.y,k.end.x,k.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!a&&!c)return k=_a(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),{x:k.x,y:k.y,alpha:k.alpha}}n+=j,g=+i[5],h=+i[6]}l+=i.shift()+i}return m.end=l,k=a?n:c?m:b.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),k.alpha&&(k={x:k.x,y:k.y,alpha:k.alpha}),k}},bb=ab(1),cb=ab(),db=ab(0,1);b.getTotalLength=bb,b.getPointAtLength=cb,b.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return db(a,b).end;var d=db(a,c,1);return b?db(d,b).end:d},Xa.getTotalLength=function(){var a=this.getPath();if(a)return this.node.getTotalLength?this.node.getTotalLength():bb(a)},Xa.getPointAtLength=function(a){var b=this.getPath();if(b)return cb(b,a)},Xa.getPath=function(){var a,c=b._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return c&&(a=c(this)),a},Xa.getSubpath=function(a,c){var d=this.getPath();if(d)return b.getSubpath(d,a,c)};var eb=b.easing_formulas={linear:function(a){return a},"<":function(a){return Q(a,1.7)},">":function(a){return Q(a,.48)},"<>":function(a){var b=.48-a/1.04,c=M.sqrt(.1734+b*b),d=c-b,e=Q(P(d),1/3)*(d<0?-1:1),f=-c-b,g=Q(P(f),1/3)*(f<0?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){return a==!!a?a:Q(2,-10*a)*M.sin((a-.075)*(2*R)/.3)+1},bounce:function(a){var b,c=7.5625,d=2.75;return a<1/d?b=c*a*a:a<2/d?(a-=1.5/d,b=c*a*a+.75):a<2.5/d?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b}};eb.easeIn=eb["ease-in"]=eb["<"],eb.easeOut=eb["ease-out"]=eb[">"],eb.easeInOut=eb["ease-in-out"]=eb["<>"],eb["back-in"]=eb.backIn,eb["back-out"]=eb.backOut;var fb=[],gb=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},hb=function(){for(var c=+new Date,d=0;d1&&!e.next){for(g in m)m[y](g)&&(p[g]=e.totalOrigin[g]);e.el.attr(p),r(e.anim,e.el,e.anim.percents[0],null,e.totalOrigin,e.repeat-1)}e.next&&!e.stop&&r(e.anim,e.el,e.next,null,e.totalOrigin,e.repeat)}}}fb.length&&gb(hb)},ib=function(a){return a>255?255:a<0?0:a};Xa.animateWith=function(a,c,d,e,f,g){var h=this;if(h.removed)return g&&g.call(h),h;var i=d instanceof q?d:b.animation(d,e,f,g);r(i,h,i.percents[0],null,h.attr());for(var j=0,k=fb.length;ji&&(i=k)}i+="%",!a[i].callback&&(a[i].callback=e)}return new q(a,c)},Xa.animate=function(a,c,d,e){var f=this;if(f.removed)return e&&e.call(f),f;var g=a instanceof q?a:b.animation(a,c,d,e);return r(g,f,g.percents[0],null,f.attr()),f},Xa.setTime=function(a,b){return a&&null!=b&&this.status(a,O(b,a.ms)/a.ms),this},Xa.status=function(a,b){var c,d,e=[],f=0;if(null!=b)return r(a,this,-1,O(b,1)),this;for(c=fb.length;f.5)-1;i(m-.5,2)+i(n-.5,2)>.25&&(n=f.sqrt(.25-i(m-.5,2))*e+.5)&&.5!=n&&(n=n.toFixed(5)-1e-5*e)}return l}),e=e.split(/\s*\-\s*/),"linear"==j){var t=e.shift();if(t=-d(t),isNaN(t))return null;var u=[0,0,f.cos(a.rad(t)),f.sin(a.rad(t))],v=1/(g(h(u[2]),h(u[3]))||1);u[2]*=v,u[3]*=v,u[2]<0&&(u[0]=-u[2],u[2]=0),u[3]<0&&(u[1]=-u[3],u[3]=0)}var w=a._parseDots(e);if(!w)return null;if(k=k.replace(/[\(\)\s,\xb0#]/g,"_"),b.gradient&&k!=b.gradient.id&&(p.defs.removeChild(b.gradient),delete b.gradient),!b.gradient){s=q(j+"Gradient",{id:k}),b.gradient=s,q(s,"radial"==j?{fx:m,fy:n}:{x1:u[0],y1:u[1],x2:u[2],y2:u[3],gradientTransform:b.matrix.invert()}),p.defs.appendChild(s);for(var x=0,y=w.length;x0),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)},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()}}),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:30,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:5,right:74},{el:this.vlabel,top:5,right:111},{el:this.hpager,top:5,right:-9},{el:this.hlabel,top:5,right:28}]})},_createVPager:function(){var a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr,invisible:!0}),this.vpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],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:20,iconWidth:16,iconHeight:16,cls:"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:20,iconWidth:16,iconHeight:16,cls:"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:20,value:c.curr,title:c.curr,invisible:!0}),this.hpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],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:20,iconWidth:16,iconHeight:16,cls:"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:20,iconWidth:16,iconHeight:16,cls:"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=[74,111,-9,28],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.RichEditorAction=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RichEditorAction.superclass._defaultConfig.apply(this,arguments),{width:20,height:20,command:"",used:!0})},_init:function(){BI.RichEditorAction.superclass._init.apply(this,arguments);var a=this,b=this.options;b.editor.on(BI.NicEditor.EVENT_SELECTED,function(c){b.used===!0&&(a.setEnable(!0),a.checkNodes(c.target),a.key(c))}),b.editor.on(BI.NicEditor.EVENT_BLUR,function(){a.setEnable(!1)}),b.editor.on(BI.NicEditor.EVENT_KEYDOWN,BI.bind(this.keydown,this)),b.used===!1&&this.setEnable(!1)},checkNodes:function(a){if(!a)return!1;var b=a;do if(this.options.tags&&this.options.tags.contains(b.nodeName))return this.activate(),!0;while(b=b.parentNode&&b.className&&b.className.indexOf("bi-nic-editor")>=-1);for(b=a;3==b.nodeType;)b=b.parentNode;if(this.options.css)for(var c in this.options.css){if(null==this.options.css[c])return this.activate($(b).css(c)),!0;if($(b).css(c)==this.options.css[c])return this.activate(),!0}return this.deactivate(),!1},start:function(){},key:function(){},keydown:function(){},hideIf:function(a){},activate:function(){},deactivate:function(){},doCommand:function(a){this.options.command&&this.options.editor.nicCommand(this.options.command,a)}}),BI.RichEditorParamAction=BI.inherit(BI.RichEditorAction,{_defaultConfig:function(){return BI.extend(BI.RichEditorParamAction.superclass._defaultConfig.apply(this,arguments),{paramFormatter:function(a){return a}})},_init:function(){BI.RichEditorParamAction.superclass._init.apply(this,arguments)},addParam:function(a){var b=this.options,c=(b.editor.instance,new Image),d=BI.DOM.getImage(b.paramFormatter(a));c.src=d.src,c.alt=a,c.style=d.style,$(c).addClass("rich-editor-param"),this.options.editor.insertHTML($("
").append(c).html())}}),BI.RichEditorTextToolbar=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-rich-editor-text-toolbar bi-background",buttons:[{type:"bi.rich_editor_font_chooser"},{type:"bi.rich_editor_size_chooser"},{type:"bi.rich_editor_bold_button"},{type:"bi.rich_editor_italic_button"},{type:"bi.rich_editor_underline_button"},{type:"bi.rich_editor_color_chooser"},{type:"bi.rich_editor_background_color_chooser"},{type:"bi.rich_editor_align_left_button"},{type:"bi.rich_editor_align_center_button"},{type:"bi.rich_editor_align_right_button"},{type:"bi.rich_editor_param_button"}],height:28})},_init:function(){BI.RichEditorTextToolbar.superclass._init.apply(this,arguments);var a=this.options,b=BI.createWidgets(BI.map(a.buttons,function(b,c){return BI.extend(c,{editor:a.editor})}));this.element.mousedown(function(a){BI.each(b,function(b,c){c.hideIf(a)})}),BI.createWidget({type:"bi.left",element:this,items:b,hgap:3,vgap:3})},mounted:function(){var a=this;BI.isIE9Below()&&(this.element.mousedown(function(){a._noSelect(a.element[0])}),this._noSelect(this.element[0]))},_noSelect:function(a){a.setAttribute&&"input"!=a.nodeName.toLowerCase()&&"textarea"!=a.nodeName.toLowerCase()&&a.setAttribute("unselectable","on");for(var b=0;b0?a.getRangeAt(0):a.createRange()},selRng:function(a,b){window.getSelection?(b.removeAllRanges(),b.addRange(a)):a.select()},selElm:function(){var a=this.getRng();if(a){if(a.startContainer){var b=a.startContainer;if(1==a.cloneContents().childNodes.length)for(var c=0;c0&&this.colorchooser.hideView()},deactivate:function(){}}),BI.shortcut("bi.rich_editor_background_color_chooser",BI.RichEditorBackgroundColorChooser),BI.RichEditorColorChooser=BI.inherit(BI.RichEditorAction,{_defaultConfig:function(){return BI.extend(BI.RichEditorColorChooser.superclass._defaultConfig.apply(this,arguments),{width:20,height:20,command:"foreColor",css:{color:null}})},_init:function(){BI.RichEditorColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.colorchooser=BI.createWidget({type:"bi.color_chooser",element:this,width:b.width,height:b.height,el:{type:"bi.rich_editor_color_chooser_trigger",title:BI.i18nText("BI-Font_Colour"),cls:"text-toolbar-button"}}),this.colorchooser.on(BI.ColorChooser.EVENT_CHANGE,function(){a.doCommand(this.getValue())})},hideIf:function(a){!this.colorchooser.element.find(a.target).length>0&&this.colorchooser.hideView()},activate:function(a){this.colorchooser.setValue(BI.DOM.rgb2hex(a))},deactivate:function(){this.colorchooser.setValue("")}}),BI.shortcut("bi.rich_editor_color_chooser",BI.RichEditorColorChooser),BI.RichEditorFontChooser=BI.inherit(BI.RichEditorAction,{_defaultConfig:function(){return BI.extend(BI.RichEditorFontChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-rich-editor-font-chooser bi-border bi-card",command:"FontName",width:50,height:20})},_init:function(){BI.RichEditorSizeChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",readonly:!0,height:b.height,triggerWidth:16,text:BI.i18nText("BI-Font_Family")}),this.combo=BI.createWidget({type:"bi.combo",element:this,el:this.trigger,adjustLength:1,popup:{minWidth:70,el:{type:"bi.button_group",items:BI.createItems([{value:"MicrosoftYaHei",text:BI.i18nText("BI-Microsoft_YaHei")},{value:"PingFangSC-Light",text:BI.i18nText("BI-Apple_Light")},{value:"ArialMT",text:"Arial"},{value:"Verdana",text:"Verdana"}],{type:"bi.single_select_item"}),layouts:[{type:"bi.vertical"}]}}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){var b=this.getValue()[0];a.doCommand(b),this.hideView(),this.setValue([])})},hideIf:function(a){!this.combo.element.find(a.target).length>0&&this.combo.hideView()}}),BI.shortcut("bi.rich_editor_font_chooser",BI.RichEditorFontChooser),BI.RichEditorSizeChooser=BI.inherit(BI.RichEditorAction,{_defaultConfig:function(){return BI.extend(BI.RichEditorSizeChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-rich-editor-size-chooser bi-border bi-card",command:"FontSize",width:50,height:20})},_items:[{value:1,text:"1(8pt)"},{value:2,text:"2(10pt)"},{value:3,text:"3(12pt)"},{value:4,text:"4(14pt)"},{value:5,text:"5(18pt)"},{value:6,text:"6(24pt)"}],_init:function(){BI.RichEditorSizeChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",readonly:!0,height:b.height,triggerWidth:16,text:BI.i18nText("BI-Font_Size")}),this.combo=BI.createWidget({type:"bi.combo",element:this,el:this.trigger,adjustLength:1,popup:{maxWidth:70,minWidth:70,el:{type:"bi.button_group",items:BI.createItems(this._items,{type:"bi.single_select_item"}),layouts:[{type:"bi.vertical"}]}}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){var b=this.getValue()[0];a.doCommand(b),this.hideView(),this.setValue([])})},hideIf:function(a){!this.combo.element.find(a.target).length>0&&this.combo.hideView()}}),BI.shortcut("bi.rich_editor_size_chooser",BI.RichEditorSizeChooser),BI.RichEditor=BI.inherit(BI.Widget,{props:{baseCls:"bi-rich-editor bi-textarea",toolbar:{},readOnly:!1},render:function(){var a=this,b=this.options,c={type:"bi.nic_editor",width:b.width,height:b.height,readOnly:b.readOnly,ref:function(){a.editor=this},listeners:[{eventName:BI.NicEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.RichEditor.EVENT_CONFIRM)}},{eventName:BI.NicEditor.EVENT_FOCUS,action:function(){b.readOnly||a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.RichEditor.EVENT_FOCUS)}}]};return b.readOnly?c:(this.editor=BI.createWidget(c),{type:"bi.combo",toggle:!1,trigger:"click",direction:"top,right",isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,adjustLength:1,ref:function(){a.combo=this},el:this.editor,popup:{el:BI.extend({type:"bi.rich_editor_text_toolbar",editor:this.editor},b.toolbar),height:30,stopPropagation:!0,stopEvent:!0},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.fireEvent(BI.RichEditor.EVENT_AFTER_HIDEVIEW)}}]})},mounted:function(){var a=this.options;BI.isNull(a.value)&&this.editor.setValue(a.value)},focus:function(){this.editor.focus()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.RichEditor.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.RichEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.RichEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.rich_editor",BI.RichEditor),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-active",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,height:a.height-2,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)})},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.AdaptiveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.AdaptiveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.AdaptiveTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:c.columnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:c.regionColumnSize,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.columnSize=this.getColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_getFreezeColLength:function(){var a=this.options;return a.isNeedFreeze===!0?BI.clamp(a.freezeCols.length,0,a.columnSize.length):0},_digest:function(){var a=this.options,b=a.columnSize.slice(),c=a.regionColumnSize.slice(),d=a.freezeCols.slice(),e=a.regionColumnSize[0],f=this._getFreezeColLength();if(!e||e>a.width-10||e<10){var g=BI.sum(b,function(a,b){return a=b.length&&(d=[]),BI.isNumber(b[0])||(b=a.minColumnSize.slice());var h=0,i=0;return BI.each(b,function(a,b){a0&&(b[f-1]=BI.clamp(e-(h-b[f-1]),a.minColumnSize[f-1]||10,a.maxColumnSize[f-1]||Number.MAX_VALUE)),b.length>0&&(b[b.length-1]=BI.clamp(a.width-BI.GridTableScrollbar.SIZE-e-(i-h-b[b.length-1]),a.minColumnSize[b.length-1]||10,a.maxColumnSize[b.length-1]||Number.MAX_VALUE)),c[0]=e,{freezeCols:d,columnSize:b,regionColumnSize:c}},_populate:function(){var a=this.options,b=this._digest();a.regionColumnSize=b.regionColumnSize,a.columnSize=b.columnSize,this.table.setColumnSize(b.columnSize),this.table.setRegionColumnSize(b.regionColumnSize),this.table.attr("freezeCols",b.freezeCols)},setWidth:function(a){BI.AdaptiveTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.AdaptiveTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=BI.AdaptiveTable.superclass.attr.apply(this,arguments);return"freezeCols"===a?c:this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a){this.options;this._populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),BI.AdaptiveTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.adaptive_table",BI.AdaptiveTable),BI.DynamicSummaryLayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DynamicSummaryLayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-dynamic-summary-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))});var g=BI.isFunction(b.rowHeaderCreator)?b.rowHeaderCreator():b.rowHeaderCreator;if(c&&c.length>0){var h=this._formatColumns(c),i=this._getHDeep();i<=0?h.unshift(g||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):h[0]=g||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(h)}return f},_formatItems:function(a,b,c){function d(a,b){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=b;var c=[a];c=c.concat(a.values||[]),c.length>0&&f.push(c),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,c){d(c,b+1)})}var e=this.options,f=[];return BI.each(a,function(a,b){if(BI.each(b.children,function(a,b){d(b,0)}),BI.isArray(b.values)){var c=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return e.summaryCellStyleGetter(!0)}}].concat(b.values);f.push(c)}}),BI.DynamicSummaryTreeTable.formatSummaryItems(f,b,e.crossItems,1)},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a1)for(var c=0;c1)&&BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e1?g+=a.values.length:g++}var f=[],g=0;if(BI.each(c,function(a,b){e(b)}),f.length>0){var h=[],i=[];BI.each(b,function(a,b){var c=b.slice();BI.removeAt(c,f),h.push(c)}),BI.each(a,function(a,b){var c=b.slice();BI.removeAt(c,f),i.push(c)}),b=h,a=i}return{items:a,header:b,deletedCols:f}}}),BI.shortcut("bi.dynamic_summary_tree_table",BI.DynamicSummaryTreeTable),BI.LayerTreeTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table-cell",layer:0,text:""})},_init:function(){BI.LayerTreeTableCell.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget({type:"bi.label",element:this.element,textAlign:"left",whiteSpace:"nowrap",height:a.height,text:a.text,value:a.value,lgap:5+30*a.layer,rgap:5})}}),BI.shortcut("bi.layer_tree_table_cell",BI.LayerTreeTableCell),BI.LayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a){function b(a,c){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=c;var e=[a];e=e.concat(a.values||[]),e.length>0&&d.push(e),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,d){b(d,c+1)})}var c=this.options,d=[];return BI.each(a,function(a,e){if(BI.each(e.children,function(a,c){b(c,0)}),BI.isArray(e.values)){var f=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return c.summaryCellStyleGetter(!0)}}].concat(e.values);d.push(f)}}),d},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a0&&(c=BI.makeArray(b,a[0]/b)),c.concat(a.slice(1))},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.LayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;e.items=a||[],b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("freezeCols",f.freezeCols),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.LayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.layer_tree_table",BI.LayerTreeTable),BI.TableStyleCell=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-style-cell",styleGetter:BI.emptyFn})},_init:function(){BI.TableStyleCell.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,height:a.height,textAlign:"left",forceCenter:!0,hgap:5,text:a.text}),this._digestStyle()},_digestStyle:function(){var a=this.options,b=a.styleGetter();b&&this.text.element.css(b)},setText:function(a){this.text.setText(a)},populate:function(){this._digestStyle()}}),BI.shortcut("bi.table_style_cell",BI.TableStyleCell),BI.TableTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-tree",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e0},halfSelected:!1})},_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:26,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)}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.BranchRelation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-relation-tree",items:[],centerOffset:0,direction:BI.Direction.Bottom,align:BI.VerticalAlign.Top})},_init:function(){BI.BranchRelation.superclass._init.apply(this,arguments),this.populate(this.options.items)},_stratification:function(){var a=[];return this.tree.recursion(function(b,c){b.leaf=b.isLeaf(),a[c.length-1]||(a[c.length-1]=[]),a[c.length-1].push(b)}),a},_calculateLeaves:function(){function a(b){var c=0;return b.isLeaf()?1:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),b.set("leaves",c),c)}var b=0;return b=a(this.tree.getRoot())},_translate:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse());var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},populate:function(a){var b=this.options;b.items=a||[],this.empty(),a=BI.Tree.transformToTreeFormat(b.items),this.tree=new BI.Tree,this.tree.initTree(a),this.svg=BI.createWidget({type:"bi.svg"});var c=this._stratification();if(this._isNeedAdjust()){var d=this._translate(c);d=this._adjust(d),this._createBranches(d)}else{var d=this._fill(c);this._createBranches(d)}var e=BI.createWidget({type:"bi.layout",width:this._isVertical()?this._calculateWidth():this._calculateHeight(),height:this._isVertical()?this._calculateHeight():this._calculateWidth()});BI.createWidget({type:"bi.absolute",element:e,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}),a=this._isVertical()?[{type:"bi.handstand_branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.horizontal_adapt",verticalAlign:b.align}]},items:a}]:[{type:"bi.branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.vertical"},{type:b.align===BI.HorizontalAlign.Left?"bi.left":"bi.right"}]},items:a}],BI.createWidget({type:"bi.adaptive",element:e,items:a}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[e]})}}),BI.BranchRelation.EVENT_CHANGE="BranchRelation.EVENT_CHANGE",BI.shortcut("bi.branch_relation",BI.BranchRelation),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),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.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),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){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.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){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),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.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}),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="BI.EditorTrigger.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,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:b.height,text:b.text,hgap:c.hgap}),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 "+b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.triggerWidth||b.height},{el:this.text},{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];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,this.wrapper.resize()):c.width!==(b.triggerWidth||b.height)&&(c.width=b.triggerWidth||b.height,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})},_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()},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)}}),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",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)})},_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)&&!d.contains(c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},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)&&!d.contains(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.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:this._getHeaderHeight()-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this.start=this.options.startSequence,this.cache={},this._nextState(),this._populate()},_getNextSequence:function(a){function b(a){c.cache[a.text||a.value]||(c.cache[a.text||a.value]=e),e++}var c=this,d=this.start,e=this.start;return BI.each(a,function(a,f){BI.isNotEmptyArray(f.children)&&BI.each(f.children,function(a,f){0===a&&c.cache[f.text||f.value]&&(d=e=c.cache[f.text||f.value]),b(f)})}),this.start=e,d},_getStart:function(a){var b=this,c=this.start;return BI.some(a,function(a,d){if(BI.isNotEmptyArray(d.children))return BI.some(d.children,function(a,d){if(0===a&&b.cache[d.text||d.value])return c=b.cache[d.text||d.value],!0})}),c},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d},_layout:function(){var a=this.options,b=this._getHeaderHeight()-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize();try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_getHeaderHeight:function(){var a=this.options;return a.headerRowSize*(a.crossHeader.length+(a.header.length>0?1:0))},_nextState:function(){var a=this.options;this._getNextSequence(a.items)},_prevState:function(){var a,b=this.options;BI.some(b.items,function(b,c){if(BI.isNotEmptyArray(c.children))return BI.some(c.children,function(b,c){return a=c,!0})}),a&&BI.isNotEmptyObject(this.cache)?this.start=this.cache[a.text||a.value]:this.start=1,this._nextState()},_getMaxScrollTop:function(a){var b=0;return BI.each(a,function(a,c){b+=c.cnt}),Math.max(0,b*this.options.rowSize-(this.options.height-this._getHeaderHeight())+BI.DOM.getScrollWidth())},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator()||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",height:this._getHeaderHeight()-2,styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){var a=this,b=this.options,c=[],d=[],e=this._formatNumber(b.items),f=BI.PrefixIntervalTree.uniform(e.length,0);BI.each(e,function(a,b){f.set(a,b.height)});for(var g=BI.clamp(b.scrollTop,0,this._getMaxScrollTop(e)),h=f.greatestLowerBound(g),i=-(g-(h>0?f.sumTo(h-1):0)),j=i,k=b.height-this._getHeaderHeight();j-1)e[f].height!==a.renderedCells[g]._height&&(a.renderedCells[g]._height=e[f].height,a.renderedCells[g].el.setHeight(e[f].height)),e[f].top!==a.renderedCells[g].top&&(a.renderedCells[g].top=e[f].top,a.renderedCells[g].el.element.css("top",e[f].top+"px")),c.push(a.renderedCells[g]);else{var h=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,styleGetter:e[f].isSummary===!0?function(){return b.summaryCellStyleGetter(!0)}:function(a){return function(){return b.sequenceCellStyleGetter(a)}}(e[f].index)},e[f]));c.push({el:h,left:0,top:e[f].top,_height:e[f].height})}});var l={},m={},n=[];BI.each(d,function(b,c){BI.deepContains(a.renderedKeys,c)?l[b]=c:m[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(l,b)||BI.deepContains(m,b)||n.push(a)}),BI.each(n,function(b,c){a.renderedCells[c].el.destroy()});var o=[];BI.each(m,function(a){o.push(c[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:o}),this.renderedCells=c,this.renderedKeys=d,this.container.setHeight(f.sumUntil(e.length))},_restore:function(){BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},_populate:function(){var a=this;BI.each(this.tasks,function(b,c){c.apply(a)}),this.tasks=[],this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a<=1?(this.cache={},this.start=this.options.startSequence,this._restore(),this.tasks.push(this._nextState)):a===this.vCurr+1?this.tasks.push(this._nextState):a===this.vCurr-1&&this.tasks.push(this._prevState),this.vCurr=a},setHPage:function(a){a!==this.hCurr&&this.tasks.push(this._prevState),this.hCurr=a},restore:function(){this._restore()},populate:function(a,b,c,d){var e=this.options;a&&a!==this.options.items&&(e.items=a,this._restore(),this.tasks.push(this._prevState)),b&&b!==this.options.header&&(e.header=b),c&&c!==this.options.crossItems&&(e.crossItems=c),d&&d!==this.options.crossHeader&&(e.crossHeader=d),this._populate()}}),BI.shortcut("bi.sequence_table_tree_number",BI.SequenceTableTreeNumber),BI.MonthDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.MonthDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",height:24})},_init:function(){BI.MonthDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup"}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",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)})},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})},_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,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,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 bi-background",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",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"}),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:[{type:"bi.horizontal",width:100,items:[this.year,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=a.year,this._month=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 bi-background",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:[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:this.selectedTime.day});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",min:b.min,max:b.max}),this.calendar=BI.createWidget({direction:"top",element:this,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)})},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-border-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),BI.checkDateVoid(a,1,1,b.min,b.max)[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}),this.icon=BI.createWidget({type:"bi.icon",width:b.iconWidth,height:b.iconHeight}),BI.createWidget({type:"bi.center_adapt",element:this,items:[{type:"bi.center_adapt",width:50,height:b.height,items:[this.text,this.icon]}]})},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",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getDate(b.year,b.month-1,1).getMonthDays(),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:"top",element:this,logic:{dynamic:!1},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)},_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;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",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,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border",width:200,height:24})},_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:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,width:this.constants.popupWidth,stopPropagation:!1}}),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 bi-border-right",width:24,height:24});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():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,left: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="BI.DateTimeCombo.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",forceCenter:!0,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",forceCenter:!0,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",min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.vertical_adapt",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.hour=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.minute=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.second=b}}]}),this.setValue(b.value),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},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.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.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.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),allowBlank:!1,errorText:function(a){return BI.isNumeric(a)?BI.i18nText("BI-Please_Input_Natural_Number"):BI.i18nText("BI-Numerical_Interval_Input_Data"); +return{header:this._createHeader(c),items:this._formatItems(a.items),columnSize:this._formatColumnSize(a.columnSize,b),minColumnSize:this._formatColumns(a.minColumnSize,b),maxColumnSize:this._formatColumns(a.maxColumnSize,b),freezeCols:this._formatFreezeCols()}},_init:function(){BI.LayerTreeTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:[],mergeRule:b.mergeRule,columnSize:c.columnSize,minColumnSize:c.minColumnSize,maxColumnSize:c.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},setWidth:function(a){BI.LayerTreeTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.LayerTreeTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){var a=this.table.getColumnSize(),b=this._getHDeep(),c=[];return b>0&&(c=BI.makeArray(b,a[0]/b)),c.concat(a.slice(1))},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.LayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;e.items=a||[],b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("freezeCols",f.freezeCols),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.LayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.layer_tree_table",BI.LayerTreeTable),BI.TableStyleCell=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-style-cell",styleGetter:BI.emptyFn})},_init:function(){BI.TableStyleCell.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,height:a.height,textAlign:"left",forceCenter:!0,hgap:5,text:a.text}),this._digestStyle()},_digestStyle:function(){var a=this.options,b=a.styleGetter();b&&this.text.element.css(b)},setText:function(a){this.text.setText(a)},populate:function(){this._digestStyle()}}),BI.shortcut("bi.table_style_cell",BI.TableStyleCell),BI.TableTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-tree",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e0},halfSelected:!1})},_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:26,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)}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.BranchRelation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-relation-tree",items:[],centerOffset:0,direction:BI.Direction.Bottom,align:BI.VerticalAlign.Top})},_init:function(){BI.BranchRelation.superclass._init.apply(this,arguments),this.populate(this.options.items)},_stratification:function(){var a=[];return this.tree.recursion(function(b,c){b.leaf=b.isLeaf(),a[c.length-1]||(a[c.length-1]=[]),a[c.length-1].push(b)}),a},_calculateLeaves:function(){function a(b){var c=0;return b.isLeaf()?1:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),b.set("leaves",c),c)}var b=0;return b=a(this.tree.getRoot())},_translate:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse());var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},populate:function(a){var b=this.options;b.items=a||[],this.empty(),a=BI.Tree.transformToTreeFormat(b.items),this.tree=new BI.Tree,this.tree.initTree(a),this.svg=BI.createWidget({type:"bi.svg"});var c=this._stratification();if(this._isNeedAdjust()){var d=this._translate(c);d=this._adjust(d),this._createBranches(d)}else{var d=this._fill(c);this._createBranches(d)}var e=BI.createWidget({type:"bi.layout",width:this._isVertical()?this._calculateWidth():this._calculateHeight(),height:this._isVertical()?this._calculateHeight():this._calculateWidth()});BI.createWidget({type:"bi.absolute",element:e,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}),a=this._isVertical()?[{type:"bi.handstand_branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.horizontal_adapt",verticalAlign:b.align}]},items:a}]:[{type:"bi.branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.vertical"},{type:b.align===BI.HorizontalAlign.Left?"bi.left":"bi.right"}]},items:a}],BI.createWidget({type:"bi.adaptive",element:e,items:a}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[e]})}}),BI.BranchRelation.EVENT_CHANGE="BranchRelation.EVENT_CHANGE",BI.shortcut("bi.branch_relation",BI.BranchRelation),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),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.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),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){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.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){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),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.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}),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="BI.EditorTrigger.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,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:b.height,text:b.text,hgap:c.hgap}),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.triggerWidth||b.height},{el:this.text},{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];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,this.wrapper.resize()):c.width!==(b.triggerWidth||b.height)&&(c.width=b.triggerWidth||b.height,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})},_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()},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)}}),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",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)})},_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)&&!d.contains(c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},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)&&!d.contains(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.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:this._getHeaderHeight()-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this.start=this.options.startSequence,this.cache={},this._nextState(),this._populate()},_getNextSequence:function(a){function b(a){c.cache[a.text||a.value]||(c.cache[a.text||a.value]=e),e++}var c=this,d=this.start,e=this.start;return BI.each(a,function(a,f){BI.isNotEmptyArray(f.children)&&BI.each(f.children,function(a,f){0===a&&c.cache[f.text||f.value]&&(d=e=c.cache[f.text||f.value]),b(f)})}),this.start=e,d},_getStart:function(a){var b=this,c=this.start;return BI.some(a,function(a,d){if(BI.isNotEmptyArray(d.children))return BI.some(d.children,function(a,d){if(0===a&&b.cache[d.text||d.value])return c=b.cache[d.text||d.value],!0})}),c},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d},_layout:function(){var a=this.options,b=this._getHeaderHeight()-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize();try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_getHeaderHeight:function(){var a=this.options;return a.headerRowSize*(a.crossHeader.length+(a.header.length>0?1:0))},_nextState:function(){var a=this.options;this._getNextSequence(a.items)},_prevState:function(){var a,b=this.options;BI.some(b.items,function(b,c){if(BI.isNotEmptyArray(c.children))return BI.some(c.children,function(b,c){return a=c,!0})}),a&&BI.isNotEmptyObject(this.cache)?this.start=this.cache[a.text||a.value]:this.start=1,this._nextState()},_getMaxScrollTop:function(a){var b=0;return BI.each(a,function(a,c){b+=c.cnt}),Math.max(0,b*this.options.rowSize-(this.options.height-this._getHeaderHeight())+BI.DOM.getScrollWidth())},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator()||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",height:this._getHeaderHeight()-2,styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){var a=this,b=this.options,c=[],d=[],e=this._formatNumber(b.items),f=BI.PrefixIntervalTree.uniform(e.length,0);BI.each(e,function(a,b){f.set(a,b.height)});for(var g=BI.clamp(b.scrollTop,0,this._getMaxScrollTop(e)),h=f.greatestLowerBound(g),i=-(g-(h>0?f.sumTo(h-1):0)),j=i,k=b.height-this._getHeaderHeight();j-1)e[f].height!==a.renderedCells[g]._height&&(a.renderedCells[g]._height=e[f].height,a.renderedCells[g].el.setHeight(e[f].height)),e[f].top!==a.renderedCells[g].top&&(a.renderedCells[g].top=e[f].top,a.renderedCells[g].el.element.css("top",e[f].top+"px")),c.push(a.renderedCells[g]);else{var h=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,styleGetter:e[f].isSummary===!0?function(){return b.summaryCellStyleGetter(!0)}:function(a){return function(){return b.sequenceCellStyleGetter(a)}}(e[f].index)},e[f]));c.push({el:h,left:0,top:e[f].top,_height:e[f].height})}});var l={},m={},n=[];BI.each(d,function(b,c){BI.deepContains(a.renderedKeys,c)?l[b]=c:m[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(l,b)||BI.deepContains(m,b)||n.push(a)}),BI.each(n,function(b,c){a.renderedCells[c].el.destroy()});var o=[];BI.each(m,function(a){o.push(c[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:o}),this.renderedCells=c,this.renderedKeys=d,this.container.setHeight(f.sumUntil(e.length))},_restore:function(){BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},_populate:function(){var a=this;BI.each(this.tasks,function(b,c){c.apply(a)}),this.tasks=[],this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a<=1?(this.cache={},this.start=this.options.startSequence,this._restore(),this.tasks.push(this._nextState)):a===this.vCurr+1?this.tasks.push(this._nextState):a===this.vCurr-1&&this.tasks.push(this._prevState),this.vCurr=a},setHPage:function(a){a!==this.hCurr&&this.tasks.push(this._prevState),this.hCurr=a},restore:function(){this._restore()},populate:function(a,b,c,d){var e=this.options;a&&a!==this.options.items&&(e.items=a,this._restore(),this.tasks.push(this._prevState)),b&&b!==this.options.header&&(e.header=b),c&&c!==this.options.crossItems&&(e.crossItems=c),d&&d!==this.options.crossHeader&&(e.crossHeader=d),this._populate()}}),BI.shortcut("bi.sequence_table_tree_number",BI.SequenceTableTreeNumber),BI.MonthDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.MonthDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",height:24})},_init:function(){BI.MonthDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup"}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",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)})},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})},_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,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,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 bi-background",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",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"}),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:[{type:"bi.horizontal",width:100,items:[this.year,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=a.year,this._month=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 bi-background",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:[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:this.selectedTime.day});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",min:b.min,max:b.max}),this.calendar=BI.createWidget({direction:"top",element:this,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)})},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-border-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),BI.checkDateVoid(a,1,1,b.min,b.max)[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}),this.icon=BI.createWidget({type:"bi.icon",width:b.iconWidth,height:b.iconHeight}),BI.createWidget({type:"bi.center_adapt",element:this,items:[{type:"bi.center_adapt",width:50,height:b.height,items:[this.text,this.icon]}]})},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",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getDate(b.year,b.month-1,1).getMonthDays(),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:"top",element:this,logic:{dynamic:!1},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)},_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;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",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,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border",width:200,height:24})},_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:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,width:this.constants.popupWidth,stopPropagation:!1}}),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 bi-border-right",width:24,height:24});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():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,left: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="BI.DateTimeCombo.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",forceCenter:!0,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",forceCenter:!0,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",min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.vertical_adapt",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.hour=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.minute=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.second=b}}]}),this.setValue(b.value),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},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.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.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.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),allowBlank:!1,errorText:function(a){return BI.isNumeric(a)?BI.i18nText("BI-Please_Input_Natural_Number"):BI.i18nText("BI-Numerical_Interval_Input_Data"); },validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),athis.options.max&&(a=this.options.min),ac&&(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:"top",logic:{dynamic:!1},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,items:[this.calendar,{el:{type:"bi.dynamic_date_time_select",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}]}),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;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",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:!0,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(){this.downlistcombo.showView()},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.Single,{_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,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,height:b.height,text:b.text,value:b.value,logic:b.logic,selected:b.selected,disabled:b.disabled,iconHeight:b.iconHeight,iconWidth:b.iconWidth,textHgap:b.textHgap,textVgap:b.textVgap,textLgap:b.textLgap,textRgap:b.textRgap,father:b.father,bubble:b.bubble}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.IconTextItem.EVENT_CHANGE,function(){a.fireEvent(BI.DownListItem.EVENT_CHANGE)})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()}}),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:24,forceNotSelected:!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),!a.singleValues.contains(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]})},_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.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:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},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-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});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,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{baseCls:"bi-dynamic-date-combo bi-border",height:24},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:24,height:24,ref:function(){a.changeIcon=this}},width:24},{type:"bi.absolute",items:[{el:{type:"bi.combo",ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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},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:24,height:24,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}}]},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_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()}}),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="BI.DynamicDateCombo.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},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},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;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",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-high-light bi-border-top",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.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",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;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,b)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",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=a.print("%Y-%x-%e"),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},props:{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:0|c[0],month:0|c[1],day:0|c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")},title:function(){var b=a.storeValue||{},c=b.type||BI.DynamicDateCombo.Static,d=b.value;switch(c){case BI.DynamicDateCombo.Dynamic:var e=a._getText(d),f=BI.getDate();f=BI.DynamicDateHelper.getCalculation(d);var g=f.print("%Y-%x-%e");return BI.isEmptyString(e)?g:e+":"+g;case BI.DynamicDateCombo.Static:default:return BI.isNull(d)||BI.isNull(d.day)?"":BI.getDate(d.year,d.month-1,d.day).print("%Y-%X-%d")}}}),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=b.split("-");a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|c[0],month:0|c[1],day:0|c[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}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%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.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d"),c=b.print("%Y-%X-%d");return b.getMonth()>0&&(BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a||BI.parseDateTime(a,"%Y-%x").print("%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=a.print("%Y-%x-%e");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.getDate(c.year,c.month-1,c.day).print("%Y-%X-%d");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,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{baseCls:"bi-dynamic-date-combo bi-border",height:24},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:24,height:24,ref:function(){a.changeIcon=this}},width:24},{type:"bi.absolute",items:[{el:{type:"bi.combo",ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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)}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}}]},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_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},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;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",forceCenter:!0,cls:"bi-high-light bi-border-top",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",forceCenter:!0,cls:"bi-border-left bi-border-right bi-high-light bi-border-top",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",forceCenter:!0,cls:"bi-high-light bi-border-top",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;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,b)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",ref:function(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){}}]},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=a.print("%Y-%x-%e"),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 bi-border-top"},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},lgap:14},{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}return 1===a.length&&BI.parseInt(a)>c&&(d="0"+d),2===d.length&&(b===BI.DynamicDateTimeSelect.HOUR?this.minute.focus():this.second.focus()),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}),BI.DynamicDateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:6,yearFullMonthLength:7},props:{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:0|c[0],month:0|c[1],day:0|c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")},title:function(){var b=a.storeValue||{},c=b.type||BI.DynamicDateCombo.Static,d=b.value;switch(c){case BI.DynamicDateCombo.Dynamic:var e=a._getText(d),f=BI.DynamicDateHelper.getCalculation(d),g=f.print("%Y-%x-%e %H:%M:%S");return BI.isEmptyString(e)?g:e+":"+g;case BI.DynamicDateCombo.Static:default:return BI.isNull(d)||BI.isNull(d.day)?"":BI.getDate(d.year,d.month-1,d.day,d.hour||0,d.minute||0,d.second||0).print("%Y-%X-%d %H:%M:%S")}}}),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=b.split(/-|\s|:/);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|c[0],month:0|c[1],day:0|c[2],hour:0|c[3],minute:0|c[4],second:0|c[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}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S").print("%Y-%x-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S").print("%Y-%x-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S").print("%Y-%X-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%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.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d"),c=b.print("%Y-%X-%d");return b.getMonth()>0&&(BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a||BI.parseDateTime(a,"%Y-%x").print("%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=a.print("%Y-%x-%e %H:%M:%S");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.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0).print("%Y-%X-%d %H:%M:%S");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",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:"circle-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_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.center_adapt",cls:"search-font",items:[{el:{type:"bi.icon"}}]},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_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.getValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},getLastValidValue:function(){return this.editor.getLastValidValue()},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_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:24})},_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",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_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_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:24})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.FileManagerButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-button_group",items:[]})},_init:function(){BI.FileManagerButtonGroup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget({type:"bi.button_tree",element:this,chooseType:BI.Selection.Multi,items:this._formatItems(b.items),layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_formatItems:function(a){this.options;return BI.each(a,function(a,b){b.children&&b.children.length>0?b.type="bi.file_manager_folder_item":b.type="bi.file_manager_file_item"}),a},setValue:function(a){this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getAllButtons:function(){return this.button_group.getAllButtons()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},populate:function(a){this.button_group.populate(this._formatItems(a))}}),BI.FileManagerButtonGroup.EVENT_CHANGE="FileManagerButtonGroup.EVENT_CHANGE",BI.shortcut("bi.file_manager_button_group",BI.FileManagerButtonGroup),BI.FileManager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager",el:{},items:[]})},_init:function(){BI.FileManager.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree;var c=BI.Tree.transformToTreeFormat(b.items);this.tree.initTree(c),this.selectedValues=[],this.nav=BI.createWidget({type:"bi.file_manager_nav",items:BI.deepClone(c)}),this.nav.on(BI.FileManagerNav.EVENT_CHANGE,function(b,c){if("-1"==b)a.populate({children:a.tree.toJSON()});else{var d=a.tree.search(c.attr("id"));a.populate(BI.extend({id:d.id},d.get("data"),{children:a.tree.toJSON(d)}))}a.setValue(a.selectedValues)}),this.list=BI.createWidget(b.el,{type:"bi.file_manager_list",items:c}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){if(b===BI.Events.CHANGE){var e=a.tree.search(d.attr("id"));a.populate(BI.extend({id:e.id},e.get("data"),{children:a.tree.toJSON(e)}))}else if(b===BI.Events.CLICK){var f=[];if(d instanceof BI.MultiSelectBar){var g=a.list.getValue();c=g.type===BI.Selection.All,f=BI.concat(g.assist,g.value)}else f=d.getAllLeaves();BI.each(f,function(b,d){c===!0?a.selectedValues.pushDistinct(d):a.selectedValues.remove(d)})}a.setValue(a.selectedValues)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.list,left:0,right:0,top:0,bottom:10},{el:this.nav,left:40,right:100,top:0}]})},setValue:function(a){this.selectedValues=a||[],this.list.setValue(this.selectedValues)},getValue:function(){var a=this.list.getValue(),b=a.type===BI.Selection.All?a.assist:a.value;return b.pushDistinctArray(this.selectedValues),b},_populate:function(a){this.list.populate(a)},getSelectedValue:function(){return this.nav.getValue()[0]},getSelectedId:function(){return this.nav.getId()[0]},populate:function(a){var b=BI.deepClone(a);this._populate(a.children),this.nav.populate(b)}}),BI.FileManager.EVENT_CHANGE="FileManager.EVENT_CHANGE",BI.shortcut("bi.file_manager",BI.FileManager),BI.FileManagerFileItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFileItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-file-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFileItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-file-font"},width:20},{el:{type:"bi.label",textAlign:"left",height:b.height,text:b.text,value:b.value}}]})},getAllLeaves:function(){return[this.options.value]},isSelected:function(){return this.checked.isSelected()},setSelected:function(a){this.checked.setSelected(a)}}),BI.FileManagerFileItem.EVENT_CHANGE="FileManagerFileItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_file_item",BI.FileManagerFileItem),BI.FileManagerFolderItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.FileManagerFolderItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-folder-item bi-list-item bi-border-bottom",height:30})},_init:function(){BI.FileManagerFolderItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checked=BI.createWidget({type:"bi.multi_select_bar",text:"",width:36,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button=BI.createWidget({type:"bi.text_button",textAlign:"left",height:b.height,text:b.text,value:b.value}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,b.value,a)}),this.tree=new BI.Tree,this.tree.initTree([{id:b.id,children:b.children}]),this.selectValue=[],BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-folder-font"},width:20},{el:this.button}]})},setAllSelected:function(a){this.checked.setSelected(a),this.selectValue=[]},setHalfSelected:function(a){this.checked.setHalfSelected(a),a||(this.selectValue=[])},setValue:function(a){var b=(this.options,!1),c=[];this.tree.traverse(function(d){d.isLeaf()&&(BI.contains(a,d.get("data").value)?c.push(d.get("data").value):b=!0)}),this.setAllSelected(c.length>0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),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.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.AbstractFilterItem=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-item bi-border-right bi-border-bottom"},isSelectedCondition:function(){return this.emptyItem&&this.emptyItem.isVisible()},setSelectedCondition:function(a){a&&(this.emptyItem||(this.emptyItem=BI.createWidget({type:"bi.absolute",height:40,cls:"filter-item-empty-item bi-border-top",items:[{el:{type:"bi.center_adapt",cls:"empty-filter-item-leaf"}}],hgap:10,vgap:5}),BI.createWidget({type:"bi.vertical",element:this,items:[this.emptyItem],scrolly:!1}))),this.emptyItem&&this.emptyItem.setVisible(a)}}),BI.extend(BI.AbstractFilterItem,{FILTER_OPERATION_FORMULA:1,FILTER_OPERATION_CONDITION:2,FILTER_OPERATION_CONDITION_AND:3,FILTER_OPERATION_CONDITION_OR:4,FILTER_OPERATION_FORMULA_AND:5,FILTER_OPERATION_FORMULA_OR:6}),!function(){var a=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-expander",el:{},popup:{}},render:function(){var a=this,b=this.options;return{type:"bi.filter_expander",el:b.el,popup:b.popup,id:b.id,value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}],ref:function(b){a.expander=b}}},populate:function(){this.expander.populate.apply(this.expander,arguments)},getValue:function(){var a=this.expander.getValue();return{filterType:a.type,filterValue:a.value,id:a.id}}});BI.shortcut("bi.and.or.filter.expander",a)}(),!function(){var a=BI.inherit(BI.AbstractFilterItem,{_constant:{EXPANDER_WIDTH:20},props:{baseCls:"bi-filter-item bi-filter-expander",el:{},popup:{}},render:function(){var a=this,b=this.options,c=b.el.value,d="";return d=c===BI.Filter.FILTER_TYPE.AND?BI.i18nText("BI-Basic_And"):BI.i18nText("BI-Basic_Or"),{type:"bi.horizontal_adapt",cls:"filter-item-empty-item",verticalAlign:BI.VerticalAlign.Middle,items:[{type:"bi.text_button",cls:"condition-and-or",text:d,value:c,id:b.id,width:this._constant.EXPANDER_WIDTH,height:"100%",ref:function(b){a.expander=b},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,"",a)}}]},BI.extend(b.popup,{ref:function(b){a.conditionsView=b},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})]}},getValue:function(){return{type:this.expander.getValue(),value:this.conditionsView.getValue(),id:this.options.id}},populate:function(){this.conditionsView.populate.apply(this.conditionsView,arguments)}});BI.shortcut("bi.filter_expander",a)}(),BI.Filter=BI.inherit(BI.Widget,{constants:{FIELD_TYPE_NUMBER:1,FIELD_TYPE_STRING:0,FIELD_TYPE_DATE:2},props:{baseCls:"bi-filter",expander:{},items:[],el:{},itemCreator:BI.empty},render:function(){var a=this,b=this.options;return BI.extend({type:"bi.filter_operation",expander:b.expander,listeners:[{eventName:"EVENT_OPERATION",action:function(b){switch(b){case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION);break;case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION,1);break;case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA);break;case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA,1)}}},{eventName:"BI.FilterOperation.EVENT_DESTROY_ITEM",action:function(b){a._removeCondition(b)}}],ref:function(b){a.filter=b}},b.el)},mounted:function(){this.tree=new BI.Tree,this.tree.initTree(this.options.items),this._populate(this.tree.toJSONWithNode())},_createEmptyNode:function(a){var b=new BI.Node(BI.UUID());return b.set("data",{value:a}),b},_insertAndOrCondition:function(a,b,c){var d=["AND","OR"];c||(c=0);var e=this.tree.search(a);if(BI.isNotNull(e)){var f=e.get("data"),g=e.getParent(),h=g.getChildIndex(e.id),i=g.get("data")||{},j=this._createEmptyNode(b);if(f.value===BI.Filter.FILTER_TYPE[d[c]])return void this.tree.addNode(e,j);if(f.value===BI.Filter.FILTER_TYPE[d[1-c]]&&i.value===BI.Filter.FILTER_TYPE[d[c]])return void g.addChild(j,h+1);if(f.value===BI.Filter.FILTER_TYPE[d[1-c]]&&i.value!==BI.Filter.FILTER_TYPE[d[c]]||i.value===BI.Filter.FILTER_TYPE[d[1-c]]||i.value!==BI.Filter.FILTER_TYPE.AND&&i.value!==BI.Filter.FILTER_TYPE.OR){var k=new BI.Node(BI.UUID());return k.set("data",{value:BI.Filter.FILTER_TYPE[d[c]],children:[e.get("data"),j.get("data")]}),g.removeChildByIndex(h),g.addChild(k,h),k.addChild(e),void k.addChild(j)}g.addChild(j,h+1)}},_removeCondition:function(a){var b=this.tree.search(a);if(BI.isNotNull(b)){var c=b.getParent();if(c.removeChild(a),c.getChildrenLength()<=1){var d=c.getParent();if(BI.isNotNull(d)){var e=d.getChildIndex(c.id);d.removeChildByIndex(e),1===c.getChildrenLength()&&d.addChild(c.getFirstChild(),e)}}this._populate(this.tree.toJSONWithNode()),this.fireEvent("EVENT_CHANGE")}},_addAndOrCondition:function(a,b){var c=["AND","OR"];b||(b=0);var d=this.filter.getCurrentSelectItem();if(BI.isNotNull(d)){var e=d.attr("id");this._insertAndOrCondition(e,a,b)}else{var f=this._createEmptyNode(a),g=this.tree.getRoot(),h=g.getLastChild();if(BI.isNotNull(h)){var i=h.get("data");if(i.value===BI.Filter.FILTER_TYPE[c[b]])this.tree.addNode(h,f);else{var j=new BI.Node(BI.UUID());j.set("data",{value:BI.Filter.FILTER_TYPE[c[b]],children:[h.get("data"),f.get("data")]}),g.removeChild(h.id),this.tree.addNode(j),this.tree.addNode(j,h),this.tree.addNode(j,f)}}else this.tree.addNode(f)}this._populate(this.tree.toJSONWithNode()),this.fireEvent("EVENT_CHANGE")},_populate:function(a){this.filter.defaultState();var b=this.options;b.items=a,BI.Tree.traversal(a,function(a,c){b.itemCreator(c)}),this.filter.populate.apply(this.filter,[a])},populate:function(a){this.tree.initTree(a),this._populate(this.tree.toJSONWithNode())},getValue:function(){return this.filter.getValue()}}),BI.shortcut("bi.filter",BI.Filter),BI.Filter.FILTER_TYPE={},BI.Filter.FILTER_TYPE.FORMULA=33,BI.Filter.FILTER_TYPE.AND=34,BI.Filter.FILTER_TYPE.OR=35,BI.Filter.FILTER_TYPE.EMPTY_FORMULA=36,BI.Filter.FILTER_TYPE.EMPTY_CONDITION=37,!function(){var a=BI.inherit(BI.ButtonTree,{props:{baseCls:"bi-button-map"},_createBtns:function(a){var b=this.options,c=BI.createWidgets(BI.createItems(a,{type:"bi.text_button",once:0===b.chooseType})),d=BI.map(a,function(a,b){if(b=BI.stripEL(b),!b.id&&!b.value)throw new Error("item must have 'id' or 'value' as its property");return b.id||b.value});return BI.zipObject(d,c)},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(a.contains(b)?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)):void c.setValue(a)})},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(a.contains(b)?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)):void c.setNotSelectedValue(a)})},populate:function(a){var b=this,c=[].slice.call(arguments),d=new BI.LinkHashMap,e=function(a){return a.id||a.value};this.buttons||(this.buttons={});var f=[];BI.each(a,function(a,d){if(d=BI.stripEL(d),b.buttons[e(d)]){var g=b.buttons[e(d)];c[0]=d.items,c[2]=d,g.populate&&g.populate.apply(g,c)}else f.push(d)}),c[0]=f;var g=this._btnsCreator.apply(this,c),h=[];BI.each(a,function(a,c){c=BI.stripEL(c);var f=b.buttons[e(c)]||g[e(c)];d.add(e(c),f),h.push(f)}),this.buttons=d.map,BI.DOM.hang(this.buttons),this.element.empty();var i=this._packageItems(a,this._packageBtns(h));BI.createWidget(BI.extend({element:this},this._packageLayout(i)))},getIndexByValue:function(){throw new Error("Can not use getIndexByValue")}});BI.shortcut("bi.filter_list",a)}(),!function(){var a=0,b=1,c=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(c.superclass._defaultConfig.apply(this,arguments),{constants:{FORMULA_COMBO:[{text:BI.i18nText("BI-Conf_Formula_And"),value:BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND},{text:BI.i18nText("BI-Conf_Formula_Or"),value:BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR}],CONDITION_COMBO:[{text:BI.i18nText("BI-Conf_Condition_And"),value:BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND},{text:BI.i18nText("BI-Conf_Condition_Or"),value:BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR}]}})},props:{baseCls:"bi-filter-operation",expander:{},items:[],selections:[BI.AbstractFilterItem.FILTER_OPERATION_CONDITION,BI.AbstractFilterItem.FILTER_OPERATION_FORMULA],itemsCreator:BI.emptyFn},render:function(){var c=this,d=this.options;return this.currentSelected=null,{type:"bi.vtape",items:[{el:{type:"bi.tab",showIndex:a,cardCreator:BI.bind(this._createTabs,this),ref:function(a){c.buttonComboTab=a}},height:40},{el:{type:"bi.absolute",scrollable:!0,items:[{el:{type:"bi.left",items:[{type:"bi.filter_pane",expander:d.expander,items:d.items,itemsCreator:d.itemsCreator,listeners:[{eventName:"EVENT_CHANGE",action:function(d,e,f){d===BI.Events.CLICK&&(BI.isNotNull(c.currentSelected)&&c.currentSelected===f?f.setSelectedCondition(!f.isSelectedCondition()):(BI.isNotNull(c.currentSelected)&&c.currentSelected.setSelectedCondition(!1),c.currentSelected=f,f.setSelectedCondition(!0)),c.currentSelected.isSelectedCondition()?c.buttonComboTab.setSelect(b):c.buttonComboTab.setSelect(a)),d===BI.Events.DESTROY&&(c.currentSelected===f&&(c.currentSelected=null,c.buttonComboTab.setSelect(a)),c.fireEvent("BI.FilterOperation.EVENT_DESTROY_ITEM",e,f))}}],ref:function(a){c.filter=a}}]},top:0,right:2,bottom:0,left:0}]}}]}},_createTabs:function(c){var d=this;switch(c){case a:return{type:"bi.button_group",items:BI.createItems(d._createButtons(),{type:"bi.icon_text_item",height:30,width:100}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_DEFAULT,layouts:[{type:"bi.left",vgap:5}],listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(a,b){BI.isEmptyArray(d.filter.getValue())&&d.filter.element.addClass("bi-border-top bi-border-left"),d.fireEvent("EVENT_OPERATION",b.getValue()),d.defaultState()}}]};case b:return{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_DEFAULT,items:d._buildOperationButton(),layouts:[{type:"bi.left",vgap:5}]}}},_createButtons:function(){var a=[];return BI.each(this.options.selections,function(b,c){switch(c){case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:a.push({text:BI.i18nText("BI-Conf_Add_Formula"),value:BI.AbstractFilterItem.FILTER_OPERATION_FORMULA,cls:"operation-trigger filter-formula-font"});break;case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:a.push({text:BI.i18nText("BI-Conf_Add_Condition"),value:BI.AbstractFilterItem.FILTER_OPERATION_CONDITION,cls:"operation-trigger filter-condition-font"})}}),a},_buildOperationButton:function(){var a=this,b=[];return BI.each(this.options.selections,function(c,d){var e="",f="",g=[];switch(d){case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:e=BI.i18nText("BI-Conf_Add_Formula"),f="filter-formula-font",g=a.options.constants.FORMULA_COMBO;break;case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:default:e=BI.i18nText("BI-Conf_Add_Condition"),f="filter-condition-font",g=a.options.constants.CONDITION_COMBO}var h=BI.createWidget({type:"bi.icon_text_icon_item",iconCls1:"operation-trigger "+f,iconCls2:"pull-down-font",text:e,height:30,width:100});b.push({type:"bi.combo",el:h,popup:{el:{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_NONE,items:BI.createItems(g,{type:"bi.single_select_item",height:25}),layouts:[{type:"bi.vertical"}]}},listeners:[{eventName:BI.Combo.EVENT_CHANGE,action:function(b,c){switch(BI.isEmptyArray(a.filter.getValue())&&a.filter.element.addClass("bi-border-top bi-border-left"),b){case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND:case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR:h.setText(BI.i18nText("BI-Conf_Add_Condition"));break;case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND:case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR:h.setText(BI.i18nText("BI-Conf_Add_Formula"));break;default:h.setText()}a.fireEvent("EVENT_OPERATION",c.getValue()),a.defaultState(),this.hideView()}}]})}),b},defaultState:function(){BI.isNotNull(this.currentSelected)&&this.currentSelected.setSelectedCondition(!1),this.buttonComboTab.setSelect(a)},getCurrentSelectItem:function(){ diff --git a/dist/case.js b/dist/case.js index ac71d1b18..9306eb031 100644 --- a/dist/case.js +++ b/dist/case.js @@ -14804,7 +14804,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { items: [{ el: { type: "bi.icon_change_button", - cls: "icon-combo-trigger-icon " + o.iconCls, + cls: "icon-combo-trigger-icon", + iconCls: o.iconCls, ref: function (_ref) { self.icon = _ref; }, @@ -14812,7 +14813,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { iconWidth: o.iconWidth, disableSelected: true }, - width: BI.isEmptyString(o.iconCls)? 0 : (o.triggerWidth || o.height) + width: BI.isEmptyString(o.iconCls) ? 0 : (o.triggerWidth || o.height) }, { el: this.text diff --git a/dist/core.css b/dist/core.css index 0ffc1ad4d..efda6c5de 100644 --- a/dist/core.css +++ b/dist/core.css @@ -394,6 +394,11 @@ textarea { .bi-border { border: 1px solid #d4dadd; } +.bi-border-radius { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} .bi-theme-dark .bi-border { border: 1px solid #525466; } @@ -741,7 +746,6 @@ textarea { } .bi-list-item-active.active { color: #3685f2; - background-color: #ffffff; } .bi-list-item-active.active .bi-input { color: #3685f2; diff --git a/dist/core_without_normalize.css b/dist/core_without_normalize.css index 30156f6df..81dd59a12 100644 --- a/dist/core_without_normalize.css +++ b/dist/core_without_normalize.css @@ -116,6 +116,11 @@ textarea { .bi-border { border: 1px solid #d4dadd; } +.bi-border-radius { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} .bi-theme-dark .bi-border { border: 1px solid #525466; } @@ -463,7 +468,6 @@ textarea { } .bi-list-item-active.active { color: #3685f2; - background-color: #ffffff; } .bi-list-item-active.active .bi-input { color: #3685f2; diff --git a/dist/demo.js b/dist/demo.js index 74f65fc1a..242b51e4f 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -2030,7 +2030,7 @@ Demo.IconTextValueCombo = BI.inherit(BI.Widget, { type: "bi.icon_text_value_combo", text: "默认值", // defaultIconCls: "next-page-h-font", - value: 23, + value: 1, width: 300, iconHeight: 16, iconWidth: 16, @@ -2191,7 +2191,7 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, { render: function () { var combo; return { - type: "bi.horizontal_auto", + type: "bi.vertical", items: [{ type: "bi.text_value_combo", ref: function () { @@ -2222,12 +2222,15 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, { value: ["1", "2", "3"] } }, { - type: "bi.button", + type: "bi.popup_view", width: 90, height: 25, handler: function () { combo.setValue(3); } + }, { + type: 'bi.label', + height: 1000 }], vgap: 20 }; diff --git a/dist/fineui.css b/dist/fineui.css index 8dfc00b4f..92196ea69 100644 --- a/dist/fineui.css +++ b/dist/fineui.css @@ -394,6 +394,11 @@ textarea { .bi-border { border: 1px solid #d4dadd; } +.bi-border-radius { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} .bi-theme-dark .bi-border { border: 1px solid #525466; } @@ -741,7 +746,6 @@ textarea { } .bi-list-item-active.active { color: #3685f2; - background-color: #ffffff; } .bi-list-item-active.active .bi-input { color: #3685f2; diff --git a/dist/fineui.js b/dist/fineui.js index 1b7ceaf4a..aaef62cb4 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -50661,7 +50661,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, { this.editor.replaceSelection("\u200b" + field + "\u200b"); var to = this.editor.getCursor(); this.editor.markText(from, to, {className: "fieldName", atomic: true, startStyle: "start", endStyle: "end"}); - this.editor.replaceSelection(" "); this.editor.focus(); }, @@ -51607,7 +51606,7 @@ BI.PopupView = BI.inherit(BI.Widget, { BI.PopupView.superclass._init.apply(this, arguments); var self = this, o = this.options; var fn = function (e) { - e.stopPropagation(); + e.stopEvent(); }, stop = function (e) { e.stopEvent(); return false; @@ -87531,7 +87530,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { items: [{ el: { type: "bi.icon_change_button", - cls: "icon-combo-trigger-icon " + o.iconCls, + cls: "icon-combo-trigger-icon", + iconCls: o.iconCls, ref: function (_ref) { self.icon = _ref; }, @@ -87539,7 +87539,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { iconWidth: o.iconWidth, disableSelected: true }, - width: BI.isEmptyString(o.iconCls)? 0 : (o.triggerWidth || o.height) + width: BI.isEmptyString(o.iconCls) ? 0 : (o.triggerWidth || o.height) }, { el: this.text diff --git a/dist/fineui.min.css b/dist/fineui.min.css index 58b1f24de..61e2b3f8b 100644 --- a/dist/fineui.min.css +++ b/dist/fineui.min.css @@ -1 +1 @@ -/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.cm-em,dfn{font-style:italic}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.b-font,body,i{-moz-osx-font-smoothing:grayscale}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}button,html,input,select,textarea{font-family:sans-serif}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#9ea6b2!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}.bi-search-editor .circle-close-font,.bi-search-editor .search-font,.bi-search-text-value-combo .trigger-icon-button{font-size:16px}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{outline:0;text-decoration:none}a:focus{outline:0}input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-ms-clear{display:none}input,textarea{margin:0;padding:0;outline:0;border:1px solid #d4dadd}ul{list-style:disc}li{list-style-type:none}i{-webkit-font-smoothing:antialiased}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#f7f8fa;color:#3d4d66}.bi-background .bi-input,.bi-background .bi-textarea{color:#3d4d66}.bi-theme-dark .bi-background{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#3d4d66}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea{color:#9ea6b2}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#c4c9d1}.bi-border{border:1px solid #d4dadd}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#faaa39}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3685f2}.bi-error,.bi-error .bi-input,.bi-error .bi-textarea{color:#ff4949}.bi-error-background,.bi-error-background .bi-input,.bi-error-background .bi-textarea,.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-background{background-color:#3685f2;color:#fff}.bi-error-background{background-color:#ff4949}.bi-high-light-border{border-color:#3685f2}.bi-water-mark{color:#c4c9d1;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#c4c9d1}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(54,133,242,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d3685f2, endColorstr=#0d3685f2)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #3685f2}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3685f2}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(54,133,242,.06);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2, endColorstr=#0f3685f2)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-list-item-active:active{color:#3685f2}.bi-list-item-active.active{background-color:#fff}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3685f2;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3685f2;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3685f2;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(54,133,242,.06);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2, endColorstr=#0f3685f2)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3685f2}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.button-success.active,.bi-list-item-select.button-success:active{color:#fff;background-color:#13cd66}.bi-list-item-select.button-success.active .bi-high-light,.bi-list-item-select.button-success.active .bi-input,.bi-list-item-select.button-success.active .bi-textarea,.bi-list-item-select.button-success:active .bi-high-light,.bi-list-item-select.button-success:active .bi-input,.bi-list-item-select.button-success:active .bi-textarea{color:#fff}.bi-list-item-select.button-warning,.bi-list-item-select.button-warning .bi-high-light,.bi-list-item-select.button-warning .bi-input,.bi-list-item-select.button-warning .bi-textarea,.bi-list-item-select.button-warning.hover .bi-high-light,.bi-list-item-select.button-warning.hover .bi-input,.bi-list-item-select.button-warning.hover .bi-textarea,.bi-list-item-select.button-warning:hover .bi-high-light,.bi-list-item-select.button-warning:hover .bi-input,.bi-list-item-select.button-warning:hover .bi-textarea{color:#ff4949}.bi-list-item-select.button-success.active.bi-high-light-border,.bi-list-item-select.button-success:active.bi-high-light-border{border-color:#13cd66}.bi-list-item-select.button-warning.active.bi-high-light-border,.bi-list-item-select.button-warning.bi-high-light-border,.bi-list-item-select.button-warning.hover.bi-high-light-border,.bi-list-item-select.button-warning:active.bi-high-light-border,.bi-list-item-select.button-warning:hover.bi-high-light-border{border-color:#e85050}.bi-list-item-select.button-warning.hover,.bi-list-item-select.button-warning:hover{color:#ff4949;background-color:#ffecec}.bi-list-item-select.button-warning.active,.bi-list-item-select.button-warning:active{color:#fff;background-color:#ff4949}.bi-list-item-select.button-warning.active .bi-high-light,.bi-list-item-select.button-warning.active .bi-input,.bi-list-item-select.button-warning.active .bi-textarea,.bi-list-item-select.button-warning:active .bi-high-light,.bi-list-item-select.button-warning:active .bi-input,.bi-list-item-select.button-warning:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-select.disabled.bi-high-light-border,.bi-list-item-select.disabled:active.bi-high-light-border,.bi-list-item-select.disabled:hover.bi-high-light-border{border-color:#ccc}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3685f2}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.CodeMirror-crosshair,.farbtastic *{cursor:crosshair}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-center{text-align:center}.horizon-left{text-align:left}.border-sizing{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-flex-align:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-ms-flex-align:end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-vertical-center.stretch{-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-ms-flex-align:stretch;-o-align-items:stretch;align-items:stretch}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper.stretch{width:100%;-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-o-align-items:stretch;align-items:stretch}.bi-inline-center-adapt-layout:after,.bi-inline-vertical-adapt-layout:after{display:inline-block;width:0;min-height:100%;vertical-align:middle;content:' '}.bi-theme-dark{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-search-text-value-combo.combo-error .bi-search-text-value-trigger .bi-text-button,.bi-text-value-combo.combo-error .bi-select-text-trigger .select-text-label{color:#ff4949}.bi-color-chooser-popup .disable-mask{opacity:.5;filter:alpha(opacity=50);background-color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.farbtastic{position:relative}.farbtastic *{position:absolute}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{width:195px;height:195px}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important;z-index:10000000}.bi-bubble-combo .bubble-combo-triangle-left{z-index:1;position:absolute;width:5px;height:16px;border-left:1px solid #f5f5f5}.bi-bubble-combo .bubble-combo-triangle-left:before{position:absolute;left:0;top:0;right:0;border-left:7px solid #ccc;border-top:8px solid transparent;border-bottom:8px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-left:after{position:absolute;top:1px;left:1px;right:0;border-bottom:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-right:after,.bi-bubble-combo .bubble-combo-triangle-right:before{right:0;border-top:7px solid transparent;border-bottom:8px solid transparent;content:"";position:absolute;top:0;bottom:0}.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;position:absolute;width:7px;height:16px}.bi-bubble-combo .bubble-combo-triangle-right:before{border-right:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-right:after{border-right:7px solid #fff}.bi-bubble-combo .bubble-combo-triangle-top{z-index:1;position:absolute;width:16px;height:10px;border-top:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-top:after{position:absolute;right:1px;top:0;border-top:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-bottom:before,.bi-bubble-combo .bubble-combo-triangle-top:before{border-left:8px solid transparent;border-right:8px solid transparent;content:"";position:absolute}.bi-bubble-combo .bubble-combo-triangle-top:before{border-top:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom{z-index:1;position:absolute;width:16px;height:5px;border-bottom:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-bottom:before{top:0;right:0;bottom:0;border-bottom:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-combo.bi-combo-popup{display:block!important;visibility:visible!important}.bi-search-text-value-combo .trigger-up{display:none}.bi-search-text-value-combo .trigger-down,.bi-search-text-value-combo.combo-show .trigger-up{display:block}.bi-search-text-value-combo.combo-show .trigger-down{display:none}.bi-search-editor{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.bi-display-tree .ztree li a:hover,.ztree li a{text-decoration:none}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{display:inline-block;color:#fff;background:#3685f2;padding:0 5px;margin:1px}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3685f2}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;z-index:1000000000}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:14px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-close,.bi-message-content{font-size:16px}.bi-message-animate{-webkit-transition:opacity .3s,transform .4s,-webkit-transform .4s;-moz-transition:opacity .3s,transform .4s,-webkit-transform .4s;-o-transition:opacity .3s,transform .4s,-webkit-transform .4s;transition:opacity .3s,transform .4s,-webkit-transform .4s}.bi-message-enter{opacity:1}.bi-message-leave{opacity:0;transform:translateY(-100%)}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title{background-color:#F2F4F7}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev,.bi-rich-editor-text-toolbar .text-toolbar-button{font-size:16px}.bi-sortable-holder{border:1px dashed #d4dadd}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-rich-editor .rich-editor-param{-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}#body .bi-button,body .bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #3685f2;background-color:#3685f2;text-align:center;vertical-align:middle;cursor:pointer}#body .bi-button.clear,#body .bi-button.ghost,body .bi-button.clear,body .bi-button.ghost{font-size:inherit;background-color:transparent}#body .bi-button.block,body .bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}#body .bi-button.clear,body .bi-button.clear{border-width:0}#body .bi-button.clear:hover,body .bi-button.clear:hover{opacity:.9;filter:alpha(opacity=90)}#body .bi-button.clear:active,body .bi-button.clear:active{opacity:.8;filter:alpha(opacity=80)}#body .bi-button.button-common,#body .bi-button.button-common .b-font:before,body .bi-button.button-common,body .bi-button.button-common .b-font:before{color:#fff}#body .bi-button.button-common.clear,#body .bi-button.button-common.clear .b-font:before,#body .bi-button.button-common.ghost,#body .bi-button.button-common.ghost .b-font:before,body .bi-button.button-common.clear,body .bi-button.button-common.clear .b-font:before,body .bi-button.button-common.ghost,body .bi-button.button-common.ghost .b-font:before{color:#3685f2}#body .bi-button.button-common.ghost:hover,body .bi-button.button-common.ghost:hover{color:#fff;background-color:#3685f2}#body .bi-button.button-common.ghost:active,body .bi-button.button-common.ghost:active{background-color:#3685f2}#body .bi-button.button-ignore,body .bi-button.button-ignore{background-color:#fff;border-color:#3685f2}#body .bi-button.button-ignore,#body .bi-button.button-ignore .b-font:before,body .bi-button.button-ignore,body .bi-button.button-ignore .b-font:before{color:#3685f2}#body .bi-button.button-ignore.clear,body .bi-button.button-ignore.clear{background-color:transparent;border-width:0}#body .bi-button.button-success,body .bi-button.button-success{background-color:#13cd66;border-color:#13cd66}#body .bi-button.button-success,#body .bi-button.button-success .b-font:before,body .bi-button.button-success,body .bi-button.button-success .b-font:before{color:#fff}#body .bi-button.button-success.clear,body .bi-button.button-success.clear{background-color:transparent;border-width:0}#body .bi-button.button-success.clear,#body .bi-button.button-success.clear .b-font:before,body .bi-button.button-success.clear,body .bi-button.button-success.clear .b-font:before{color:#13cd66}#body .bi-button.button-warning,body .bi-button.button-warning{background-color:#faaa39;border-color:#fbb03b}#body .bi-button.button-warning,#body .bi-button.button-warning .b-font:before,body .bi-button.button-warning,body .bi-button.button-warning .b-font:before{color:#fff}#body .bi-button.button-warning.clear,body .bi-button.button-warning.clear{background-color:transparent;border-width:0}#body .bi-button.button-warning.clear,#body .bi-button.button-warning.clear .b-font:before,body .bi-button.button-warning.clear,body .bi-button.button-warning.clear .b-font:before{color:#faaa39}#body .bi-button.button-error,body .bi-button.button-error{background-color:#ff4949;border-color:#e85050}#body .bi-button.button-error,#body .bi-button.button-error .b-font:before,body .bi-button.button-error,body .bi-button.button-error .b-font:before{color:#fff}#body .bi-button.button-error.clear,body .bi-button.button-error.clear{background-color:transparent;border-width:0}#body .bi-button.button-error.clear,#body .bi-button.button-error.clear .b-font:before,body .bi-button.button-error.clear,body .bi-button.button-error.clear .b-font:before{color:#ff4949}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled .b-font:before,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-common.disabled.base-disabled .b-font:before,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled .b-font:before,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-error.disabled.base-disabled .b-font:before,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled .b-font:before,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-success.disabled.base-disabled .b-font:before,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled .b-font:before,#body .bi-button.button-warning.disabled.base-disabled,#body .bi-button.button-warning.disabled.base-disabled .b-font:before,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled .b-font:before,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-common.disabled.base-disabled .b-font:before,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled .b-font:before,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-error.disabled.base-disabled .b-font:before,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled .b-font:before,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-success.disabled.base-disabled .b-font:before,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled .b-font:before,body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-common.disabled.clear .b-font:before,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-error.disabled.clear .b-font:before,#body .bi-button.button-ignore.disabled,#body .bi-button.button-ignore.disabled .b-font:before,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-ignore.disabled.clear .b-font:before,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-success.disabled.clear .b-font:before,#body .bi-button.button-warning.disabled.clear,#body .bi-button.button-warning.disabled.clear .b-font:before,body .bi-button.button-common.disabled.clear,body .bi-button.button-common.disabled.clear .b-font:before,body .bi-button.button-error.disabled.clear,body .bi-button.button-error.disabled.clear .b-font:before,body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled .b-font:before,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-ignore.disabled.clear .b-font:before,body .bi-button.button-success.disabled.clear,body .bi-button.button-success.disabled.clear .b-font:before,body .bi-button.button-warning.disabled.clear,body .bi-button.button-warning.disabled.clear .b-font:before{color:#9ea6b2!important}#body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-warning.disabled.clear,body .bi-button.button-common.disabled.clear,body .bi-button.button-error.disabled.clear,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-success.disabled.clear,body .bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}#body .bi-button.button-common.disabled.clear:active,#body .bi-button.button-common.disabled.clear:hover,#body .bi-button.button-error.disabled.clear:active,#body .bi-button.button-error.disabled.clear:hover,#body .bi-button.button-ignore.disabled.clear:active,#body .bi-button.button-ignore.disabled.clear:hover,#body .bi-button.button-success.disabled.clear:active,#body .bi-button.button-success.disabled.clear:hover,#body .bi-button.button-warning.disabled.clear:active,#body .bi-button.button-warning.disabled.clear:hover,body .bi-button.button-common.disabled.clear:active,body .bi-button.button-common.disabled.clear:hover,body .bi-button.button-error.disabled.clear:active,body .bi-button.button-error.disabled.clear:hover,body .bi-button.button-ignore.disabled.clear:active,body .bi-button.button-ignore.disabled.clear:hover,body .bi-button.button-success.disabled.clear:active,body .bi-button.button-success.disabled.clear:hover,body .bi-button.button-warning.disabled.clear:active,body .bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-warning.disabled.ghost,body .bi-button.button-common.disabled.ghost,body .bi-button.button-error.disabled.ghost,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-success.disabled.ghost,body .bi-button.button-warning.disabled.ghost{background:0 0!important;border-color:#3685f2!important;opacity:.5;filter:alpha(opacity=50)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-common.disabled.ghost .b-font:before,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-error.disabled.ghost .b-font:before,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost .b-font:before,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-success.disabled.ghost .b-font:before,#body .bi-button.button-warning.disabled.ghost,#body .bi-button.button-warning.disabled.ghost .b-font:before,body .bi-button.button-common.disabled.ghost,body .bi-button.button-common.disabled.ghost .b-font:before,body .bi-button.button-error.disabled.ghost,body .bi-button.button-error.disabled.ghost .b-font:before,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-ignore.disabled.ghost .b-font:before,body .bi-button.button-success.disabled.ghost,body .bi-button.button-success.disabled.ghost .b-font:before,body .bi-button.button-warning.disabled.ghost,body .bi-button.button-warning.disabled.ghost .b-font:before{color:#3685f2!important}.bi-basic-button.button-common:hover .bi-button-mask,.bi-basic-button.button-error:hover .bi-button-mask,.bi-basic-button.button-ignore:hover .bi-button-mask,.bi-basic-button.button-success:hover .bi-button-mask,.bi-basic-button.button-warning:hover .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#fff}.bi-basic-button.button-common:active .bi-button-mask,.bi-basic-button.button-error:active .bi-button-mask,.bi-basic-button.button-ignore:active .bi-button-mask,.bi-basic-button.button-success:active .bi-button-mask,.bi-basic-button.button-warning:active .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#1a1a1a}.bi-basic-button .popup-content{font-size:14px}.bi-theme-dark #body .bi-button.button-common.ghost,.bi-theme-dark #body .bi-button.button-common.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.ghost,.bi-theme-dark body .bi-button.button-common.ghost .b-font:before{color:#fff;border-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:hover,.bi-theme-dark body .bi-button.button-common.ghost:hover{color:#3d4d66;background-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:active,.bi-theme-dark body .bi-button.button-common.ghost:active{background-color:rgba(255,255,255,.9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#e6ffffff, endColorstr=#e6ffffff)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost{background:0 0!important;border-color:#fff!important;opacity:.5;filter:alpha(opacity=50)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark #body .bi-button.button-common.disabled.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost .b-font:before{color:#fff!important}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3685f2}.bi-switch{-webkit-border-radius:40px 40px 40px 40px;-moz-border-radius:40px;border-radius:40px;background-color:#d4dadd}.bi-switch.active,.bi-switch:active{background-color:#3685f2}.bi-switch .circle-button{-webkit-border-radius:9px 9px 9px 9px;-moz-border-radius:9px;border-radius:9px}.bi-code-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3685f2;display:inline-block}.bi-code-editor .error-param{color:#ff4949;padding:0 5px;margin:1px;display:inline-block}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-dynamic-date-combo .date-font,.bi-toast .toast-icon,.bi-trigger .bi-trigger-icon-button{font-size:16px}.x-icon.b-font{margin:auto;width:100%}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input,.bi-textarea{border:none;outline:0;background-color:transparent;padding:0;margin:0;width:100%;height:100%}.bi-input.bi-input-focus,.bi-textarea.bi-input-focus{border:none}.bi-input.bi-input-error,.bi-textarea.bi-input-error{border:none;color:#ff4949!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px}.bi-bubble .bubble-error{background:#ffecec;color:#ff4949}.bi-bubble .bubble-common{background:#eaf2fd;color:#3685f2}.bi-bubble .bubble-success{background:#e1f4e7;color:#13cd66}.bi-bubble .bubble-warning{background:#feeed7;color:#faaa39}.bi-tip{position:fixed!important}.bi-toast{color:#fff;max-width:400px;min-width:150px;border-radius:2px}.bi-toast.toast-success{background:#13cd66}.bi-toast.toast-warning{background:#faaa39}.bi-toast.toast-error{background:#ff4949}.bi-toast.toast-normal{background:#3685f2}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px;color:#fff}.bi-tooltip.tooltip-success{background:#647185;border:1px solid #647185}.bi-tooltip.tooltip-warning{background:#ff4949;border:1px solid #e85050}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-sql-editor .cm-s-default .cm-function,.bi-sql-editor .cm-s-default .cm-keyword,.bi-sql-editor .cm-s-default span[class*="#"]{color:#3685f2}.bi-sql-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3685f2;display:inline-block}.CodeMirror-hints .sql-fr-function,.CodeMirror-hints .sql-keyword{color:#3685f2}.bi-collection-table-cell{box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3685f2}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#13cd66}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3685f2}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#13cd66}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3685f2}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-filter-expander>table,.bi-filter-pane,.bi-multilayer-select-level-tree .tree-view,.bi-multilayer-single-level-tree .tree-view{min-width:100%}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.ztree li a,.ztree li span.button{cursor:pointer;display:inline-block}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li a{padding:1px 3px 0 0;margin:0;height:24px;background-color:transparent;vertical-align:top}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;border:0;outline:0;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll}.bi-popup-view .list-view-toolbar,.bi-year-popup .year-popup-navigation{line-height:30px}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.noline_docu,.ztree li span.button.root_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;display:inline-block;padding:0;margin:2px 0 0 1px;border:0;position:absolute;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-110px -80px}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}body,html{height:100%}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)}.bi-trigger .trigger-up{display:none}.bi-combo-popup>.bi-trigger .trigger-up,.bi-trigger .trigger-down{display:block}.bi-combo-popup>.bi-trigger .trigger-down,.bi-multi-select-combo .trigger-up{display:none}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-date-trigger,.bi-filter-pane{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-popup-view .list-view-shadow{-webkit-box-shadow:0 1px 5px 0 rgba(26,26,26,.2);-moz-box-shadow:0 1px 5px 0 rgba(26,26,26,.2);box-shadow:0 1px 5px 0 rgba(26,26,26,.2)}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-date-trigger{border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text,.bi-down-list-popup .list-group-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#f7f8fa;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191B2B;color:#999}.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf{border:1px dashed #3685f2;background:#eaf2fd}.bi-filter-expander{min-width:100%;border-right:0;border-bottom:0}.bi-filter-expander>.filter-item-empty-item{border-top:0;border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-filter-expander>table>tbody>tr>td.first-element{width:20px;border-right:1px solid #d4dadd!important;border-bottom:1px solid #d4dadd!important}.bi-theme-dark .bi-filter-expander>.filter-item-empty-item{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-filter-expander>table>tbody>tr>td.first-element{border-right:1px solid #525466!important;border-bottom:1px solid #525466!important}.bi-filter-operation .operation-trigger.hover,.bi-filter-operation .operation-trigger:hover{color:#13cd66}.bi-filter-pane{border-radius:2px}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#faaa39}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-interval-slider-label{min-height:50px}.bi-interval-slider{min-height:70px}.bi-month-trigger,.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .multidate-popup-label{color:#3685f2;font-size:14px}.bi-multidate-popup .multidate-popup-item.active,.bi-multidate-popup .multidate-popup-item:active{background-color:#3685f2;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .multidate-popup-button{color:#3685f2;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-select-insert-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-multi-select-combo .trigger-down,.bi-multi-select-combo.combo-show .trigger-up{display:block}.bi-multi-select-combo.combo-show .trigger-down,.bi-multi-select-insert-combo .trigger-up{display:none}.bi-multi-select-insert-combo .trigger-down,.bi-multi-select-insert-combo.combo-show .trigger-up{display:block}.bi-multi-select-insert-combo.combo-show .trigger-down,.bi-multi-tree-combo .trigger-up{display:none}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#ff4949}.bi-multi-select-check-selected-button{z-index:1;min-width:16px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3685f2}.bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-combo .trigger-down,.bi-multi-tree-combo.combo-show .trigger-up{display:block}.bi-multi-tree-combo.combo-show .trigger-down,.bi-search-multi-text-value-combo .trigger-up{display:none}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3685f2;z-index:1}.bi-number-editor{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-number-interval .number-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-number-interval .number-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-search-multi-text-value-combo .multi-select-trigger-icon-button,.bi-single-select-combo .single-select-trigger-icon-button{font-size:16px}.bi-number-interval.number-error .bi-input{color:#ff4949!important}.bi-date-interval.time-error .bi-input,.bi-date-interval.time-error .sign-editor-text,.bi-search-multi-text-value-combo.combo-error .bi-multi-select-searcher .tip-text-style,.bi-time-interval.time-error .bi-date-time-trigger .bi-input,.bi-time-interval.time-error .bi-date-time-trigger .sign-editor-text,.bi-year-month-interval.time-error .bi-input,.bi-year-month-interval.time-error .sign-editor-text{color:#ff4949}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#f7f8fa}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191B2B}.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-search-multi-text-value-combo .trigger-down,.bi-search-multi-text-value-combo.combo-show .trigger-up{display:block}.bi-search-multi-text-value-combo.combo-show .trigger-down,.bi-single-select-combo .trigger-up{display:none}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-select-combo .trigger-down,.bi-single-select-combo.combo-show .trigger-up{display:block}.bi-single-select-combo.combo-show .trigger-down{display:none}.bi-single-slider-label{min-height:50px}.bi-single-slider-normal{min-height:30px}.bi-single-slider{min-height:50px}.bi-single-slider-button .slider-button{cursor:ew-resize;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider-track .gray-track{background-color:#F2F4F7;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-slider-track .blue-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-slider-track .disabled-blue-track{background-color:#d0d4da;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-time-interval .bi-date-time-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}html{overflow:hidden}body{position:absolute;width:100%;margin:0;padding:0;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#3d4d66;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;text-decoration:none;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.farbtastic .wheel{background:url(resources?path=/com/fr/web/ui/images/1x/background/wheel.png) center center no-repeat}.farbtastic .overlay{background:url(resources?path=/com/fr/web/ui/images/1x/background/mask.png) center center no-repeat}.farbtastic .marker{background:url(resources?path=/com/fr/web/ui/images/1x/background/marker.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.center_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.roots_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.bottom_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.ztree li ul.line{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_active.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.root_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.ztree li span.button.root_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.ztree li span.button.roots_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.ztree li span.button.roots_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.ztree li span.button.center_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.ztree li span.button.center_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.ztree li span.button.bottom_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.ztree li span.button.bottom_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.ztree li span.button.roots_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.ztree li span.button.center_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.ztree li span.button.bottom_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.ztree li span.button.ico_loading{background:url(resources?path=/com/fr/web/ui/images/1x/icon/loading.gif) center center no-repeat}.base-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.first-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.mid-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.last-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.loading-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(resources?path=/com/fr/web/ui/images/1x/background/auto_color.png) center center no-repeat}.auto-color-normal-background{background:url(resources?path=/com/fr/web/ui/images/1x/background/auto_color_normal.png) center center no-repeat}.trans-color-background{background:url(resources?path=/com/fr/web/ui/images/1x/background/trans_color.png) center center no-repeat}@font-face{font-family:bi;src:url(resources?path=/com/fr/web/ui/font/iconfont.eot);src:url(resources?path=/com/fr/web/ui/font/iconfont.eot?#iefix) format('embedded-opentype'),url(resources?path=/com/fr/web/ui/font/iconfont.woff) format('woff'),url(resources?path=/com/fr/web/ui/font/iconfont.ttf) format('truetype'),url(resources?path=/com/fr/web/ui/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:hover .b-font:before{content:"\e6d0";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e6d0";color:#3f8ce8}.close-ha-font.disabled .b-font:before{content:"\e6d0";color:inherit}.circle-close-font .b-font:before,.circle-close-font.disabled .b-font:before{content:"\e6d5";color:inherit}.search-close-h-font .b-font:before{content:"\e6d0";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e6d0";color:#ff4949}.search-close-h-font.disabled .b-font:before{content:"\e6d0";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e70d";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e70c";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before{content:"\e6dc";color:inherit}.date-font .b-font:before,.date-font.disabled .b-font:before{content:"\e733";color:inherit}.date-change-h-font .b-font:before,.date-change-h-font.disabled .b-font:before,.date-change-h-font.hover .b-font:before,.date-change-h-font:hover .b-font:before{content:"\e72f";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-h-font .b-font:before{content:"\e762";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:hover .b-font:before{content:"\e762";color:inherit}.dot-h-font.disabled .b-font:before{content:"\e762";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e762";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e762";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before{content:"\e762";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:hover .b-font:before{content:"\e762";color:#999}.dot-e-font:active .b-font:before{content:"\e762";color:#3685f2}.dot-e-font.active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font.disabled .b-font:before{content:"\e762";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e70c";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before{content:"\e70c";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before{content:"\e70c";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-h-font .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-h-font.disabled .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font.disabled .b-font:before{content:"\e6bd";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e6cf";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before{content:"\e6cf";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before{content:"\e6cf";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6d9";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6d8";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6d6";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6d7";color:inherit}.expander-right-font .b-font:before,.expander-right-font.disabled .b-font:before{content:"\e6d8";color:inherit}.expander-down-font .b-font:before,.expander-down-font.disabled .b-font:before{content:"\e6d7";color:inherit}.solid-triangle-top-font .b-font:before,.solid-triangle-top-font.disabled .b-font:before,.solid-triangle-top-font.hover .b-font:before,.solid-triangle-top-font:hover .b-font:before{content:"\e6d6";color:inherit}.solid-triangle-bottom-font .b-font:before,.solid-triangle-bottom-font.disabled .b-font:before,.solid-triangle-bottom-font.hover .b-font:before,.solid-triangle-bottom-font:hover .b-font:before{content:"\e6d7";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e64e";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e64e";color:#3685f2}.trigger-triangle-font.disabled .b-font:before{content:"\e64e";color:#999}.pull-up-font .b-font:before,.pull-up-font.disabled .b-font:before{content:"\e70a";color:inherit}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-h-font .b-font:before{content:"\e70b";color:#647185}.pull-down-h-font.hover .b-font:before,.pull-down-h-font:hover .b-font:before{content:"\e70b";color:inherit}.pull-down-h-font.disabled .b-font:before,.pull-down-ha-font .b-font:before{content:"\e70b";color:#647185}.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e70b";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e70b";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before{content:"\e70b";color:#647185}.check-font .b-font:before,.check-font.disabled .b-font:before{content:"\e6cf";color:#3685f2}.item-check-font .b-font:before{content:"\e6cf";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:hover .b-font:before{content:"\e6cf";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.item-check-font.disabled .b-font:before{content:"\e6cf";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font:hover .b-font:before{content:"\e740";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before{content:"\e6d0";color:#faaa39}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:hover .b-font:before{content:"\e75e";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e75e";color:#3f8ce8}.less-font.disabled .b-font:before{content:"\e75e";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:hover .b-font:before{content:"\e761";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e761";color:#3f8ce8}.less-equal-font.disabled .b-font:before{content:"\e761";color:inherit}.text-bold-font .b-font:before,.text-bold-font.disabled .b-font:before{content:"\e75b";color:inherit}.text-italic-font .b-font:before,.text-italic-font.disabled .b-font:before{content:"\e75c";color:inherit}.text-underline-font .b-font:before,.text-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-color-font .b-font:before,.text-color-font.disabled .b-font:before{content:"\e75a";color:inherit}.text-background-font .b-font:before,.text-background-font.disabled .b-font:before{content:"\e758";color:inherit}.text-color-underline-font .b-font:before,.text-color-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-align-left-font .b-font:before,.text-align-left-font.disabled .b-font:before{content:"\e6ca";color:inherit}.text-align-center-font .b-font:before,.text-align-center-font.disabled .b-font:before{content:"\e6bf";color:inherit}.text-align-right-font .b-font:before,.text-align-right-font.disabled .b-font:before{content:"\e6c8";color:inherit}.toast-error-font .b-font:before,.toast-error-font.disabled .b-font:before{content:"\e757";color:inherit}.toast-success-font .b-font:before,.toast-success-font.disabled .b-font:before{content:"\e756";color:inherit}.toast-warning-font .b-font:before,.toast-warning-font.disabled .b-font:before{content:"\e755";color:inherit}.toast-message-font .b-font:before,.toast-message-font.disabled .b-font:before{content:"\e74b";color:inherit}.text-add-tip-font .b-font:before,.text-add-tip-font.disabled .b-font:before{content:"\e6dd";color:#13cd66}.tree-collapse-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_1.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_1.png) center center no-repeat}.tree-collapse-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_2.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_2.png) center center no-repeat}.tree-collapse-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_3.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_3.png) center center no-repeat}.tree-collapse-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_4.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_4.png) center center no-repeat}.tree-expand-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_1.png) center center no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_1.png) center center no-repeat}.tree-expand-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_2.png) center center no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_2.png) center center no-repeat}.tree-expand-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_3.png) center center no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_3.png) center center no-repeat}.tree-expand-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_4.png) center center no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_4.png) center center no-repeat}.tree-vertical-line-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.tree-vertical-line-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.tree-vertical-line-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.check-box-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon:active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon:active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_active.png) center center no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_active.png) center center no-repeat}.check-box-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_disable.png) center center no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_disable.png) center center no-repeat}.check-box-icon.disabled.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_disable2.png) center center no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_disable2.png) center center no-repeat}.radio-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.hover .x-icon,.radio-icon:hover .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon:active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon:active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_active.png) center center no-repeat;background-size:contain}.radio-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_active.png) center center no-repeat}.radio-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_disable.png) center center no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_disable.png) center center no-repeat}.radio-icon.disabled.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_disable2.png) center center no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_disable2.png) center center no-repeat}.check-half-select-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/half_selected.png) center center no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png) center center no-repeat}.slider-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/slider_normal_small.png) center center no-repeat}.slider-icon.hover .x-icon,.slider-icon:hover .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/slider_active_small.png) center center no-repeat;background-size:contain}.slider-icon.hover .x-icon.hack,.slider-icon:hover .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/slider_active_small.png) center center no-repeat}.slider-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/slider_normal_small.png) center center no-repeat}.auto-color-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/auto_normal.png) center center no-repeat;background-size:contain}.auto-color-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/auto_normal.png) center center no-repeat}.auto-color-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/auto_select.png) center center no-repeat;background-size:contain}.auto-color-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/auto_select.png) center center no-repeat}.auto-color-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/auto_disable.png) center center no-repeat;background-size:contain}.auto-color-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/auto_disable.png) center center no-repeat}.trans-color-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/trans_normal.png) center center no-repeat;background-size:contain}.trans-color-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/trans_normal.png) center center no-repeat}.trans-color-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/trans_select.png) center center no-repeat;background-size:contain}.trans-color-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/trans_select.png) center center no-repeat}.trans-color-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/trans_disable.png) center center no-repeat;background-size:contain}.trans-color-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/trans_disable.png) center center no-repeat} \ No newline at end of file +/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.cm-em,dfn{font-style:italic}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.b-font,body,i{-moz-osx-font-smoothing:grayscale}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}button,html,input,select,textarea{font-family:sans-serif}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#9ea6b2!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}.bi-search-editor .circle-close-font,.bi-search-editor .search-font,.bi-search-text-value-combo .trigger-icon-button{font-size:16px}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{outline:0;text-decoration:none}a:focus{outline:0}input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-ms-clear{display:none}input,textarea{margin:0;padding:0;outline:0;border:1px solid #d4dadd}ul{list-style:disc}li{list-style-type:none}i{-webkit-font-smoothing:antialiased}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#f7f8fa;color:#3d4d66}.bi-background .bi-input,.bi-background .bi-textarea{color:#3d4d66}.bi-theme-dark .bi-background{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#3d4d66}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea{color:#9ea6b2}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#c4c9d1}.bi-border{border:1px solid #d4dadd}.bi-border-radius{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#faaa39}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3685f2}.bi-error,.bi-error .bi-input,.bi-error .bi-textarea{color:#ff4949}.bi-error-background,.bi-error-background .bi-input,.bi-error-background .bi-textarea,.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-background{background-color:#3685f2;color:#fff}.bi-error-background{background-color:#ff4949}.bi-high-light-border{border-color:#3685f2}.bi-water-mark{color:#c4c9d1;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#c4c9d1}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(54,133,242,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d3685f2, endColorstr=#0d3685f2)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #3685f2}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3685f2}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(54,133,242,.06);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2, endColorstr=#0f3685f2)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3685f2;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3685f2;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3685f2;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(54,133,242,.06);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2, endColorstr=#0f3685f2)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3685f2}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.button-success.active,.bi-list-item-select.button-success:active{color:#fff;background-color:#13cd66}.bi-list-item-select.button-success.active .bi-high-light,.bi-list-item-select.button-success.active .bi-input,.bi-list-item-select.button-success.active .bi-textarea,.bi-list-item-select.button-success:active .bi-high-light,.bi-list-item-select.button-success:active .bi-input,.bi-list-item-select.button-success:active .bi-textarea{color:#fff}.bi-list-item-select.button-warning,.bi-list-item-select.button-warning .bi-high-light,.bi-list-item-select.button-warning .bi-input,.bi-list-item-select.button-warning .bi-textarea,.bi-list-item-select.button-warning.hover .bi-high-light,.bi-list-item-select.button-warning.hover .bi-input,.bi-list-item-select.button-warning.hover .bi-textarea,.bi-list-item-select.button-warning:hover .bi-high-light,.bi-list-item-select.button-warning:hover .bi-input,.bi-list-item-select.button-warning:hover .bi-textarea{color:#ff4949}.bi-list-item-select.button-success.active.bi-high-light-border,.bi-list-item-select.button-success:active.bi-high-light-border{border-color:#13cd66}.bi-list-item-select.button-warning.active.bi-high-light-border,.bi-list-item-select.button-warning.bi-high-light-border,.bi-list-item-select.button-warning.hover.bi-high-light-border,.bi-list-item-select.button-warning:active.bi-high-light-border,.bi-list-item-select.button-warning:hover.bi-high-light-border{border-color:#e85050}.bi-list-item-select.button-warning.hover,.bi-list-item-select.button-warning:hover{color:#ff4949;background-color:#ffecec}.bi-list-item-select.button-warning.active,.bi-list-item-select.button-warning:active{color:#fff;background-color:#ff4949}.bi-list-item-select.button-warning.active .bi-high-light,.bi-list-item-select.button-warning.active .bi-input,.bi-list-item-select.button-warning.active .bi-textarea,.bi-list-item-select.button-warning:active .bi-high-light,.bi-list-item-select.button-warning:active .bi-input,.bi-list-item-select.button-warning:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-select.disabled.bi-high-light-border,.bi-list-item-select.disabled:active.bi-high-light-border,.bi-list-item-select.disabled:hover.bi-high-light-border{border-color:#ccc}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3685f2}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.CodeMirror-crosshair,.farbtastic *{cursor:crosshair}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-center{text-align:center}.horizon-left{text-align:left}.border-sizing{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-flex-align:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-ms-flex-align:end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-vertical-center.stretch{-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-ms-flex-align:stretch;-o-align-items:stretch;align-items:stretch}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper.stretch{width:100%;-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-o-align-items:stretch;align-items:stretch}.bi-inline-center-adapt-layout:after,.bi-inline-vertical-adapt-layout:after{display:inline-block;width:0;min-height:100%;vertical-align:middle;content:' '}.bi-theme-dark{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-search-text-value-combo.combo-error .bi-search-text-value-trigger .bi-text-button,.bi-text-value-combo.combo-error .bi-select-text-trigger .select-text-label{color:#ff4949}.bi-color-chooser-popup .disable-mask{opacity:.5;filter:alpha(opacity=50);background-color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.farbtastic{position:relative}.farbtastic *{position:absolute}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{width:195px;height:195px}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important;z-index:10000000}.bi-bubble-combo .bubble-combo-triangle-left{z-index:1;position:absolute;width:5px;height:16px;border-left:1px solid #f5f5f5}.bi-bubble-combo .bubble-combo-triangle-left:before{position:absolute;left:0;top:0;right:0;border-left:7px solid #ccc;border-top:8px solid transparent;border-bottom:8px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-left:after{position:absolute;top:1px;left:1px;right:0;border-bottom:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-right:after,.bi-bubble-combo .bubble-combo-triangle-right:before{right:0;border-top:7px solid transparent;border-bottom:8px solid transparent;content:"";position:absolute;top:0;bottom:0}.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;position:absolute;width:7px;height:16px}.bi-bubble-combo .bubble-combo-triangle-right:before{border-right:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-right:after{border-right:7px solid #fff}.bi-bubble-combo .bubble-combo-triangle-top{z-index:1;position:absolute;width:16px;height:10px;border-top:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-top:after{position:absolute;right:1px;top:0;border-top:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-bottom:before,.bi-bubble-combo .bubble-combo-triangle-top:before{border-left:8px solid transparent;border-right:8px solid transparent;content:"";position:absolute}.bi-bubble-combo .bubble-combo-triangle-top:before{border-top:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom{z-index:1;position:absolute;width:16px;height:5px;border-bottom:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-bottom:before{top:0;right:0;bottom:0;border-bottom:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-combo.bi-combo-popup{display:block!important;visibility:visible!important}.bi-search-text-value-combo .trigger-up{display:none}.bi-search-text-value-combo .trigger-down,.bi-search-text-value-combo.combo-show .trigger-up{display:block}.bi-search-text-value-combo.combo-show .trigger-down{display:none}.bi-search-editor{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.bi-display-tree .ztree li a:hover,.ztree li a{text-decoration:none}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{display:inline-block;color:#fff;background:#3685f2;padding:0 5px;margin:1px}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3685f2}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;z-index:1000000000}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:14px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-close,.bi-message-content{font-size:16px}.bi-message-animate{-webkit-transition:opacity .3s,transform .4s,-webkit-transform .4s;-moz-transition:opacity .3s,transform .4s,-webkit-transform .4s;-o-transition:opacity .3s,transform .4s,-webkit-transform .4s;transition:opacity .3s,transform .4s,-webkit-transform .4s}.bi-message-enter{opacity:1}.bi-message-leave{opacity:0;transform:translateY(-100%)}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title{background-color:#F2F4F7}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev,.bi-rich-editor-text-toolbar .text-toolbar-button{font-size:16px}.bi-sortable-holder{border:1px dashed #d4dadd}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-rich-editor .rich-editor-param{-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}#body .bi-button,body .bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #3685f2;background-color:#3685f2;text-align:center;vertical-align:middle;cursor:pointer}#body .bi-button.clear,#body .bi-button.ghost,body .bi-button.clear,body .bi-button.ghost{font-size:inherit;background-color:transparent}#body .bi-button.block,body .bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}#body .bi-button.clear,body .bi-button.clear{border-width:0}#body .bi-button.clear:hover,body .bi-button.clear:hover{opacity:.9;filter:alpha(opacity=90)}#body .bi-button.clear:active,body .bi-button.clear:active{opacity:.8;filter:alpha(opacity=80)}#body .bi-button.button-common,#body .bi-button.button-common .b-font:before,body .bi-button.button-common,body .bi-button.button-common .b-font:before{color:#fff}#body .bi-button.button-common.clear,#body .bi-button.button-common.clear .b-font:before,#body .bi-button.button-common.ghost,#body .bi-button.button-common.ghost .b-font:before,body .bi-button.button-common.clear,body .bi-button.button-common.clear .b-font:before,body .bi-button.button-common.ghost,body .bi-button.button-common.ghost .b-font:before{color:#3685f2}#body .bi-button.button-common.ghost:hover,body .bi-button.button-common.ghost:hover{color:#fff;background-color:#3685f2}#body .bi-button.button-common.ghost:active,body .bi-button.button-common.ghost:active{background-color:#3685f2}#body .bi-button.button-ignore,body .bi-button.button-ignore{background-color:#fff;border-color:#3685f2}#body .bi-button.button-ignore,#body .bi-button.button-ignore .b-font:before,body .bi-button.button-ignore,body .bi-button.button-ignore .b-font:before{color:#3685f2}#body .bi-button.button-ignore.clear,body .bi-button.button-ignore.clear{background-color:transparent;border-width:0}#body .bi-button.button-success,body .bi-button.button-success{background-color:#13cd66;border-color:#13cd66}#body .bi-button.button-success,#body .bi-button.button-success .b-font:before,body .bi-button.button-success,body .bi-button.button-success .b-font:before{color:#fff}#body .bi-button.button-success.clear,body .bi-button.button-success.clear{background-color:transparent;border-width:0}#body .bi-button.button-success.clear,#body .bi-button.button-success.clear .b-font:before,body .bi-button.button-success.clear,body .bi-button.button-success.clear .b-font:before{color:#13cd66}#body .bi-button.button-warning,body .bi-button.button-warning{background-color:#faaa39;border-color:#fbb03b}#body .bi-button.button-warning,#body .bi-button.button-warning .b-font:before,body .bi-button.button-warning,body .bi-button.button-warning .b-font:before{color:#fff}#body .bi-button.button-warning.clear,body .bi-button.button-warning.clear{background-color:transparent;border-width:0}#body .bi-button.button-warning.clear,#body .bi-button.button-warning.clear .b-font:before,body .bi-button.button-warning.clear,body .bi-button.button-warning.clear .b-font:before{color:#faaa39}#body .bi-button.button-error,body .bi-button.button-error{background-color:#ff4949;border-color:#e85050}#body .bi-button.button-error,#body .bi-button.button-error .b-font:before,body .bi-button.button-error,body .bi-button.button-error .b-font:before{color:#fff}#body .bi-button.button-error.clear,body .bi-button.button-error.clear{background-color:transparent;border-width:0}#body .bi-button.button-error.clear,#body .bi-button.button-error.clear .b-font:before,body .bi-button.button-error.clear,body .bi-button.button-error.clear .b-font:before{color:#ff4949}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled .b-font:before,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-common.disabled.base-disabled .b-font:before,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled .b-font:before,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-error.disabled.base-disabled .b-font:before,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled .b-font:before,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-success.disabled.base-disabled .b-font:before,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled .b-font:before,#body .bi-button.button-warning.disabled.base-disabled,#body .bi-button.button-warning.disabled.base-disabled .b-font:before,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled .b-font:before,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-common.disabled.base-disabled .b-font:before,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled .b-font:before,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-error.disabled.base-disabled .b-font:before,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled .b-font:before,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-success.disabled.base-disabled .b-font:before,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled .b-font:before,body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-common.disabled.clear .b-font:before,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-error.disabled.clear .b-font:before,#body .bi-button.button-ignore.disabled,#body .bi-button.button-ignore.disabled .b-font:before,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-ignore.disabled.clear .b-font:before,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-success.disabled.clear .b-font:before,#body .bi-button.button-warning.disabled.clear,#body .bi-button.button-warning.disabled.clear .b-font:before,body .bi-button.button-common.disabled.clear,body .bi-button.button-common.disabled.clear .b-font:before,body .bi-button.button-error.disabled.clear,body .bi-button.button-error.disabled.clear .b-font:before,body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled .b-font:before,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-ignore.disabled.clear .b-font:before,body .bi-button.button-success.disabled.clear,body .bi-button.button-success.disabled.clear .b-font:before,body .bi-button.button-warning.disabled.clear,body .bi-button.button-warning.disabled.clear .b-font:before{color:#9ea6b2!important}#body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-warning.disabled.clear,body .bi-button.button-common.disabled.clear,body .bi-button.button-error.disabled.clear,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-success.disabled.clear,body .bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}#body .bi-button.button-common.disabled.clear:active,#body .bi-button.button-common.disabled.clear:hover,#body .bi-button.button-error.disabled.clear:active,#body .bi-button.button-error.disabled.clear:hover,#body .bi-button.button-ignore.disabled.clear:active,#body .bi-button.button-ignore.disabled.clear:hover,#body .bi-button.button-success.disabled.clear:active,#body .bi-button.button-success.disabled.clear:hover,#body .bi-button.button-warning.disabled.clear:active,#body .bi-button.button-warning.disabled.clear:hover,body .bi-button.button-common.disabled.clear:active,body .bi-button.button-common.disabled.clear:hover,body .bi-button.button-error.disabled.clear:active,body .bi-button.button-error.disabled.clear:hover,body .bi-button.button-ignore.disabled.clear:active,body .bi-button.button-ignore.disabled.clear:hover,body .bi-button.button-success.disabled.clear:active,body .bi-button.button-success.disabled.clear:hover,body .bi-button.button-warning.disabled.clear:active,body .bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-warning.disabled.ghost,body .bi-button.button-common.disabled.ghost,body .bi-button.button-error.disabled.ghost,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-success.disabled.ghost,body .bi-button.button-warning.disabled.ghost{background:0 0!important;border-color:#3685f2!important;opacity:.5;filter:alpha(opacity=50)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-common.disabled.ghost .b-font:before,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-error.disabled.ghost .b-font:before,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost .b-font:before,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-success.disabled.ghost .b-font:before,#body .bi-button.button-warning.disabled.ghost,#body .bi-button.button-warning.disabled.ghost .b-font:before,body .bi-button.button-common.disabled.ghost,body .bi-button.button-common.disabled.ghost .b-font:before,body .bi-button.button-error.disabled.ghost,body .bi-button.button-error.disabled.ghost .b-font:before,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-ignore.disabled.ghost .b-font:before,body .bi-button.button-success.disabled.ghost,body .bi-button.button-success.disabled.ghost .b-font:before,body .bi-button.button-warning.disabled.ghost,body .bi-button.button-warning.disabled.ghost .b-font:before{color:#3685f2!important}.bi-basic-button.button-common:hover .bi-button-mask,.bi-basic-button.button-error:hover .bi-button-mask,.bi-basic-button.button-ignore:hover .bi-button-mask,.bi-basic-button.button-success:hover .bi-button-mask,.bi-basic-button.button-warning:hover .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#fff}.bi-basic-button.button-common:active .bi-button-mask,.bi-basic-button.button-error:active .bi-button-mask,.bi-basic-button.button-ignore:active .bi-button-mask,.bi-basic-button.button-success:active .bi-button-mask,.bi-basic-button.button-warning:active .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#1a1a1a}.bi-basic-button .popup-content{font-size:14px}.bi-theme-dark #body .bi-button.button-common.ghost,.bi-theme-dark #body .bi-button.button-common.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.ghost,.bi-theme-dark body .bi-button.button-common.ghost .b-font:before{color:#fff;border-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:hover,.bi-theme-dark body .bi-button.button-common.ghost:hover{color:#3d4d66;background-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:active,.bi-theme-dark body .bi-button.button-common.ghost:active{background-color:rgba(255,255,255,.9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#e6ffffff, endColorstr=#e6ffffff)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost{background:0 0!important;border-color:#fff!important;opacity:.5;filter:alpha(opacity=50)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark #body .bi-button.button-common.disabled.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost .b-font:before{color:#fff!important}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3685f2}.bi-switch{-webkit-border-radius:40px 40px 40px 40px;-moz-border-radius:40px;border-radius:40px;background-color:#d4dadd}.bi-switch.active,.bi-switch:active{background-color:#3685f2}.bi-switch .circle-button{-webkit-border-radius:9px 9px 9px 9px;-moz-border-radius:9px;border-radius:9px}.bi-code-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3685f2;display:inline-block}.bi-code-editor .error-param{color:#ff4949;padding:0 5px;margin:1px;display:inline-block}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-dynamic-date-combo .date-font,.bi-toast .toast-icon,.bi-trigger .bi-trigger-icon-button{font-size:16px}.x-icon.b-font{margin:auto;width:100%}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input,.bi-textarea{border:none;outline:0;background-color:transparent;padding:0;margin:0;width:100%;height:100%}.bi-input.bi-input-focus,.bi-textarea.bi-input-focus{border:none}.bi-input.bi-input-error,.bi-textarea.bi-input-error{border:none;color:#ff4949!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px}.bi-bubble .bubble-error{background:#ffecec;color:#ff4949}.bi-bubble .bubble-common{background:#eaf2fd;color:#3685f2}.bi-bubble .bubble-success{background:#e1f4e7;color:#13cd66}.bi-bubble .bubble-warning{background:#feeed7;color:#faaa39}.bi-tip{position:fixed!important}.bi-toast{color:#fff;max-width:400px;min-width:150px;border-radius:2px}.bi-toast.toast-success{background:#13cd66}.bi-toast.toast-warning{background:#faaa39}.bi-toast.toast-error{background:#ff4949}.bi-toast.toast-normal{background:#3685f2}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px;color:#fff}.bi-tooltip.tooltip-success{background:#647185;border:1px solid #647185}.bi-tooltip.tooltip-warning{background:#ff4949;border:1px solid #e85050}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-sql-editor .cm-s-default .cm-function,.bi-sql-editor .cm-s-default .cm-keyword,.bi-sql-editor .cm-s-default span[class*="#"]{color:#3685f2}.bi-sql-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3685f2;display:inline-block}.CodeMirror-hints .sql-fr-function,.CodeMirror-hints .sql-keyword{color:#3685f2}.bi-collection-table-cell{box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3685f2}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#13cd66}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3685f2}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#13cd66}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3685f2}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-filter-expander>table,.bi-filter-pane,.bi-multilayer-select-level-tree .tree-view,.bi-multilayer-single-level-tree .tree-view{min-width:100%}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.ztree li a,.ztree li span.button{cursor:pointer;display:inline-block}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li a{padding:1px 3px 0 0;margin:0;height:24px;background-color:transparent;vertical-align:top}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;border:0;outline:0;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll}.bi-popup-view .list-view-toolbar,.bi-year-popup .year-popup-navigation{line-height:30px}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.noline_docu,.ztree li span.button.root_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;display:inline-block;padding:0;margin:2px 0 0 1px;border:0;position:absolute;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;background-position:-110px -80px}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}body,html{height:100%}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)}.bi-trigger .trigger-up{display:none}.bi-combo-popup>.bi-trigger .trigger-up,.bi-trigger .trigger-down{display:block}.bi-combo-popup>.bi-trigger .trigger-down,.bi-multi-select-combo .trigger-up{display:none}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-date-trigger,.bi-filter-pane{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-popup-view .list-view-shadow{-webkit-box-shadow:0 1px 5px 0 rgba(26,26,26,.2);-moz-box-shadow:0 1px 5px 0 rgba(26,26,26,.2);box-shadow:0 1px 5px 0 rgba(26,26,26,.2)}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-date-trigger{border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text,.bi-down-list-popup .list-group-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#f7f8fa;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191B2B;color:#999}.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf{border:1px dashed #3685f2;background:#eaf2fd}.bi-filter-expander{min-width:100%;border-right:0;border-bottom:0}.bi-filter-expander>.filter-item-empty-item{border-top:0;border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-filter-expander>table>tbody>tr>td.first-element{width:20px;border-right:1px solid #d4dadd!important;border-bottom:1px solid #d4dadd!important}.bi-theme-dark .bi-filter-expander>.filter-item-empty-item{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-filter-expander>table>tbody>tr>td.first-element{border-right:1px solid #525466!important;border-bottom:1px solid #525466!important}.bi-filter-operation .operation-trigger.hover,.bi-filter-operation .operation-trigger:hover{color:#13cd66}.bi-filter-pane{border-radius:2px}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#faaa39}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-interval-slider-label{min-height:50px}.bi-interval-slider{min-height:70px}.bi-month-trigger,.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .multidate-popup-label{color:#3685f2;font-size:14px}.bi-multidate-popup .multidate-popup-item.active,.bi-multidate-popup .multidate-popup-item:active{background-color:#3685f2;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .multidate-popup-button{color:#3685f2;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-select-insert-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-multi-select-combo .trigger-down,.bi-multi-select-combo.combo-show .trigger-up{display:block}.bi-multi-select-combo.combo-show .trigger-down,.bi-multi-select-insert-combo .trigger-up{display:none}.bi-multi-select-insert-combo .trigger-down,.bi-multi-select-insert-combo.combo-show .trigger-up{display:block}.bi-multi-select-insert-combo.combo-show .trigger-down,.bi-multi-tree-combo .trigger-up{display:none}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#ff4949}.bi-multi-select-check-selected-button{z-index:1;min-width:16px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3685f2}.bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-combo .trigger-down,.bi-multi-tree-combo.combo-show .trigger-up{display:block}.bi-multi-tree-combo.combo-show .trigger-down,.bi-search-multi-text-value-combo .trigger-up{display:none}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3685f2;z-index:1}.bi-number-editor{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-number-interval .number-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-number-interval .number-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-search-multi-text-value-combo .multi-select-trigger-icon-button,.bi-single-select-combo .single-select-trigger-icon-button{font-size:16px}.bi-number-interval.number-error .bi-input{color:#ff4949!important}.bi-date-interval.time-error .bi-input,.bi-date-interval.time-error .sign-editor-text,.bi-search-multi-text-value-combo.combo-error .bi-multi-select-searcher .tip-text-style,.bi-time-interval.time-error .bi-date-time-trigger .bi-input,.bi-time-interval.time-error .bi-date-time-trigger .sign-editor-text,.bi-year-month-interval.time-error .bi-input,.bi-year-month-interval.time-error .sign-editor-text{color:#ff4949}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#f7f8fa}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191B2B}.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-search-multi-text-value-combo .trigger-down,.bi-search-multi-text-value-combo.combo-show .trigger-up{display:block}.bi-search-multi-text-value-combo.combo-show .trigger-down,.bi-single-select-combo .trigger-up{display:none}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-select-combo .trigger-down,.bi-single-select-combo.combo-show .trigger-up{display:block}.bi-single-select-combo.combo-show .trigger-down{display:none}.bi-single-slider-label{min-height:50px}.bi-single-slider-normal{min-height:30px}.bi-single-slider{min-height:50px}.bi-single-slider-button .slider-button{cursor:ew-resize;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider-track .gray-track{background-color:#F2F4F7;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-slider-track .blue-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-slider-track .disabled-blue-track{background-color:#d0d4da;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-time-interval .bi-date-time-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}html{overflow:hidden}body{position:absolute;width:100%;margin:0;padding:0;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#3d4d66;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;text-decoration:none;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.farbtastic .wheel{background:url(resources?path=/com/fr/web/ui/images/1x/background/wheel.png) center center no-repeat}.farbtastic .overlay{background:url(resources?path=/com/fr/web/ui/images/1x/background/mask.png) center center no-repeat}.farbtastic .marker{background:url(resources?path=/com/fr/web/ui/images/1x/background/marker.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.center_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.roots_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.bottom_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.ztree li ul.line{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_active.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.root_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.ztree li span.button.root_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.ztree li span.button.roots_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.ztree li span.button.roots_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.ztree li span.button.center_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.ztree li span.button.center_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.ztree li span.button.bottom_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.ztree li span.button.bottom_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.ztree li span.button.roots_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.ztree li span.button.center_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.ztree li span.button.bottom_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.ztree li span.button.ico_loading{background:url(resources?path=/com/fr/web/ui/images/1x/icon/loading.gif) center center no-repeat}.base-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.first-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.mid-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.last-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.loading-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(resources?path=/com/fr/web/ui/images/1x/background/auto_color.png) center center no-repeat}.auto-color-normal-background{background:url(resources?path=/com/fr/web/ui/images/1x/background/auto_color_normal.png) center center no-repeat}.trans-color-background{background:url(resources?path=/com/fr/web/ui/images/1x/background/trans_color.png) center center no-repeat}@font-face{font-family:bi;src:url(resources?path=/com/fr/web/ui/font/iconfont.eot);src:url(resources?path=/com/fr/web/ui/font/iconfont.eot?#iefix) format('embedded-opentype'),url(resources?path=/com/fr/web/ui/font/iconfont.woff) format('woff'),url(resources?path=/com/fr/web/ui/font/iconfont.ttf) format('truetype'),url(resources?path=/com/fr/web/ui/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:hover .b-font:before{content:"\e6d0";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e6d0";color:#3f8ce8}.close-ha-font.disabled .b-font:before{content:"\e6d0";color:inherit}.circle-close-font .b-font:before,.circle-close-font.disabled .b-font:before{content:"\e6d5";color:inherit}.search-close-h-font .b-font:before{content:"\e6d0";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e6d0";color:#ff4949}.search-close-h-font.disabled .b-font:before{content:"\e6d0";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e70d";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e70c";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before{content:"\e6dc";color:inherit}.date-font .b-font:before,.date-font.disabled .b-font:before{content:"\e733";color:inherit}.date-change-h-font .b-font:before,.date-change-h-font.disabled .b-font:before,.date-change-h-font.hover .b-font:before,.date-change-h-font:hover .b-font:before{content:"\e72f";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-h-font .b-font:before{content:"\e762";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:hover .b-font:before{content:"\e762";color:inherit}.dot-h-font.disabled .b-font:before{content:"\e762";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e762";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e762";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before{content:"\e762";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:hover .b-font:before{content:"\e762";color:#999}.dot-e-font:active .b-font:before{content:"\e762";color:#3685f2}.dot-e-font.active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font.disabled .b-font:before{content:"\e762";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e70c";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before{content:"\e70c";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before{content:"\e70c";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-h-font .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-h-font.disabled .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font.disabled .b-font:before{content:"\e6bd";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e6cf";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before{content:"\e6cf";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before{content:"\e6cf";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6d9";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6d8";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6d6";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6d7";color:inherit}.expander-right-font .b-font:before,.expander-right-font.disabled .b-font:before{content:"\e6d8";color:inherit}.expander-down-font .b-font:before,.expander-down-font.disabled .b-font:before{content:"\e6d7";color:inherit}.solid-triangle-top-font .b-font:before,.solid-triangle-top-font.disabled .b-font:before,.solid-triangle-top-font.hover .b-font:before,.solid-triangle-top-font:hover .b-font:before{content:"\e6d6";color:inherit}.solid-triangle-bottom-font .b-font:before,.solid-triangle-bottom-font.disabled .b-font:before,.solid-triangle-bottom-font.hover .b-font:before,.solid-triangle-bottom-font:hover .b-font:before{content:"\e6d7";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e64e";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e64e";color:#3685f2}.trigger-triangle-font.disabled .b-font:before{content:"\e64e";color:#999}.pull-up-font .b-font:before,.pull-up-font.disabled .b-font:before{content:"\e70a";color:inherit}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-h-font .b-font:before{content:"\e70b";color:#647185}.pull-down-h-font.hover .b-font:before,.pull-down-h-font:hover .b-font:before{content:"\e70b";color:inherit}.pull-down-h-font.disabled .b-font:before,.pull-down-ha-font .b-font:before{content:"\e70b";color:#647185}.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e70b";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e70b";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before{content:"\e70b";color:#647185}.check-font .b-font:before,.check-font.disabled .b-font:before{content:"\e6cf";color:#3685f2}.item-check-font .b-font:before{content:"\e6cf";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:hover .b-font:before{content:"\e6cf";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.item-check-font.disabled .b-font:before{content:"\e6cf";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font:hover .b-font:before{content:"\e740";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before{content:"\e6d0";color:#faaa39}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:hover .b-font:before{content:"\e75e";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e75e";color:#3f8ce8}.less-font.disabled .b-font:before{content:"\e75e";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:hover .b-font:before{content:"\e761";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e761";color:#3f8ce8}.less-equal-font.disabled .b-font:before{content:"\e761";color:inherit}.text-bold-font .b-font:before,.text-bold-font.disabled .b-font:before{content:"\e75b";color:inherit}.text-italic-font .b-font:before,.text-italic-font.disabled .b-font:before{content:"\e75c";color:inherit}.text-underline-font .b-font:before,.text-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-color-font .b-font:before,.text-color-font.disabled .b-font:before{content:"\e75a";color:inherit}.text-background-font .b-font:before,.text-background-font.disabled .b-font:before{content:"\e758";color:inherit}.text-color-underline-font .b-font:before,.text-color-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-align-left-font .b-font:before,.text-align-left-font.disabled .b-font:before{content:"\e6ca";color:inherit}.text-align-center-font .b-font:before,.text-align-center-font.disabled .b-font:before{content:"\e6bf";color:inherit}.text-align-right-font .b-font:before,.text-align-right-font.disabled .b-font:before{content:"\e6c8";color:inherit}.toast-error-font .b-font:before,.toast-error-font.disabled .b-font:before{content:"\e757";color:inherit}.toast-success-font .b-font:before,.toast-success-font.disabled .b-font:before{content:"\e756";color:inherit}.toast-warning-font .b-font:before,.toast-warning-font.disabled .b-font:before{content:"\e755";color:inherit}.toast-message-font .b-font:before,.toast-message-font.disabled .b-font:before{content:"\e74b";color:inherit}.text-add-tip-font .b-font:before,.text-add-tip-font.disabled .b-font:before{content:"\e6dd";color:#13cd66}.tree-collapse-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_1.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_1.png) center center no-repeat}.tree-collapse-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_2.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_2.png) center center no-repeat}.tree-collapse-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_3.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_3.png) center center no-repeat}.tree-collapse-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_4.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_4.png) center center no-repeat}.tree-expand-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_1.png) center center no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_1.png) center center no-repeat}.tree-expand-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_2.png) center center no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_2.png) center center no-repeat}.tree-expand-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_3.png) center center no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_3.png) center center no-repeat}.tree-expand-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_4.png) center center no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_4.png) center center no-repeat}.tree-vertical-line-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.tree-vertical-line-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.tree-vertical-line-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.check-box-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon:active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon:active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_active.png) center center no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_active.png) center center no-repeat}.check-box-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_disable.png) center center no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_disable.png) center center no-repeat}.check-box-icon.disabled.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_disable2.png) center center no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_disable2.png) center center no-repeat}.radio-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.hover .x-icon,.radio-icon:hover .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon:active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon:active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_active.png) center center no-repeat;background-size:contain}.radio-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_active.png) center center no-repeat}.radio-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_disable.png) center center no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_disable.png) center center no-repeat}.radio-icon.disabled.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_disable2.png) center center no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_disable2.png) center center no-repeat}.check-half-select-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/half_selected.png) center center no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png) center center no-repeat}.slider-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/slider_normal_small.png) center center no-repeat}.slider-icon.hover .x-icon,.slider-icon:hover .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/slider_active_small.png) center center no-repeat;background-size:contain}.slider-icon.hover .x-icon.hack,.slider-icon:hover .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/slider_active_small.png) center center no-repeat}.slider-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/slider_normal_small.png) center center no-repeat}.auto-color-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/auto_normal.png) center center no-repeat;background-size:contain}.auto-color-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/auto_normal.png) center center no-repeat}.auto-color-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/auto_select.png) center center no-repeat;background-size:contain}.auto-color-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/auto_select.png) center center no-repeat}.auto-color-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/auto_disable.png) center center no-repeat;background-size:contain}.auto-color-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/auto_disable.png) center center no-repeat}.trans-color-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/trans_normal.png) center center no-repeat;background-size:contain}.trans-color-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/trans_normal.png) center center no-repeat}.trans-color-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/trans_select.png) center center no-repeat;background-size:contain}.trans-color-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/trans_select.png) center center no-repeat}.trans-color-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/trans_disable.png) center center no-repeat;background-size:contain}.trans-color-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/trans_disable.png) center center no-repeat} \ No newline at end of file diff --git a/dist/fineui.min.js b/dist/fineui.min.js index 53ab70f09..f83648d58 100644 --- a/dist/fineui.min.js +++ b/dist/fineui.min.js @@ -18,8 +18,8 @@ direction:"bottom",logic:{dynamic:!1},single:!1,showIndex:!1,tab:!1,cardCreator: pf||nf&&9==of?setTimeout(function(){document.body.focus(),e.input.focus()},20):e.input.focus())});pf&&(e.scroller.draggable=!0),a.state.draggingText=g,e.scroller.dragDrop&&e.scroller.dragDrop(),xg(document,"mouseup",g),xg(e.scroller,"drop",g)}function Xb(a,b,c,d,e){function f(b){if(0!=Gf(q,b))if(q=b,"rect"==d){for(var e=[],f=a.options.tabSize,g=Gg(Vd(j,c.line).text,c.ch,f),h=Gg(Vd(j,b.line).text,b.ch,f),i=Math.min(g,h),n=Math.max(g,h),o=Math.min(c.line,b.line),p=Math.min(a.lastLine(),Math.max(c.line,b.line));o<=p;o++){var r=Vd(j,o).text,s=Ae(r,i,f);i==n?e.push(new ma(Ff(o,s),Ff(o,s))):r.length>s&&e.push(new ma(Ff(o,s),Ff(o,Ae(r,n,f))))}e.length||e.push(new ma(c,c)),Ba(j,na(m.ranges.slice(0,l).concat(e),l),{origin:"*mouse",scroll:!1}),a.scrollIntoView(b)}else{var t=k,u=t.anchor,v=b;if("single"!=d){if("double"==d)var w=a.findWordAt(b);else var w=new ma(Ff(b.line,0),qa(j,Ff(b.line+1,0)));Gf(w.anchor,u)>0?(v=w.head,u=X(t.from(),w.anchor)):(v=w.anchor,u=W(t.to(),w.head))}var e=m.ranges.slice(0);e[l]=new ma(qa(j,u),v),Ba(j,na(e,l),Eg)}}function g(b){var c=++s,e=Tb(a,b,!0,"rect"==d);if(e)if(0!=Gf(e,q)){a.curOp.focus=Pe(),f(e);var h=u(i,j);(e.line>=h.to||e.liner.bottom?20:0;k&&setTimeout(Db(a,function(){s==c&&(i.scroller.scrollTop+=k,g(b))}),50)}}function h(a){s=1/0,ug(a),i.input.focus(),yg(document,"mousemove",t),yg(document,"mouseup",v),j.history.lastSelOrigin=null}var i=a.display,j=a.doc;ug(b);var k,l,m=j.sel,n=m.ranges;if(e&&!b.shiftKey?(l=j.sel.contains(c),k=l>-1?n[l]:new ma(c,c)):(k=j.sel.primary(),l=j.sel.primIndex),b.altKey)d="rect",e||(k=new ma(c,c)),c=Tb(a,b,!0,!0),l=-1;else if("double"==d){var o=a.findWordAt(c);k=a.display.shift||j.extend?ua(j,k,o.anchor,o.head):o}else if("triple"==d){var p=new ma(Ff(c.line,0),qa(j,Ff(c.line+1,0)));k=a.display.shift||j.extend?ua(j,k,p.anchor,p.head):p}else k=ua(j,k,c);e?l==-1?(l=n.length,Ba(j,na(n.concat([k]),l),{scroll:!1,origin:"*mouse"})):n.length>1&&n[l].empty()&&"single"==d&&!b.shiftKey?(Ba(j,na(n.slice(0,l).concat(n.slice(l+1)),0)),m=j.sel):xa(j,l,k,Eg):(l=0,Ba(j,new la([k],0),Eg),m=j.sel);var q=c,r=i.wrapper.getBoundingClientRect(),s=0,t=Db(a,function(a){se(a)?g(a):h(a)}),v=Db(a,h);xg(document,"mousemove",t),xg(document,"mouseup",v)}function Yb(a,b,c,d,e){try{var f=b.clientX,g=b.clientY}catch(b){return!1}if(f>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&ug(b);var h=a.display,i=h.lineDiv.getBoundingClientRect();if(g>i.bottom||!xe(a,c))return qe(b);g-=i.top-h.viewOffset;for(var j=0;j=f){var l=$d(a.doc,g),m=a.options.gutters[j];return e(a,c,a,l,m,b),qe(b)}}}function Zb(a,b){return Yb(a,b,"gutterClick",!0,te)}function $b(a){var b=this;if(!ve(b,a)&&!Sb(b.display,a)){ug(a),nf&&(Of=+new Date);var c=Tb(b,a,!0),d=a.dataTransfer.files;if(c&&!Z(b))if(d&&d.length&&window.FileReader&&window.File)for(var e=d.length,f=Array(e),g=0,h=function(a,d){var h=new FileReader;h.onload=Db(b,function(){if(f[d]=h.result,++g==e){c=qa(b.doc,c);var a={from:c,to:c,text:Ug(f.join("\n")),origin:"paste"};wc(b.doc,a),Aa(b.doc,oa(c,Uf(a)))}}),h.readAsText(a)},i=0;i-1)return b.state.draggingText(a),void setTimeout(function(){b.display.input.focus()},20);try{var f=a.dataTransfer.getData("Text");if(f){if(b.state.draggingText&&!(yf?a.altKey:a.ctrlKey))var j=b.listSelections();if(Ca(b.doc,oa(c,c)),j)for(var i=0;ig.clientWidth||e&&g.scrollHeight>g.clientHeight){if(e&&yf&&pf)a:for(var h=b.target,i=f.view;h!=g;h=h.parentNode)for(var j=0;j=0;--e)xc(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else xc(a,b)}}function xc(a,b){if(1!=b.text.length||""!=b.text[0]||0!=Gf(b.from,b.to)){var c=sc(a,b);fe(a,b,c,a.cm?a.cm.curOp.id:NaN),Ac(a,b,c,bd(a,b));var d=[];Td(a,function(a,c){c||De(d,a.history)!=-1||(pe(a.history,b),d.push(a.history)),Ac(a,b,null,bd(a,b))})}}function yc(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var d,e=a.history,f=a.sel,g="undo"==b?e.done:e.undone,h="undo"==b?e.undone:e.done,i=0;i=0;--i){var l=d.changes[i];if(l.origin=b,k&&!vc(a,l,!1))return void(g.length=0);j.push(ce(a,l));var m=i?sc(a,l):Ce(g);Ac(a,l,m,dd(a,l)),!i&&a.cm&&a.cm.scrollIntoView({from:l.from,to:Uf(l)});var n=[];Td(a,function(a,b){b||De(n,a.history)!=-1||(pe(a.history,l),n.push(a.history)),Ac(a,l,null,dd(a,l))})}}}}function zc(a,b){if(0!=b&&(a.first+=b,a.sel=new la(Ee(a.sel.ranges,function(a){return new ma(Ff(a.anchor.line+b,a.anchor.ch),Ff(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Ib(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;da.lastLine())){if(b.from.linef&&(b={from:b.from,to:Ff(f,Vd(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=Wd(a,b.from,b.to),c||(c=sc(a,b)),a.cm?Bc(a.cm,b,d):Qd(a,b,d),Ca(a,c,Dg)}}function Bc(a,b,c){var d=a.doc,e=a.display,g=b.from,h=b.to,i=!1,j=g.line;a.options.lineWrapping||(j=Zd(od(Vd(d,g.line))),d.iter(j,h.line+1,function(a){if(a==e.maxLine)return i=!0,!0})),d.sel.contains(b.from,b.to)>-1&&we(a),Qd(d,b,c,f(a)),a.options.lineWrapping||(d.iter(j,g.line+b.text.length,function(a){var b=l(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,i=!1)}),i&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,g.line),Ma(a,400);var k=b.text.length-(h.line-g.line)-1;b.full?Ib(a):g.line!=h.line||1!=b.text.length||Pd(a.doc,b)?Ib(a,g.line,h.line+1,k):Jb(a,g.line,"text");var m=xe(a,"changes"),n=xe(a,"change");if(n||m){var o={from:g,to:h,text:b.text,removed:b.removed,origin:b.origin};n&&te(a,"change",a,o),m&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(o)}a.display.selForContextMenu=null}function Cc(a,b,c,d,e){if(d||(d=c),Gf(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=Ug(b)),wc(a,{from:c,to:d,text:b,origin:e})}function Dc(a,b){if(!ve(a,"scrollCursorIntoView")){var c=a.display,d=c.sizer.getBoundingClientRect(),e=null;if(b.top+d.top<0?e=!0:b.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!vf){var f=Me("div","​",null,"position: absolute; top: "+(b.top-c.viewOffset-Qa(a.display))+"px; height: "+(b.bottom-b.top+Ta(a)+c.barHeight)+"px; left: "+b.left+"px; width: 2px;");a.display.lineSpace.appendChild(f),f.scrollIntoView(e),a.display.lineSpace.removeChild(f)}}}function Ec(a,b,c,d){null==d&&(d=0);for(var e=0;e<5;e++){var f=!1,g=mb(a,b),h=c&&c!=b?mb(a,c):g,i=Gc(a,Math.min(g.left,h.left),Math.min(g.top,h.top)-d,Math.max(g.left,h.left),Math.max(g.bottom,h.bottom)+d),j=a.doc.scrollTop,k=a.doc.scrollLeft;if(null!=i.scrollTop&&(ac(a,i.scrollTop),Math.abs(a.doc.scrollTop-j)>1&&(f=!0)),null!=i.scrollLeft&&(bc(a,i.scrollLeft),Math.abs(a.doc.scrollLeft-k)>1&&(f=!0)),!f)break}return g}function Fc(a,b,c,d,e){var f=Gc(a,b,c,d,e);null!=f.scrollTop&&ac(a,f.scrollTop),null!=f.scrollLeft&&bc(a,f.scrollLeft)}function Gc(a,b,c,d,e){var f=a.display,g=rb(a.display);c<0&&(c=0);var h=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:f.scroller.scrollTop,i=Va(a),j={};e-c>i&&(e=c+i);var k=a.doc.height+Ra(f),l=ck-g;if(ch+i){var n=Math.min(c,(m?k:e)-i);n!=h&&(j.scrollTop=n)}var o=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:f.scroller.scrollLeft,p=Ua(a)-(a.options.fixedGutter?f.gutters.offsetWidth:0),q=d-b>p;return q&&(d=b+p),b<10?j.scrollLeft=0:bp+o-3&&(j.scrollLeft=d+(q?0:10)-p),j}function Hc(a,b,c){null==b&&null==c||Jc(a),null!=b&&(a.curOp.scrollLeft=(null==a.curOp.scrollLeft?a.doc.scrollLeft:a.curOp.scrollLeft)+b),null!=c&&(a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+c)}function Ic(a){Jc(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?Ff(b.line,b.ch-1):b,d=Ff(b.line,b.ch+1)),a.curOp.scrollToPos={from:c,to:d,margin:a.options.cursorScrollMargin,isCursor:!0}}function Jc(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=nb(a,b.from),d=nb(a,b.to),e=Gc(a,Math.min(c.left,d.left),Math.min(c.top,d.top)-b.margin,Math.max(c.right,d.right),Math.max(c.bottom,d.bottom)+b.margin);a.scrollTo(e.scrollLeft,e.scrollTop)}}function Kc(a,b,c,d){var e,f=a.doc;null==c&&(c="add"),"smart"==c&&(f.mode.indent?e=Pa(a,b):c="prev");var g=a.options.tabSize,h=Vd(f,b),i=Gg(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var j,k=h.text.match(/^\s*/)[0];if(d||/\S/.test(h.text)){if("smart"==c&&(j=f.mode.indent(e,h.text.slice(k.length),h.text),j==Cg||j>150)){if(!d)return;c="prev"}}else j=0,c="not";"prev"==c?j=b>f.first?Gg(Vd(f,b-1).text,null,g):0:"add"==c?j=i+a.options.indentUnit:"subtract"==c?j=i-a.options.indentUnit:"number"==typeof c&&(j=i+c),j=Math.max(0,j);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(j/g);n;--n)m+=g,l+="\t";if(m=0;b--)Cc(a.doc,"",d[b].from,d[b].to,"+delete");Ic(a)})}function Nc(a,b,c,d,e){function f(){var b=h+c;return b=a.first+a.size?l=!1:(h=b,k=Vd(a,b))}function g(a){var b=(e?hf:jf)(k,i,c,!0);if(null==b){if(a||!f())return l=!1;i=e?(c<0?af:_e)(k):c<0?k.text.length:0}else i=b;return!0}var h=b.line,i=b.ch,j=c,k=Vd(a,h),l=!0;if("char"==d)g();else if("column"==d)g(!0);else if("word"==d||"group"==d)for(var m=null,n="group"==d,o=a.cm&&a.cm.getHelper(b,"wordChars"),p=!0;!(c<0)||g(!p);p=!1){var q=k.text.charAt(i)||"\n",r=Je(q,o)?"w":n&&"\n"==q?"n":!n||/\s/.test(q)?null:"p";if(!n||p||r||(r="s"),m&&m!=r){c<0&&(c=1,g());break}if(r&&(m=r),c>0&&!g(!p))break}var s=Ga(a,Ff(h,i),j,!0);return l||(s.hitSide=!0),s}function Oc(a,b,c,d){var e,f=a.doc,g=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);e=b.top+c*(h-(c<0?1.5:.5)*rb(a.display))}else"line"==d&&(e=c>0?b.bottom+3:b.top-3);for(;;){var i=pb(a,g,e);if(!i.outside)break;if(c<0?e<=0:e>=f.height){i.hitSide=!0;break}e+=5*c}return i}function Pc(b,c,d,e){a.defaults[b]=c,d&&(Wf[b]=e?function(a,b,c){c!=Xf&&d(a,b,c)}:d)}function Qc(a){for(var b,c,d,e,f=a.split(/-(?!$)/),a=f[f.length-1],g=0;g0||0==g&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=Me("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(nd(a,b.line,b,c,f)||b.line!=c.line&&nd(a,c.line,b,c,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ef=!0}f.addToHistory&&fe(a,{from:b,to:c,origin:"markText"},a.sel,NaN);var h,i=b.line,j=a.cm;if(a.iter(i,c.line+1,function(a){j&&f.collapsed&&!j.options.lineWrapping&&od(a)==j.display.maxLine&&(h=!0),f.collapsed&&i!=b.line&&Yd(a,0),$c(a,new Xc(f,i==b.line?b.ch:null,i==c.line?c.ch:null)),++i}),f.collapsed&&a.iter(b.line,c.line+1,function(b){sd(a,b)&&Yd(b,0)}),f.clearOnEnter&&xg(f,"beforeCursorEnter",function(){f.clear()}),f.readOnly&&(Df=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory()),f.collapsed&&(f.id=++jg,f.atomic=!0),j){if(h&&(j.curOp.updateMaxLine=!0),f.collapsed)Ib(j,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle||f.css)for(var k=b.line;k<=c.line;k++)Jb(j,k,"text");f.atomic&&Ea(j.doc),te(j,"markerAdded",j,f)}return f}function Tc(a,b,c,d,e){d=He(d),d.shared=!1;var f=[Sc(a,b,c,d,e)],g=f[0],h=d.widgetNode;return Td(a,function(a){h&&(d.widgetNode=h.cloneNode(!0)),f.push(Sc(a,qa(a,b),qa(a,c),d,e));for(var i=0;i=b:f.to>b);(d||(d=[])).push(new Xc(g,f.from,i?null:f.to))}}return d}function ad(a,b,c){if(a)for(var d,e=0;e=b:f.to>b);if(h||f.from==b&&"bookmark"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from0&&h)for(var l=0;l0)){var k=[i,1],l=Gf(j.from,h.from),m=Gf(j.to,h.to);(l<0||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(m>0||!g.inclusiveRight&&!m)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-1}}return e}function fd(a){var b=a.markedSpans;if(b){for(var c=0;c=0&&l<=0||k<=0&&l>=0)&&(k<=0&&(Gf(j.to,c)>0||i.marker.inclusiveRight&&e.inclusiveLeft)||k>=0&&(Gf(j.from,d)<0||i.marker.inclusiveLeft&&e.inclusiveRight)))return!0}}}function od(a){for(var b;b=ld(a);)a=b.find(-1,!0).line;return a}function pd(a){for(var b,c;b=md(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function qd(a,b){var c=Vd(a,b),d=od(c);return c==d?b:Zd(d)}function rd(a,b){if(b>a.lastLine())return b;var c,d=Vd(a,b);if(!sd(a,d))return b;for(;c=md(d);)d=c.find(1,!0).line;return Zd(d)+1}function sd(a,b){var c=Ef&&b.markedSpans;if(c)for(var d,e=0;ec.start)return g}throw new Error("Mode "+b.name+" failed to advance stream.")}function Cd(a,b,c,d){function e(a){return{start:l.start,end:l.pos,string:l.current(),type:f||null,state:a?bg(g.mode,k):k}}var f,g=a.doc,h=g.mode;b=qa(g,b);var i,j=Vd(g,b.line),k=Pa(a,b.line,c),l=new ig(j.text,a.options.tabSize);for(d&&(i=[]);(d||l.posa.options.maxHighlightLength?(h=!1,g&&Gd(a,b,d,l.pos),l.pos=b.length,i=null):i=zd(Bd(c,l,d,m),f),m){var n=m[0].name;n&&(i="m-"+(i?n+" "+i:n))}if(!h||k!=i){for(;ja&&e.splice(i,1,a,e[i+1],d),i+=2,j=Math.min(a,d)}if(b)if(h.opaque)e.splice(c,i-c,a,"cm-overlay "+b),i=c+2;else for(;cj&&m.from<=j)break}if(m.to>=k)return a(c,d,e,f,g,h,i);a(c,d.slice(0,m.to-j),e,f,null,h,i),f=null,d=d.slice(m.to-j),j=m.to}}}function Nd(a,b,c,d){var e=!d&&c.widgetNode;e&&a.map.push(a.pos,a.pos+b,e),!d&&a.cm.display.input.needsContentAttribute&&(e||(e=a.content.appendChild(document.createElement("span"))),e.setAttribute("cm-marker",c.id)),e&&(a.cm.display.input.setUneditable(e),a.content.appendChild(e)),a.pos+=b}function Od(a,b,c){var d=a.markedSpans,e=a.text,f=0;if(d)for(var g,h,i,j,k,l,m,n=e.length,o=0,p=1,q="",r=0;;){if(r==o){i=j=k=l=h="",m=null,r=1/0;for(var s=[],t=0;to||v.collapsed&&u.to==o&&u.from==o)?(null!=u.to&&u.to!=o&&r>u.to&&(r=u.to,j=""),v.className&&(i+=" "+v.className),v.css&&(h=v.css),v.startStyle&&u.from==o&&(k+=" "+v.startStyle),v.endStyle&&u.to==r&&(j+=" "+v.endStyle),v.title&&!l&&(l=v.title),v.collapsed&&(!m||jd(m.marker,v)<0)&&(m=u)):u.from>o&&r>u.from&&(r=u.from)}if(m&&(m.from||0)==o){if(Nd(b,(null==m.to?n+1:m.to)-o,m.marker,null==m.from),null==m.to)return; m.to==o&&(m=!1)}if(!m&&s.length)for(var t=0;t=n)break;for(var w=Math.min(n,r);;){if(q){var x=o+q.length;if(!m){var y=x>w?q.slice(0,w-o):q;b.addToken(b,y,g?g+i:i,k,o+y.length==r?j:"",l,h)}if(x>=w){q=q.slice(w-o),o=w;break}o=x,k=""}q=e.slice(f,f=c[p++]),g=Hd(c[p++],b.cm.options)}}else for(var p=1;p1&&a.remove(h.line+1,o-1),a.insert(h.line+1,p)}te(a,"change",a,b)}function Rd(a){this.lines=a,this.parent=null;for(var b=0,c=0;b=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(b1&&!a.done[a.done.length-2].ranges?(a.done.pop(),Ce(a.done)):void 0}function fe(a,b,c,d){var e=a.history;e.undone.length=0;var f,g=+new Date;if((e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>g-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))&&(f=ee(e,e.lastOp==d))){var h=Ce(f.changes);0==Gf(b.from,b.to)&&0==Gf(b.from,h.to)?h.to=Uf(b):f.changes.push(ce(a,b))}else{var i=Ce(e.done);for(i&&i.ranges||ie(a.sel,e.done),f={changes:[ce(a,b)],generation:e.generation},e.done.push(f);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift()}e.done.push(c),e.generation=++e.maxGeneration,e.lastModTime=e.lastSelTime=g,e.lastOp=e.lastSelOp=d,e.lastOrigin=e.lastSelOrigin=b.origin,h||zg(a,"historyAdded")}function ge(a,b,c,d){var e=b.charAt(0);return"*"==e||"+"==e&&c.ranges.length==d.ranges.length&&c.somethingSelected()==d.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function he(a,b,c,d){var e=a.history,f=d&&d.origin;c==e.lastSelOp||f&&e.lastSelOrigin==f&&(e.lastModTime==e.lastSelTime&&e.lastOrigin==f||ge(a,f,Ce(e.done),b))?e.done[e.done.length-1]=b:ie(b,e.done),e.lastSelTime=+new Date,e.lastSelOrigin=f,e.lastSelOp=c,d&&d.clearRedo!==!1&&de(e.undone)}function ie(a,b){var c=Ce(b);c&&c.ranges&&c.equals(a)||b.push(a)}function je(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans),++f})}function ke(a){if(!a)return null;for(var b,c=0;c-1&&(Ce(h)[l]=k[l],delete k[l])}}}return e}function ne(a,b,c,d){c0}function ye(a){a.prototype.on=function(a,b){xg(this,a,b)},a.prototype.off=function(a,b){yg(this,a,b)}}function ze(){this.id=null}function Ae(a,b,c){for(var d=0,e=0;;){var f=a.indexOf("\t",d);f==-1&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}}function Be(a){for(;Hg.length<=a;)Hg.push(Ce(Hg)+" ");return Hg[a]}function Ce(a){return a[a.length-1]}function De(a,b){for(var c=0;c-1&&Lg(a))||b.test(a):Lg(a)}function Ke(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function Le(a){return a.charCodeAt(0)>=768&&Mg.test(a)}function Me(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f0;--b)a.removeChild(a.firstChild);return a}function Oe(a,b){return Ne(a).appendChild(b)}function Pe(){return document.activeElement}function Qe(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function Re(a,b){for(var c=a.split(" "),d=0;d2&&!(nf&&of<8))}var c=Og?Me("span","​"):Me("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}function We(a){if(null!=Pg)return Pg;var b=Oe(a,document.createTextNode("AخA")),c=Jg(b,0,1).getBoundingClientRect();if(!c||c.left==c.right)return!1;var d=Jg(b,1,2).getBoundingClientRect();return Pg=d.right-c.right<3}function Xe(a){if(null!=Xg)return Xg;var b=Oe(a,Me("span","x")),c=b.getBoundingClientRect(),d=Jg(b,0,1).getBoundingClientRect();return Xg=Math.abs(c.left-d.left)>1}function Ye(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;fb||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function Ze(a){return a.level%2?a.to:a.from}function $e(a){return a.level%2?a.from:a.to}function _e(a){var b=ae(a);return b?Ze(b[0]):0}function af(a){var b=ae(a);return b?$e(Ce(b)):a.text.length}function bf(a,b){var c=Vd(a.doc,b),d=od(c);d!=c&&(b=Zd(d));var e=ae(d),f=e?e[0].level%2?af(d):_e(d):0;return Ff(b,f)}function cf(a,b){for(var c,d=Vd(a.doc,b);c=md(d);)d=c.find(1,!0).line,b=null;var e=ae(d),f=e?e[0].level%2?_e(d):af(d):d.text.length;return Ff(null==b?Zd(d):b,f)}function df(a,b){var c=bf(a,b.line),d=Vd(a.doc,c.line),e=ae(d);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch;return Ff(c.line,g?0:f)}return c}function ef(a,b,c){var d=a[0].level;return b==d||c!=d&&bb)return d;if(e.from==b||e.to==b){if(null!=c)return ef(a,e.level,a[c].level)?(e.from!=e.to&&(Zg=c),d):(e.from!=e.to&&(Zg=d),c);c=d}}return c}function gf(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&Le(a.text.charAt(b)));return b}function hf(a,b,c,d){var e=ae(a);if(!e)return jf(a,b,c,d);for(var f=ff(e,b),g=e[f],h=gf(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?gf(a,g.to,-1,d):gf(a,g.from,1,d)}}function jf(a,b,c,d){var e=b+c;if(d)for(;e>0&&Le(a.text.charAt(e));)e+=c;return e<0||e>a.text.length?null:e}var kf=/gecko\/\d/i.test(navigator.userAgent),lf=/MSIE \d/.test(navigator.userAgent),mf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),nf=lf||mf,of=nf&&(lf?document.documentMode||6:mf[1]),pf=/WebKit\//.test(navigator.userAgent),qf=pf&&/Qt\/\d+\.\d+/.test(navigator.userAgent),rf=/Chrome\//.test(navigator.userAgent),sf=/Opera\//.test(navigator.userAgent),tf=/Apple Computer/.test(navigator.vendor),uf=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),vf=/PhantomJS/.test(navigator.userAgent),wf=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),xf=wf||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),yf=wf||/Mac/.test(navigator.platform),zf=/win/i.test(navigator.platform),Af=sf&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Af&&(Af=Number(Af[1])),Af&&Af>=15&&(sf=!1,pf=!0);var Bf=yf&&(qf||sf&&(null==Af||Af<12.11)),Cf=kf||nf&&of>=9,Df=!1,Ef=!1;p.prototype=He({update:function(a){var b=a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0";var e=a.viewHeight-(b?d:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+e)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(b){this.horiz.style.display="block",this.horiz.style.right=c?d+"px":"0",this.horiz.style.left=a.barLeft+"px";var f=a.viewWidth-a.barLeft-(c?d:0);this.horiz.firstChild.style.width=a.scrollWidth-a.clientWidth+f+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&a.clientHeight>0&&(0==d&&this.overlayHack(),this.checkedOverlay=!0),{right:c?d:0,bottom:b?d:0}},setScrollLeft:function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a)},setScrollTop:function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a)},overlayHack:function(){var a=yf&&!uf?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=a;var b=this,c=function(a){re(a)!=b.vert&&re(a)!=b.horiz&&Db(b.cm,Ub)(a)};xg(this.vert,"mousedown",c),xg(this.horiz,"mousedown",c)},clear:function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)}},p.prototype),q.prototype=He({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},q.prototype),a.scrollbarModel={"native":p,"null":q},z.prototype.signal=function(a,b){xe(a,b)&&this.events.push(arguments)},z.prototype.finish=function(){for(var a=0;a=9&&c.hasSelection&&(c.hasSelection=null),c.poll()}),xg(f,"paste",function(a){return!!_(a,d)||(d.state.pasteIncoming=!0,void c.fastPoll())}),xg(f,"cut",b),xg(f,"copy",b),xg(a.scroller,"paste",function(b){Sb(a,b)||(d.state.pasteIncoming=!0,c.focus())}),xg(a.lineSpace,"selectstart",function(b){Sb(a,b)||ug(b)}),xg(f,"compositionstart",function(){var a=d.getCursor("from");c.composing={start:a,range:d.markText(a,d.getCursor("to"),{className:"CodeMirror-composing"})}}),xg(f,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},prepareSelection:function(){var a=this.cm,b=a.display,c=a.doc,d=Ia(a);if(a.options.moveInputWithCursor){var e=mb(a,c.sel.primary().head,"div"),f=b.wrapper.getBoundingClientRect(),g=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,e.top+g.top-f.top)),d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,e.left+g.left-f.left))}return d},showSelection:function(a){var b=this.cm,c=b.display;Oe(c.cursorDiv,a.cursors),Oe(c.selectionDiv,a.selection),null!=a.teTop&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},reset:function(a){if(!this.contextMenuPending){var b,c,d=this.cm,e=d.doc;if(d.somethingSelected()){this.prevInput="";var f=e.sel.primary();b=Wg&&(f.to().line-f.from().line>100||(c=d.getSelection()).length>1e3);var g=b?"-":c||d.getSelection();this.textarea.value=g,d.state.focused&&Ig(this.textarea),nf&&of>=9&&(this.hasSelection=g)}else a||(this.prevInput=this.textarea.value="",nf&&of>=9&&(this.hasSelection=null));this.inaccurateSelection=b}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!xf||Pe()!=this.textarea))try{this.textarea.focus()}catch(a){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var a=this;a.pollingFast||a.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},fastPoll:function(){function a(){var d=c.poll();d||b?(c.pollingFast=!1,c.slowPoll()):(b=!0,c.polling.set(60,a))}var b=!1,c=this;c.pollingFast=!0,c.polling.set(20,a)},poll:function(){var a=this.cm,b=this.textarea,c=this.prevInput;if(this.contextMenuPending||!a.state.focused||Vg(b)&&!c||Z(a)||a.options.disableInput||a.state.keySeq)return!1;var d=b.value;if(d==c&&!a.somethingSelected())return!1;if(nf&&of>=9&&this.hasSelection===d||yf&&/[\uf700-\uf7ff]/.test(d))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var e=d.charCodeAt(0);if(8203!=e||c||(c="​"),8666==e)return this.reset(),this.cm.execCommand("undo")}for(var f=0,g=Math.min(c.length,d.length);f1e3||d.indexOf("\n")>-1?b.value=h.prevInput="":h.prevInput=d,h.composing&&(h.composing.range.clear(),h.composing.range=a.markText(h.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){nf&&of>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(a){function b(){if(null!=g.selectionStart){var a=e.somethingSelected(),b="​"+(a?g.value:"");g.value="⇚",g.value=b,d.prevInput=a?"":"​",g.selectionStart=1,g.selectionEnd=b.length,f.selForContextMenu=e.doc.sel}}function c(){if(d.contextMenuPending=!1,d.wrapper.style.position="relative",g.style.cssText=k,nf&&of<9&&f.scrollbars.setScrollTop(f.scroller.scrollTop=i),null!=g.selectionStart){(!nf||nf&&of<9)&&b();var a=0,c=function(){f.selForContextMenu==e.doc.sel&&0==g.selectionStart&&g.selectionEnd>0&&"​"==d.prevInput?Db(e,dg.selectAll)(e):a++<10?f.detectingSelectAll=setTimeout(c,500):f.input.reset()};f.detectingSelectAll=setTimeout(c,200)}}var d=this,e=d.cm,f=e.display,g=d.textarea,h=Tb(e,a),i=f.scroller.scrollTop;if(h&&!sf){var j=e.options.resetSelectionOnContextMenu;j&&e.doc.sel.contains(h)==-1&&Db(e,Ba)(e.doc,oa(h),Dg);var k=g.style.cssText;if(d.wrapper.style.position="absolute",g.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(a.clientY-5)+"px; left: "+(a.clientX-5)+"px; z-index: 1000; background: "+(nf?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",pf)var l=window.scrollY;if(f.input.focus(),pf&&window.scrollTo(null,l),f.input.reset(),e.somethingSelected()||(g.value=d.prevInput=" "),d.contextMenuPending=!0,f.selForContextMenu=e.doc.sel,clearTimeout(f.detectingSelectAll),nf&&of>=9&&b(),Cf){wg(a);var m=function(){yg(window,"mouseup",m),setTimeout(c,20)};xg(window,"mouseup",m)}else setTimeout(c,50)}},setUneditable:Fe,needsContentAttribute:!1},da.prototype),fa.prototype=He({init:function(a){function b(a){if(d.somethingSelected())Hf=d.getSelections(),"cut"==a.type&&d.replaceSelection("",null,"cut");else{if(!d.options.lineWiseCopyCut)return;var b=ba(d);Hf=b.text,"cut"==a.type&&d.operation(function(){d.setSelections(b.ranges,0,Dg),d.replaceSelection("",null,"cut")})}if(a.clipboardData&&!wf)a.preventDefault(),a.clipboardData.clearData(),a.clipboardData.setData("text/plain",Hf.join("\n"));else{var c=ea(),e=c.firstChild;d.display.lineSpace.insertBefore(c,d.display.lineSpace.firstChild),e.value=Hf.join("\n");var f=document.activeElement;Ig(e),setTimeout(function(){d.display.lineSpace.removeChild(c),f.focus()},50)}}var c=this,d=c.cm,e=c.div=a.lineDiv;e.contentEditable="true",ca(e),xg(e,"paste",function(a){_(a,d)}),xg(e,"compositionstart",function(a){var b=a.data;if(c.composing={sel:d.doc.sel,data:b,startData:b},b){var e=d.doc.sel.primary(),f=d.getLine(e.head.line),g=f.indexOf(b,Math.max(0,e.head.ch-b.length));g>-1&&g<=e.head.ch&&(c.composing.sel=oa(Ff(e.head.line,g),Ff(e.head.line,g+b.length)))}}),xg(e,"compositionupdate",function(a){c.composing.data=a.data}),xg(e,"compositionend",function(a){var b=c.composing;b&&(a.data==b.startData||/\u200b/.test(a.data)||(b.data=a.data),setTimeout(function(){b.handled||c.applyComposition(b),c.composing==b&&(c.composing=null)},50))}),xg(e,"touchstart",function(){c.forceCompositionEnd()}),xg(e,"input",function(){c.composing||c.pollContent()||Cb(c.cm,function(){Ib(d)})}),xg(e,"copy",b),xg(e,"cut",b)},prepareSelection:function(){var a=Ia(this.cm,!1);return a.focus=this.cm.state.focused,a},showSelection:function(a){a&&this.cm.display.view.length&&(a.focus&&this.showPrimarySelection(),this.showMultipleSelections(a))},showPrimarySelection:function(){var a=window.getSelection(),b=this.cm.doc.sel.primary(),c=ia(this.cm,a.anchorNode,a.anchorOffset),d=ia(this.cm,a.focusNode,a.focusOffset);if(!c||c.bad||!d||d.bad||0!=Gf(X(c,d),b.from())||0!=Gf(W(c,d),b.to())){var e=ga(this.cm,b.from()),f=ga(this.cm,b.to());if(e||f){var g=this.cm.display.view,h=a.rangeCount&&a.getRangeAt(0);if(e){if(!f){var i=g[g.length-1].measure,j=i.maps?i.maps[i.maps.length-1]:i.map;f={node:j[j.length-1],offset:j[j.length-2]-j[j.length-3]}}}else e={node:g[0].measure.map[2],offset:0};try{var k=Jg(e.node,e.offset,f.offset,f.node)}catch(l){}k&&(a.removeAllRanges(),a.addRange(k),h&&null==a.anchorNode?a.addRange(h):kf&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){a.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(a){Oe(this.cm.display.cursorDiv,a.cursors),Oe(this.cm.display.selectionDiv,a.selection)},rememberSelection:function(){var a=window.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},selectionInEditor:function(){var a=window.getSelection();if(!a.rangeCount)return!1;var b=a.getRangeAt(0).commonAncestorContainer;return Ng(this.div,b)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function a(){b.cm.state.focused&&(b.pollSelection(),b.polling.set(b.cm.options.pollInterval,a))}var b=this;this.selectionInEditor()?this.pollSelection():Cb(this.cm,function(){b.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,a)},selectionChanged:function(){var a=window.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var a=window.getSelection(),b=this.cm;this.rememberSelection();var c=ia(b,a.anchorNode,a.anchorOffset),d=ia(b,a.focusNode,a.focusOffset);c&&d&&Cb(b,function(){Ba(b.doc,oa(c,d),Dg),(c.bad||d.bad)&&(b.curOp.selectionChanged=!0)})}},pollContent:function(){var a=this.cm,b=a.display,c=a.doc.sel.primary(),d=c.from(),e=c.to();if(d.lineb.viewTo-1)return!1;var f;if(d.line==b.viewFrom||0==(f=Lb(a,d.line)))var g=Zd(b.view[0].line),h=b.view[0].node;else var g=Zd(b.view[f].line),h=b.view[f-1].node.nextSibling;var i=Lb(a,e.line);if(i==b.view.length-1)var j=b.viewTo-1,k=b.lineDiv.lastChild;else var j=Zd(b.view[i+1].line)-1,k=b.view[i+1].node.previousSibling;for(var l=Ug(ka(a,h,k,g,j)),m=Wd(a.doc,Ff(g,0),Ff(j,Vd(a.doc,j).text.length));l.length>1&&m.length>1;)if(Ce(l)==Ce(m))l.pop(),m.pop(),j--;else{if(l[0]!=m[0])break;l.shift(),m.shift(),g++}for(var n=0,o=0,p=l[0],q=m[0],r=Math.min(p.length,q.length);n1||l[0]||Gf(v,w)?(Cc(a.doc,l,v,w,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(a){a.data&&a.data!=a.startData&&Db(this.cm,$)(this.cm,a.data,0,a.sel)},setUneditable:function(a){a.setAttribute("contenteditable","false")},onKeyPress:function(a){a.preventDefault(),Db(this.cm,$)(this.cm,String.fromCharCode(null==a.charCode?a.keyCode:a.charCode),0)},onContextMenu:Fe,resetPosition:Fe,needsContentAttribute:!0},fa.prototype),a.inputStyles={textarea:da,contenteditable:fa},la.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b=0&&Gf(a,d.to())<=0)return c}return-1}},ma.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return W(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var If,Jf,Kf,Lf={left:0,right:0,top:0,bottom:0},Mf=null,Nf=0,Of=0,Pf=0,Qf=null;nf?Qf=-.53:kf?Qf=15:rf?Qf=-.7:tf&&(Qf=-1/3);var Rf=function(a){var b=a.wheelDeltaX,c=a.wheelDeltaY;return null==b&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(b=a.detail),null==c&&a.detail&&a.axis==a.VERTICAL_AXIS?c=a.detail:null==c&&(c=a.wheelDelta),{x:b,y:c}};a.wheelEventPixels=function(a){var b=Rf(a);return b.x*=Qf,b.y*=Qf,b};var Sf=new ze,Tf=null,Uf=a.changeEnd=function(a){return a.text?Ff(a.from.line+a.text.length-1,Ce(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(a,b){var c=this.options,d=c[a];c[a]==b&&"mode"!=a||(c[a]=b,Wf.hasOwnProperty(a)&&Db(this,Wf[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](Rc(a))},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;cc&&(Kc(this,e.head.line,a,!0),c=e.head.line,d==this.doc.sel.primIndex&&Ic(this));else{var f=e.from(),g=e.to(),h=Math.max(c,f.line);c=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var i=h;i0&&xa(this.doc,d,new ma(f,j[d].to()),Dg)}}}),getTokenAt:function(a,b){return Cd(this,a,b)},getLineTokens:function(a,b){return Cd(this,Ff(a),b,!0)},getTokenTypeAt:function(a){a=qa(this.doc,a);var b,c=Fd(this,Vd(this.doc,a.line)),d=0,e=(c.length-1)/2,f=a.ch;if(0==f)b=c[2];else for(;;){var g=d+e>>1;if((g?c[2*g-1]:0)>=f)e=g;else{if(!(c[2*g+1]e&&(a=e,d=!0),c=Vd(this.doc,a)}else c=a;return jb(this,c,{top:0,left:0},b||"page").top+(d?this.doc.height-_d(c):0)},defaultTextHeight:function(){return rb(this.display)},defaultCharWidth:function(){return sb(this.display)},setGutterMarker:Eb(function(a,b,c){return Lc(this.doc,a,"gutter",function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&Ke(d)&&(a.gutterMarkers=null),!0})}),clearGutter:Eb(function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,Jb(b,d,"gutter"),Ke(c.gutterMarkers)&&(c.gutterMarkers=null)),++d})}),lineInfo:function(a){if("number"==typeof a){if(!sa(this.doc,a))return null;var b=a;if(a=Vd(this.doc,a),!a)return null}else{var b=Zd(a);if(null==b)return null}return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=mb(this,qa(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",b.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(b), f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&Fc(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:Eb(ic),triggerOnKeyPress:Eb(lc),triggerOnKeyUp:kc,execCommand:function(a){if(dg.hasOwnProperty(a))return dg[a](this)},triggerElectric:Eb(function(a){aa(this,a)}),findPosH:function(a,b,c,d){var e=1;b<0&&(e=-1,b=-b);for(var f=0,g=qa(this.doc,a);f0&&h(c.charAt(d-1));)--d;for(;e.5)&&g(this),zg(this,"refresh",this)}),swapDoc:Eb(function(a){var b=this.doc;return b.cm=null,Ud(this,a),gb(this),this.display.input.reset(),this.scrollTo(a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,te(this,"swapDoc",this,b),b}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(a);var Vf=a.defaults={},Wf=a.optionHandlers={},Xf=a.Init={toString:function(){return"CodeMirror.Init"}};Pc("value","",function(a,b){a.setValue(b)},!0),Pc("mode",null,function(a,b){a.doc.modeOption=b,c(a)},!0),Pc("indentUnit",2,c,!0),Pc("indentWithTabs",!1),Pc("smartIndent",!0),Pc("tabSize",4,function(a){d(a),gb(a),Ib(a)},!0),Pc("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(b,c,d){b.state.specialChars=new RegExp(c.source+(c.test("\t")?"":"|\t"),"g"),d!=a.Init&&b.refresh()}),Pc("specialCharPlaceholder",Jd,function(a){a.refresh()},!0),Pc("electricChars",!0),Pc("inputStyle",xf?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Pc("rtlMoveVisually",!zf),Pc("wholeLineUpdateBefore",!0),Pc("theme","default",function(a){h(a),i(a)},!0),Pc("keyMap","default",function(b,c,d){var e=Rc(c),f=d!=a.Init&&Rc(d);f&&f.detach&&f.detach(b,e),e.attach&&e.attach(b,f||null)}),Pc("extraKeys",null),Pc("lineWrapping",!1,e,!0),Pc("gutters",[],function(a){n(a.options),i(a)},!0),Pc("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?y(a.display)+"px":"0",a.refresh()},!0),Pc("coverGutterNextToScrollbar",!1,function(a){s(a)},!0),Pc("scrollbarStyle","native",function(a){r(a),s(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),Pc("lineNumbers",!1,function(a){n(a.options),i(a)},!0),Pc("firstLineNumber",1,i,!0),Pc("lineNumberFormatter",function(a){return a},i,!0),Pc("showCursorWhenSelecting",!1,Ha,!0),Pc("resetSelectionOnContextMenu",!0),Pc("lineWiseCopyCut",!0),Pc("readOnly",!1,function(a,b){"nocursor"==b?(oc(a),a.display.input.blur(),a.display.disabled=!0):(a.display.disabled=!1,b||a.display.input.reset())}),Pc("disableInput",!1,function(a,b){b||a.display.input.reset()},!0),Pc("dragDrop",!0,Qb),Pc("cursorBlinkRate",530),Pc("cursorScrollMargin",0),Pc("cursorHeight",1,Ha,!0),Pc("singleCursorHeightPerLine",!0,Ha,!0),Pc("workTime",100),Pc("workDelay",100),Pc("flattenSpans",!0,d,!0),Pc("addModeClass",!1,d,!0),Pc("pollInterval",100),Pc("undoDepth",200,function(a,b){a.doc.history.undoDepth=b}),Pc("historyEventDelay",1250),Pc("viewportMargin",10,function(a){a.refresh()},!0),Pc("maxHighlightLength",1e4,d,!0),Pc("moveInputWithCursor",!0,function(a,b){b||a.display.input.resetPosition()}),Pc("tabindex",null,function(a,b){a.display.input.getField().tabIndex=b||""}),Pc("autofocus",null);var Yf=a.modes={},Zf=a.mimeModes={};a.defineMode=function(b,c){a.defaults.mode||"null"==b||(a.defaults.mode=b),arguments.length>2&&(c.dependencies=Array.prototype.slice.call(arguments,2)),Yf[b]=c},a.defineMIME=function(a,b){Zf[a]=b},a.resolveMode=function(b){if("string"==typeof b&&Zf.hasOwnProperty(b))b=Zf[b];else if(b&&"string"==typeof b.name&&Zf.hasOwnProperty(b.name)){var c=Zf[b.name];"string"==typeof c&&(c={name:c}),b=Ge(c,b),b.name=c.name}else if("string"==typeof b&&/^[\w\-]+\/[\w\-]+\+xml$/.test(b))return a.resolveMode("application/xml");return"string"==typeof b?{name:b}:b||{name:"null"}},a.getMode=function(b,c){var c=a.resolveMode(c),d=Yf[c.name];if(!d)return a.getMode(b,"text/plain");var e=d(b,c);if($f.hasOwnProperty(c.name)){var f=$f[c.name];for(var g in f)f.hasOwnProperty(g)&&(e.hasOwnProperty(g)&&(e["_"+g]=e[g]),e[g]=f[g])}if(e.name=c.name,c.helperType&&(e.helperType=c.helperType),c.modeProps)for(var g in c.modeProps)e[g]=c.modeProps[g];return e},a.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),a.defineMIME("text/plain","null");var $f=a.modeExtensions={};a.extendMode=function(a,b){var c=$f.hasOwnProperty(a)?$f[a]:$f[a]={};He(b,c)},a.defineExtension=function(b,c){a.prototype[b]=c},a.defineDocExtension=function(a,b){rg.prototype[a]=b},a.defineOption=Pc;var _f=[];a.defineInitHook=function(a){_f.push(a)};var ag=a.helpers={};a.registerHelper=function(b,c,d){ag.hasOwnProperty(b)||(ag[b]=a[b]={_global:[]}),ag[b][c]=d},a.registerGlobalHelper=function(b,c,d,e){a.registerHelper(b,c,e),ag[b]._global.push({pred:d,val:e})};var bg=a.copyState=function(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c},cg=a.startState=function(a,b,c){return!a.startState||a.startState(b,c)};a.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state,a=c.mode}return c||{mode:a,state:b}};var dg=a.commands={selectAll:function(a){a.setSelection(Ff(a.firstLine(),0),Ff(a.lastLine()),Dg)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Dg)},killLine:function(a){Mc(a,function(b){if(b.empty()){var c=Vd(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line0)e=new Ff(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),Ff(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var g=Vd(a.doc,e.line-1).text;g&&a.replaceRange(f.charAt(0)+"\n"+g.charAt(g.length-1),Ff(e.line-1,g.length-1),Ff(e.line,1),"+transpose")}c.push(new ma(e,e))}a.setSelections(c)})},newlineAndIndent:function(a){Cb(a,function(){for(var b=a.listSelections().length,c=0;c=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.posb},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);if(b>-1)return this.pos=b,!0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos0?null:(d&&b!==!1&&(this.pos+=d[0].length),d)}var e=function(a){return c?a.toLowerCase():a},f=this.string.substr(this.pos,a.length);if(e(f)==e(a))return b!==!1&&(this.pos+=a.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}};var jg=0,kg=a.TextMarker=function(a,b){this.lines=[],this.type=b,this.doc=a,this.id=++jg};ye(kg),kg.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;if(b&&tb(a),xe(this,"clear")){var c=this.find();c&&te(this,"clear",c.from,c.to)}for(var d=null,e=null,f=0;fa.display.maxLineLength&&(a.display.maxLine=i,a.display.maxLineLength=j,a.display.maxLineChanged=!0)}null!=d&&a&&this.collapsed&&Ib(a,d,e+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Ea(a.doc)),a&&te(a,"markerCleared",a,this),b&&vb(a),this.parent&&this.parent.clear()}},kg.prototype.find=function(a,b){null==a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;e1||!(this.children[0]instanceof Rd))){var h=[];this.collapse(h),this.children=[new Rd(h)],this.children[0].parent=this}},collapse:function(a){for(var b=0;b50){for(;e.lines.length>50;){var g=e.lines.splice(e.lines.length-25,25),h=new Rd(g);e.height-=h.height,this.children.splice(d+1,0,h),h.parent=this}this.maybeSpill()}break}a-=f}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new Sd(b);if(a.parent){a.size-=c.size,a.height-=c.height;var d=De(a.parent.children,a);a.parent.children.splice(d+1,0,c)}else{var e=new Sd(a.children);e.parent=a,a.children=[e,c],a=e}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0;d=0;f--)wc(this,d[f]);h?Aa(this,h):this.cm&&Ic(this.cm)}),undo:Fb(function(){yc(this,"undo")}),redo:Fb(function(){yc(this,"redo")}),undoSelection:Fb(function(){yc(this,"undo",!0)}),redoSelection:Fb(function(){yc(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=qa(this,a),b=qa(this,b);var d=[],e=a.line;return this.iter(a.line,b.line+1,function(f){var g=f.markedSpans;if(g)for(var h=0;hi.to||null==i.from&&e!=a.line||e==b.line&&i.from>b.ch||c&&!c(i.marker)||d.push(i.marker.parent||i.marker)}++e}),d},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;da?(b=a,!0):(a-=e,void++c)}),qa(this,Ff(c,b))},indexFromPos:function(a){a=qa(this,a);var b=a.ch;return a.lineb&&(b=a.from),null!=a.to&&a.to=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}},Hg=[""],Ig=function(a){a.select()};wf?Ig=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:nf&&(Ig=function(a){try{a.select()}catch(b){}});var Jg,Kg=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Lg=a.isWordChar=function(a){return/\w/.test(a)||a>"€"&&(a.toUpperCase()!=a.toLowerCase()||Kg.test(a))},Mg=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Jg=document.createRange?function(a,b,c,d){var e=document.createRange();return e.setEnd(d||a,c),e.setStart(a,b),e}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(e){return d}return d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d};var Ng=a.contains=function(a,b){if(3==b.nodeType&&(b=b.parentNode),a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)};nf&&of<11&&(Pe=function(){try{return document.activeElement}catch(a){return document.body}});var Og,Pg,Qg=a.rmClass=function(a,b){var c=a.className,d=Qe(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+(e?d[1]+e:"")}},Rg=a.addClass=function(a,b){var c=a.className;Qe(b).test(c)||(a.className+=(c?" ":"")+b)},Sg=!1,Tg=function(){if(nf&&of<9)return!1;var a=Me("div");return"draggable"in a||"dragDrop"in a}(),Ug=a.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;b<=d;){var e=a.indexOf("\n",b);e==-1&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");g!=-1?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},Vg=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return!(!b||b.parentElement()!=a)&&0!=b.compareEndPoints("StartToEnd",b)},Wg=function(){var a=Me("div");return"oncopy"in a||(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),Xg=null,Yg={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};a.keyNames=Yg,function(){for(var a=0;a<10;a++)Yg[a+48]=Yg[a+96]=String(a);for(var a=65;a<=90;a++)Yg[a]=String.fromCharCode(a);for(var a=1;a<=12;a++)Yg[a+111]=Yg[a+63235]="F"+a}();var Zg,$g=function(){function a(a){return a<=247?c.charAt(a):1424<=a&&a<=1524?"R":1536<=a&&a<=1773?d.charAt(a-1536):1774<=a&&a<=2220?"r":8192<=a&&a<=8203?"w":8204==a?"b":"L"}function b(a,b,c){this.level=a,this.from=b,this.to=c}var c="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",d="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,g=/[LRr]/,h=/[Lb1n]/,i=/[1n]/,j="L";return function(c){if(!e.test(c))return!1;for(var d,k=c.length,l=[],m=0;mf.ch&&(i.end=f.ch,i.string=i.string.slice(0,f.ch-i.start)):i={start:f.ch,end:f.ch,string:"",state:i.state,type:"."==i.string?"property":null};for(var j=i;"property"==j.type;){if(j=d(b,h(f.line,j.start)),"."!=j.string)return;if(j=d(b,h(f.line,j.start)),!k)var k=[];k.push(j)}return{list:g(i,k,c,e),from:h(f.line,i.start),to:h(f.line,i.end)}}}function e(){return BI.FormulaCollections}function f(a,b){return d(a,e(),function(a,b){return a.getTokenAt(b)},b)}function g(a,d,e,f){function g(a){0!=a.lastIndexOf(i,0)||c(h,a)||h.push(a)}var h=[],i=a.string;return i?(d&&d.length?d.pop():b(e,g),h):h}var h=a.Pos;a.registerHelper("hint","formula",f)}),function(a){a(CodeMirror)}(function(a){"use strict";a.defineMode("formula",function(){function a(a){for(var b={},c=0,d=a.length;c0){var y=w.bottom-w.top,z=q.top-(q.bottom-w.top);if(z-y>0)k.style.top=(s=q.top-y)+"px",t=!1;else if(y>v){k.style.height=v-5+"px",k.style.top=(s=q.bottom-w.top)+"px";var A=j.getCursor();f.from.ch!=A.ch&&(q=j.cursorCoords(A),k.style.left=(r=q.left)+"px",w=k.getBoundingClientRect())}}var B=w.right-u;if(B>0&&(w.right-w.left>u&&(k.style.width=u-5+"px",B-=w.right-w.left-u),k.style.left=(r=q.left-B)+"px"),j.addKeyMap(this.keyMap=d(b,{moveFocus:function(a,b){i.changeActive(i.selectedHint+a,b)},setFocus:function(a){i.changeActive(a)},menuSize:function(){return i.screenAmount()},length:l.length,close:function(){b.close()},pick:function(){i.pick()},data:f})),b.options.closeOnUnfocus){var C;j.on("blur",this.onBlur=function(){C=setTimeout(function(){b.close()},100)}),j.on("focus",this.onFocus=function(){clearTimeout(C)})}var D=j.getScrollInfo();return j.on("scroll",this.onScroll=function(){var a=j.getScrollInfo(),c=j.getWrapperElement().getBoundingClientRect(),d=s+D.top-a.top,e=d-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return t||(e+=k.offsetHeight),e<=c.top||e>=c.bottom?b.close():(k.style.top=d+"px",void(k.style.left=r+D.left-a.left+"px"))}),a.on(k,"dblclick",function(a){var b=e(k,a.target||a.srcElement);b&&null!=b.hintId&&(i.changeActive(b.hintId),i.pick())}),a.on(k,"click",function(a){var c=e(k,a.target||a.srcElement);c&&null!=c.hintId&&(i.changeActive(c.hintId),b.options.completeOnSingleClick&&i.pick())}),a.on(k,"mousedown",function(){setTimeout(function(){j.focus()},20)}),a.signal(f,"select",l[0],k.firstChild),!0}var g="CodeMirror-hint",h="CodeMirror-hint-active";a.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);var d={hint:b};if(c)for(var e in c)d[e]=c[e];return a.showHint(d)},a.defineExtension("showHint",function(c){if(!(this.listSelections().length>1||this.somethingSelected())){this.state.completionActive&&this.state.completionActive.close();var d=this.state.completionActive=new b(this,c);d.options.hint&&(a.signal(this,"startCompletion",this),d.update(!0))}});var i=window.requestAnimationFrame||function(a){return setTimeout(a,1e3/60)},j=window.cancelAnimationFrame||clearTimeout;b.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&a.signal(this.data,"close"),this.widget&&this.widget.close(),a.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(b,d){var e=b.list[d];if(e.hint)e.hint(this.cm,b,e);else if(this.cm.replaceRange(c(e),e.from||b.from,e.to||b.to,"complete"),e.isKeyword===!0);else{var f=this.cm.getCursor();this.cm.markText(e.from||b.from,f,{className:"#function",atomic:!0}),this.cm.replaceSelection("() "),f=this.cm.getCursor(),f.ch=f.ch-2,this.cm.setCursor(f),this.cm.focus()}a.signal(b,"pick",e),this.close()},cursorActivity:function(){this.debounce&&(j(this.debounce),this.debounce=0);var a=this.cm.getCursor(),b=this.cm.getLine(a.line);if(a.line!=this.startPos.line||b.length-a.ch!=this.startLen-this.startPos.ch||a.ch=this.data.list.length?b=c?this.data.list.length-1:0:b<0&&(b=c?0:this.data.list.length-1),this.selectedHint!=b){var d=this.hints.childNodes[this.selectedHint];d.className=d.className.replace(" "+h,""),d=this.hints.childNodes[this.selectedHint=b],d.className+=" "+h,d.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=d.offsetTop+d.offsetHeight-this.hints.clientHeight+3),a.signal(this.data,"select",this.data.list[this.selectedHint],d)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},a.registerHelper("hint","auto",function(b,c){var d,e=b.getHelpers(b.getCursor(),"hint");if(e.length)for(var f=0;f,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};a.defineOption("hintOptions",null)}),$.extend(BI,{Msg:function(){var a,b,c;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||$("body");var d=b.level||"normal",e=!!BI.isNull(b.autoClose)||b.autoClose,f=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:d,autoClose:e,text:a});BI.createWidget({type:"bi.absolute",element:c,items:[{el:f,left:"50%",top:10}]}),f.element.css({"margin-left":-1*f.element.outerWidth()/2}),f.element.removeClass("bi-message-leave").addClass("bi-message-enter"),e&&BI.delay(function(){f.element.removeClass("bi-message-enter").addClass("bi-message-leave"),BI.delay(function(){f.destroy()},1e3)},5e3)},_show:function(d,e,f,g){b=$('
').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=$('
').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-message-content bi-card",items:{north:{el:{type:"bi.border",cls:"bi-message-title bi-background",items:{center:{el:{type:"bi.label",text:e||BI.i18nText("BI-Basic_Prompt"),textAlign:"left",hgap:20,height:50}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",handler:function(){h()}},width:60}}},height:50},center:{el:{type:"bi.text",cls:"bi-message-text",tgap:60,hgap:20,lineHeight:30,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",hgap:5,items:i},top:0,left:20,right:20,bottom:0}]},height:60}},width:400,height:300}]};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(),0===b.scrollLeft&&0===b.scrollTop||BI.nextTick(function(){a.element.scrollTop(b.scrollTop),a.element.scrollLeft(b.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})),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.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",header:null,body:null,footer:null})},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(),e=$("body").width(),f=$("body").height();a.startX+=b,a.startY+=c,a.element.css({left:BI.clamp(a.startX,0,e-d.width)+"px",top:BI.clamp(a.startY,0,f-d.height)+"px"}),BI.Resizers._resize()},function(){a.tracker.releaseMouseMoves()},window);var c={north:{el:{type:"bi.border",cls:"bi-message-title bi-background",ref:function(b){a.dragger=b},items:{center:{el:{type:"bi.absolute",items:[{el:BI.isPlainObject(b.header)?BI.createWidget(b.header):{type:"bi.label",height:this._constant.HEADER_HEIGHT,text:b.header,title:b.header,textAlign:"left"},left:10,top:0,right:0,bottom:0}]}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){a.close()}},width:60}}},height:this._constant.HEADER_HEIGHT},center:{el:{type:"bi.absolute",items:[{el:BI.createWidget(b.body),left:20,top:10,right:20,bottom:0}]}}};b.footer&&(c.south={el:{type:"bi.absolute",items:[{el:BI.createWidget(b.footer),left:20,top:0,right:20,bottom:0}]},height:44});var d=this._calculateSize();return{type:"bi.border",items:c,width:d.width,height:d.height}},mounted:function(){var a=this;this.dragger.element.mousedown(function(b){var c=a.element.offset();a.startX=c.left,a.startY=c.top,a.tracker.captureMouseMoves(b)})},_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=220;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:25,lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap: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.button_group.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"}),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-border-top",height:30,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.button_group},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||30:0,c=this.tab?this.tab.attr("height")||25:0,d=(this.tool&&this.tool.attr("height")||25)*(this.tool&&this.tool.isVisible()?1:0);this.view.resetHeight?this.view.resetHeight(a-b-c-d-2):this.view.element.css({"max-height":a-b-c-d-2+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.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="IconButton.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="ImageButton.EVENT_CHANGE",BI.shortcut("bi.image_button",BI.ImageButton),function(a){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",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",forceCenter:!1,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?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",width:18,height:a.height-2}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value,height:a.height-2}),BI.createWidget({type:"bi.horizontal_auto",cls:a.iconCls,element:this,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:a.textAlign,whiteSpace:a.whiteSpace,forceCenter:a.forceCenter,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"}(jQuery),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",forceCenter:!1,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,forceCenter:a.forceCenter,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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),c=BI.createWidget({type:"bi.layout",width:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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},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.center_adapt",width:a.height,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(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", +}}),rg.prototype.eachLine=rg.prototype.iter;var sg="iter insert remove copy getEditor constructor".split(" ");for(var tg in rg.prototype)rg.prototype.hasOwnProperty(tg)&&De(sg,tg)<0&&(a.prototype[tg]=function(a){return function(){return a.apply(this.doc,arguments)}}(rg.prototype[tg]));ye(rg);var ug=a.e_preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},vg=a.e_stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},wg=a.e_stop=function(a){ug(a),vg(a)},xg=a.on=function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var d=a._handlers||(a._handlers={}),e=d[b]||(d[b]=[]);e.push(c)}},yg=a.off=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else{var d=a._handlers&&a._handlers[b];if(!d)return;for(var e=0;e=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}},Hg=[""],Ig=function(a){a.select()};wf?Ig=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:nf&&(Ig=function(a){try{a.select()}catch(b){}});var Jg,Kg=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Lg=a.isWordChar=function(a){return/\w/.test(a)||a>"€"&&(a.toUpperCase()!=a.toLowerCase()||Kg.test(a))},Mg=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Jg=document.createRange?function(a,b,c,d){var e=document.createRange();return e.setEnd(d||a,c),e.setStart(a,b),e}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(e){return d}return d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d};var Ng=a.contains=function(a,b){if(3==b.nodeType&&(b=b.parentNode),a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)};nf&&of<11&&(Pe=function(){try{return document.activeElement}catch(a){return document.body}});var Og,Pg,Qg=a.rmClass=function(a,b){var c=a.className,d=Qe(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+(e?d[1]+e:"")}},Rg=a.addClass=function(a,b){var c=a.className;Qe(b).test(c)||(a.className+=(c?" ":"")+b)},Sg=!1,Tg=function(){if(nf&&of<9)return!1;var a=Me("div");return"draggable"in a||"dragDrop"in a}(),Ug=a.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;b<=d;){var e=a.indexOf("\n",b);e==-1&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");g!=-1?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},Vg=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return!(!b||b.parentElement()!=a)&&0!=b.compareEndPoints("StartToEnd",b)},Wg=function(){var a=Me("div");return"oncopy"in a||(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),Xg=null,Yg={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};a.keyNames=Yg,function(){for(var a=0;a<10;a++)Yg[a+48]=Yg[a+96]=String(a);for(var a=65;a<=90;a++)Yg[a]=String.fromCharCode(a);for(var a=1;a<=12;a++)Yg[a+111]=Yg[a+63235]="F"+a}();var Zg,$g=function(){function a(a){return a<=247?c.charAt(a):1424<=a&&a<=1524?"R":1536<=a&&a<=1773?d.charAt(a-1536):1774<=a&&a<=2220?"r":8192<=a&&a<=8203?"w":8204==a?"b":"L"}function b(a,b,c){this.level=a,this.from=b,this.to=c}var c="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",d="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,g=/[LRr]/,h=/[Lb1n]/,i=/[1n]/,j="L";return function(c){if(!e.test(c))return!1;for(var d,k=c.length,l=[],m=0;mf.ch&&(i.end=f.ch,i.string=i.string.slice(0,f.ch-i.start)):i={start:f.ch,end:f.ch,string:"",state:i.state,type:"."==i.string?"property":null};for(var j=i;"property"==j.type;){if(j=d(b,h(f.line,j.start)),"."!=j.string)return;if(j=d(b,h(f.line,j.start)),!k)var k=[];k.push(j)}return{list:g(i,k,c,e),from:h(f.line,i.start),to:h(f.line,i.end)}}}function e(){return BI.FormulaCollections}function f(a,b){return d(a,e(),function(a,b){return a.getTokenAt(b)},b)}function g(a,d,e,f){function g(a){0!=a.lastIndexOf(i,0)||c(h,a)||h.push(a)}var h=[],i=a.string;return i?(d&&d.length?d.pop():b(e,g),h):h}var h=a.Pos;a.registerHelper("hint","formula",f)}),function(a){a(CodeMirror)}(function(a){"use strict";a.defineMode("formula",function(){function a(a){for(var b={},c=0,d=a.length;c0){var y=w.bottom-w.top,z=q.top-(q.bottom-w.top);if(z-y>0)k.style.top=(s=q.top-y)+"px",t=!1;else if(y>v){k.style.height=v-5+"px",k.style.top=(s=q.bottom-w.top)+"px";var A=j.getCursor();f.from.ch!=A.ch&&(q=j.cursorCoords(A),k.style.left=(r=q.left)+"px",w=k.getBoundingClientRect())}}var B=w.right-u;if(B>0&&(w.right-w.left>u&&(k.style.width=u-5+"px",B-=w.right-w.left-u),k.style.left=(r=q.left-B)+"px"),j.addKeyMap(this.keyMap=d(b,{moveFocus:function(a,b){i.changeActive(i.selectedHint+a,b)},setFocus:function(a){i.changeActive(a)},menuSize:function(){return i.screenAmount()},length:l.length,close:function(){b.close()},pick:function(){i.pick()},data:f})),b.options.closeOnUnfocus){var C;j.on("blur",this.onBlur=function(){C=setTimeout(function(){b.close()},100)}),j.on("focus",this.onFocus=function(){clearTimeout(C)})}var D=j.getScrollInfo();return j.on("scroll",this.onScroll=function(){var a=j.getScrollInfo(),c=j.getWrapperElement().getBoundingClientRect(),d=s+D.top-a.top,e=d-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return t||(e+=k.offsetHeight),e<=c.top||e>=c.bottom?b.close():(k.style.top=d+"px",void(k.style.left=r+D.left-a.left+"px"))}),a.on(k,"dblclick",function(a){var b=e(k,a.target||a.srcElement);b&&null!=b.hintId&&(i.changeActive(b.hintId),i.pick())}),a.on(k,"click",function(a){var c=e(k,a.target||a.srcElement);c&&null!=c.hintId&&(i.changeActive(c.hintId),b.options.completeOnSingleClick&&i.pick())}),a.on(k,"mousedown",function(){setTimeout(function(){j.focus()},20)}),a.signal(f,"select",l[0],k.firstChild),!0}var g="CodeMirror-hint",h="CodeMirror-hint-active";a.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);var d={hint:b};if(c)for(var e in c)d[e]=c[e];return a.showHint(d)},a.defineExtension("showHint",function(c){if(!(this.listSelections().length>1||this.somethingSelected())){this.state.completionActive&&this.state.completionActive.close();var d=this.state.completionActive=new b(this,c);d.options.hint&&(a.signal(this,"startCompletion",this),d.update(!0))}});var i=window.requestAnimationFrame||function(a){return setTimeout(a,1e3/60)},j=window.cancelAnimationFrame||clearTimeout;b.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&a.signal(this.data,"close"),this.widget&&this.widget.close(),a.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(b,d){var e=b.list[d];if(e.hint)e.hint(this.cm,b,e);else if(this.cm.replaceRange(c(e),e.from||b.from,e.to||b.to,"complete"),e.isKeyword===!0);else{var f=this.cm.getCursor();this.cm.markText(e.from||b.from,f,{className:"#function",atomic:!0}),this.cm.replaceSelection("() "),f=this.cm.getCursor(),f.ch=f.ch-2,this.cm.setCursor(f),this.cm.focus()}a.signal(b,"pick",e),this.close()},cursorActivity:function(){this.debounce&&(j(this.debounce),this.debounce=0);var a=this.cm.getCursor(),b=this.cm.getLine(a.line);if(a.line!=this.startPos.line||b.length-a.ch!=this.startLen-this.startPos.ch||a.ch=this.data.list.length?b=c?this.data.list.length-1:0:b<0&&(b=c?0:this.data.list.length-1),this.selectedHint!=b){var d=this.hints.childNodes[this.selectedHint];d.className=d.className.replace(" "+h,""),d=this.hints.childNodes[this.selectedHint=b],d.className+=" "+h,d.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=d.offsetTop+d.offsetHeight-this.hints.clientHeight+3),a.signal(this.data,"select",this.data.list[this.selectedHint],d)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},a.registerHelper("hint","auto",function(b,c){var d,e=b.getHelpers(b.getCursor(),"hint");if(e.length)for(var f=0;f,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};a.defineOption("hintOptions",null)}),$.extend(BI,{Msg:function(){var a,b,c;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||$("body");var d=b.level||"normal",e=!!BI.isNull(b.autoClose)||b.autoClose,f=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:d,autoClose:e,text:a});BI.createWidget({type:"bi.absolute",element:c,items:[{el:f,left:"50%",top:10}]}),f.element.css({"margin-left":-1*f.element.outerWidth()/2}),f.element.removeClass("bi-message-leave").addClass("bi-message-enter"),e&&BI.delay(function(){f.element.removeClass("bi-message-enter").addClass("bi-message-leave"),BI.delay(function(){f.destroy()},1e3)},5e3)},_show:function(d,e,f,g){b=$('
').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body"),c=$('
').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-message-content bi-card",items:{north:{el:{type:"bi.border",cls:"bi-message-title bi-background",items:{center:{el:{type:"bi.label",text:e||BI.i18nText("BI-Basic_Prompt"),textAlign:"left",hgap:20,height:50}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",handler:function(){h()}},width:60}}},height:50},center:{el:{type:"bi.text",cls:"bi-message-text",tgap:60,hgap:20,lineHeight:30,whiteSpace:"normal",text:f}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",hgap:5,items:i},top:0,left:20,right:20,bottom:0}]},height:60}},width:400,height:300}]};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(),0===b.scrollLeft&&0===b.scrollTop||BI.nextTick(function(){a.element.scrollTop(b.scrollTop),a.element.scrollLeft(b.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})),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.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",header:null,body:null,footer:null})},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(),e=$("body").width(),f=$("body").height();a.startX+=b,a.startY+=c,a.element.css({left:BI.clamp(a.startX,0,e-d.width)+"px",top:BI.clamp(a.startY,0,f-d.height)+"px"}),BI.Resizers._resize()},function(){a.tracker.releaseMouseMoves()},window);var c={north:{el:{type:"bi.border",cls:"bi-message-title bi-background",ref:function(b){a.dragger=b},items:{center:{el:{type:"bi.absolute",items:[{el:BI.isPlainObject(b.header)?BI.createWidget(b.header):{type:"bi.label",height:this._constant.HEADER_HEIGHT,text:b.header,title:b.header,textAlign:"left"},left:10,top:0,right:0,bottom:0}]}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){a.close()}},width:60}}},height:this._constant.HEADER_HEIGHT},center:{el:{type:"bi.absolute",items:[{el:BI.createWidget(b.body),left:20,top:10,right:20,bottom:0}]}}};b.footer&&(c.south={el:{type:"bi.absolute",items:[{el:BI.createWidget(b.footer),left:20,top:0,right:20,bottom:0}]},height:44});var d=this._calculateSize();return{type:"bi.border",items:c,width:d.width,height:d.height}},mounted:function(){var a=this;this.dragger.element.mousedown(function(b){var c=a.element.offset();a.startX=c.left,a.startY=c.top,a.tracker.captureMouseMoves(b)})},_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=220;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:25,lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap: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.stopEvent()},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.button_group.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"}),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-border-top",height:30,items:BI.createItems(a.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.button_group},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetWidth:function(a){this.options.width=a,this.element.width(a)},resetHeight:function(a){var b=this.toolbar?this.toolbar.attr("height")||30:0,c=this.tab?this.tab.attr("height")||25:0,d=(this.tool&&this.tool.attr("height")||25)*(this.tool&&this.tool.isVisible()?1:0);this.view.resetHeight?this.view.resetHeight(a-b-c-d-2):this.view.element.css({"max-height":a-b-c-d-2+"px"})},setValue:function(a){this.tab&&this.tab.setValue(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.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="IconButton.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="ImageButton.EVENT_CHANGE",BI.shortcut("bi.image_button",BI.ImageButton),function(a){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",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",forceCenter:!1,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?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",width:18,height:a.height-2}),this.text=BI.createWidget({type:"bi.label",text:a.text,value:a.value,height:a.height-2}),BI.createWidget({type:"bi.horizontal_auto",cls:a.iconCls,element:this,hgap:a.hgap,vgap:a.vgap,tgap:a.tgap,bgap:a.bgap,lgap:a.lgap,rgap:a.rgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:a.textAlign,whiteSpace:a.whiteSpace,forceCenter:a.forceCenter,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"}(jQuery),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",forceCenter:!1,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,forceCenter:a.forceCenter,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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}}]}),c=BI.createWidget({type:"bi.layout",width:a.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.center_adapt",cls:a.iconCls2,width:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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},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.center_adapt",width:a.height,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(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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",cls:a.iconCls1,width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",cls:a.iconCls2,width:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.center_adapt",width:a.height,height:a.height,items:[{el:{type:"bi.icon",width:a.iconWidth,height: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.CodeEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(),{baseCls:"bi-code-editor",value:"",watermark:"",lineHeight:2,readOnly:!1,lineNumbers:!1,paramFormatter:function(a){return a}})},_init:function(){BI.CodeEditor.superclass._init.apply(this,arguments);var a=this.options,b=this,c={textWrapping:!0,lineWrapping:!0,lineNumbers:!1,readOnly:a.readOnly,specialChars:/[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/};a.readOnly&&(c.cursorBlinkRate=-1),this.editor=CodeMirror(this.element[0],c),1===a.lineHeight?this.element.addClass("codemirror-low-line-height"):this.element.addClass("codemirror-high-line-height"),this.editor.on("change",function(a,c){BI.nextTick(function(){b.fireEvent(BI.CodeEditor.EVENT_CHANGE)})}),this.editor.on("focus",function(){b.watermark.setVisible(!1),b.fireEvent(BI.CodeEditor.EVENT_FOCUS)}),this.editor.on("blur",function(){b.watermark.setVisible(BI.isEmptyString(b.getValue())),b.fireEvent(BI.CodeEditor.EVENT_BLUR)}),this.watermark=BI.createWidget({type:"bi.label",text:a.watermark,cls:"bi-water-mark",whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind("mousedown",function(a){b.insertString(""),b.editor.focus(),a.stopEvent()}),this.watermark.element.bind("click",function(a){b.editor.focus(),a.stopEvent()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,top:0,left:a.lineNumbers?35:5}]})},mounted:function(){var a=this.options;(BI.isNumber(a.value)||BI.isString(a.value))&&this.setValue(a.value),BI.isNotNull(a.style)&&this.setStyle(a.style)},_setEnable:function(a){BI.CodeEditor.superclass._setEnable.apply(this,arguments),this.editor.setOption("readOnly",a!==!0&&"nocursor")},_checkWaterMark:function(){var a=this.options;BI.isEmptyString(this.editor.getValue())&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},insertParam:function(a){var b=a;a=this.options.paramFormatter(a);var c=this.editor.getCursor();this.editor.replaceSelection("​"+a+"​");var d=this.editor.getCursor(),e={className:"param",atomic:!0};BI.isNotNull(a.match(/^$/))&&(e.className="error-param"),e.value=b,this.editor.markText(c,d,e),this.editor.replaceSelection(" "),this.editor.focus()},insertString:function(a){this.editor.replaceSelection(a),this.editor.focus()},getValue:function(){return this.editor.getValue("\n",function(a){var b=a.text,c=a.text,d=0;return c.text=b,_.forEach(_.sortBy(a.markedSpans,"from"),function(a,b){switch(a.marker.className){case"param":case"error-param":var e=a.to-a.from;c=c.substr(0,a.from+d)+"${"+a.marker.value+"}"+c.substr(a.to+d,c.length),d+=3,d+=a.marker.value.length-e}}),c})},_analyzeContent:function(a){var b=/\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]|\$[^\{]*[^\$\{]/g;return a.match(b)},setValue:function(a){var b,c=this;this.refresh(),c.editor.setValue(""),b=this._analyzeContent(a||""),BI.each(b,function(a,b){var d=/\$[\{][^\}]*[\}]/,e=b.match(d);BI.isNotEmptyArray(e)?c.insertParam(e[0].substring(2,b.length-1)):c.insertString(b)}),this._checkWaterMark()},focus:function(){this.editor.focus()},blur:function(){this.editor.getInputField().blur()},setStyle:function(a){this.style=a,this.element.css(a)},getStyle:function(){return this.style},refresh:function(){var a=this;BI.nextTick(function(){a.editor.refresh()})}}),BI.CodeEditor.EVENT_CHANGE="EVENT_CHANGE",BI.CodeEditor.EVENT_BLUR="EVENT_BLUR",BI.CodeEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.code_editor",BI.CodeEditor),BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-editor",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,forceCenter:!0,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()}),this.watermark.element.css({position:"absolute",left:"3px",right:"3px",top:"0px",bottom:"0px"}));var c=[{el:{type:"bi.default",items:this.watermark?[this.editor,this.watermark]:[this.editor]},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:c}),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){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.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(this.editor.getValue())),!this.disabledError&&BI.isKey(c))return BI.Bubbles[a?"show":"hide"](this.getName(),c,this),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()},resetLastValidValue:function(){this.editor.resetLastValidValue()},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()}}),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_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="MultifileEditor.EVENT_CHANGE",BI.MultifileEditor.EVENT_UPLOADSTART="MultifileEditor.EVENT_UPLOADSTART",BI.MultifileEditor.EVENT_ERROR="MultifileEditor.EVENT_ERROR",BI.MultifileEditor.EVENT_PROGRESS="MultifileEditor.EVENT_PROGRESS",BI.MultifileEditor.EVENT_UPLOADED="MultifileEditor.EVENT_UPLOADED",BI.shortcut("bi.multifile_editor",BI.MultifileEditor),BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return $.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},_init:function(){BI.TextAreaEditor.superclass._init.apply(this,arguments);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:0,right:3,top:0,bottom:5}]}),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)),$(document).bind("mousedown."+b.getName(),function(a){BI.DOM.isExist(b)&&!b.element.__isMouseInBounds__(a)&&($(document).unbind("mousedown."+b.getName()),b.content.element.blur())})}),this.content.element.blur(function(){b.isValid()&&(b._blur(),b.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),$(document).unbind("mousedown."+b.getName())}),BI.isKey(a.value)&&b.setValue(a.value),BI.isNotNull(a.style)&&b.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",textAlign:"left",height:30,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:0,top:0,right:0}]})))},_focus:function(){this.content.element.addClass("textarea-editor-focus"),this._checkWaterMark()},_blur:function(){this.content.element.removeClass("textarea-editor-focus"),this._checkWaterMark()},focus:function(){this._focus(),this.content.element.focus()},blur:function(){this._blur(),this.content.element.blur()},getValue:function(){return this.content.element.val()},setValue:function(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)}}),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.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()&&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,{baseCls:(a.baseCls||"")+" bi-iframe",src:"",width:"100%",height:"100%"})},_init:function(){var a=this.options;this.options.element=$("'))}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||window.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loaded",name:"",url:"",multiple:!0,accept:"",maxSize:-1})},_init:function(){var a=this.options;BI.File.superclass._init.apply(this,arguments),a.multiple===!0&&this.element.attr("multiple","multiple"),this.element.attr("name",a.name||this.getName()),this.element.attr("title",a.title||"")},mounted:function(){var a=this,b=this.options,c=this.wrap=this._wrap(this.element[0],b.maxSize);c.onloadstart=function(b,c){a.fireEvent(BI.File.EVENT_UPLOADSTART,arguments)},c.onprogress=function(b,c){this.file.fileSize!==-1&&b.simulation,a.fireEvent(BI.File.EVENT_PROGRESS,{file:this.file,total:b.total,loaded:b.loaded,simulation:b.simulation})},c.onerror=function(){a.fireEvent(BI.File.EVENT_ERROR)},c.onload=function(b,c){var d=this;setTimeout(function(){d.clean(),d.hide(),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);d>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.dom.input).click()},upload:function(a){this.wrap.upload(a)},getValue:function(){return this.wrap.attach_array},reset:function(){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="BI.File.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)}(),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",element:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1})},_init:function(){BI.Input.superclass._init.apply(this,arguments);var a=this,b=!1,c=!1,d=BI.debounce(function(c){a.onKeyDown(c,b),a._keydown_=!1},300),e=BI.debounce(BI.bind(this._click,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(d){c=!1,b=d.ctrlKey,a.fireEvent(BI.Input.EVENT_QUICK_DOWN)}).keyup(function(b){c&&b.keyCode===BI.KeyCode.ENTER||(a._keydown_=!0,d(b.keyCode))}).on("input propertychange",function(b){BI.isNotNull(b.keyCode)&&(c=!0,a._keydown_=!0,d(b.keyCode))}).click(function(a){a.stopPropagation(),e()}).mousedown(function(b){a.element.val(a.element.val())}).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(){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()&&(b._lastValidValue=b.getValue(),b.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,b.getValue(),b),b.fireEvent(BI.Input.EVENT_CONFIRM)),b.fireEvent(BI.Input.EVENT_BLUR)}var b=this;b._keydown_===!0?BI.delay(a,300):a()},_click:function(){this._isEditing!==!0&&(this._focus(),this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(a,b){this.isValid()&&BI.trim(this._lastValidValue)===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))),b===!0&&86===a?this._valueChange():(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())?(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._lastValidValue||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._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},_setValid:function(){BI.Input.superclass._setValid.apply(this,arguments),this.isValid()?(this.element.removeClass("bi-input-error"),this.fireEvent(BI.Input.EVENT_VALID,BI.trim(this.getValue()),this)):(this._lastValidValue===this.getValue()&&(this._lastValidValue=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_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.Radio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.Radio.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.Radio.superclass._init.apply(this,arguments)},doClick:function(){BI.Radio.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Radio.EVENT_CHANGE)}}),BI.Radio.EVENT_CHANGE="Radio.EVENT_CHANGE",BI.shortcut("bi.radio",BI.Radio),BI.Label=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.Label.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-label",textAlign:"center",whiteSpace:"nowrap",forceCenter:!1,textWidth:null,textHeight:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",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}},_init:function(){BI.Label.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var a=this.options,b=this._createJson();if(BI.isNumber(a.width)&&a.width>0){if(BI.isNumber(a.textWidth)&&a.textWidth>0){if(BI.isNumber(a.height)&&a.height>0){var c=(a.width-a.textWidth)/2;return BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:c+a.hgap+a.lgap,right:c+a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]}),void this.element.css({"line-height":a.height+"px"})}return b.width=a.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]})}return"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",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:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.absolute",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(b.width=a.width-2*a.hgap,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b)}]}))}return BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=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?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap,scrollable:"normal"===a.whiteSpace,element:this,items:[this.text]})):BI.isNumber(a.height)&&a.height>0?BI.isNumber(a.textHeight)&&a.textHeight>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.element.css({"line-height":a.height+"px"}),this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),a.forceCenter?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]})):(this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})))},_createNotCenterEl:function(){var a=this.options,b=this._createJson();return BI.isNumber(a.width)&&a.width>0?BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=a.textWidth,BI.isNumber(a.height)&&a.height>0?(BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]}),void this.element.css({"line-height":a.height+"px"})):void BI.createWidget({type:"bi.vertical_adapt",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(b)}]})):"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",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:[this.text]})):BI.isNumber(a.height)&&a.height>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.absolute",scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(b.width=a.width-2*a.hgap-a.lgap-a.rgap,void BI.createWidget({type:"bi.vertical_adapt",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(b)}]})):BI.isNumber(a.textWidth)&&a.textWidth>0?(b.width=a.textWidth,void BI.createWidget({type:"bi.vertical_adapt",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(b)}]})):"normal"==a.whiteSpace?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",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:[this.text]})):BI.isNumber(a.height)&&a.height>0?BI.isNumber(a.textHeight)&&a.textHeight>0?(this.element.css({"line-height":a.height+"px"}),void BI.createWidget({type:"bi.adaptive",height:a.height,scrollable:"normal"===a.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(b),left:a.hgap+a.lgap,right:a.hgap+a.rgap,top:a.vgap+a.tgap,bottom:a.vgap+a.bgap}]})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),this.element.css({"line-height":a.height+"px"}),this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})):(BI.extend(b,{hgap:a.hgap,vgap:a.vgap,lgap:a.lgap,rgap:a.rgap,tgap:a.tgap,bgap:a.bgap}),a.forceCenter?(this.text=BI.createWidget(b),void BI.createWidget({type:"bi.vertical_adapt",element:this,items:[this.text]})):(this.text=BI.createWidget(BI.extend(b,{element:this})),void BI.createWidget({type:"bi.layout",element:this.text,scrollable:"normal"===a.whiteSpace})))},_setEnable:function(a){BI.Label.superclass._setEnable.apply(this,arguments),a===!0?this.element.removeClass("base-disabled disabled"):a===!1&&this.element.addClass("base-disabled disabled")},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.Label.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(a)},populate:function(){BI.Label.superclass.populate.apply(this,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:10,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.center_adapt",cls:d+" toast-icon",items:[{type:"bi.icon"}],width:36},{el:{type:"bi.label",whiteSpace:"normal",text:b.text,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:5,columnSize:f})},setText:function(a){this.text.setText(a)}}),BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:10},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1,height:20})},_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:16}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:a.text,textHeight:20,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(){}}),function(a){a(CodeMirror)}(function(a){function b(a){return"[object Array]"==Object.prototype.toString.call(a)}function c(b){var c=b.doc.modeOption;return"sql"===c&&(c="text/x-sql"),a.resolveMode(c).keywords}function d(b){var c=b.doc.modeOption;return"sql"===c&&(c="text/x-sql"),a.resolveMode(c).identifierQuote||"`"}function e(a){return"string"==typeof a?a:a.text}function f(a,c){return b(c)&&(c={columns:c}),c.text||(c.text=a),c}function g(a){var c={};if(b(a))for(var d=a.length-1;d>=0;d--){var g=a[d];c[e(g).toUpperCase()]=f(e(g),g)}else if(a)for(var h in a)c[h.toUpperCase()]=f(h,a[h]);return c}function h(a){return q[a.toUpperCase()]}function i(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function j(a,b){if(BI.isNotEmptyString(a)&&b.length!==a.length){var c=a.length,d=e(b).substr(0,c);return a.toUpperCase()===d.toUpperCase()}}function k(a,c,d,e){if(b(d))for(var f=0;f0)&&w(m,i[n])<=0){j={start:l,end:i[n]};break}l=i[n]}for(var p=c.getRange(j.start,j.end,!1),n=0;nl.ch&&(m.end=l.ch,m.string=m.string.slice(0,l.ch-m.start)),m.string.match(/^[.`"\w@]\w*$/)?(w=m.string,o=m.start,u=m.end):(o=u=l.ch,w=""),"."==w.charAt(0)||w.charAt(0)==t?o=n(l,m,x,a):(k(x,w,q,function(a){return a}),k(x,w,r,function(a){return a}),f||k(x,w,s,function(a,b){var c=b47&&c.charCodeAt(0)<58)return a.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),n.decimallessFloat&&a.match(/^\.(?!\.)/),"number";if("?"==c&&(a.eatSpace()||a.eol()||a.eat(";")))return"variable-3";if("'"==c||'"'==c&&n.doubleQuote)return b.tokenize=e(c),b.tokenize(a,b);if((n.nCharCast&&("n"==c||"N"==c)||n.charsetCast&&"_"==c&&a.match(/[a-z][a-z0-9]*/i))&&("'"==a.peek()||'"'==a.peek()))return"keyword";if(/^[\(\),\;\[\]]/.test(c))return null;if(n.commentSlashSlash&&"/"==c&&a.eat("/"))return a.skipToEnd(),"comment";if(n.commentHash&&"#"==c||"-"==c&&a.eat("-")&&(!n.commentSpaceRequired||a.eat(" ")))return a.skipToEnd(),"comment";if("/"==c&&a.eat("*"))return b.tokenize=f(1),b.tokenize(a,b);if("."!=c){if(m.test(c))return a.eatWhile(m),null;if("{"==c&&(a.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||a.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";a.eatWhile(/^[_\w\d]/);var g=a.current().toLowerCase();return p.hasOwnProperty(g)&&(a.match(/^( )+'[^']*'/)||a.match(/^( )+"[^"]*"/))?"number":j.hasOwnProperty(g)?"atom":k.hasOwnProperty(g)?"builtin":q.hasOwnProperty(g)&&"("===a.peek()?"function":l.hasOwnProperty(g)?"keyword":i.hasOwnProperty(g)?"string-2":null}return n.zerolessFloat&&a.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":a.match(/^\.+/)?null:n.ODBCdotTable&&a.match(/^[\w\d_]+/)?"variable-2":void 0}function e(a){return function(b,c){for(var e,f=!1;null!=(e=b.next());){if(e==a&&!f){c.tokenize=d;break}f=!f&&"\\"==e}return"string"}}function f(a){return function(b,c){var e=b.match(/^.*?(\/\*|\*\/)/);return e?"/*"==e[1]?c.tokenize=f(a+1):a>1?c.tokenize=f(a-1):c.tokenize=d:b.skipToEnd(),"comment"}}function g(a,b,c){b.context={prev:b.context,indent:a.indentation(),col:a.column(),type:c}}function h(a){a.indent=a.context.indent,a.context=a.context.prev}var i=c.client||{},j=c.atoms||{"false":!0,"true":!0,"null":!0},k=c.builtin||{},l=c.keywords||{},m=c.operatorChars||/^[*+\-%<>!=&|~^]/,n=c.support||{},o=c.hooks||{},p=c.dateSQL||{date:!0,time:!0,timestamp:!0},q=c.functions||{};return{startState:function(){return{tokenize:d,context:null}},token:function(a,b){if(a.sol()&&b.context&&null==b.context.align&&(b.context.align=!1),b.tokenize==d&&a.eatSpace())return null;var c=b.tokenize(a,b);if("comment"==c)return c;b.context&&null==b.context.align&&(b.context.align=!0);var e=a.current();return"("==e?g(a,b,")"):"["==e?g(a,b,"]"):b.context&&b.context.type==e&&h(b),c},indent:function(c,d){var e=c.context;if(!e)return a.Pass;var f=d.charAt(0)==e.type;return e.align?e.col+(f?0:1):e.indent+(f?0:b.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:n.commentSlashSlash?"//":n.commentHash?"#":"--"}}),function(){function b(a){for(var b={},c=a.split(" "),d=0;d!=]/,dateSQL:b("date time timestamp"),support:b("ODBCdotTable doubleQuote binaryNumber hexNumber"),functions:BI.makeObject(BI.FormulaCollections,!0)})}()}),BI.SQLEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(),{baseCls:"bi-sql-editor",value:"",lineHeight:2,showHint:!0,supportFunction:!1,supportParam:!1})},_init:function(){BI.CodeEditor.superclass._init.apply(this,arguments);var a=this.options,b=this;this.editor=CodeMirror(this.element[0],{mode:"text/x-sql",textWrapping:!0,lineWrapping:!0,lineNumbers:!1}),1===a.lineHeight?this.element.addClass("codemirror-low-line-height"):this.element.addClass("codemirror-high-line-height"),this.editor.on("change",function(c,d){b._checkWaterMark(),a.showHint&&CodeMirror.showHint(c,CodeMirror.sqlHint,{completeSingle:!1,supportFunction:a.supportFunction}),BI.nextTick(function(){b.fireEvent(BI.FormulaEditor.EVENT_CHANGE)})}),this.editor.on("focus",function(){b._checkWaterMark(),b.fireEvent(BI.FormulaEditor.EVENT_FOCUS)}),this.editor.on("blur",function(){b.fireEvent(BI.FormulaEditor.EVENT_BLUR)}),this.watermark=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Please_Enter_SQL"),cls:"bi-water-mark",whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind("mousedown",function(a){b.insertString(""),b.editor.focus(),a.stopEvent()}),this.watermark.element.bind("click",function(a){b.editor.focus(),a.stopEvent()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,top:0,left:5}]}),BI.isKey(a.value)&&BI.nextTick(function(){b.setValue(a.value)})},insertString:function(a){this.editor.replaceSelection(a),this.editor.focus()},insertParam:function(a){var b=a,c=this.editor.getCursor();this.editor.replaceSelection(a);var d=this.editor.getCursor(),e={className:"param",atomic:!0};e.value=b,this.editor.markText(c,d,e),this.editor.replaceSelection(" "),this.editor.focus()},_checkWaterMark:function(){var a=this.options;!this.disabledWaterMark&&BI.isEmptyString(this.editor.getValue())&&BI.isKey(a.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible(); },_analyzeContent:function(a){var b=/\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]/g;return a.match(b)},getValue:function(){var a=this.editor.getValue("\n",function(a){var b=a.text,c=a.text,d=0;return c.text=b,_.forEach(_.sortBy(a.markedSpans,"from"),function(a,b){switch(a.marker.className){case"param":case"error-param":var e=a.to-a.from;c=c.substr(0,a.from+d)+"${"+a.marker.value+"}"+c.substr(a.to+d,c.length),d+=3,d+=a.marker.value.length-e}}),c});return a.replaceAll("(\\$\\{.*?\\})\\s","$1")},setValue:function(a){var b,c=this,d=this.options;this.refresh(),c.editor.setValue(""),b=this._analyzeContent(a||""),BI.each(b,function(a,b){var e=/\$[\{][^\}]*[\}]/,f=b.match(e);BI.isNotEmptyArray(f)&&d.supportParam?c.insertParam(f[0].substring(2,b.length-1)):c.insertString(b)}),this._checkWaterMark()},refresh:function(){var a=this;BI.nextTick(function(){a.editor.refresh()})}}),BI.shortcut("bi.sql_editor",BI.SQLEditor),function(a,b){"function"==typeof define&&define.amd?define("eve",function(){return b()}):"object"==typeof exports?module.exports=b():a.eve=b()}(this,function(){var a,b,c="0.4.2",d="hasOwnProperty",e=/[\.\/]/,f="*",g=function(){},h=function(a,b){return a-b},i={n:{}},j=function(c,d){c=String(c);var e,f=b,g=Array.prototype.slice.call(arguments,2),i=j.listeners(c),k=0,l=[],m={},n=[],o=a;a=c,b=0;for(var p=0,q=i.length;p=1e3&&delete h[i.shift()],i.push(g),h[g]=a[C](b,f),c?c(h[g]):h[g])}return e}function f(){return this.hex}function g(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function h(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function i(a,b,c,d,e,f,g,i,j){null==j&&(j=1),j=j>1?1:j<0?0:j;for(var k=j/2,l=12,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;po;)m/=2,n+=(kN(e,g)||N(b,d)N(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+O(a,c).toFixed(2)||n>+N(a,c).toFixed(2)||n<+O(e,g).toFixed(2)||n>+N(e,g).toFixed(2)||o<+O(b,d).toFixed(2)||o>+N(b,d).toFixed(2)||o<+O(f,h).toFixed(2)||o>+N(f,h).toFixed(2)))return{x:l,y:m}}}}function l(a,c,d){var e=b.bezierBBox(a),f=b.bezierBBox(c);if(!b.isBBoxIntersect(e,f))return d?0:[];for(var g=i.apply(0,a),h=i.apply(0,c),j=N(~~(g/5),1),l=N(~~(h/5),1),m=[],n=[],o={},p=d?0:[],q=0;q=0&&A<=1.001&&B>=0&&B<=1.001&&(d?p++:p.push({x:z.x,y:z.y,t1:O(A,1),t2:O(B,1)}))}}return p}function m(a,c,d){a=b._path2curve(a),c=b._path2curve(c);for(var e,f,g,h,i,j,k,m,n,o,p=d?0:[],q=0,r=a.length;qd)return d;for(;cf?c=e:d=e,e=(d-c)/2+c}return e}var j=3*b,k=3*(d-b)-j,l=1-j-k,m=3*c,n=3*(e-c)-m,o=1-m-n;return h(a,1/(200*f))}function q(a,b){var c=[],d={};if(this.ms=b,this.times=1,a){for(var e in a)a[y](e)&&(d[$(e)]=a[e],c.push($(e)));c.sort(ka)}this.anim=d,this.top=c[c.length-1],this.percents=c}function r(c,d,e,f,g,h){e=$(e);var i,j,k,l,m,o,q=c.ms,r={},s={},t={};if(f)for(w=0,x=fb.length;wf*c.top){e=c.percents[w],m=c.percents[w-1]||0,q=q/c.top*(e-m),l=c.percents[w+1],i=c.anim[e];break}f&&d.attr(c.anim[c.percents[w]])}if(i){if(j)j.initstatus=f,j.start=new Date-j.ms*f;else{for(var z in i)if(i[y](z)&&(ca[y](z)||d.paper.customAttributes[y](z)))switch(r[z]=d.attr(z),null==r[z]&&(r[z]=ba[z]),s[z]=i[z],ca[z]){case S:t[z]=(s[z]-r[z])/q;break;case"colour":r[z]=b.getRGB(r[z]);var A=b.getRGB(s[z]);t[z]={r:(A.r-r[z].r)/q,g:(A.g-r[z].g)/q,b:(A.b-r[z].b)/q};break;case"path":var B=Ia(r[z],s[z]),C=B[1];for(r[z]=B[0],t[z]=[],w=0,x=r[z].length;w',qa=ra.firstChild,qa.style.behavior="url(#default#VML)",!qa||"object"!=typeof qa.adj)return b.type=F;ra=null}b.svg=!(b.vml="VML"==b.type),b._Paper=B,b.fn=u=B.prototype=b.prototype,b._id=0,b._oid=0,b.is=function(a,b){return b=L.call(b),"finite"==b?!X[y](+a):"array"==b?a instanceof Array:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||"array"==b&&Array.isArray&&Array.isArray(a)||V.call(a).slice(8,-1).toLowerCase()==b},b.angle=function(a,c,d,e,f,g){if(null==f){var h=a-d,i=c-e;return h||i?(180+180*M.atan2(-i,-h)/R+360)%360:0}return b.angle(a,c,f,g)-b.angle(d,e,f,g)},b.rad=function(a){return a%360*R/180},b.deg=function(a){return Math.round(180*a/R%360*1e3)/1e3},b.snapTo=function(a,c,d){if(d=b.is(d,"finite")?d:10,b.is(a,U)){for(var e=a.length;e--;)if(P(a[e]-c)<=d)return a[e]}else{a=+a;var f=c%a;if(fa-d)return c-f+a}return c};b.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=16*M.random()|0,c="x"==a?b:3&b|8;return c.toString(16)});b.setWindow=function(c){a("raphael.setWindow",b,z.win,c),z.win=c,z.doc=z.win.document,b._engine.initWin&&b._engine.initWin(z.win)};var sa=function(a){if(b.vml){var c,d=/^\s+|\s+$/g;try{var f=new ActiveXObject("htmlfile");f.write(""),f.close(),c=f.body}catch(g){c=createPopup().document.body}var h=c.createTextRange();sa=e(function(a){try{c.style.color=H(a).replace(d,F);var b=h.queryCommandValue("ForeColor");return b=(255&b)<<16|65280&b|(16711680&b)>>>16,"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=z.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",z.doc.body.appendChild(i),sa=e(function(a){return i.style.color=a,z.doc.defaultView.getComputedStyle(i,F).getPropertyValue("color")})}return sa(a)},ta=function(){return"hsb("+[this.h,this.s,this.b]+")"},ua=function(){return"hsl("+[this.h,this.s,this.l]+")"},va=function(){return this.hex},wa=function(a,c,d){if(null==c&&b.is(a,"object")&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,c=a.g,a=a.r),null==c&&b.is(a,T)){var e=b.getRGB(a);a=e.r,c=e.g,d=e.b}return(a>1||c>1||d>1)&&(a/=255,c/=255,d/=255),[a,c,d]},xa=function(a,c,d,e){a*=255,c*=255,d*=255;var f={r:a,g:c,b:d,hex:b.rgb(a,c,d),toString:va};return b.is(e,"finite")&&(f.opacity=e),f};b.color=function(a){var c;return b.is(a,"object")&&"h"in a&&"s"in a&&"b"in a?(c=b.hsb2rgb(a),a.r=c.r,a.g=c.g,a.b=c.b,a.hex=c.hex):b.is(a,"object")&&"h"in a&&"s"in a&&"l"in a?(c=b.hsl2rgb(a),a.r=c.r,a.g=c.g,a.b=c.b,a.hex=c.hex):(b.is(a,"string")&&(a=b.getRGB(a)),b.is(a,"object")&&"r"in a&&"g"in a&&"b"in a?(c=b.rgb2hsl(a),a.h=c.h,a.s=c.s,a.l=c.l,c=b.rgb2hsb(a),a.v=c.b):(a={hex:"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1)),a.toString=va,a},b.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,d=a.o,a=a.h),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-P(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],xa(e,f,g,d)},b.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,f,g,h,i;return a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-P(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],xa(e,f,g,d)},b.rgb2hsb=function(a,b,c){c=wa(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=N(a,b,c),g=f-O(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{h:d,s:e,b:f,toString:ta}},b.rgb2hsl=function(a,b,c){c=wa(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=N(a,b,c),h=O(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:f<.5?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:ua}},b._path2string=function(){return this.join(",").replace(fa,"$1")};b._preload=function(a,b){var c=z.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,z.doc.body.removeChild(this)},c.onerror=function(){z.doc.body.removeChild(this)},z.doc.body.appendChild(c),c.src=a};b.getRGB=e(function(a){if(!a||(a=H(a)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:f};if("none"==a)return{r:-1,g:-1,b:-1,hex:"none",toString:f};!(ea[y](a.toLowerCase().substring(0,2))||"#"==a.charAt())&&(a=sa(a));var c,d,e,g,h,i,j=a.match(W);return j?(j[2]&&(e=_(j[2].substring(5),16),d=_(j[2].substring(3,5),16),c=_(j[2].substring(1,3),16)),j[3]&&(e=_((h=j[3].charAt(3))+h,16),d=_((h=j[3].charAt(2))+h,16),c=_((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100)),j[5]?(i=j[5][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(c/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),b.hsb2rgb(c,d,e,g)):j[6]?(i=j[6][I](da),c=$(i[0]),"%"==i[0].slice(-1)&&(c*=2.55),d=$(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=$(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(c/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(g=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),b.hsl2rgb(c,d,e,g)):(j={r:c,g:d,b:e,toString:f},j.hex="#"+(16777216|e|d<<8|c<<16).toString(16).slice(1),b.is(g,"finite")&&(j.opacity=g),j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:f}},b),b.hsb=e(function(a,c,d){return b.hsb2rgb(a,c,d).hex}),b.hsl=e(function(a,c,d){return b.hsl2rgb(a,c,d).hex}),b.rgb=e(function(a,b,c){function d(a){return a+.5|0}return"#"+(16777216|d(c)|d(b)<<8|d(a)<<16).toString(16).slice(1)}),b.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),c.hex},b.getColor.reset=function(){delete this.start},b.parsePathString=function(a){if(!a)return null;var c=ya(a);if(c.arr)return Aa(c.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[];return b.is(a,U)&&b.is(a[0],U)&&(e=Aa(a)),e.length||H(a).replace(ga,function(a,b,c){var f=[],g=b.toLowerCase();if(c.replace(ia,function(a,b){b&&f.push(+b)}),"m"==g&&f.length>2&&(e.push([b][D](f.splice(0,2))),g="l",b="m"==b?"l":"L"),"r"==g)e.push([b][D](f));else for(;f.length>=d[g]&&(e.push([b][D](f.splice(0,d[g]))),d[g]););}),e.toString=b._path2string,c.arr=Aa(e),e},b.parseTransformString=e(function(a){if(!a)return null;var c=[];return b.is(a,U)&&b.is(a[0],U)&&(c=Aa(a)),c.length||H(a).replace(ha,function(a,b,d){var e=[];L.call(b);d.replace(ia,function(a,b){b&&e.push(+b)}),c.push([b][D](e))}),c.toString=b._path2string,c});var ya=function(a){var b=ya.ps=ya.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[y](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]};b.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=Q(j,3),l=Q(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*M.atan2(q-s,r-t)/R;return(q>s||r=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},b.isBBoxIntersect=function(a,c){var d=b.isPointInsideBBox;return d(c,a.x,a.y)||d(c,a.x2,a.y)||d(c,a.x,a.y2)||d(c,a.x2,a.y2)||d(a,c.x,c.y)||d(a,c.x2,c.y)||d(a,c.x,c.y2)||d(a,c.x2,c.y2)||(a.xc.x||c.xa.x)&&(a.yc.y||c.ya.y)},b.pathIntersection=function(a,b){return m(a,b)},b.pathIntersectionNumber=function(a,b){return m(a,b,1)},b.isPointInsidePath=function(a,c,d){var e=b.pathBBox(a);return b.isPointInsideBBox(e,c,d)&&m(a,[["M",c,d],["H",e.x2+10]],1)%2==1},b._removedFactory=function(b){return function(){a("raphael.log",null,"Raphaël: you are calling to method “"+b+"” of removed object",b)}};var za=b.pathBBox=function(a){var b=ya(a);if(b.bbox)return c(b.bbox);if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=Ia(a);for(var d,e=0,f=0,g=[],h=[],i=0,j=a.length;i1&&(s=M.sqrt(s),c=s*c,d=s*d);var t=c*c,u=d*d,v=(g==h?-1:1)*M.sqrt(P((t*u-t*r*r-u*q*q)/(t*r*r+u*q*q))),w=v*c*r/d+(a+i)/2,x=v*-d*q/c+(b+j)/2,y=M.asin(((b-x)/d).toFixed(9)),z=M.asin(((j-x)/d).toFixed(9));y=az&&(y-=2*R),!h&&z>y&&(z-=2*R)}var A=z-y;if(P(A)>m){var B=z,C=i,E=j;z=y+m*(h&&z>y?1:-1),i=w+c*M.cos(z),j=x+d*M.sin(z),o=Fa(i,j,c,d,f,0,h,C,E,[z,B,w,x])}A=z-y;var F=M.cos(y),G=M.sin(y),H=M.cos(z),J=M.sin(z),K=M.tan(A/4),L=4/3*c*K,N=4/3*d*K,O=[a,b],Q=[a+L*G,b-N*F],S=[i+L*J,j-N*H],T=[i,j];if(Q[0]=2*O[0]-Q[0],Q[1]=2*O[1]-Q[1],k)return[Q,S,T][D](o);o=[Q,S,T][D](o).join()[I](",");for(var U=[],V=0,W=o.length;V"1e12"&&(m=.5),P(n)>"1e12"&&(n=.5),m>0&&m<1&&(i=Ga(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&n<1&&(i=Ga(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+M.sqrt(k*k-4*j*l))/2/j,n=(-k-M.sqrt(k*k-4*j*l))/2/j,P(m)>"1e12"&&(m=.5),P(n)>"1e12"&&(n=.5),m>0&&m<1&&(i=Ga(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&n<1&&(i=Ga(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{min:{x:O[C](0,p),y:O[C](0,o)},max:{x:N[C](0,p),y:N[C](0,o)}}}),Ia=b._path2curve=e(function(a,b){var c=!b&&ya(a);if(!b&&c.curve)return Aa(c.curve);for(var d=Ca(a),e=b&&Ca(b),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=(function(a,b,c){var d,e,f={T:1,Q:1};if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in f)&&(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][D](Fa[C](0,[b.x,b.y][D](a.slice(1))));break;case"S":"C"==c||"S"==c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e][D](a.slice(1));break;case"T":"Q"==c||"T"==c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"][D](Ea(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][D](Ea(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][D](Da(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][D](Da(b.x,b.y,a[1],b.y));break;case"V":a=["C"][D](Da(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][D](Da(b.x,b.y,b.X,b.Y))}return a}),i=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)k[b]="A",e&&(l[b]="A"),a.splice(b++,0,["C"][D](c.splice(0,6)));a.splice(b,1),p=N(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&"M"==a[g][0]&&"M"!=b[g][0]&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],p=N(d.length,e&&e.length||0))},k=[],l=[],m="",n="",o=0,p=N(d.length,e&&e.length||0);o0),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)},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()}}),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:30,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:5,right:74},{el:this.vlabel,top:5,right:111},{el:this.hpager,top:5,right:-9},{el:this.hlabel,top:5,right:28}]})},_createVPager:function(){var a=this,b=this.options,c=b.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:20,value:c.curr,title:c.curr,invisible:!0}),this.vpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],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:20,iconWidth:16,iconHeight:16,cls:"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:20,iconWidth:16,iconHeight:16,cls:"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:20,value:c.curr,title:c.curr,invisible:!0}),this.hpager=BI.createWidget({type:"bi.pager",width:76,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24,vgap:1}],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:20,iconWidth:16,iconHeight:16,cls:"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:20,iconWidth:16,iconHeight:16,cls:"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=[74,111,-9,28],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.RichEditorAction=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RichEditorAction.superclass._defaultConfig.apply(this,arguments),{width:20,height:20,command:"",used:!0})},_init:function(){BI.RichEditorAction.superclass._init.apply(this,arguments);var a=this,b=this.options;b.editor.on(BI.NicEditor.EVENT_SELECTED,function(c){b.used===!0&&(a.setEnable(!0),a.checkNodes(c.target),a.key(c))}),b.editor.on(BI.NicEditor.EVENT_BLUR,function(){a.setEnable(!1)}),b.editor.on(BI.NicEditor.EVENT_KEYDOWN,BI.bind(this.keydown,this)),b.used===!1&&this.setEnable(!1)},checkNodes:function(a){if(!a)return!1;var b=a;do if(this.options.tags&&this.options.tags.contains(b.nodeName))return this.activate(),!0;while(b=b.parentNode&&b.className&&b.className.indexOf("bi-nic-editor")>=-1);for(b=a;3==b.nodeType;)b=b.parentNode;if(this.options.css)for(var c in this.options.css){if(null==this.options.css[c])return this.activate($(b).css(c)),!0;if($(b).css(c)==this.options.css[c])return this.activate(),!0}return this.deactivate(),!1},start:function(){},key:function(){},keydown:function(){},hideIf:function(a){},activate:function(){},deactivate:function(){},doCommand:function(a){this.options.command&&this.options.editor.nicCommand(this.options.command,a)}}),BI.RichEditorParamAction=BI.inherit(BI.RichEditorAction,{_defaultConfig:function(){return BI.extend(BI.RichEditorParamAction.superclass._defaultConfig.apply(this,arguments),{paramFormatter:function(a){return a}})},_init:function(){BI.RichEditorParamAction.superclass._init.apply(this,arguments)},addParam:function(a){var b=this.options,c=(b.editor.instance,new Image),d=BI.DOM.getImage(b.paramFormatter(a));c.src=d.src,c.alt=a,c.style=d.style,$(c).addClass("rich-editor-param"),this.options.editor.insertHTML($("
").append(c).html())}}),BI.RichEditorTextToolbar=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-rich-editor-text-toolbar bi-background",buttons:[{type:"bi.rich_editor_font_chooser"},{type:"bi.rich_editor_size_chooser"},{type:"bi.rich_editor_bold_button"},{type:"bi.rich_editor_italic_button"},{type:"bi.rich_editor_underline_button"},{type:"bi.rich_editor_color_chooser"},{type:"bi.rich_editor_background_color_chooser"},{type:"bi.rich_editor_align_left_button"},{type:"bi.rich_editor_align_center_button"},{type:"bi.rich_editor_align_right_button"},{type:"bi.rich_editor_param_button"}],height:28})},_init:function(){BI.RichEditorTextToolbar.superclass._init.apply(this,arguments);var a=this.options,b=BI.createWidgets(BI.map(a.buttons,function(b,c){return BI.extend(c,{editor:a.editor})}));this.element.mousedown(function(a){BI.each(b,function(b,c){c.hideIf(a)})}),BI.createWidget({type:"bi.left",element:this,items:b,hgap:3,vgap:3})},mounted:function(){var a=this;BI.isIE9Below()&&(this.element.mousedown(function(){a._noSelect(a.element[0])}),this._noSelect(this.element[0]))},_noSelect:function(a){a.setAttribute&&"input"!=a.nodeName.toLowerCase()&&"textarea"!=a.nodeName.toLowerCase()&&a.setAttribute("unselectable","on");for(var b=0;b0?a.getRangeAt(0):a.createRange()},selRng:function(a,b){window.getSelection?(b.removeAllRanges(),b.addRange(a)):a.select()},selElm:function(){var a=this.getRng();if(a){if(a.startContainer){var b=a.startContainer;if(1==a.cloneContents().childNodes.length)for(var c=0;c0&&this.colorchooser.hideView()},deactivate:function(){}}),BI.shortcut("bi.rich_editor_background_color_chooser",BI.RichEditorBackgroundColorChooser),BI.RichEditorColorChooser=BI.inherit(BI.RichEditorAction,{_defaultConfig:function(){return BI.extend(BI.RichEditorColorChooser.superclass._defaultConfig.apply(this,arguments),{width:20,height:20,command:"foreColor",css:{color:null}})},_init:function(){BI.RichEditorColorChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.colorchooser=BI.createWidget({type:"bi.color_chooser",element:this,width:b.width,height:b.height,el:{type:"bi.rich_editor_color_chooser_trigger",title:BI.i18nText("BI-Font_Colour"),cls:"text-toolbar-button"}}),this.colorchooser.on(BI.ColorChooser.EVENT_CHANGE,function(){a.doCommand(this.getValue())})},hideIf:function(a){!this.colorchooser.element.find(a.target).length>0&&this.colorchooser.hideView()},activate:function(a){this.colorchooser.setValue(BI.DOM.rgb2hex(a))},deactivate:function(){this.colorchooser.setValue("")}}),BI.shortcut("bi.rich_editor_color_chooser",BI.RichEditorColorChooser),BI.RichEditorFontChooser=BI.inherit(BI.RichEditorAction,{_defaultConfig:function(){return BI.extend(BI.RichEditorFontChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-rich-editor-font-chooser bi-border bi-card",command:"FontName",width:50,height:20})},_init:function(){BI.RichEditorSizeChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",readonly:!0,height:b.height,triggerWidth:16,text:BI.i18nText("BI-Font_Family")}),this.combo=BI.createWidget({type:"bi.combo",element:this,el:this.trigger,adjustLength:1,popup:{minWidth:70,el:{type:"bi.button_group",items:BI.createItems([{value:"MicrosoftYaHei",text:BI.i18nText("BI-Microsoft_YaHei")},{value:"PingFangSC-Light",text:BI.i18nText("BI-Apple_Light")},{value:"ArialMT",text:"Arial"},{value:"Verdana",text:"Verdana"}],{type:"bi.single_select_item"}),layouts:[{type:"bi.vertical"}]}}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){var b=this.getValue()[0];a.doCommand(b),this.hideView(),this.setValue([])})},hideIf:function(a){!this.combo.element.find(a.target).length>0&&this.combo.hideView()}}),BI.shortcut("bi.rich_editor_font_chooser",BI.RichEditorFontChooser),BI.RichEditorSizeChooser=BI.inherit(BI.RichEditorAction,{_defaultConfig:function(){return BI.extend(BI.RichEditorSizeChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-rich-editor-size-chooser bi-border bi-card",command:"FontSize",width:50,height:20})},_items:[{value:1,text:"1(8pt)"},{value:2,text:"2(10pt)"},{value:3,text:"3(12pt)"},{value:4,text:"4(14pt)"},{value:5,text:"5(18pt)"},{value:6,text:"6(24pt)"}],_init:function(){BI.RichEditorSizeChooser.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.text_trigger",readonly:!0,height:b.height,triggerWidth:16,text:BI.i18nText("BI-Font_Size")}),this.combo=BI.createWidget({type:"bi.combo",element:this,el:this.trigger,adjustLength:1,popup:{maxWidth:70,minWidth:70,el:{type:"bi.button_group",items:BI.createItems(this._items,{type:"bi.single_select_item"}),layouts:[{type:"bi.vertical"}]}}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){var b=this.getValue()[0];a.doCommand(b),this.hideView(),this.setValue([])})},hideIf:function(a){!this.combo.element.find(a.target).length>0&&this.combo.hideView()}}),BI.shortcut("bi.rich_editor_size_chooser",BI.RichEditorSizeChooser),BI.RichEditor=BI.inherit(BI.Widget,{props:{baseCls:"bi-rich-editor bi-textarea",toolbar:{},readOnly:!1},render:function(){var a=this,b=this.options,c={type:"bi.nic_editor",width:b.width,height:b.height,readOnly:b.readOnly,ref:function(){a.editor=this},listeners:[{eventName:BI.NicEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.RichEditor.EVENT_CONFIRM)}},{eventName:BI.NicEditor.EVENT_FOCUS,action:function(){b.readOnly||a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.RichEditor.EVENT_FOCUS)}}]};return b.readOnly?c:(this.editor=BI.createWidget(c),{type:"bi.combo",toggle:!1,trigger:"click",direction:"top,right",isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,adjustLength:1,ref:function(){a.combo=this},el:this.editor,popup:{el:BI.extend({type:"bi.rich_editor_text_toolbar",editor:this.editor},b.toolbar),height:30,stopPropagation:!0,stopEvent:!0},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){a.fireEvent(BI.RichEditor.EVENT_AFTER_HIDEVIEW)}}]})},mounted:function(){var a=this.options;BI.isNull(a.value)&&this.editor.setValue(a.value)},focus:function(){this.editor.focus()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.RichEditor.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.RichEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.RichEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.rich_editor",BI.RichEditor),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-active",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,height:a.height-2,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)})},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.AdaptiveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.AdaptiveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.AdaptiveTable.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:c.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:c.columnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:c.regionColumnSize,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.columnSize=this.getColumnSize(),a._populate(),a.table.populate(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_getFreezeColLength:function(){var a=this.options;return a.isNeedFreeze===!0?BI.clamp(a.freezeCols.length,0,a.columnSize.length):0},_digest:function(){var a=this.options,b=a.columnSize.slice(),c=a.regionColumnSize.slice(),d=a.freezeCols.slice(),e=a.regionColumnSize[0],f=this._getFreezeColLength();if(!e||e>a.width-10||e<10){var g=BI.sum(b,function(a,b){return a=b.length&&(d=[]),BI.isNumber(b[0])||(b=a.minColumnSize.slice());var h=0,i=0;return BI.each(b,function(a,b){a0&&(b[f-1]=BI.clamp(e-(h-b[f-1]),a.minColumnSize[f-1]||10,a.maxColumnSize[f-1]||Number.MAX_VALUE)),b.length>0&&(b[b.length-1]=BI.clamp(a.width-BI.GridTableScrollbar.SIZE-e-(i-h-b[b.length-1]),a.minColumnSize[b.length-1]||10,a.maxColumnSize[b.length-1]||Number.MAX_VALUE)),c[0]=e,{freezeCols:d,columnSize:b,regionColumnSize:c}},_populate:function(){var a=this.options,b=this._digest();a.regionColumnSize=b.regionColumnSize,a.columnSize=b.columnSize,this.table.setColumnSize(b.columnSize),this.table.setRegionColumnSize(b.regionColumnSize),this.table.attr("freezeCols",b.freezeCols)},setWidth:function(a){BI.AdaptiveTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.AdaptiveTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=BI.AdaptiveTable.superclass.attr.apply(this,arguments);return"freezeCols"===a?c:this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a){this.options;this._populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),BI.AdaptiveTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.adaptive_table",BI.AdaptiveTable),BI.DynamicSummaryLayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DynamicSummaryLayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-dynamic-summary-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))});var g=BI.isFunction(b.rowHeaderCreator)?b.rowHeaderCreator():b.rowHeaderCreator;if(c&&c.length>0){var h=this._formatColumns(c),i=this._getHDeep();i<=0?h.unshift(g||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):h[0]=g||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(h)}return f},_formatItems:function(a,b,c){function d(a,b){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=b;var c=[a];c=c.concat(a.values||[]),c.length>0&&f.push(c),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,c){d(c,b+1)})}var e=this.options,f=[];return BI.each(a,function(a,b){if(BI.each(b.children,function(a,b){d(b,0)}),BI.isArray(b.values)){var c=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return e.summaryCellStyleGetter(!0)}}].concat(b.values);f.push(c)}}),BI.DynamicSummaryTreeTable.formatSummaryItems(f,b,e.crossItems,1)},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a1)for(var c=0;c1)&&BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e1?g+=a.values.length:g++}var f=[],g=0;if(BI.each(c,function(a,b){e(b)}),f.length>0){var h=[],i=[];BI.each(b,function(a,b){var c=b.slice();BI.removeAt(c,f),h.push(c)}),BI.each(a,function(a,b){var c=b.slice();BI.removeAt(c,f),i.push(c)}),b=h,a=i}return{items:a,header:b,deletedCols:f}}}),BI.shortcut("bi.dynamic_summary_tree_table",BI.DynamicSummaryTreeTable),BI.LayerTreeTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table-cell",layer:0,text:""})},_init:function(){BI.LayerTreeTableCell.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget({type:"bi.label",element:this.element,textAlign:"left",whiteSpace:"nowrap",height:a.height,text:a.text,value:a.value,lgap:5+30*a.layer,rgap:5})}}),BI.shortcut("bi.layer_tree_table_cell",BI.LayerTreeTableCell),BI.LayerTreeTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LayerTreeTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-layer-tree-table",el:{type:"bi.resizable_table"},isNeedResize:!1,isResizeAdapt:!0,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],rowHeaderCreator:null,headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_createHeader:function(a){var b=this.options,c=b.header||[],d=b.crossHeader||[],e=BI.TableTree.formatCrossItems(b.crossItems,a,b.headerCellStyleGetter),f=[];if(BI.each(e,function(a,b){var c=[d[a]];f.push(c.concat(b||[]))}),c&&c.length>0){var g=this._formatColumns(c),h=this._getHDeep();h<=0?g.unshift(b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter}):g[0]=b.rowHeaderCreator||{type:"bi.table_style_cell",text:BI.i18nText("BI-Row_Header"),styleGetter:b.headerCellStyleGetter},f.push(g)}return f},_formatItems:function(a){function b(a,c){a.type||(a.type="bi.layer_tree_table_cell"),a.layer=c;var e=[a];e=e.concat(a.values||[]),e.length>0&&d.push(e),BI.isNotEmptyArray(a.children)&&BI.each(a.children,function(a,d){b(d,c+1)})}var c=this.options,d=[];return BI.each(a,function(a,e){if(BI.each(e.children,function(a,c){b(c,0)}),BI.isArray(e.values)){var f=[{type:"bi.table_style_cell",text:BI.i18nText("BI-Summary_Values"),styleGetter:function(){return c.summaryCellStyleGetter(!0)}}].concat(e.values);d.push(f)}}),d},_formatColumns:function(a,b){return BI.isNotEmptyArray(a)?(b=b||this._getHDeep(),a.slice(Math.max(0,b-1))):a},_formatFreezeCols:function(){return this.options.freezeCols.length>0?[0]:[]},_formatColumnSize:function(a,b){if(a.length<=0)return[];var c=[0];return b=b||this._getHDeep(),BI.each(a,function(a,d){return a0&&(c=BI.makeArray(b,a[0]/b)),c.concat(a.slice(1))},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(a,b){var c=this;if(BI.isObject(a))return void BI.each(a,function(a,b){c.attr(a,b)});switch(BI.LayerTreeTable.superclass.attr.apply(this,arguments),a){case"columnSize":case"minColumnSize":case"maxColumnSize":case"freezeCols":case"mergeCols":return}this.table.attr.apply(this.table,[a,b])},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;e.items=a||[],b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.setColumnSize(f.columnSize),this.table.attr("freezeCols",f.freezeCols),this.table.attr("minColumnSize",f.minColumnSize),this.table.attr("maxColumnSize",f.maxColumnSize),this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.LayerTreeTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.layer_tree_table",BI.LayerTreeTable),BI.TableStyleCell=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TableStyleCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-style-cell",styleGetter:BI.emptyFn})},_init:function(){BI.TableStyleCell.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,height:a.height,textAlign:"left",forceCenter:!0,hgap:5,text:a.text}),this._digestStyle()},_digestStyle:function(){var a=this.options,b=a.styleGetter();b&&this.text.element.css(b)},setText:function(a){this.text.setText(a)},populate:function(){this._digestStyle()}}),BI.shortcut("bi.table_style_cell",BI.TableStyleCell),BI.TableTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TableTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-tree",el:{type:"bi.resizable_table"},isNeedResize:!0,isResizeAdapt:!0,freezeCols:[],isNeedMerge:!0,mergeCols:[],mergeRule:BI.emptyFn,columnSize:[],minColumnSize:[],maxColumnSize:[],headerRowSize:25,rowSize:25,regionColumnSize:[],headerCellStyleGetter:BI.emptyFn,summaryCellStyleGetter:BI.emptyFn,sequenceCellStyleGetter:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_getVDeep:function(){ -return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e0},halfSelected:!1})},_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:26,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)}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.BranchRelation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-relation-tree",items:[],centerOffset:0,direction:BI.Direction.Bottom,align:BI.VerticalAlign.Top})},_init:function(){BI.BranchRelation.superclass._init.apply(this,arguments),this.populate(this.options.items)},_stratification:function(){var a=[];return this.tree.recursion(function(b,c){b.leaf=b.isLeaf(),a[c.length-1]||(a[c.length-1]=[]),a[c.length-1].push(b)}),a},_calculateLeaves:function(){function a(b){var c=0;return b.isLeaf()?1:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),b.set("leaves",c),c)}var b=0;return b=a(this.tree.getRoot())},_translate:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse());var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},populate:function(a){var b=this.options;b.items=a||[],this.empty(),a=BI.Tree.transformToTreeFormat(b.items),this.tree=new BI.Tree,this.tree.initTree(a),this.svg=BI.createWidget({type:"bi.svg"});var c=this._stratification();if(this._isNeedAdjust()){var d=this._translate(c);d=this._adjust(d),this._createBranches(d)}else{var d=this._fill(c);this._createBranches(d)}var e=BI.createWidget({type:"bi.layout",width:this._isVertical()?this._calculateWidth():this._calculateHeight(),height:this._isVertical()?this._calculateHeight():this._calculateWidth()});BI.createWidget({type:"bi.absolute",element:e,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}),a=this._isVertical()?[{type:"bi.handstand_branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.horizontal_adapt",verticalAlign:b.align}]},items:a}]:[{type:"bi.branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.vertical"},{type:b.align===BI.HorizontalAlign.Left?"bi.left":"bi.right"}]},items:a}],BI.createWidget({type:"bi.adaptive",element:e,items:a}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[e]})}}),BI.BranchRelation.EVENT_CHANGE="BranchRelation.EVENT_CHANGE",BI.shortcut("bi.branch_relation",BI.BranchRelation),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),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.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),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){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.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){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),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.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}),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="BI.EditorTrigger.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,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:b.height,text:b.text,hgap:c.hgap}),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 "+b.iconCls,ref:function(b){a.icon=b},iconHeight:b.iconHeight,iconWidth:b.iconWidth,disableSelected:!0},width:BI.isEmptyString(b.iconCls)?0:b.triggerWidth||b.height},{el:this.text},{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];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,this.wrapper.resize()):c.width!==(b.triggerWidth||b.height)&&(c.width=b.triggerWidth||b.height,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})},_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()},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)}}),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",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)})},_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)&&!d.contains(c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},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)&&!d.contains(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.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute", +return this.options.crossHeader.length},_getHDeep:function(){var a=this.options;return Math.max(a.mergeCols.length,a.freezeCols.length,BI.TableTree.maxDeep(a.items)-1)},_init:function(){BI.TableTree.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._digest();this.table=BI.createWidget(b.el,{type:"bi.resizable_table",element:this,width:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:c.header,items:c.items}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_digest:function(){var a=this.options,b=this._getHDeep(),c=this._getVDeep(),d=BI.TableTree.formatHeader(a.header,a.crossHeader,a.crossItems,b,c,a.headerCellStyleGetter),e=BI.TableTree.formatItems(a.items,b,!1,a.summaryCellStyleGetter);return{header:d,items:e}},setWidth:function(a){BI.TableTree.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.TableTree.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.regionColumnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.TableTree.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a||[]),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d);var f=this._digest();this.table.populate(f.items,f.header)},destroy:function(){this.table.destroy(),BI.TableTree.superclass.destroy.apply(this,arguments)}}),BI.extend(BI.TableTree,{formatHeader:function(a,b,c,d,e,f){for(var g=BI.TableTree.formatCrossItems(c,e,f),h=[],i=0;i0&&h.push(a),h},formatItems:function(a,b,c,d){function e(a,g){var h;if(BI.isArray(g.children)){if(BI.each(g.children,function(b,c){var d;a!=-1?(d=a.slice(),d.push(g)):d=[],e(d,c)}),a!=-1?(h=a.slice(),h.push(g)):h=[],BI.isNotEmptyArray(g.values)){for(var i={text:BI.i18nText("BI-Summary_Values"),type:"bi.table_style_cell",styleGetter:function(){return d(a===-1)}},j=h.length;j0)if(c)for(var k=0,l=g.values.length;k0&&f.push(h);h.length>0&&f.push(h)}}var f=[];return BI.each(a,function(a,b){e(-1,b)}),BI.each(f,function(a,c){for(var d=BI.last(c),e=c.length;e0},halfSelected:!1})},_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:26,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)}}),BI.MultiSelectBar.EVENT_CHANGE="MultiSelectBar.EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.BranchRelation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchRelation.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-relation-tree",items:[],centerOffset:0,direction:BI.Direction.Bottom,align:BI.VerticalAlign.Top})},_init:function(){BI.BranchRelation.superclass._init.apply(this,arguments),this.populate(this.options.items)},_stratification:function(){var a=[];return this.tree.recursion(function(b,c){b.leaf=b.isLeaf(),a[c.length-1]||(a[c.length-1]=[]),a[c.length-1].push(b)}),a},_calculateLeaves:function(){function a(b){var c=0;return b.isLeaf()?1:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),b.set("leaves",c),c)}var b=0;return b=a(this.tree.getRoot())},_translate:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,g);var k=g.parent.getChildIndex(g.id);g.parent.removeChildByIndex(k),g.parent.addChild(h,k),h.addChild(g),b[d].push(h),e[f]=h}else b[d].push(g)})}),b},_fill:function(a){var b=[],c=a.length;return BI.each(a,function(d,e){b[d]||(b[d]=[]),BI.each(e,function(f,g){if(g.isLeaf()&&d0){var j=e[f-1].getLastChild();i=a[d+1].indexOf(j)+1}a[d+1].splice(i,0,h),g.addChild(h)}b[d].push(g)})}),b},_adjust:function(a){for(;;){var b=!1;if(BI.backEach(a,function(a,c){BI.each(c,function(a,c){if(!c.isNew){var d=!0;if(BI.any(c.getChildren(),function(a,b){if(!b.isNew)return d=!1,!0}),!c.isLeaf()&&d===!0){var e=[];BI.each(c.getChildren(),function(a,b){e=e.concat(b.getChildren())}),c.removeAllChilds(),BI.each(e,function(a,b){c.addChild(b)});var f=new BI.Node(BI.UUID());f.isNew=!0;var g=c.parent.getChildIndex(c.id);c.parent.removeChildByIndex(g),c.parent.addChild(f,g),f.addChild(c),b=!0}}})}),b===!1)break;a=this._stratification()}return a},_calculateWidth:function(){function a(b){var c=0;return b.isLeaf()?b.width:(BI.each(b.getChildren(),function(b,d){c+=a(d)}),c)}function b(a){var c=0;return a.isLeaf()?a.height:(BI.each(a.getChildren(),function(a,d){c+=b(d)}),c)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_isVertical:function(){var a=this.options;return a.direction===BI.Direction.Top||a.direction===BI.Direction.Bottom},_calculateHeight:function(){function a(b){var c=0;return BI.each(b.getChildren(),function(b,d){c=Math.max(c,a(d))}),c+(b.height||0)}function b(a){var c=0;return BI.each(a.getChildren(),function(a,d){c=Math.max(c,b(d))}),c+(a.width||0)}var c=(this.options,0);return c=this._isVertical()?a(this.tree.getRoot()):b(this.tree.getRoot())},_calculateXY:function(a){var b=(this.options,this._calculateWidth()),c=this._calculateHeight(),d=a.length,e=this._calculateLeaves(),f={},g=c/d;return BI.each(a,function(a,c){var d=[];BI.each(c,function(a,b){d[a]=(b.get("leaves")||1)/e}),BI.each(c,function(c,e){var h=BI.sum(d.slice(0,c)),i=h*b+d[c]*b/2,j=a*g+g/2;f[e.id]={x:i,y:j}})}),f},_stroke:function(a,b){var c=this._calculateHeight(),d=a.length,e=c/d,f=this,g=this.options;switch(g.direction){case BI.Direction.Top:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+h.x+","+(h.y+g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y+g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Bottom:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+","+(h.y-g.centerOffset)+"L"+h.x+","+i;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+e.x+","+(e.y-g.centerOffset)+"L"+e.x+","+i}),j.length>0&&(d+="M"+BI.first(j).x+","+i+"L"+BI.last(j).x+","+i),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Left:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y+e/2;d+="M"+(h.y+g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y+g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})});break;case BI.Direction.Right:BI.each(a,function(a,c){BI.each(c,function(a,c){if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+(h.y-g.centerOffset)+","+h.x+"L"+i+","+h.x;var j=[];BI.each(c.getChildren(),function(a,c){var e=j[a]=b[c.id];d+="M"+(e.y-g.centerOffset)+","+e.x+"L"+i+","+e.x}),j.length>0&&(d+="M"+i+","+BI.first(j).x+"L"+i+","+BI.last(j).x),f.svg.path(d).attr("stroke","#d4dadd")}})})}},_createBranches:function(a){var b=this.options;b.direction!==BI.Direction.Bottom&&b.direction!==BI.Direction.Right||(a=a.reverse());var c=this._calculateXY(a);this._stroke(a,c)},_isNeedAdjust:function(){var a=this.options;return a.direction===BI.Direction.Top&&a.align===BI.VerticalAlign.Bottom||a.direction===BI.Direction.Bottom&&a.align===BI.VerticalAlign.Top||a.direction===BI.Direction.Left&&a.align===BI.HorizontalAlign.Right||a.direction===BI.Direction.Right&&a.align===BI.HorizontalAlign.Left},setValue:function(a){},getValue:function(){},populate:function(a){var b=this.options;b.items=a||[],this.empty(),a=BI.Tree.transformToTreeFormat(b.items),this.tree=new BI.Tree,this.tree.initTree(a),this.svg=BI.createWidget({type:"bi.svg"});var c=this._stratification();if(this._isNeedAdjust()){var d=this._translate(c);d=this._adjust(d),this._createBranches(d)}else{var d=this._fill(c);this._createBranches(d)}var e=BI.createWidget({type:"bi.layout",width:this._isVertical()?this._calculateWidth():this._calculateHeight(),height:this._isVertical()?this._calculateHeight():this._calculateWidth()});BI.createWidget({type:"bi.absolute",element:e,items:[{el:this.svg,top:0,left:0,right:0,bottom:0}]}),a=this._isVertical()?[{type:"bi.handstand_branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.horizontal_adapt",verticalAlign:b.align}]},items:a}]:[{type:"bi.branch_tree",expander:{direction:b.direction},el:{layouts:[{type:"bi.vertical"},{type:b.align===BI.HorizontalAlign.Left?"bi.left":"bi.right"}]},items:a}],BI.createWidget({type:"bi.adaptive",element:e,items:a}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[e]})}}),BI.BranchRelation.EVENT_CHANGE="BranchRelation.EVENT_CHANGE",BI.shortcut("bi.branch_relation",BI.BranchRelation),BI.HandStandBranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-expander",direction:BI.Direction.Top,logic:{dynamic:!0},el:{type:"bi.label"},popup:{}})},_init:function(){BI.HandStandBranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(a.direction),BI.extend({},a.logic,{items:BI.LogicFactory.createLogicItemsByDirection(a.direction,{type:"bi.center_adapt",items:[this.expander]},this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.HandStandBranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.BranchExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-expander",direction:BI.Direction.Left,logic:{dynamic:!0},el:{},popup:{}})},_init:function(){BI.BranchExpander.superclass._init.apply(this,arguments);var a=this.options;this._initExpander(),this._initBranchView(),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.expander,this.branchView)}))))},_initExpander:function(){var a=this,b=this.options;this.expander=BI.createWidget(b.el,{type:"bi.label",width:30,height:"100%"}),this.expander.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_initBranchView:function(){var a=this,b=this.options;this.branchView=BI.createWidget(b.popup,{}),this.branchView.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(a){this.branchView.populate.apply(this.branchView,arguments)},getValue:function(){return this.branchView.getValue()}}),BI.BranchExpander.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_expander",BI.BranchExpander),BI.HandStandBranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.HandStandBranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-handstand-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.HandStandBranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.handstand_branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.horizontal_adapt"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.HandStandBranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.HandStandBranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.handstand_branch_tree",BI.HandStandBranchTree),BI.BranchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.BranchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-branch-tree",expander:{},el:{},items:[]})},_init:function(){BI.BranchTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.branchTree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({type:"bi.branch_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:BI.extend({type:"bi.button_tree",chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical"}]},b.el),items:this.options.items}),this.branchTree.on(BI.CustomTree.EVENT_CHANGE,function(){a.fireEvent(BI.BranchTree.EVENT_CHANGE,arguments)}),this.branchTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},populate:function(){this.branchTree.populate.apply(this.branchTree,arguments)},getValue:function(){return this.branchTree.getValue()}}),BI.BranchTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.branch_tree",BI.BranchTree),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){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.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){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.first_plus_group_node";break;case a.length-1:f.type="bi.last_plus_group_node";break;default:f.type="bi.mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),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.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}),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="BI.EditorTrigger.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,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:b.height,text:b.text,hgap:c.hgap}),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.triggerWidth||b.height},{el:this.text},{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];BI.isNull(a)||BI.isEmptyString(a)?0!==c.width&&(c.width=0,this.wrapper.resize()):c.width!==(b.triggerWidth||b.height)&&(c.width=b.triggerWidth||b.height,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})},_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()},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)}}),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",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)})},_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)&&!d.contains(c.text||c.value)&&d.push(c.text||c.value)}),d.length>0?d.join(","):c.text},setValue:function(a){this.trigger.setText(this._digest(a,this.options.items))},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)&&!d.contains(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.SequenceTableTreeNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableTreeNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-tree-number",isNeedFreeze:!1,startSequence:1,scrollTop:0,headerRowSize:25,rowSize:25,sequenceHeaderCreator:BI.emptyFn,header:[],items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.SequenceTableTreeNumber.superclass._init.apply(this,arguments);this.options;this.vCurr=1,this.hCurr=1,this.tasks=[],this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute", cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:this._getHeaderHeight()-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this.start=this.options.startSequence,this.cache={},this._nextState(),this._populate()},_getNextSequence:function(a){function b(a){c.cache[a.text||a.value]||(c.cache[a.text||a.value]=e),e++}var c=this,d=this.start,e=this.start;return BI.each(a,function(a,f){BI.isNotEmptyArray(f.children)&&BI.each(f.children,function(a,f){0===a&&c.cache[f.text||f.value]&&(d=e=c.cache[f.text||f.value]),b(f)})}),this.start=e,d},_getStart:function(a){var b=this,c=this.start;return BI.some(a,function(a,d){if(BI.isNotEmptyArray(d.children))return BI.some(d.children,function(a,d){if(0===a&&b.cache[d.text||d.value])return c=b.cache[d.text||d.value],!0})}),c},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d},_layout:function(){var a=this.options,b=this._getHeaderHeight()-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize();try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_getHeaderHeight:function(){var a=this.options;return a.headerRowSize*(a.crossHeader.length+(a.header.length>0?1:0))},_nextState:function(){var a=this.options;this._getNextSequence(a.items)},_prevState:function(){var a,b=this.options;BI.some(b.items,function(b,c){if(BI.isNotEmptyArray(c.children))return BI.some(c.children,function(b,c){return a=c,!0})}),a&&BI.isNotEmptyObject(this.cache)?this.start=this.cache[a.text||a.value]:this.start=1,this._nextState()},_getMaxScrollTop:function(a){var b=0;return BI.each(a,function(a,c){b+=c.cnt}),Math.max(0,b*this.options.rowSize-(this.options.height-this._getHeaderHeight())+BI.DOM.getScrollWidth())},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator()||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",height:this._getHeaderHeight()-2,styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){var a=this,b=this.options,c=[],d=[],e=this._formatNumber(b.items),f=BI.PrefixIntervalTree.uniform(e.length,0);BI.each(e,function(a,b){f.set(a,b.height)});for(var g=BI.clamp(b.scrollTop,0,this._getMaxScrollTop(e)),h=f.greatestLowerBound(g),i=-(g-(h>0?f.sumTo(h-1):0)),j=i,k=b.height-this._getHeaderHeight();j-1)e[f].height!==a.renderedCells[g]._height&&(a.renderedCells[g]._height=e[f].height,a.renderedCells[g].el.setHeight(e[f].height)),e[f].top!==a.renderedCells[g].top&&(a.renderedCells[g].top=e[f].top,a.renderedCells[g].el.element.css("top",e[f].top+"px")),c.push(a.renderedCells[g]);else{var h=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,styleGetter:e[f].isSummary===!0?function(){return b.summaryCellStyleGetter(!0)}:function(a){return function(){return b.sequenceCellStyleGetter(a)}}(e[f].index)},e[f]));c.push({el:h,left:0,top:e[f].top,_height:e[f].height})}});var l={},m={},n=[];BI.each(d,function(b,c){BI.deepContains(a.renderedKeys,c)?l[b]=c:m[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(l,b)||BI.deepContains(m,b)||n.push(a)}),BI.each(n,function(b,c){a.renderedCells[c].el.destroy()});var o=[];BI.each(m,function(a){o.push(c[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:o}),this.renderedCells=c,this.renderedKeys=d,this.container.setHeight(f.sumUntil(e.length))},_restore:function(){BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},_populate:function(){var a=this;BI.each(this.tasks,function(b,c){c.apply(a)}),this.tasks=[],this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a<=1?(this.cache={},this.start=this.options.startSequence,this._restore(),this.tasks.push(this._nextState)):a===this.vCurr+1?this.tasks.push(this._nextState):a===this.vCurr-1&&this.tasks.push(this._prevState),this.vCurr=a},setHPage:function(a){a!==this.hCurr&&this.tasks.push(this._prevState),this.hCurr=a},restore:function(){this._restore()},populate:function(a,b,c,d){var e=this.options;a&&a!==this.options.items&&(e.items=a,this._restore(),this.tasks.push(this._prevState)),b&&b!==this.options.header&&(e.header=b),c&&c!==this.options.crossItems&&(e.crossItems=c),d&&d!==this.options.crossHeader&&(e.crossHeader=d),this._populate()}}),BI.shortcut("bi.sequence_table_tree_number",BI.SequenceTableTreeNumber),BI.MonthDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.MonthDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",height:24})},_init:function(){BI.MonthDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup"}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",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)})},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})},_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,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,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 bi-background",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",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"}),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:[{type:"bi.horizontal",width:100,items:[this.year,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=a.year,this._month=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 bi-background",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:[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:this.selectedTime.day});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",min:b.min,max:b.max}),this.calendar=BI.createWidget({direction:"top",element:this,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)})},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-border-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),BI.checkDateVoid(a,1,1,b.min,b.max)[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}),this.icon=BI.createWidget({type:"bi.icon",width:b.iconWidth,height:b.iconHeight}),BI.createWidget({type:"bi.center_adapt",element:this,items:[{type:"bi.center_adapt",width:50,height:b.height,items:[this.text,this.icon]}]})},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",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var b=a.datePicker.getValue(),c=BI.getDate(b.year,b.month-1,1).getMonthDays(),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:"top",element:this,logic:{dynamic:!1},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)},_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;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",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,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border",width:200,height:24})},_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:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,width:this.constants.popupWidth,stopPropagation:!1}}),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 bi-border-right",width:24,height:24});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():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,left: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="BI.DateTimeCombo.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",forceCenter:!0,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",forceCenter:!0,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",min:a.options.min,max:a.options.max}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.vertical_adapt",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.hour=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.minute=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.second=b}}]}),this.setValue(b.value),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},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.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.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.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),allowBlank:!1,errorText:function(a){return BI.isNumeric(a)?BI.i18nText("BI-Please_Input_Natural_Number"):BI.i18nText("BI-Numerical_Interval_Input_Data")},validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),athis.options.max&&(a=this.options.min),ac&&(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:"top",logic:{dynamic:!1},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,items:[this.calendar,{el:{type:"bi.dynamic_date_time_select",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}]}),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;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",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:!0,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(){this.downlistcombo.showView()},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.Single,{_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,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,height:b.height,text:b.text,value:b.value,logic:b.logic,selected:b.selected,disabled:b.disabled,iconHeight:b.iconHeight,iconWidth:b.iconWidth,textHgap:b.textHgap,textVgap:b.textVgap,textLgap:b.textLgap,textRgap:b.textRgap,father:b.father,bubble:b.bubble}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.IconTextItem.EVENT_CHANGE,function(){a.fireEvent(BI.DownListItem.EVENT_CHANGE)})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()}}),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:24,forceNotSelected:!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),!a.singleValues.contains(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]})},_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.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:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},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-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});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,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{baseCls:"bi-dynamic-date-combo bi-border",height:24},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:24,height:24,ref:function(){a.changeIcon=this}},width:24},{type:"bi.absolute",items:[{el:{type:"bi.combo",ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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},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:24,height:24,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}}]},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_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()}}),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="BI.DynamicDateCombo.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},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},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;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",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-high-light bi-border-top",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.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",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;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,b)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",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=a.print("%Y-%x-%e"),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},props:{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:0|c[0],month:0|c[1],day:0|c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")},title:function(){var b=a.storeValue||{},c=b.type||BI.DynamicDateCombo.Static,d=b.value;switch(c){case BI.DynamicDateCombo.Dynamic:var e=a._getText(d),f=BI.getDate();f=BI.DynamicDateHelper.getCalculation(d);var g=f.print("%Y-%x-%e");return BI.isEmptyString(e)?g:e+":"+g;case BI.DynamicDateCombo.Static:default:return BI.isNull(d)||BI.isNull(d.day)?"":BI.getDate(d.year,d.month-1,d.day).print("%Y-%X-%d")}}}),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=b.split("-");a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|c[0],month:0|c[1],day:0|c[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}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%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.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d"),c=b.print("%Y-%X-%d");return b.getMonth()>0&&(BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a||BI.parseDateTime(a,"%Y-%x").print("%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=a.print("%Y-%x-%e");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.getDate(c.year,c.month-1,c.day).print("%Y-%X-%d");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,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{baseCls:"bi-dynamic-date-combo bi-border",height:24},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:24,height:24,ref:function(){a.changeIcon=this}},width:24},{type:"bi.absolute",items:[{el:{type:"bi.combo",ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,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)}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}}]},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_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},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;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",forceCenter:!0,cls:"bi-high-light bi-border-top",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",forceCenter:!0,cls:"bi-border-left bi-border-right bi-high-light bi-border-top",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",forceCenter:!0,cls:"bi-high-light bi-border-top",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;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-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(b){switch(b){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,b)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",ref:function(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){}}]},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=a.print("%Y-%x-%e"),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 bi-border-top"},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},lgap:14},{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}return 1===a.length&&BI.parseInt(a)>c&&(d="0"+d),2===d.length&&(b===BI.DynamicDateTimeSelect.HOUR?this.minute.focus():this.second.focus()),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}),BI.DynamicDateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:6,yearFullMonthLength:7},props:{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:0|c[0],month:0|c[1],day:0|c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")},title:function(){var b=a.storeValue||{},c=b.type||BI.DynamicDateCombo.Static,d=b.value;switch(c){case BI.DynamicDateCombo.Dynamic:var e=a._getText(d),f=BI.DynamicDateHelper.getCalculation(d),g=f.print("%Y-%x-%e %H:%M:%S");return BI.isEmptyString(e)?g:e+":"+g;case BI.DynamicDateCombo.Static:default:return BI.isNull(d)||BI.isNull(d.day)?"":BI.getDate(d.year,d.month-1,d.day,d.hour||0,d.minute||0,d.second||0).print("%Y-%X-%d %H:%M:%S")}}}),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=b.split(/-|\s|:/);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|c[0],month:0|c[1],day:0|c[2],hour:0|c[3],minute:0|c[4],second:0|c[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}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S").print("%Y-%x-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S").print("%Y-%x-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S").print("%Y-%X-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%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.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d"),c=b.print("%Y-%X-%d");return b.getMonth()>0&&(BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a||BI.parseDateTime(a,"%Y-%x").print("%Y-%x")===a)&&c>=this.options.min&&c<=this.options.max},_setInnerValue:function(a){var b=a.print("%Y-%x-%e %H:%M:%S");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.getDate(c.year,c.month-1,c.day,c.hour||0,c.minute||0,c.second||0).print("%Y-%X-%d %H:%M:%S");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",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:"circle-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_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.center_adapt",cls:"search-font",items:[{el:{type:"bi.icon"}}]},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_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.getValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},getLastValidValue:function(){return this.editor.getLastValidValue()},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_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:24})},_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",hgap:4, @@ -179,7 +179,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, { this.editor.replaceSelection("\u200b" + field + "\u200b"); var to = this.editor.getCursor(); this.editor.markText(from, to, {className: "fieldName", atomic: true, startStyle: "start", endStyle: "end"}); - this.editor.replaceSelection(" "); this.editor.focus(); }, diff --git a/src/base/formula/formulaeditor.js b/src/base/formula/formulaeditor.js index bd114e13c..1c26f6e4c 100644 --- a/src/base/formula/formulaeditor.js +++ b/src/base/formula/formulaeditor.js @@ -125,7 +125,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, { this.editor.replaceSelection("\u200b" + field + "\u200b"); var to = this.editor.getCursor(); this.editor.markText(from, to, {className: "fieldName", atomic: true, startStyle: "start", endStyle: "end"}); - this.editor.replaceSelection(" "); this.editor.focus(); }, diff --git a/src/base/layer/layer.popup.js b/src/base/layer/layer.popup.js index f73c82f2b..1923e9182 100644 --- a/src/base/layer/layer.popup.js +++ b/src/base/layer/layer.popup.js @@ -44,7 +44,7 @@ BI.PopupView = BI.inherit(BI.Widget, { BI.PopupView.superclass._init.apply(this, arguments); var self = this, o = this.options; var fn = function (e) { - e.stopPropagation(); + e.stopEvent(); }, stop = function (e) { e.stopEvent(); return false; diff --git a/src/case/trigger/trigger.icon.text.js b/src/case/trigger/trigger.icon.text.js index 5cedc4a09..5a2dd5f70 100644 --- a/src/case/trigger/trigger.icon.text.js +++ b/src/case/trigger/trigger.icon.text.js @@ -44,7 +44,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { items: [{ el: { type: "bi.icon_change_button", - cls: "icon-combo-trigger-icon " + o.iconCls, + cls: "icon-combo-trigger-icon", + iconCls: o.iconCls, ref: function (_ref) { self.icon = _ref; }, @@ -52,7 +53,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { iconWidth: o.iconWidth, disableSelected: true }, - width: BI.isEmptyString(o.iconCls)? 0 : (o.triggerWidth || o.height) + width: BI.isEmptyString(o.iconCls) ? 0 : (o.triggerWidth || o.height) }, { el: this.text diff --git a/src/css/core/utils/common.css b/src/css/core/utils/common.css index 6c5fd39e7..0074e52f3 100644 --- a/src/css/core/utils/common.css +++ b/src/css/core/utils/common.css @@ -116,6 +116,11 @@ textarea { .bi-border { border: 1px solid #d4dadd; } +.bi-border-radius { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} .bi-theme-dark .bi-border { border: 1px solid #525466; } @@ -463,7 +468,6 @@ textarea { } .bi-list-item-active.active { color: #3685f2; - background-color: #ffffff; } .bi-list-item-active.active .bi-input { color: #3685f2; diff --git a/src/less/core/utils/common.less b/src/less/core/utils/common.less index a078d9776..6d86baa24 100644 --- a/src/less/core/utils/common.less +++ b/src/less/core/utils/common.less @@ -137,6 +137,10 @@ textarea { border: 1px solid @color-bi-border-line; } +.bi-border-radius { + .border-radius(2px); +} + .bi-theme-dark { .bi-border { border: 1px solid @color-bi-border-line-theme-dark; @@ -510,7 +514,6 @@ textarea { & .bi-textarea { color: @color-bi-text-highlight; } - background-color: @color-bi-background-default; } &.disabled { &, &:hover, &:active {