diff --git a/dist/bundle.css b/dist/bundle.css index 54cf71a6c..aeebb4cf4 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -4530,19 +4530,19 @@ textarea::-webkit-scrollbar-thumb:hover { color: #ffffff; } .primary-key-font .b-font { - *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = ';'); + *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = ''); } .primary-key-font .b-font:before { - content: "\e67d;"; + content: "\e67d"; color: inherit; } .primary-key-font:hover .b-font:before, .primary-key-font.hover .b-font:before { - content: "\e67d;"; + content: "\e67d"; color: inherit; } .primary-key-font.disabled .b-font:before { - content: "\e67d;"; + content: "\e67d"; color: inherit; } .drag-tag-font .b-font { diff --git a/dist/bundle.min.css b/dist/bundle.min.css index 1fe0940de..bdb92b477 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}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.cm-em,dfn{font-style:italic}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.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%}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}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}.bi-collection-table-cell,.bi-text,.border-sizing{-moz-box-sizing:border-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}.bi-flex-center-layout>*,.bi-flex-horizontal-layout>*,.bi-flex-vertical-center>*,.bi-flex-wrapper-center-layout>*,.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper>*,.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper>*{margin:auto}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}ul{list-style:disc}li{list-style-type:none}i{-webkit-font-smoothing:antialiased}.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:#eff1f4;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-high-light-background{background-color:#3f8ce8;color:#fff}.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-border{border-color:#178cdf}.bi-water-mark{color:#ccc;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#ccc}.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{color:#fff;background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-z-index-mask .bi-input,.bi-z-index-mask .bi-textarea{color:#fff}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.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 #178cdf}.bi-list-item-simple,.bi-list-item-simple .bi-input,.bi-list-item-simple .bi-textarea{color:#c4c9d1}.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.active,.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.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(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.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:#3f8ce8}.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.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-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:#3f8ce8}.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}.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;-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:' '}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-theme-dark{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-input{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;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}.farbtastic{position:relative}.farbtastic *{position:absolute;cursor:crosshair}.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 .bubble-combo-triangle-left,.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important}.bi-bubble-combo .bubble-combo-triangle-left{border-left:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-right{border-right:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom,.bi-bubble-combo .bubble-combo-triangle-top{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;z-index:1}.bi-bubble-combo .bubble-combo-triangle-top{border-top:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom{border-bottom:6px solid #3f8ce8}.bi-adapt-editor .adapt-editor-text{font-size:14px}.bi-search-editor .close-font,.bi-search-editor .search-font{font-size:20px}.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;-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-crosshair{cursor:crosshair}.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:16px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-content{font-size:16px}.bi-message-close{font-size:25px}.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 .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-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.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 #178cdf;background-color:#3f8ce8;text-align:center;vertical-align:middle;cursor:pointer;font-size:14px}#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{font-size:inherit;border-width:0;background-color:transparent}#body .bi-button.clear:active,#body .bi-button.clear:hover,body .bi-button.clear:active,body .bi-button.clear:hover{opacity:.75;filter:alpha(opacity=75)}#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.clear,body .bi-button.button-common.clear .b-font:before{color:#3685f2}#body .bi-button.button-ignore,body .bi-button.button-ignore{background-color:#fff;border-color:#d4dadd}#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:#1a1a1a}#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:#58cc7d;border-color:#58cc7d}#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:#5cb75d}#body .bi-button.button-warning,body .bi-button.button-warning{background-color:#ff4949;border-color:#e85050}#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:#ff4949}#body .bi-button.button-common.disabled,#body .bi-button.button-common.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-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-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-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-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-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-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-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-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-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)}.bi-basic-button.button-common .bi-button-mask,.bi-basic-button.button-success .bi-button-mask,.bi-basic-button.button-warning .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#fff}.bi-basic-button .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#1a1a1a}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3685f2}.bi-code-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3f8ce8;display:inline-block}.bi-code-editor .error-param{color:#ff4949;padding:0 5px;margin:1px;display:inline-block}.bi-editor{font-size:12px}.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-shelter-editor .shelter-editor-text,.bi-sign-editor .sign-editor-text{font-size:12px}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-bubble,.bi-toast{font-size:14px}.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;background:#fddddd;color:#ff4949}.bi-tip{position:fixed!important}.bi-toast{border-radius:2px}.bi-toast.toast-success{background:#e1f4e7;color:#5cb75d}.bi-toast.toast-warning{background:#fddddd;color:#ff4949}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px}.bi-tooltip.tooltip-success{background:#fff5c1;border:1px solid #fff5c1;color:#1a1a1a}.bi-tooltip.tooltip-warning{background:#fddddd;color:#ff4949;border:1px solid #f4cbcb}.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}.CodeMirror-hints .sql-fr-function,.CodeMirror-hints .sql-keyword,.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-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-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-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-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:#3f8ce8}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#58cc7d}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3f8ce8}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#58cc7d}.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:#3f8ce8}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.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 .bi-trigger-icon-button{font-size:16px}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-date-trigger,.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-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{border-radius:2px}.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-arrangement .arrangement-helper{background:#3f8ce8;z-index:1000000000}.bi-arrangement .arrangement-block,.bi-arrangement .arrangement-drop-container{z-index:1000000000}.bi-arrangement .arrangement-drop-container .arrangement-drop-region{overflow:hidden}.bi-arrangement .arrangement-drop-container .bottom-center,.bi-arrangement .arrangement-drop-container .bottom-center-second,.bi-arrangement .arrangement-drop-container .bottom-left,.bi-arrangement .arrangement-drop-container .bottom-left-second,.bi-arrangement .arrangement-drop-container .bottom-right,.bi-arrangement .arrangement-drop-container .bottom-right-second,.bi-arrangement .arrangement-drop-container .drop-devider,.bi-arrangement .arrangement-drop-container .left-center,.bi-arrangement .arrangement-drop-container .left-center-second,.bi-arrangement .arrangement-drop-container .right-center,.bi-arrangement .arrangement-drop-container .right-center-second,.bi-arrangement .arrangement-drop-container .top-center,.bi-arrangement .arrangement-drop-container .top-center-second,.bi-arrangement .arrangement-drop-container .top-left,.bi-arrangement .arrangement-drop-container .top-left-second,.bi-arrangement .arrangement-drop-container .top-right,.bi-arrangement .arrangement-drop-container .top-right-second{z-index:1000000001;background:#3f8ce8}.bi-arrangement-droppable{z-index:100000}.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:#eff1f4;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-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{min-height:70px}.bi-interval-slider-label{min-height:50px}.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-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-number-editor,.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#ff4949}.bi-multi-select-check-selected-button{z-index:1}.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-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px;max-width:220px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3685f2;z-index:1}.bi-number-editor{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-number-interval.number-error .bi-input{color:#ff4949!important}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-path-chooser .path-chooser-radio,.bi-path-region .path-region-label{z-index:1}.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:#eff1f4}.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{border-radius:2px}.bi-relation-view-region .relation-view-region-container{z-index:1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container.other-package{border-style:dashed}.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-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:rgba(153,153,153,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999, endColorstr=#4d999999);-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-param-time-interval.time-error .bi-input,.bi-param-time-interval.time-error .sign-editor-text{color:#ff4949}.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}*,button,html,input,select,textarea{font-family:"Microsoft YaHei","Hiragino Sans GB W3"}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}.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),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:"\e600";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e600";color:#3f8ce8}.close-ha-font.disabled .b-font:before,.search-close-h-font .b-font:before{content:"\e600";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e600";color:#ff4949}.search-close-h-font.disabled .b-font:before{content:"\e600";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:"\e601";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:"\e602";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before{content:"\e604";color:inherit}.date-font .b-font:before,.date-font.disabled .b-font:before{content:"\e61b";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:"\e660";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-h-font .b-font:before{content:"\e606";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:hover .b-font:before{content:"\e606";color:inherit}.dot-h-font.disabled .b-font:before{content:"\e606";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e606";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e606";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before{content:"\e606";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:hover .b-font:before{content:"\e606";color:#999}.dot-e-font.active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font:active .b-font:before{content:"\e606";color:#3685f2}.dot-e-font.disabled .b-font:before{content:"\e606";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:"\e607";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e607";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:"\e607";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before{content:"\e607";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before{content:"\e610";color:inherit}.copy-h-font .b-font:before{content:"\e610";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:hover .b-font:before{content:"\e610";color:inherit}.copy-h-font.disabled .b-font:before{content:"\e610";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e610";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e610";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:"\e610";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font.disabled .b-font:before{content:"\e610";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:"\e611";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e611";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:"\e611";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before{content:"\e611";color:inherit}.tree-node-triangle-expand-font .b-font:before,.tree-node-triangle-expand-font.disabled .b-font:before{content:"\e608";color:inherit}.tree-node-triangle-collapse-font .b-font:before,.tree-node-triangle-collapse-font.disabled .b-font:before{content:"\e607";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:"\e6be";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:"\e6bd";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:"\e6bc";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:"\e6bb";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e66a";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e66a";color:#3685f2}.trigger-triangle-font.disabled .b-font:before{content:"\e66a";color:#999}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-h-font .b-font:before,.pull-down-h-font.disabled .b-font:before,.pull-down-h-font.hover .b-font:before,.pull-down-h-font:hover .b-font:before,.pull-down-ha-font .b-font:before,.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e608";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e608";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before{content:"\e608";color:inherit}.check-font .b-font:before,.check-font.disabled .b-font:before{content:"\e611";color:#3685f2}.item-check-font .b-font:before{content:"\e611";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:hover .b-font:before{content:"\e611";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font.disabled .b-font:before{content:"\e611";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:"\e67d;";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before{content:"\e600";color:#faaa39}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:hover .b-font:before{content:"\e633";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e633";color:#3f8ce8}.less-font.disabled .b-font:before{content:"\e633";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:hover .b-font:before{content:"\e636";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e636";color:#3f8ce8}.less-equal-font.disabled .b-font:before{content:"\e636";color:inherit}.text-bold-font .b-font:before,.text-bold-font.disabled .b-font:before{content:"\e64d";color:inherit}.text-italic-font .b-font:before,.text-italic-font.disabled .b-font:before{content:"\e656";color:inherit}.text-underline-font .b-font:before,.text-underline-font.disabled .b-font:before{content:"\e650";color:inherit}.text-color-font .b-font:before,.text-color-font.disabled .b-font:before{content:"\e69c";color:inherit}.text-background-font .b-font:before,.text-background-font.disabled .b-font:before{content:"\e696";color:inherit}.text-color-underline-font .b-font:before,.text-color-underline-font.disabled .b-font:before{content:"\e69d";color:inherit}.text-align-left-font .b-font:before,.text-align-left-font.disabled .b-font:before{content:"\e654";color:inherit}.text-align-center-font .b-font:before,.text-align-center-font.disabled .b-font:before{content:"\e64f";color:inherit}.text-align-right-font .b-font:before,.text-align-right-font.disabled .b-font:before{content:"\e651";color:inherit}.tree-collapse-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_1.png) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) no-repeat}.check-box-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) 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) 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) 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) no-repeat}.check-box-icon.active .x-icon,.check-box-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_active.png) no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack,.check-box-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png) 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) 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) 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) 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) no-repeat}.radio-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) 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) 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) no-repeat}.radio-icon.active .x-icon,.radio-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_active.png) no-repeat;background-size:contain}.radio-icon.active .x-icon.hack,.radio-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_active.png) no-repeat}.radio-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_disable.png) 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) no-repeat}.radio-icon.disabled.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_disable2.png) 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) no-repeat}.check-half-select-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) 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) no-repeat}.slider-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png) 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) 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) 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) no-repeat}.slider-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png) 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) 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}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.cm-em,dfn{font-style:italic}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.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%}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}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}.bi-collection-table-cell,.bi-text,.border-sizing{-moz-box-sizing:border-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}.bi-flex-center-layout>*,.bi-flex-horizontal-layout>*,.bi-flex-vertical-center>*,.bi-flex-wrapper-center-layout>*,.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper>*,.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper>*{margin:auto}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}ul{list-style:disc}li{list-style-type:none}i{-webkit-font-smoothing:antialiased}.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:#fafbfc;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-high-light-background{background-color:#3f8ce8;color:#fff}.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-border{border-color:#178cdf}.bi-water-mark{color:#ccc;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#ccc}.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{color:#fff;background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-z-index-mask .bi-input,.bi-z-index-mask .bi-textarea{color:#fff}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.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 #178cdf}.bi-list-item-simple,.bi-list-item-simple .bi-input,.bi-list-item-simple .bi-textarea{color:#c4c9d1}.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.active,.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.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(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.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:#3f8ce8}.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.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-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:#3f8ce8}.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}.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;-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:' '}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-theme-dark{background-color:#191b2b;color:#ccc}.bi-theme-dark .bi-input{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;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}.farbtastic{position:relative}.farbtastic *{position:absolute;cursor:crosshair}.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 .bubble-combo-triangle-left,.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important}.bi-bubble-combo .bubble-combo-triangle-left{border-left:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-right{border-right:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom,.bi-bubble-combo .bubble-combo-triangle-top{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;z-index:1}.bi-bubble-combo .bubble-combo-triangle-top{border-top:6px solid #3f8ce8}.bi-bubble-combo .bubble-combo-triangle-bottom{border-bottom:6px solid #3f8ce8}.bi-adapt-editor .adapt-editor-text{font-size:14px}.bi-search-editor .close-font,.bi-search-editor .search-font{font-size:20px}.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;-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-crosshair{cursor:crosshair}.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:16px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-content{font-size:16px}.bi-message-close{font-size:25px}.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 .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-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.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 #178cdf;background-color:#3f8ce8;text-align:center;vertical-align:middle;cursor:pointer;font-size:14px}#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{font-size:inherit;border-width:0;background-color:transparent}#body .bi-button.clear:active,#body .bi-button.clear:hover,body .bi-button.clear:active,body .bi-button.clear:hover{opacity:.75;filter:alpha(opacity=75)}#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.clear,body .bi-button.button-common.clear .b-font:before{color:#3685f2}#body .bi-button.button-ignore,body .bi-button.button-ignore{background-color:#fff;border-color:#d4dadd}#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:#1a1a1a}#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:#58cc7d;border-color:#58cc7d}#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:#5cb75d}#body .bi-button.button-warning,body .bi-button.button-warning{background-color:#ff4949;border-color:#e85050}#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:#ff4949}#body .bi-button.button-common.disabled,#body .bi-button.button-common.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-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-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-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-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-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-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-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-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-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)}.bi-basic-button.button-common .bi-button-mask,.bi-basic-button.button-success .bi-button-mask,.bi-basic-button.button-warning .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#fff}.bi-basic-button .bi-button-mask{opacity:.2;filter:alpha(opacity=20);background-color:#1a1a1a}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3685f2}.bi-code-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3f8ce8;display:inline-block}.bi-code-editor .error-param{color:#ff4949;padding:0 5px;margin:1px;display:inline-block}.bi-editor{font-size:12px}.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-shelter-editor .shelter-editor-text,.bi-sign-editor .sign-editor-text{font-size:12px}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-bubble,.bi-toast{font-size:14px}.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;background:#fddddd;color:#ff4949}.bi-tip{position:fixed!important}.bi-toast{border-radius:2px}.bi-toast.toast-success{background:#e1f4e7;color:#5cb75d}.bi-toast.toast-warning{background:#fddddd;color:#ff4949}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px}.bi-tooltip.tooltip-success{background:#fff5c1;border:1px solid #fff5c1;color:#1a1a1a}.bi-tooltip.tooltip-warning{background:#fddddd;color:#ff4949;border:1px solid #f4cbcb}.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}.CodeMirror-hints .sql-fr-function,.CodeMirror-hints .sql-keyword,.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-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-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-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-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:#3f8ce8}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#58cc7d}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3f8ce8}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#58cc7d}.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:#3f8ce8}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.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 .bi-trigger-icon-button{font-size:16px}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-date-trigger,.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-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{border-radius:2px}.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-arrangement .arrangement-helper{background:#3f8ce8;z-index:1000000000}.bi-arrangement .arrangement-block,.bi-arrangement .arrangement-drop-container{z-index:1000000000}.bi-arrangement .arrangement-drop-container .arrangement-drop-region{overflow:hidden}.bi-arrangement .arrangement-drop-container .bottom-center,.bi-arrangement .arrangement-drop-container .bottom-center-second,.bi-arrangement .arrangement-drop-container .bottom-left,.bi-arrangement .arrangement-drop-container .bottom-left-second,.bi-arrangement .arrangement-drop-container .bottom-right,.bi-arrangement .arrangement-drop-container .bottom-right-second,.bi-arrangement .arrangement-drop-container .drop-devider,.bi-arrangement .arrangement-drop-container .left-center,.bi-arrangement .arrangement-drop-container .left-center-second,.bi-arrangement .arrangement-drop-container .right-center,.bi-arrangement .arrangement-drop-container .right-center-second,.bi-arrangement .arrangement-drop-container .top-center,.bi-arrangement .arrangement-drop-container .top-center-second,.bi-arrangement .arrangement-drop-container .top-left,.bi-arrangement .arrangement-drop-container .top-left-second,.bi-arrangement .arrangement-drop-container .top-right,.bi-arrangement .arrangement-drop-container .top-right-second{z-index:1000000001;background:#3f8ce8}.bi-arrangement-droppable{z-index:100000}.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:#fafbfc;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-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{min-height:70px}.bi-interval-slider-label{min-height:50px}.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-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-number-editor,.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#ff4949}.bi-multi-select-check-selected-button{z-index:1}.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-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px;max-width:220px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3685f2;z-index:1}.bi-number-editor{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-number-interval.number-error .bi-input{color:#ff4949!important}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-path-chooser .path-chooser-radio,.bi-path-region .path-region-label{z-index:1}.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:#fafbfc}.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{border-radius:2px}.bi-relation-view-region .relation-view-region-container{z-index:1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container.other-package{border-style:dashed}.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-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:rgba(153,153,153,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999, endColorstr=#4d999999);-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-param-time-interval.time-error .bi-input,.bi-param-time-interval.time-error .sign-editor-text{color:#ff4949}.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}*,button,html,input,select,textarea{font-family:"Microsoft YaHei","Hiragino Sans GB W3"}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}.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),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:"\e600";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e600";color:#3f8ce8}.close-ha-font.disabled .b-font:before,.search-close-h-font .b-font:before{content:"\e600";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e600";color:#ff4949}.search-close-h-font.disabled .b-font:before{content:"\e600";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:"\e601";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:"\e602";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before{content:"\e604";color:inherit}.date-font .b-font:before,.date-font.disabled .b-font:before{content:"\e61b";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:"\e660";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-h-font .b-font:before{content:"\e606";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:hover .b-font:before{content:"\e606";color:inherit}.dot-h-font.disabled .b-font:before{content:"\e606";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e606";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e606";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before{content:"\e606";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:hover .b-font:before{content:"\e606";color:#999}.dot-e-font.active .b-font:before{content:"\e606";color:#1a1a1a}.dot-e-font:active .b-font:before{content:"\e606";color:#3685f2}.dot-e-font.disabled .b-font:before{content:"\e606";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:"\e607";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e607";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:"\e607";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e607";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before{content:"\e607";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before{content:"\e610";color:inherit}.copy-h-font .b-font:before{content:"\e610";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:hover .b-font:before{content:"\e610";color:inherit}.copy-h-font.disabled .b-font:before{content:"\e610";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e610";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e610";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:"\e610";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e610";color:#3f8ce8}.copy-e-font.disabled .b-font:before{content:"\e610";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:"\e611";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e611";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:"\e611";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e611";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before{content:"\e611";color:inherit}.tree-node-triangle-expand-font .b-font:before,.tree-node-triangle-expand-font.disabled .b-font:before{content:"\e608";color:inherit}.tree-node-triangle-collapse-font .b-font:before,.tree-node-triangle-collapse-font.disabled .b-font:before{content:"\e607";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:"\e6be";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:"\e6bd";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:"\e6bc";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:"\e6bb";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e66a";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e66a";color:#3685f2}.trigger-triangle-font.disabled .b-font:before{content:"\e66a";color:#999}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-h-font .b-font:before,.pull-down-h-font.disabled .b-font:before,.pull-down-h-font.hover .b-font:before,.pull-down-h-font:hover .b-font:before,.pull-down-ha-font .b-font:before,.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e608";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e608";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before{content:"\e608";color:inherit}.check-font .b-font:before,.check-font.disabled .b-font:before{content:"\e611";color:#3685f2}.item-check-font .b-font:before{content:"\e611";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:hover .b-font:before{content:"\e611";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e611";color:#3f8ce8}.item-check-font.disabled .b-font:before{content:"\e611";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:"\e67d";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before{content:"\e600";color:#faaa39}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:hover .b-font:before{content:"\e633";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e633";color:#3f8ce8}.less-font.disabled .b-font:before{content:"\e633";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:hover .b-font:before{content:"\e636";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e636";color:#3f8ce8}.less-equal-font.disabled .b-font:before{content:"\e636";color:inherit}.text-bold-font .b-font:before,.text-bold-font.disabled .b-font:before{content:"\e64d";color:inherit}.text-italic-font .b-font:before,.text-italic-font.disabled .b-font:before{content:"\e656";color:inherit}.text-underline-font .b-font:before,.text-underline-font.disabled .b-font:before{content:"\e650";color:inherit}.text-color-font .b-font:before,.text-color-font.disabled .b-font:before{content:"\e69c";color:inherit}.text-background-font .b-font:before,.text-background-font.disabled .b-font:before{content:"\e696";color:inherit}.text-color-underline-font .b-font:before,.text-color-underline-font.disabled .b-font:before{content:"\e69d";color:inherit}.text-align-left-font .b-font:before,.text-align-left-font.disabled .b-font:before{content:"\e654";color:inherit}.text-align-center-font .b-font:before,.text-align-center-font.disabled .b-font:before{content:"\e64f";color:inherit}.text-align-right-font .b-font:before,.text-align-right-font.disabled .b-font:before{content:"\e651";color:inherit}.tree-collapse-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_1.png) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) no-repeat}.check-box-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) 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) 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) 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) no-repeat}.check-box-icon.active .x-icon,.check-box-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_active.png) no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack,.check-box-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png) 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) 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) 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) 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) no-repeat}.radio-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) 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) 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) no-repeat}.radio-icon.active .x-icon,.radio-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_active.png) no-repeat;background-size:contain}.radio-icon.active .x-icon.hack,.radio-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_active.png) no-repeat}.radio-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_disable.png) 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) no-repeat}.radio-icon.disabled.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_disable2.png) 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) no-repeat}.check-half-select-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) 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) no-repeat}.slider-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png) 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) 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) 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) no-repeat}.slider-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png) 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) no-repeat} \ No newline at end of file diff --git a/dist/bundle.min.js b/dist/bundle.min.js index 7e6b6dc11..73aba2f6f 100644 --- a/dist/bundle.min.js +++ b/dist/bundle.min.js @@ -29,23 +29,23 @@ cell:b[d.row][d.col]};c.push(e)})};C(this.topLeftItems,a.header,y),C(this.topRig _defaultConfig:function(){return BI.extend(BI.TableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table-header-cell",text:""})},_init:function(){BI.TableHeaderCell.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.label",element:this,textAlign:"center",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.table_header_cell",BI.TableHeaderCell),BI.Table=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Table.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-table",logic:{dynamic:!1},isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[]})},_calculateWidth:function(a){return a&&"0"!==a?(a=BI.parseFloat(a),a<0&&(a=0),a>1.01?a:100*a+"%"):""},_calculateHeight:function(a){return a?a:""},_isRightFreeze:function(){return BI.isNotEmptyArray(this.options.freezeCols)&&0!==BI.first(this.options.freezeCols)},_createTopLeft:function(){var a=this.options,b=this._isRightFreeze();this.topLeftColGroupTds={},this.topLeftBodyTds={},this.topLeftBodyItems={};var c=this._table(),d=this._createColGroup(this.columnLeft,this.topLeftColGroupTds),e=this.topLeftBody=this._body();if(e.element.append(this._createHeaderCells(this.topLeftItems,this.columnLeft,this.mergeLeft,this.topLeftBodyTds,this.topLeftBodyItems)),BI.createWidget({type:"bi.adaptive",element:c,items:[d,e]}),b){var f=0;BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)||(f+=c)}),BI.isNumeric(f)&&f>1&&(f=BI.parseFloat(f)+a.columnSize.length-a.freezeCols.length)}return this.topLeftContainer=BI.createWidget({type:"bi.adaptive",width:this._calculateWidth(f),items:[c]})},_createTopRight:function(){var a=this.options,b=this._isRightFreeze();this.topRightColGroupTds={},this.topRightBodyTds={},this.topRightBodyItems={};var c=this._table(),d=this._createColGroup(this.columnRight,this.topRightColGroupTds),e=this.topRightBody=this._body();if(e.element.append(this._createHeaderCells(this.topRightItems,this.columnRight,this.mergeRight,this.topRightBodyTds,this.topRightBodyItems,this.columnLeft.length)),BI.createWidget({type:"bi.adaptive",element:c,items:[d,e]}),!b){var f=0;BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)||(f+=c)}),BI.isNumeric(f)&&(f=BI.parseFloat(f)+a.columnSize.length-a.freezeCols.length)}return this.topRightContainer=BI.createWidget({type:"bi.adaptive",width:f||void 0,items:[c]})},_createBottomLeft:function(){var a=this.options,b=this._isRightFreeze();this.bottomLeftColGroupTds={},this.bottomLeftBodyTds={},this.bottomLeftBodyItems={};var c=this._table(),d=this._createColGroup(this.columnLeft,this.bottomLeftColGroupTds),e=this._createBottomLeftBody();if(BI.createWidget({type:"bi.adaptive",element:c,items:[d,e]}),b){var f=0;BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)||(f+=c)}),BI.isNumeric(f)&&f>1&&(f=BI.parseFloat(f)+a.columnSize.length-a.freezeCols.length)}return this.bottomLeftContainer=BI.createWidget({type:"bi.adaptive",width:this._calculateWidth(f),items:[c]})},_createBottomLeftBody:function(){var a=this.bottomLeftBody=this._body();return a.element.append(this._createCells(this.bottomLeftItems,this.columnLeft,this.mergeLeft,this.bottomLeftBodyTds,this.bottomLeftBodyItems)),a},_createBottomRight:function(){var a=this.options,b=this._isRightFreeze();this.bottomRightColGroupTds={},this.bottomRightBodyTds={},this.bottomRightBodyItems={};var c=this._table(),d=this._createColGroup(this.columnRight,this.bottomRightColGroupTds),e=this._createBottomRightBody();if(BI.createWidget({type:"bi.adaptive",element:c,items:[d,e]}),!b){var f=0;BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)||(f+=c)}),BI.isNumeric(f)&&f>1&&(f=BI.parseFloat(f)+a.columnSize.length-a.freezeCols.length)}return this.bottomRightContainer=BI.createWidget({type:"bi.adaptive",width:this._calculateWidth(f),items:[c]})},_createBottomRightBody:function(){var a=this.bottomRightBody=this._body();return a.element.append(this._createCells(this.bottomRightItems,this.columnRight,this.mergeRight,this.bottomRightBodyTds,this.bottomRightBodyItems,this.columnLeft.length)),a},_createFreezeTable:function(){var a=this,b=this.options,c=this._isRightFreeze(),d=this._split(b.header);this.topLeftItems=d.left,this.topRightItems=d.right,d=this._split(b.items),this.bottomLeftItems=d.left,this.bottomRightItems=d.right,this.columnLeft=[],this.columnRight=[],BI.each(b.columnSize,function(d,e){b.freezeCols.contains(d)?a[c?"columnRight":"columnLeft"].push(e):a[c?"columnLeft":"columnRight"].push(e)}),this.mergeLeft=[],this.mergeRight=[],BI.each(b.mergeCols,function(d,e){b.freezeCols.contains(e)?a[c?"mergeRight":"mergeLeft"].push(e):a[c?"mergeLeft":"mergeRight"].push(e)});var e=this._createTopLeft(),f=this._createTopRight(),g=this._createBottomLeft(),h=this._createBottomRight();this.scrollTopLeft=BI.createWidget({type:"bi.adaptive",cls:"scroll-top-left",width:"100%",height:"100%",scrollable:!1,items:[e]}),this.scrollTopRight=BI.createWidget({type:"bi.adaptive",cls:"scroll-top-right",width:"100%",height:"100%",scrollable:!1,items:[f]}),this.scrollBottomLeft=BI.createWidget({type:"bi.adaptive",cls:"scroll-bottom-left",width:"100%",height:"100%",scrollable:c||null,scrollx:!c,items:[g]}),this.scrollBottomRight=BI.createWidget({type:"bi.adaptive",cls:"scroll-bottom-right",width:"100%",height:"100%",scrollable:!c||null,scrollx:c,items:[h]}),this.topLeft=BI.createWidget({type:"bi.adaptive",cls:"top-left",scrollable:!1,items:[this.scrollTopLeft]}),this.topRight=BI.createWidget({type:"bi.adaptive",cls:"top-right",scrollable:!1,items:[this.scrollTopRight]}),this.bottomLeft=BI.createWidget({type:"bi.adaptive",cls:"bottom-left",items:[this.scrollBottomLeft]}),this.bottomRight=BI.createWidget({type:"bi.adaptive",cls:"bottom-right",scrollable:!1,items:[this.scrollBottomRight]});var i=b.header.length*((b.headerRowSize||b.rowSize)+1)+1,j=BI.sum(b.freezeCols,function(a,c){return b.columnSize[c]>1?b.columnSize[c]+1:b.columnSize[c]});this._resize=function(){a.scrollBottomLeft.element.is(":visible")&&(a.scrollBottomLeft.element.css({"overflow-x":"auto"}),a.scrollBottomRight.element.css({"overflow-x":"auto"}),a.setColumnSize(b.columnSize),c?a.scrollBottomLeft.element.css({"overflow-y":"auto"}):a.scrollBottomRight.element.css({"overflow-y":"auto"}),(a.scrollBottomLeft.element.hasHorizonScroll()||a.scrollBottomRight.element.hasHorizonScroll())&&(a.scrollBottomLeft.element.css("overflow-x","scroll"),a.scrollBottomRight.element.css("overflow-x","scroll")),a.scrollBottomRight.element.hasVerticalScroll()?a.scrollTopRight.element.css("overflow-y","scroll"):a.scrollTopRight.element.css("overflow-y","hidden"),a.scrollBottomLeft.element.hasVerticalScroll()?a.scrollTopLeft.element.css("overflow-y","scroll"):a.scrollTopLeft.element.css("overflow-y","hidden"),a.scrollTopLeft.element[0].scrollLeft=a.scrollBottomLeft.element[0].scrollLeft,a.scrollTopRight.element[0].scrollLeft=a.scrollBottomRight.element[0].scrollLeft,a.scrollBottomLeft.element[0].scrollTop=a.scrollBottomRight.element[0].scrollTop)};var k=b.regionColumnSize;0===b.freezeCols.length?k=c?["fill",0]:[0,"fill"]:b.freezeCols.length>=b.columnSize.length&&(k=c?[0,"fill"]:["fill",0]),this.partitions=BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{rows:2,columns:2,columnSize:k||(c?["fill",j]:[j,"fill"]),rowSize:[i,"fill"],items:[[{el:this.topLeft},{el:this.topRight}],[{el:this.bottomLeft},{el:this.bottomRight}]]})))),this._initFreezeScroll(),BI.ResizeDetector.addResizeListener(this,function(){a._resize(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE)})},mounted:function(){this._resize&&this._resize(),this.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT)},_initFreezeScroll:function(){function a(a,c,d){a.scroll(function(e){d.scrollTop(a.scrollTop()),c.scrollLeft(a.scrollLeft()),b.fireEvent(BI.Table.EVENT_TABLE_SCROLL)})}var b=this;this.options;a(this.scrollBottomRight.element,this.scrollTopRight.element,this.scrollBottomLeft.element)},resize:function(){this._resize&&this._resize()},_createCells:function(a,b,c,d,e,f,g){var h=this,i=this.options,j={},k={},l={},m={},n={};b=b||i.columnSize,c=c||i.mergeCols,d=d||{},e=e||{},f=f||0,g||(g=i.rowSize);var o=document.createDocumentFragment();return BI.each(a,function(a,p){function q(a,b){var c=(0|j[b].attr("height"))+g+1;j[b].attr("height",c).css("height",c);var f=(0|(j[b].attr("rowspan")||1))+1;j[b].attr("rowspan",f),j[b].__mergeRows.pushDistinct(a),d[a][b]=j[b],e[a][b]=m[b]}function r(a,c){if(b[c]){var f=0|k[a].attr("width");f>1.05&&b[c]?(f=f+b[c]+1,c===b.length-1&&f--):f+=b[c],f=h._calculateWidth(f),k[a].attr("width",f).css("width",f),l[a].element.width(f)}var g=(0|(k[a].attr("colspan")||1))+1;k[a].attr("colspan",g),k[a].__mergeCols.pushDistinct(c),d[a][c]=k[a],e[a][c]=l[a]}function s(a,c){var i=h._calculateWidth(b[c]);i>1.05&&c===b.length-1&&i--;var o=h._calculateHeight(g),q=$("").attr("height",o).attr("width",i).css({width:i,height:o,position:"relative"}).addClass(0===(1&c)?"odd-col":"even-col").addClass(0===a?"first-row":"").addClass(0===c?"first-col":"").addClass(c===p.length-1?"last-col":""),r=BI.createWidget(n[a][c],{type:"bi.table_cell",textAlign:"left",width:BI.isNumeric(i)?i:"",height:BI.isNumeric(o)?o:"",_row:a,_col:c+f});h.addWidget(r.getName(),r),r._mount(),r.element.css("position","relative"),q.append(r.element),t.append(q),j[c]=q,j[c].__mergeRows=[a],m[c]=r,k[a]=q,k[a].__mergeCols=[c],l[a]=r,d[a][c]=q,e[a][c]=r}var t=$("").addClass(0===(1&a)?"odd":"even");BI.each(p,function(b,f){if(n[a]||(n[a]={}),d[a]||(d[a]={}),e[a]||(e[a]={}),n[a][b]=f,i.isNeedMerge&&c.contains(b))if(0===a&&0===b)s(0,0);else if(0===b&&a>0){var g=i.mergeRule(n[a][b],n[a-1][b]);g===!0?(q(a,b),k[a]=j[b],l[a]=m[b]):s(a,b)}else if(0===a&&b>0){var h=i.mergeRule(n[a][b],n[a][b-1]);h===!0?(r(a,b),j[b]=k[a],m[b]=l[a]):s(a,b)}else{var g=i.mergeRule(n[a][b],n[a-1][b]),h=i.mergeRule(n[a][b],n[a][b-1]);if(h&&g)return;h&&r(a,b),g&&q(a,b),h||g||s(a,b)}else s(a,b)}),o.appendChild(t[0])}),o},_createColGroupCells:function(a,b){var c=this,d=this.options;a=a||d.columnSize,b=b||{};var e=document.createDocumentFragment();return BI.each(a,function(a,d){var f=c._calculateWidth(d),g=$("").attr("width",f).css("width",f);b[a]=g,e.appendChild(g[0])}),e},_createHeaderCells:function(a,b,c,d,e,f){var g=this.options;f||(f=0);var h=this._createCells(a,b,BI.range(g.columnSize.length),d,e,f,g.headerRowSize||g.rowSize);return h},_createFooterCells:function(a,b,c,d){var e=(this.options,this._createCells(a,b,[],c,d,0));return e},_createColGroup:function(a,b,c){this.options;return this.colgroup=this._colgroup(),this.colgroup.element.append(this._createColGroupCells(a,b,c)),this.colgroup},_createHeader:function(){var a=this.options;if(a.header!==!1)return this.header=this._header(),this.header.element.append(this._createHeaderCells(a.header,null,null,this.headerTds,this.headerItems)),this.header},_createFooter:function(a,b,c){var d=this.options;if(d.footer!==!1)return this.footer=this._footer(),this.footer.element.append(this._createFooterCells(d.footer,null,this.footerTds,this.footerItems)),this.footer},_createBody:function(){var a=this.options;return this.body=this._body(),this.body.element.append(this._createCells(a.items,null,null,this.bodyTds,this.bodyItems)),this.body},_createNormalTable:function(){var a=this,b=this.options,c=this._table();this.colgroupTds={},this.headerTds={},this.footerTds={},this.bodyTds={},this.headerItems={},this.footerItems={},this.bodyItems={};var d=this._createColGroup(null,this.colgroupTds),e=this._createHeader(),f=this._createFooter(),g=this._createBody();BI.createWidget({type:"bi.adaptive",element:c,items:[d,e,f,g]});var h=BI.sum(this.options.columnSize)||void 0;h=this._calculateWidth(h),BI.isNumeric(h)&&h>1&&(h+=b.columnSize.length),this.tableContainer=BI.createWidget({type:"bi.adaptive",width:this._calculateWidth(h),items:[c]}),this.scrollBottomRight=BI.createWidget({type:"bi.adaptive",width:"100%",height:"100%",cls:"scroll-bottom-right",scrollable:!0,items:[this.tableContainer]}),BI.createWidget({type:"bi.adaptive",cls:"bottom-right",element:this,scrollable:!1,items:[this.scrollBottomRight]}),this._initNormalScroll(),BI.nextTick(function(){a.element.is(":visible")&&a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT)})},_initNormalScroll:function(){var a=this;this.scrollBottomRight.element.scroll(function(b){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL)})},_split:function(a){var b=this.options,c=[],d=[],e=this._isRightFreeze();return BI.each(a,function(a,f){c.push([]),d.push([]),BI.each(f,function(f,g){b.freezeCols.contains(f)?(e?d:c)[a].push(g):(e?c:d)[a].push(g)})}),{left:c,right:d}},_table:function(){return BI.createWidget({type:"bi.layout",tagName:"table",cls:"table",attribute:{cellspacing:0,cellpadding:0}})},_header:function(){return BI.createWidget({type:"bi.layout",cls:"header",tagName:"thead"})},_footer:function(){return BI.createWidget({type:"bi.layout",cls:"footer",tagName:"tfoot"})},_body:function(){return BI.createWidget({type:"bi.layout",tagName:"tbody",cls:"body"})},_colgroup:function(){return BI.createWidget({type:"bi.layout",tagName:"colgroup"})},render:function(){this.populate(this.options.items)},setColumnSize:function(a){var b=this,c=this.options,d=this._isRightFreeze();if(c.columnSize=a||[],c.isNeedFreeze){var e=[],f=[];BI.each(c.columnSize,function(a,b){c.freezeCols.contains(a)?d?f.push(b):e.push(b):d?e.push(b):f.push(b)});var g=0,h=1,i=2,j=3,k=function(a){var c,d,k,l;switch(a){case g:c=b.topLeftColGroupTds,d=b.topLeftBodyTds,k=b.topLeftBodyItems,l=e;break;case h:c=b.topRightColGroupTds,d=b.topRightBodyTds,k=b.topRightBodyItems,l=f;break;case i:c=b.bottomLeftColGroupTds,d=b.bottomLeftBodyTds,k=b.bottomLeftBodyItems,l=e;break;case j:c=b.bottomRightColGroupTds,d=b.bottomRightBodyTds,k=b.bottomRightBodyItems,l=f}BI.each(c,function(a,c){var e=0|c.attr("width");if(""!==l[a]&&e!==l[a]){var f=b._calculateWidth(l[a]);c.attr("width",f).css("width",f),BI.each(d,function(c,d){if(d[a])if(d[a].__mergeCols.length>1){var e=0;BI.each(l,function(b,c){d[a].__mergeCols.contains(b)&&(e+=c)}),e=b._calculateWidth(e),e>1&&(e+=d[a].__mergeCols.length-1),BI.isNumeric(e)?a==BI.size(d)-1?d[a].attr("width",e-1).css("width",e-1):d[a].attr("width",e).css("width",e):d[a].attr("width","").css("width","")}else a==BI.size(d)-1?d[a].attr("width",f-1).css("width",f-1):d[a].attr("width",f).css("width",f)}),BI.each(k,function(c,e){if(e[a])if(d[c][a].__mergeCols.length>1){var g=0;BI.each(l,function(b,e){d[c][a].__mergeCols.contains(b)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=d[c][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")})}})};k(g),k(h),k(i),k(j);var l=0,m=0;this.columnLeft=[],this.columnRight=[],BI.each(c.columnSize,function(a,e){c.freezeCols.contains(a)?(l+=e,b[d?"columnRight":"columnLeft"].push(e)):(m+=e,b[d?"columnLeft":"columnRight"].push(e))}),l=this._calculateWidth(l),m=this._calculateWidth(m),BI.isNumeric(l)&&(l=BI.parseFloat(l)+c.freezeCols.length),BI.isNumeric(m)&&(m=BI.parseFloat(m)+c.columnSize.length-c.freezeCols.length),this.topLeftContainer.element.width(d?m:l),this.bottomLeftContainer.element.width(d?m:l),this.topRightContainer.element.width(d?l:m),this.bottomRightContainer.element.width(d?l:m),this.scrollTopLeft.element[0].scrollLeft=this.scrollBottomLeft.element[0].scrollLeft,this.scrollTopRight.element[0].scrollLeft=this.scrollBottomRight.element[0].scrollLeft}else{BI.each(this.colgroupTds,function(a,d){var e=0|d.attr("width");if(""!==c.columnSize[a]&&e!==c.columnSize[a]){var f=b._calculateWidth(c.columnSize[a]);d.attr("width",f).css("width",f),BI.each(b.bodyTds,function(d,e){if(e[a])if(e[a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(b,c){e[a].__mergeCols.contains(b)&&(g+=c)}),g=b._calculateWidth(g),g>1&&(g+=e[a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f):e[a].attr("width","").css("width","")}else a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f)}),BI.each(b.headerTds,function(d,e){if(e[a])if(e[a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(b,c){e[a].__mergeCols.contains(b)&&(g+=c)}),g=b._calculateWidth(g),g>1&&(g+=e[a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f):e[a].attr("width","").css("width","")}else a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f)}),BI.each(b.footerTds,function(d,e){if(e[a])if(e[a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(b,c){e[a].__mergeCols.contains(b)&&(g+=c)}),g=b._calculateWidth(g),g>1&&(g+=e[a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f):e[a].attr("width","").css("width","")}else a==BI.size(e)-1?e[a].attr("width",f-1).css("width",f-1):e[a].attr("width",f).css("width",f)}),BI.each(b.bodyItems,function(d,e){if(e[a])if(b.bodyTds[d][a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(c,e){b.bodyTds[d][a].__mergeCols.contains(c)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=b.bodyTds[d][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")}),BI.each(b.headerItems,function(d,e){if(e[a])if(b.headerTds[d][a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(c,e){b.headerTds[d][a].__mergeCols.contains(c)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=b.headerTds[d][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")}),BI.each(b.footerItems,function(d,e){if(e[a])if(b.footerTds[d][a].__mergeCols.length>1){var g=0;BI.each(c.columnSize,function(c,e){b.footerTds[d][a].__mergeCols.contains(c)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=b.footerTds[d][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")})}});var n=this._calculateWidth(BI.sum(c.columnSize));n>1.05&&(n+=c.columnSize.length),n>1.05&&this.tableContainer.element.width(n)}},getColumnSize:function(){return this.options.columnSize},getCalculateColumnSize:function(){var a=this,b=this.options,c=[];if(b.isNeedFreeze===!0){if(BI.size(this.bottomLeftBodyTds)>0||BI.size(this.bottomRightBodyTds)>0)return BI.any(this.bottomLeftBodyTds,function(a,b){if(!BI.any(b,function(a,b){if(b.__mergeCols.length>1)return!0}))return BI.each(b,function(a,d){var e=d.width()/d.__mergeCols.length;a==BI.size(b)-1&&e++,c.push(e)}),!0})||BI.each(this.bottomLeftBodyTds[0],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.bottomLeftBodyTds[0])-1&&e++,c.push(e)}),BI.any(this.bottomRightBodyTds,function(a,b){if(!BI.any(b,function(a,b){if(b.__mergeCols.length>1)return!0}))return BI.each(b,function(a,d){var e=d.width()/d.__mergeCols.length;a==BI.size(b)-1&&e++,c.push(e)}),!0})||BI.each(this.bottomRightBodyTds[0],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.bottomRightBodyTds[0])-1&&e++,c.push(e)}),c;BI.any(this.topLeftBodyTds,function(a,b){if(!BI.any(b,function(a,b){if(b.__mergeCols.length>1)return!0}))return BI.each(b,function(a,d){var e=d.width()/d.__mergeCols.length;a==BI.size(b)-1&&e++,c.push(e)}),!0})||BI.each(this.topLeftBodyTds[BI.size(this.topLeftBodyTds)-1],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.topLeftBodyTds[BI.size(a.topLeftBodyTds)-1])-1&&e++,c.push(e)}),BI.any(this.topRightBodyTds,function(a,b){if(!BI.any(b,function(a,b){if(b.__mergeCols.length>1)return!0}))return BI.each(b,function(a,d){var e=d.width()/d.__mergeCols.length;a==BI.size(b)-1&&e++,c.push(e)}),!0})||BI.each(this.topRightBodyTds[BI.size(this.topRightBodyTds)-1],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.topRightBodyTds[BI.size(a.topRightBodyTds)-1])-1&&e++,c.push(e)})}else BI.each(this.headerTds[BI.size(this.headerTds)-1],function(b,d){var e=d.width()/d.__mergeCols.length;b==BI.size(a.headerTds[BI.size(a.headerTds)-1])-1&&e++,c.push(e)});return c},setHeaderColumnSize:function(a){var b=this,c=this.options,d=this._isRightFreeze();if(c.isNeedFreeze){var e=[],f=[];BI.each(a,function(a,b){c.freezeCols.contains(a)?d?f.push(b):e.push(b):d?e.push(b):f.push(b)});var g=0,h=1,i=function(a){var c,d,i,j;switch(a){case g:c=b.topLeftColGroupTds,d=b.topLeftBodyTds,i=b.topLeftBodyItems,j=e;break;case h:c=b.topRightColGroupTds,d=b.topRightBodyTds,i=b.topRightBodyItems,j=f}BI.each(c,function(a,c){var e=0|c.attr("width");if(e!==j[a]){var f=b._calculateWidth(j[a]);c.attr("width",f).css("width",f),BI.each(d,function(c,d){if(d[a])if(d[a].__mergeCols.length>1){var e=0;BI.each(j,function(b,c){d[a].__mergeCols.contains(b)&&(e+=c)}),e=b._calculateWidth(e),e>1&&(e+=d[a].__mergeCols.length-1),BI.isNumeric(e)?a==BI.size(d)-1?d[a].attr("width",e-1).css("width",e-1):d[a].attr("width",e).css("width",e):d[a].attr("width","").css("width","")}else a==BI.size(d)-1?d[a].attr("width",f-1).css("width",f-1):d[a].attr("width",f).css("width",f)}),BI.each(i,function(c,e){if(e[a])if(d[c][a].__mergeCols.length>1){var g=0;BI.each(j,function(b,e){d[c][a].__mergeCols.contains(b)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=d[c][a].__mergeCols.length-1),BI.isNumeric(g)?a==BI.size(e)-1?e[a].element.attr("width",g-1).css("width",g-1):e[a].element.attr("width",g).css("width",g):e[a].element.attr("width","").css("width","")}else BI.isNumeric(f)?a==BI.size(e)-1?e[a].element.attr("width",f-1).css("width",f-1):e[a].element.attr("width",f).css("width",f):e[a].element.attr("width","").css("width","")})}})};i(g),i(h);var j=0,k=0;BI.each(a,function(a,b){c.freezeCols.contains(a)?j+=b:k+=b}),j=this._calculateWidth(j),k=this._calculateWidth(k),BI.isNumeric(j)&&(j=BI.parseFloat(j)+c.freezeCols.length),BI.isNumeric(k)&&(k=BI.parseFloat(k)+a.length-c.freezeCols.length),this.topLeftContainer.element.width(d?k:j),this.topRightContainer.element.width(d?j:k),this.scrollTopLeft.element[0].scrollLeft=this.scrollBottomLeft.element[0].scrollLeft,this.scrollTopRight.element[0].scrollLeft=this.scrollBottomRight.element[0].scrollLeft}else{BI.each(this.colgroupTds,function(c,d){var e=0|d.attr("width");if(e!==a[c]){var f=b._calculateWidth(a[c]);d.attr("width",f).css("width",f),BI.each(b.headerTds,function(d,e){if(e[c])if(e[c].__mergeCols.length>1){var g=0;BI.each(a,function(a,b){e[c].__mergeCols.contains(a)&&(g+=b)}),g=b._calculateWidth(g),g>1&&(g+=e[c].__mergeCols.length-1),BI.isNumeric(g)?c==BI.size(e)-1?e[c].element.attr("width",g-1).css("width",g-1):e[c].element.attr("width",g).css("width",g):e[c].attr("width","").css("width","")}else c==BI.size(e)-1?e[c].attr("width",f-1).css("width",f-1):e[c].attr("width",f).css("width",f)}),BI.each(b.headerItems,function(d,e){if(e[c])if(b.headerTds[d][c].__mergeCols.length>1){var g=0;BI.each(a,function(a,e){b.headerTds[d][c].__mergeCols.contains(a)&&(g+=e)}),g=b._calculateWidth(g),g>1&&(g+=b.headerTds[d][c].__mergeCols.length-1),BI.isNumeric(g)?c==BI.size(e)-1?e[c].element.attr("width",g-1).css("width",g-1):e[c].element.attr("width",g).css("width",g):e[c].element.attr("width","").css("width","")}else BI.isNumeric(f)?c==BI.size(e)-1?e[c].element.attr("width",f-1).css("width",f-1):e[c].element.attr("width",f).css("width",f):e[c].element.attr("width","").css("width","")})}});var l=this._calculateWidth(BI.sum(a));l>1.05&&(l+=a.length),this.tableContainer.element.width(l)}},setRegionColumnSize:function(a){var b=this.options;b.regionColumnSize=a,0===b.freezeCols.length?b.isNeedFreeze?(this.partitions.attr("columnSize",this._isRightFreeze()?["fill",0]:[0,"fill"]),this.partitions.resize()):this.tableContainer.element.width(a[0]):b.freezeCols.length>0&&b.freezeCols.length=d?d:0;e=d?(b+=this.table.getRegionSize(),b-=this.table.getRightHorizontalScroll()):b-=this.table.getLeftHorizontalScroll(),b},_formatHeader:function(a){var b=this,c=this.options,d=[],e=function(a,d){b.resizer.setVisible(!0);var e=c.headerRowSize+b._getRegionRowSize()[1];b.resizer.setHeight(e),b._setResizerPosition(b._getResizerLeft(a)+d,(c.header.length-1)*c.headerRowSize)},f=function(a,d){b.resizer.setVisible(!1);var e=c.columnSize.slice();e[a]=d,c.columnSize=e,b.table.setColumnSize(e),b._populate(),b.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE)};return BI.each(a,function(g,h){g===a.length-1?(d[g]=[],BI.each(h,function(a,i){if(a===b._getFreezeColLength()-1||a===h.length-1)d[g][a]=i;else if(d[g][a]={type:"bi.resizable_table_cell",cell:i,suitableSize:c.minColumnSize[a],maxSize:c.maxColumnSize[a],resize:BI.bind(e,null,a),stop:BI.bind(f,null,a)},c.isNeedMerge)for(var j=g;j>0&&b._mergeRule(d[j][a],d[j-1][a]);)d[j-1][a]={type:"bi.resizable_table_cell",cell:d[j-1][a],suitableSize:c.minColumnSize[a],maxSize:c.maxColumnSize[a],resize:BI.bind(e,null,a),stop:BI.bind(f,null,a)},j--})):d.push(h)}),d},_populate:function(){var a=(this.options,this._getRegionSize());a>0?(this.regionResizerHandler.setVisible(!0),this._setRegionResizerHandlerPosition(a-3,0)):this.regionResizerHandler.setVisible(!1)},setWidth:function(a){BI.ResizableTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.ResizableTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(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()},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},attr:function(){BI.ResizableTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},restore:function(){this.table.restore()},populate:function(a,b){a&&(this.options.items=a),b&&(this.options.header=b,this.options.isNeedResize&&(b=this._formatHeader(b))),this.table.populate(a,b),this._populate()}}),BI.shortcut("bi.resizable_table",BI.ResizableTable),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a){var b=this,c=this.options;a=BI.Tree.transformToTreeFormat(a);var d=[];return BI.each(a,function(a,e){if(BI.isNotEmptyArray(e.children)||e.isParent===!0){var f=BI.extend({type:"bi.expander",el:{},popup:{type:"bi.custom_tree"}},BI.deepClone(c.expander),{id:e.id,pId:e.pId,value:e.value}),g=BI.stripEL(e);BI.isWidget(g)?f.el=g:(g=BI.clone(g),delete g.children,BI.extend(f.el,g)),f.popup.expander=BI.deepClone(c.expander),f.items=f.popup.items=e.children,f.itemsCreator=f.popup.itemsCreator=function(a){if(BI.isNotNull(a.node))return c.itemsCreator.apply(b,arguments);var d=Array.prototype.slice.call(arguments,0);return d[0].node=e,c.itemsCreator.apply(b,d)},BI.isNull(f.popup.el)&&(f.popup.el=BI.deepClone(c.el)),d.push(f)}else d.push(e)}),d},initTree:function(a){var b=this,c=this.options;this.tree=BI.createWidget(c.el,{element:this,items:this._formatItems(a),itemsCreator:function(a,d){c.itemsCreator.apply(this,[a,function(a){var c=Array.prototype.slice.call(arguments,0);c[0]=b._formatItems(a),d.apply(null,c)}])}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.CustomTree.EVENT_CHANGE,c,d)})},stroke:function(a){this.populate.apply(this,arguments)},populate:function(a){var b=Array.prototype.slice.call(arguments,0);arguments.length>0&&(b[0]=this._formatItems(a)),this.tree.populate.apply(this.tree,b)},setValue:function(a){this.tree&&this.tree.setValue(a)},getValue:function(){return this.tree?this.tree.getValue():[]},getAllButtons:function(){return this.tree?this.tree.getAllButtons():[]},getAllLeaves:function(){return this.tree?this.tree.getAllLeaves():[]},getNodeById:function(a){return this.tree&&this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree&&this.tree.getNodeByValue(a)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree),function($){var settings={},roots={},caches={},_consts={className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_setting={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},_initRoot=function(a){var b=data.getRoot(a);b||(b={},data.setRoot(a,b)),b[a.data.key.children]=[],b.expandTriggerFlag=!1,b.curSelectedList=[],b.noSelection=!0,b.createdNodes=[],b.zId=0,b._ver=(new Date).getTime()},_initCache=function(a){var b=data.getCache(a);b||(b={},data.setCache(a,b)),b.nodes=[],b.doms=[]},_bindEvent=function(a){var b=a.treeObj,c=consts.event;b.bind(c.NODECREATED,function(b,c,d){tools.apply(a.callback.onNodeCreated,[b,c,d])}),b.bind(c.CLICK,function(b,c,d,e,f){tools.apply(a.callback.onClick,[c,d,e,f])}),b.bind(c.EXPAND,function(b,c,d){tools.apply(a.callback.onExpand,[b,c,d])}),b.bind(c.COLLAPSE,function(b,c,d){tools.apply(a.callback.onCollapse,[b,c,d])}),b.bind(c.ASYNC_SUCCESS,function(b,c,d,e){tools.apply(a.callback.onAsyncSuccess,[b,c,d,e])}),b.bind(c.ASYNC_ERROR,function(b,c,d,e,f,g){tools.apply(a.callback.onAsyncError,[b,c,d,e,f,g])}),b.bind(c.REMOVE,function(b,c,d){tools.apply(a.callback.onRemove,[b,c,d])}),b.bind(c.SELECTED,function(b,c,d,e){tools.apply(a.callback.onSelected,[c,d,e])}),b.bind(c.UNSELECTED,function(b,c,d,e){tools.apply(a.callback.onUnSelected,[c,d,e])})},_unbindEvent=function(a){var b=a.treeObj,c=consts.event;b.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(a){var b=a.target,c=data.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null,j=null;if(tools.eqs(a.type,"mousedown")?g="mousedown":tools.eqs(a.type,"mouseup")?g="mouseup":tools.eqs(a.type,"contextmenu")?g="contextmenu":tools.eqs(a.type,"click")?tools.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+consts.id.SWITCH)?(d=tools.getNodeMainDom(b).id,f="switchNode"):(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="clickNode")):tools.eqs(a.type,"dblclick")&&(g="dblclick",j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id,f="switchNode")),g.length>0&&0==d.length&&(j=tools.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),j&&(d=tools.getNodeMainDom(j).id)),d.length>0)switch(e=data.getNodeCache(c,d),f){case"switchNode":e.isParent&&(tools.eqs(a.type,"click")||tools.eqs(a.type,"dblclick")&&tools.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand))?h=handler.onSwitchNode:f="";break;case"clickNode":h=handler.onClickNode}switch(g){case"mousedown":i=handler.onZTreeMousedown;break;case"mouseup":i=handler.onZTreeMouseup;break;case"dblclick":i=handler.onZTreeDblclick;break;case"contextmenu":i=handler.onZTreeContextmenu}var k={stop:!1,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return k},_initNode=function(a,b,c,d,e,f,g){if(c){var h=data.getRoot(a),i=a.data.key.children;c.level=b,c.tId=a.treeId+"_"+ ++h.zId,c.parentTId=d?d.tId:null,c.open="string"==typeof c.open?tools.eqs(c.open,"true"):!!c.open,c[i]&&c[i].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent="string"==typeof c.isParent?tools.eqs(c.isParent,"true"):!!c.isParent,c.open=!(!c.isParent||a.async.enable)&&c.open,c.zAsync=!c.isParent),c.isFirstNode=e,c.isLastNode=f,c.getParentNode=function(){return data.getNodeCache(a,c.parentTId)},c.getPreNode=function(){return data.getPreNode(a,c)},c.getNextNode=function(){return data.getNextNode(a,c)},c.isAjaxing=!1,data.fixPIdKeyValue(a,c)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(a,b){data.getCache(a).nodes[data.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){_init.afterA.push(a)},addBeforeA:function(a){_init.beforeA.push(a)},addInnerAfterA:function(a){_init.innerAfterA.push(a)},addInnerBeforeA:function(a){_init.innerBeforeA.push(a)},addInitBind:function(a){_init.bind.push(a)},addInitUnBind:function(a){_init.unbind.push(a)},addInitCache:function(a){_init.caches.push(a)},addInitNode:function(a){_init.nodes.push(a)},addInitProxy:function(a,b){b?_init.proxys.splice(0,0,a):_init.proxys.push(a)},addInitRoot:function(a){_init.roots.push(a)},addNodesData:function(a,b,c){var d=a.data.key.children;b[d]||(b[d]=[]),b[d].length>0&&(b[d][b[d].length-1].isLastNode=!1,view.setNodeLineIcos(a,b[d][b[d].length-1])),b.isParent=!0,b[d]=b[d].concat(c)},addSelectedNode:function(a,b){var c=data.getRoot(a);data.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){if(a.callback.onNodeCreated||a.view.addDiyDom){var c=data.getRoot(a);c.createdNodes.push(b)}},addZTreeTools:function(a){_init.zTreeTools.push(a)},exSetting:function(a){$.extend(!0,_setting,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=_init.afterA.length;d-1&&f.push(b[g]),f=f.concat(data.getNodesByParamFuzzy(a,b[g][e],c,d));return f},getNodesByFilter:function(a,b,c,d,e){if(!b)return d?null:[];for(var f=a.data.key.children,g=d?null:[],h=0,i=b.length;h0)},clone:function(a){if(null===a)return null;var b=tools.isArray(a)?[]:{};for(var c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):"object"==typeof a[c]?arguments.callee(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},$:function(a,b,c){return b&&"string"!=typeof b&&(c=b,b=""),"string"==typeof a?$(a,c?c.treeObj.get(0).ownerDocument:null):$("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d0},uCanDo:function(a,b){return!0}},view={addNodes:function(a,b,c,d){if(!a.data.keep.leaf||!b||b.isParent)if(tools.isArray(c)||(c=[c]),a.data.simpleData.enable&&(c=data.transformTozTreeFormat(a,c)),b){var e=$$(b,consts.id.SWITCH,a),f=$$(b,consts.id.ICON,a),g=$$(b,consts.id.UL,a);b.open||(view.replaceSwitchClass(b,e,consts.folder.CLOSE),view.replaceIcoClass(b,f,consts.folder.CLOSE),b.open=!1,g.css({display:"none"})),data.addNodesData(a,b,c),view.createNodes(a,b.level+1,c,b),d||view.expandCollapseParentNode(a,b,!0)}else data.addNodesData(a,data.getRoot(a),c),view.createNodes(a,0,c,null)},appendNodes:function(a,b,c,d,e,f){if(!c)return[];for(var g=[],h=a.data.key.children,i=0,j=c.length;i0&&(p=view.appendNodes(a,b+1,k[h],k,e,f&&k.open)),f&&(view.makeDOMNodeMainBefore(g,a,k),view.makeDOMNodeLine(g,a,k),data.getBeforeA(a,k,g),view.makeDOMNodeNameBefore(g,a,k),data.getInnerBeforeA(a,k,g),view.makeDOMNodeIcon(g,a,k),data.getInnerAfterA(a,k,g),view.makeDOMNodeNameAfter(g,a,k),data.getAfterA(a,k,g),k.isParent&&k.open&&view.makeUlHtml(a,k,g,p.join("")),view.makeDOMNodeMainAfter(g,a,k),data.addCreatedNode(a,k))}return g},appendParentULDom:function(a,b){var c=[],d=$$(b,a);!d.get(0)&&b.parentTId&&(view.appendParentULDom(a,b.getParentNode()),d=$$(b,a));var e=$$(b,consts.id.UL,a);e.get(0)&&e.remove();var f=a.data.key.children,g=view.appendNodes(a,b.level+1,b[f],b,!1,!0);view.makeUlHtml(a,b,c,g.join("")),d.append(c.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;if(node&&!node.isParent)return tools.apply(callback),!1;if(node&&node.isAjaxing)return!1;if(0==tools.apply(setting.callback.beforeAsync,[setting.treeId,node],!0))return tools.apply(callback),!1;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i1&&(spKey=pKey[1],pKey=pKey[0]),tmpParam[spKey]=node[pKey]}if(tools.isArray(setting.async.otherParam))for(i=0,l=setting.async.otherParam.length;i=0;d--)if(e=f[d],b===e||!b&&(!c||c!==e)){if($$(e,consts.id.A,a).removeClass(consts.node.CURSELECTED),b){data.removeSelectedNode(a,b),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e]);break}f.splice(d,1),a.treeObj.trigger(consts.event.UNSELECTED,[event,a.treeId,e])}},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=data.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();tools.apply(a.view.addDiyDom,[a.treeId,c]),a.callback.onNodeCreated&&a.treeObj.trigger(consts.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d){if(c&&0!=c.length){var e=data.getRoot(a),f=a.data.key.children,g=!d||d.open||!!$$(d[f][0],a).get(0);e.createdNodes=[];var h=view.appendNodes(a,b,c,d,!0,g);if(d){var i=$$(d,consts.id.UL,a);i.get(0)&&i.append(h.join(""))}else a.treeObj.append(h.join(""));view.createNodeCallback(a)}},destroy:function(a){a&&(data.initCache(a),data.initRoot(a),event.unbindTree(a),event.unbindEvent(a),a.treeObj.empty(),delete settings[a.treeId])},expandCollapseNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children;if(!b)return void tools.apply(e,[]);if(f.expandTriggerFlag){var h=e;e=function(){h&&h(),b.open?a.treeObj.trigger(consts.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(consts.event.COLLAPSE,[a.treeId,b])},f.expandTriggerFlag=!1}if(!b.open&&b.isParent&&(!$$(b,consts.id.UL,a).get(0)||b[g]&&b[g].length>0&&!$$(b[g][0],a).get(0))&&(view.appendParentULDom(a,b),view.createNodeCallback(a)),b.open==c)return void tools.apply(e,[]);var i=$$(b,consts.id.UL,a),j=$$(b,consts.id.SWITCH,a),k=$$(b,consts.id.ICON,a);b.isParent?(b.open=!b.open,b.iconOpen&&b.iconClose&&k.attr("style",view.makeNodeIcoStyle(a,b)),b.open?(view.replaceSwitchClass(b,j,consts.folder.OPEN),view.replaceIcoClass(b,k,consts.folder.OPEN),0==d||""==a.view.expandSpeed?(i.show(),tools.apply(e,[])):b[g]&&b[g].length>0?i.slideDown(a.view.expandSpeed,e):(i.show(),tools.apply(e,[]))):(view.replaceSwitchClass(b,j,consts.folder.CLOSE),view.replaceIcoClass(b,k,consts.folder.CLOSE),0!=d&&""!=a.view.expandSpeed&&b[g]&&b[g].length>0?i.slideUp(a.view.expandSpeed,e):(i.hide(),tools.apply(e,[])))):tools.apply(e,[])},expandCollapseParentNode:function(a,b,c,d,e){if(b){if(!b.parentTId)return void view.expandCollapseNode(a,b,c,d,e);view.expandCollapseNode(a,b,c,d),b.parentTId&&view.expandCollapseParentNode(a,b.getParentNode(),c,d,e)}},expandCollapseSonNode:function(a,b,c,d,e){var f=data.getRoot(a),g=a.data.key.children,h=b?b[g]:f[g],i=!b&&d,j=data.getRoot(a).expandTriggerFlag;if(data.getRoot(a).expandTriggerFlag=!1,h)for(var k=0,l=h.length;k=0;c--)if(b===d[c])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=data.getNodeName(b,c),e=b.view.nameIsHTML?d:d.replace(/&/g,"&").replace(//g,">");a.push("",e,"")},makeDOMNodeLine:function(a,b,c){a.push("")},makeDOMNodeMainAfter:function(a,b,c){a.push("")},makeDOMNodeMainBefore:function(a,b,c){a.push("
  • ")},makeDOMNodeNameAfter:function(a,b,c){a.push("")},makeDOMNodeNameBefore:function(a,b,c){var d=data.getNodeTitle(b,c),e=view.makeNodeUrl(b,c),f=view.makeNodeFontCss(b,c),g=[];for(var h in f)g.push(h,":",f[h],";");a.push("0?"href='"+e+"'":""," target='",view.makeNodeTarget(c),"' style='",g.join(""),"'"),tools.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"'").replace(//g,">"),"'"),a.push(">")},makeNodeFontCss:function(a,b){var c=tools.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);return c&&"function"!=typeof c?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];return b.isAjaxing||(c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0],b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU)),consts.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=b.isParent&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;"),0!=a.view.showIcon&&tools.apply(a.view.showIcon,[a.treeId,b],!0)||c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];return a.view.showLine?0==b.level&&b.isFirstNode&&b.isLastNode?c.push(consts.line.ROOT):0==b.level&&b.isFirstNode?c.push(consts.line.ROOTS):b.isLastNode?c.push(consts.line.BOTTOM):c.push(consts.line.CENTER):c.push(consts.line.NOLINE),b.isParent?c.push(b.open?consts.folder.OPEN:consts.folder.CLOSE):c.push(consts.folder.DOCU),view.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return consts.className.BUTTON+" "+consts.className.LEVEL+a.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("
      "),c.push(d),c.push("
    ")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?consts.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=a.data.key.children,d=b[c]; if(d){for(var e=0,f=d.length;e0&&(b[c][0].isFirstNode=!0)},setLastNode:function(a,b){var c=a.data.key.children,d=b[c].length;d>0&&(b[c][d-1].isLastNode=!0)},removeNode:function(a,b){var c=data.getRoot(a),d=a.data.key.children,e=b.parentTId?b.getParentNode():c;if(b.isFirstNode=!1,b.isLastNode=!1,b.getPreNode=function(){return null},b.getNextNode=function(){return null},data.getNodeCache(a,b.tId)){$$(b,a).remove(),data.removeNodeCache(a,b),data.removeSelectedNode(a,b);for(var f=0,g=e[d].length;f0){var l=e[d][k-1];if(h=$$(l,consts.id.UL,a),i=$$(l,consts.id.SWITCH,a),j=$$(l,consts.id.ICON,a),e==c)if(1==e[d].length)view.replaceSwitchClass(l,i,consts.line.ROOT);else{var m=$$(e[d][0],consts.id.SWITCH,a);view.replaceSwitchClass(e[d][0],m,consts.line.ROOTS),view.replaceSwitchClass(l,i,consts.line.BOTTOM)}else view.replaceSwitchClass(l,i,consts.line.BOTTOM);h.removeClass(consts.line.LINE)}}else e.isParent=!1,e.open=!1,h=$$(e,consts.id.UL,a),i=$$(e,consts.id.SWITCH,a),j=$$(e,consts.id.ICON,a),view.replaceSwitchClass(e,i,consts.folder.DOCU),view.replaceIcoClass(e,j,consts.folder.DOCU),h.css("display","none")}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[e.length-1]=c}b.attr("class",e.join("_"))}}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(void 0!=d){var e=d.split("_");switch(c){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:e[0]=view.makeNodeLineClassEx(a)+c;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:e[1]=c}b.attr("class",e.join("_")),c!==consts.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||view.cancelPreSelectedNode(a,null,b),$$(b,consts.id.A,a).addClass(consts.node.CURSELECTED),data.addSelectedNode(a,b),a.treeObj.trigger(consts.event.SELECTED,[event,a.treeId,b])},setNodeFontCss:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=$$(b,consts.id.SWITCH,a),d=$$(b,consts.id.UL,a),e=$$(b,consts.id.ICON,a),f=view.makeUlLineClass(a,b);0==f.length?d.removeClass(consts.line.LINE):d.addClass(f),c.attr("class",view.makeNodeLineClass(a,b)),b.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled"),e.removeAttr("style"),e.attr("style",view.makeNodeIcoStyle(a,b)),e.attr("class",view.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=data.getNodeTitle(a,b),d=$$(b,consts.id.SPAN,a);if(d.empty(),a.view.nameIsHTML?d.html(data.getNodeName(a,b)):d.text(data.getNodeName(a,b)),tools.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)){var e=$$(b,consts.id.A,a);e.attr("title",c?c:"")}},setNodeTarget:function(a,b){var c=$$(b,consts.id.A,a);c.attr("target",view.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=$$(b,consts.id.A,a),d=view.makeNodeUrl(a,b);null==d||0==d.length?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){if(b.open||!tools.canAsync(a,b))view.expandCollapseNode(a,b,!b.open);else if(a.async.enable){if(!view.asyncNode(a,b))return void view.expandCollapseNode(a,b,!b.open)}else b&&view.expandCollapseNode(a,b,!b.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(a){var b=data.getZTreeTools(a);return b?b:null},destroy:function(a){if(a&&a.length>0)view.destroy(data.getSetting(a));else for(var b in settings)view.destroy(settings[b])},init:function(a,b,c){var d=tools.clone(_setting);$.extend(!0,d,b),d.treeId=a.attr("id"),d.treeObj=a,d.treeObj.empty(),settings[d.treeId]=d,"undefined"==typeof document.body.style.maxHeight&&(d.view.expandSpeed=""),data.initRoot(d);var e=data.getRoot(d),f=d.data.key.children;c=c?tools.clone(tools.isArray(c)?c:[c]):[],d.data.simpleData.enable?e[f]=data.transformTozTreeFormat(d,c):e[f]=c,data.initCache(d),event.unbindTree(d),event.bindTree(d),event.unbindEvent(d),event.bindEvent(d);var g={setting:d,addNodes:function(a,b,c){function e(){view.addNodes(d,a,f,1==c)}if(!b)return null;if(a||(a=null),a&&!a.isParent&&d.data.keep.leaf)return null;var f=tools.clone(tools.isArray(b)?b:[b]);return tools.canAsync(d,a)?view.asyncNode(d,a,c,e):e(),f},cancelSelectedNode:function(a){view.cancelPreSelectedNode(d,a)},destroy:function(){view.destroy(d)},expandAll:function(a){return a=!!a,view.expandCollapseSonNode(d,null,a,!0),a},expandNode:function(a,b,c,e,f){if(!a||!a.isParent)return null;if(b!==!0&&b!==!1&&(b=!a.open),f=!!f,f&&b&&0==tools.apply(d.callback.beforeExpand,[d.treeId,a],!0))return null;if(f&&!b&&0==tools.apply(d.callback.beforeCollapse,[d.treeId,a],!0))return null;if(b&&a.parentTId&&view.expandCollapseParentNode(d,a.getParentNode(),b,!1),b===a.open&&!c)return null;if(data.getRoot(d).expandTriggerFlag=f,!tools.canAsync(d,a)&&c)view.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{$$(a,d).focus().blur()}catch(b){}});else if(a.open=!b,view.switchNode(this.setting,a),e!==!1)try{$$(a,d).focus().blur()}catch(g){}return b},getNodes:function(){return data.getNodes(d)},getNodeByParam:function(a,b,c){return a?data.getNodeByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodeByTId:function(a){return data.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return a?data.getNodesByParam(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByParamFuzzy:function(a,b,c){return a?data.getNodesByParamFuzzy(d,c?c[d.data.key.children]:data.getNodes(d),a,b):null},getNodesByFilter:function(a,b,c,e){return b=!!b,a&&"function"==typeof a?data.getNodesByFilter(d,c?c[d.data.key.children]:data.getNodes(d),a,b,e):b?null:[]},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():data.getRoot(d),e=0,f=c[b].length;e0?view.createNodes(d,0,e[f]):d.async.enable&&d.async.url&&""!==d.async.url&&view.asyncNode(d),g}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(a){var b={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},c={check:{enable:!1,autoCheckTrigger:!1,chkStyle:b.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:b.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},d=function(a){var b=v.getRoot(a);b.radioCheckedList=[]},e=function(a){},f=function(a){var b=a.treeObj,c=t.event;b.bind(c.CHECK,function(b,c,d,e){b.srcEvent=c,s.apply(a.callback.onCheck,[b,d,e])})},g=function(a){var b=a.treeObj,c=t.event;b.unbind(c.CHECK)},h=function(a){var b=a.target,c=v.getSetting(a.data.treeId),d="",e=null,f="",g="",h=null,i=null;if(s.eqs(a.type,"mouseover")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoverCheck"):s.eqs(a.type,"mouseout")?c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="mouseoutCheck"):s.eqs(a.type,"click")&&c.check.enable&&s.eqs(b.tagName,"span")&&null!==b.getAttribute("treeNode"+t.id.CHECK)&&(d=s.getNodeMainDom(b).id,f="checkNode"),d.length>0)switch(e=v.getNodeCache(c,d),f){case"checkNode":h=n.onCheckNode;break;case"mouseoverCheck":h=n.onMouseoverCheck;break;case"mouseoutCheck":h=n.onMouseoutCheck}var j={stop:"checkNode"===f,node:e,nodeEventType:f,nodeEventCallback:h,treeEventType:g,treeEventCallback:i};return j},i=function(a,b,c,d,e,f,g){if(c){var h=a.data.key.checked;if("string"==typeof c[h]&&(c[h]=s.eqs(c[h],"true")),c[h]=!!c[h],c.checkedOld=c[h],"string"==typeof c.nocheck&&(c.nocheck=s.eqs(c.nocheck,"true")),c.nocheck=!!c.nocheck||a.check.nocheckInherit&&d&&!!d.nocheck,"string"==typeof c.chkDisabled&&(c.chkDisabled=s.eqs(c.chkDisabled,"true")),c.chkDisabled=!!c.chkDisabled||a.check.chkDisabledInherit&&d&&!!d.chkDisabled,"string"==typeof c.halfCheck&&(c.halfCheck=s.eqs(c.halfCheck,"true")),c.halfCheck=!!c.halfCheck,c.check_Child_State=-1,c.check_Focus=!1,c.getCheckStatus=function(){return v.getCheckStatus(a,c)},a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL&&c[h]){var i=v.getRoot(a);i.radioCheckedList.push(c)}}},j=function(a,b,c){a.data.key.checked;a.check.enable&&(v.makeChkFlag(a,b),c.push(""))},k=function(a,b){b.checkNode=function(a,b,c,d){var e=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[e]),d=!!d,(a[e]!==b||c)&&(!d||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)){a[e]=b;var f=w(a,t.id.CHECK,this.setting);(c||this.setting.check.chkStyle===t.radio.STYLE)&&u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a),d&&this.setting.treeObj.trigger(t.event.CHECK,[null,this.setting.treeId,a])}},b.checkAllNodes=function(a){u.repairAllChk(this.setting,!!a)},b.getCheckedNodes=function(a){var b=this.setting.data.key.children;return a=a!==!1,v.getTreeCheckedNodes(this.setting,v.getRoot(this.setting)[b],a)},b.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return v.getTreeChangeCheckedNodes(this.setting,v.getRoot(this.setting)[a])},b.setChkDisabled=function(a,b,c,d){b=!!b,c=!!c,d=!!d,u.repairSonChkDisabled(this.setting,a,b,d),u.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var c=b.updateNode;b.updateNode=function(a,d){if(c&&c.apply(b,arguments),a&&this.setting.check.enable){var e=w(a,this.setting);if(e.get(0)&&s.uCanDo(this.setting)){var f=w(a,t.id.CHECK,this.setting);1!=d&&this.setting.check.chkStyle!==t.radio.STYLE||u.checkNodeRelation(this.setting,a),u.setChkClass(this.setting,f,a),u.repairParentChkClassWithSelf(this.setting,a)}}}},l={getRadioCheckedList:function(a){for(var b=v.getRoot(a).radioCheckedList,c=0,d=b.length;c-1&&b.check_Child_State<2:b.check_Child_State>0};return d},getTreeCheckedNodes:function(a,b,c,d){if(!b)return[];var e=a.data.key.children,f=a.data.key.checked,g=c&&a.check.chkStyle==t.radio.STYLE&&a.check.radioType==t.radio.TYPE_ALL;d=d?d:[];for(var h=0,i=b.length;h0));h++);return d},getTreeChangeCheckedNodes:function(a,b,c){if(!b)return[];var d=a.data.key.children,e=a.data.key.checked;c=c?c:[];for(var f=0,g=b.length;f0?2:0,2==i){e=2;break}0==i&&(e=0)}else if(a.check.chkStyle==t.checkbox.STYLE){if(i=h.nocheck===!0||h.chkDisabled===!0?h.check_Child_State:h.halfCheck===!0?1:h[d]?h.check_Child_State===-1||2===h.check_Child_State?2:1:h.check_Child_State>0?1:0,1===i){e=1;break}if(2===i&&e>-1&&f>0&&i!==e){e=1;break}if(2===e&&i>-1&&i<2){e=1;break}i>-1&&(e=i)}}b.check_Child_State=e}}},m={},n={onCheckNode:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=c.data.key.checked;if(0==s.apply(c.callback.beforeCheck,[c.treeId,b],!0))return!0;b[d]=!b[d],u.checkNodeRelation(c,b);var e=w(b,t.id.CHECK,c);return u.setChkClass(c,e,b),u.repairParentChkClassWithSelf(c,b),c.treeObj.trigger(t.event.CHECK,[a,c.treeId,b]),!0},onMouseoverCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!0,u.setChkClass(c,d,b),!0},onMouseoutCheck:function(a,b){if(b.chkDisabled===!0)return!1;var c=v.getSetting(a.data.treeId),d=w(b,t.id.CHECK,c);return b.check_Focus=!1,u.setChkClass(c,d,b),!0}},o={},p={checkNodeRelation:function(a,b){var c,d,e,f=a.data.key.children,g=a.data.key.checked,h=t.radio;if(a.check.chkStyle==h.STYLE){var i=v.getRadioCheckedList(a);if(b[g])if(a.check.radioType==h.TYPE_ALL){for(d=i.length-1;d>=0;d--)c=i[d],c[g]&&c!=b&&(c[g]=!1,i.splice(d,1),u.setChkClass(a,w(c,t.id.CHECK,a),c),c.parentTId!=b.parentTId&&u.repairParentChkClassWithSelf(a,c));i.push(b)}else{var j=b.parentTId?b.getParentNode():v.getRoot(a);for(d=0,e=j[f].length;d-1)&&u.setSonNodeCheckBox(a,b,!0),b[g]||b[f]&&0!=b[f].length&&!(a.check.chkboxType.N.indexOf("s")>-1)||u.setSonNodeCheckBox(a,b,!1),b[g]&&a.check.chkboxType.Y.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!0),!b[g]&&a.check.chkboxType.N.indexOf("p")>-1&&u.setParentNodeCheckBox(a,b,!1)},makeChkClass:function(a,b){var c=a.data.key.checked,d=t.checkbox,e=t.radio,f="";f=b.chkDisabled===!0?d.DISABLED:b.halfCheck?d.PART:a.check.chkStyle==e.STYLE?b.check_Child_State<1?d.FULL:d.PART:b[c]?2===b.check_Child_State||b.check_Child_State===-1?d.FULL:d.PART:b.check_Child_State<1?d.FULL:d.PART;var g=a.check.chkStyle+"_"+(b[c]?d.TRUE:d.FALSE)+"_"+f;return g=b.check_Focus&&b.chkDisabled!==!0?g+"_"+d.FOCUS:g,t.className.BUTTON+" "+d.DEFAULT+" "+g},repairAllChk:function(a,b){if(a.check.enable&&a.check.chkStyle===t.checkbox.STYLE)for(var c=a.data.key.checked,d=a.data.key.children,e=v.getRoot(a),f=0,g=e[d].length;f0?u.repairParentChkClass(a,b[c][0]):u.repairParentChkClass(a,b)}},repairSonChkDisabled:function(a,b,c,d){if(b){var e=a.data.key.children;if(b.chkDisabled!=c&&(b.chkDisabled=c),u.repairChkClass(a,b),b[e]&&d)for(var f=0,g=b[e].length;f0){h=!1;break}h&&u.setParentNodeCheckBox(a,b.getParentNode(),c,d)}},setSonNodeCheckBox:function(a,b,c,d){if(b){var e=a.data.key.children,f=a.data.key.checked,g=w(b,t.id.CHECK,a);d||(d=b);var h=!1;if(b[e])for(var i=0,j=b[e].length;i0?c?2:0:-1)):b.check_Child_State=-1,u.setChkClass(a,g,b),a.check.autoCheckTrigger&&b!=d&&b.nocheck!==!0&&b.chkDisabled!==!0&&a.treeObj.trigger(t.event.CHECK,[null,a.treeId,b]))}}},q={tools:o,view:p,event:m,data:l};a.extend(!0,a.fn.zTree.consts,b),a.extend(!0,a.fn.zTree._z,q);var r=a.fn.zTree,s=r._z.tools,t=r.consts,u=r._z.view,v=r._z.data,w=(r._z.event,s.$);v.exSetting(c),v.addInitBind(f),v.addInitUnBind(g),v.addInitCache(e),v.addInitNode(i),v.addInitProxy(h,!0),v.addInitRoot(d),v.addBeforeA(j),v.addZTreeTools(k);var x=u.createNodes;u.createNodes=function(a,b,c,d){x&&x.apply(u,arguments),c&&u.repairParentChkClassWithSelf(a,d)};var y=u.removeNode;u.removeNode=function(a,b){var c=b.getParentNode();y&&y.apply(u,arguments),b&&c&&(u.repairChkClass(a,c),u.repairParentChkClass(a,c))};var z=u.appendNodes;u.appendNodes=function(a,b,c,d,e,f){var g="";return z&&(g=z.apply(u,arguments)),d&&v.makeChkFlag(a,d),g}}(jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var a=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-icon-change-button",iconClass:"",iconWidth:null,iconHeight:null,stopEvent:!1,stopPropagation:!1,selected:!1,once:!1,forceSelected:!1,forceNotSelected:!1,disableSelected:!1,shadow:!1,isShadowShowingOnSelected:!1,trigger:null,handler:BI.emptyFn})},_init:function(){BI.IconChangeButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:b.iconClass,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight,stopEvent:b.stopEvent,stopPropagation:b.stopPropagation,selected:b.selected,once:b.once,forceSelected:b.forceSelected,forceNotSelected:b.forceNotSelected,disableSelected:b.disableSelected,shadow:b.shadow,isShadowShowingOnSelected:b.isShadowShowingOnSelected,trigger:b.trigger,handler:b.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(a){this.button.setSelected(a)},setIcon:function(a){var b=this.options;b.iconClass!==a&&(this.element.removeClass(b.iconClass).addClass(a),b.iconClass=a)}}),BI.IconChangeButton.EVENT_CHANGE="IconChangeButton.EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})},_init:function(){BI.HalfIconButton.superclass._init.apply(this,arguments)},doClick:function(){BI.HalfIconButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfIconButton.EVENT_CHANGE)}}),BI.HalfIconButton.EVENT_CHANGE="HalfIconButton.EVENT_CHANGE",BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var a=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})},_init:function(){BI.TriggerIconButton.superclass._init.apply(this,arguments)},doClick:function(){BI.TriggerIconButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TriggerIconButton.EVENT_CHANGE,this)}}),BI.TriggerIconButton.EVENT_CHANGE="TriggerIconButton.EVENT_CHANGE",BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:25,logic:{dynamic:!1}})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,rgap:b.rgap,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:36},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.MultiSelectItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE,this.getValue(),this)},setSelected:function(a){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),BI.SingleSelectIconTextItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-icon-text-item bi-list-item-active",iconClass:"",hgap:10,height:25})},_init:function(){BI.SingleSelectIconTextItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:b.iconClass,once:b.once,selected:b.selected,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,text:b.text,keyword:b.keyword,value:b.value,py:b.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(a){this.text.setSelected(a)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectIconTextItem.superclass.doClick.apply(this,arguments)}}),BI.shortcut("bi.single_select_icon_text_item",BI.SingleSelectIconTextItem),BI.SingleSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-item bi-list-item-active",hgap:10,height:25,textAlign:"left"})},_init:function(){BI.SingleSelectItem.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:a.textAlign,whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.single_select_item",BI.SingleSelectItem),BI.SingleSelectRadioItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item bi-list-item-active",logic:{dynamic:!1},hgap:10,height:25})},_init:function(){BI.SingleSelectRadioItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio"}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",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(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:36},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectRadioItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected())},setSelected:function(a){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){var a=this,b=this.options;BI.ArrowNode.superclass._init.apply(this,arguments),this.checkbox=BI.createWidget({type:"bi.arrow_tree_group_node_checkbox",iconWidth:13,iconHeight:13}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.ArrowNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isOpened())},setValue:function(a){this.text.setValue(a)},setOpened:function(a){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-first-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.FirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.FirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode),BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25,iconHeight:13,iconWidth:13,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_group_node_checkbox",width:23,stopPropagation:!0});var c=BI.createWidget({type:"bi.center_adapt",cls:b.iconCls,width:23,items:[{type:"bi.icon",height:b.iconHeight,width:b.iconWidth}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var d=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),e=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},{width:23,el:c},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(d,BI.extend(b.logic,{items:e}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.IconArrowNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-last-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"", -open:!1,height:25})},_init:function(){BI.LastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.LastPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-mid-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.MidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.MidPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode),BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-icon-arrow-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25,iconHeight:13,iconWidth:13,iconCls:""})},_init:function(){BI.MultiLayerIconArrowNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:b.iconCls,id:b.id,pId:b.pId,open:b.open,height:b.height,iconHeight:b.iconHeight,iconWidth:b.iconWidth,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode),BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.PlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.PlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(a){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode),BI.TriangleGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.TriangleGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-triangle-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:25})},_init:function(){BI.TriangleGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({iconWidth:13,iconHeight:13,type:"bi.tree_group_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.TriangleGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isOpened())},setOpened:function(a){BI.TriangleGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(a)},setText:function(a){BI.TriangleGroupNode.superclass.setText.apply(this,arguments),this.text.setText(a)}}),BI.shortcut("bi.triangle_group_node",BI.TriangleGroupNode),BI.FirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:25})},_init:function(){BI.FirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:13,el:{type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height}},{width:25,el:{type:"bi.layout",cls:"mid-line-conn-background",width:25,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.FirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.FirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem),BI.IconTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.IconTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},height:25,iconWidth:16,iconHeight:16,iconCls:""})},_init:function(){BI.IconTreeLeafItem.superclass._init.apply(this,arguments);var a=this.options,b=BI.createWidget({type:"bi.center_adapt",width:23,cls:a.iconCls,items:[{type:"bi.icon",width:a.iconWidth,height:a.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,value:a.value,py:a.py});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:23,el:b},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(a.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.IconTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.IconTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem),BI.LastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:25})},_init:function(){BI.LastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:13,el:{type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height}},{width:25,el:{type:"bi.layout",cls:"mid-line-conn-background",width:25,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.LastTreeLeafItem.superclass.doClick.apply(this,arguments)},setSelected:function(a){BI.LastTreeLeafItem.superclass.setSelected.apply(this,arguments)}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem),BI.MidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:25})},_init:function(){BI.MidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===b.layer?"":{width:13,el:{type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height}},{width:25,el:{type:"bi.layout",cls:"mid-line-conn-background",width:25,height:b.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MidTreeLeafItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setSelected:function(a){BI.MidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(a)}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem),BI.MultiLayerIconTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerIconTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-icon-tree-leaf-item bi-list-item-active",layer:0,height:25,iconCls:"",iconHeight:14,iconWidth:12})},_init:function(){BI.MultiLayerIconTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:b.iconCls,id:b.id,pId:b.pId,isFront:!0,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerIconTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem),BI.TreeTextLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tree-text-leaf-item bi-list-item-active",id:"",pId:"",height:25,hgap:0,lgap:0,rgap:0})},_init:function(){BI.TreeTextLeafItem.superclass._init.apply(this,arguments);var a=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,lgap:a.lgap,rgap:a.hgap,text:a.text,value:a.value,py:a.py}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text}]})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.tree_text_leaf_item",BI.TreeTextLeafItem),BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:7,day:25})},_dateCreator:function(a,b,c){var d=this.options,e={},f=Date.getDate(),g=d.min.match(/\d+/g),h=d.max.match(/\d+/g);a<(0|g[0])&&(a=0|g[0]),a>(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=Date._MD.slice(0);i[1]=Date.isLeap(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay(),e.PDay=i[0===b?11:b-1]-e.FDay+1,e.NDay=1;var j=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=e.FDay&&a=0?c%12:(12+c%12)%12;return{year:Date.getDate().getFullYear()+d,month:e}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[];return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var e={};Date.checkVoid(c+a,1,1,b.min,b.max)[0]&&(e.disabled=!0),e.text=c+a,d.push(e)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=Date.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:23,width:38,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!Date.checkVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!Date.checkVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=Date.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL},getPageByYear:function(a){var b=Date.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),BI.ComplexCanvas=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ComplexCanvas.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-complex-canvas"})},_init:function(){BI.ComplexCanvas.superclass._init.apply(this,arguments);var a=this.options;this.canvas=BI.createWidget({type:"bi.canvas",element:this,width:a.width,height:a.height})},branch:function(a,b,c,d,e,f){var g=this,h=[].slice.call(arguments);if(h.length<=5)return this.canvas.line.apply(this.canvas,arguments);var i;BI.isOdd(h.length)&&(i=BI.last(h),h=BI.initial(h)),h=[].slice.call(h,2);var j=BI.filter(h,function(a){return a%2===0}),k=BI.filter(h,function(a){return a%2!==0});i||(i={});var l=i.offset||20;if(b>d&&b>f||bd&&b>f)var m=Math.max.apply(this,k)+l;else var m=Math.min.apply(this,k)-l;var n=Math.min.apply(this,j),o=BI.indexOf(j,n),p=Math.max.apply(this,j),q=BI.indexOf(j,p);return this.canvas.line(n,k[o],n,m,p,m,p,k[q],i),BI.each(j,function(a,b){a!==q&&a!==o&&g.canvas.line(b,k[a],b,m,i)}),void this.canvas.line(a,m,a,b,i)}if(a>c&&a>e||ac&&a>e)var r=Math.max.apply(this,j)+l;else var r=Math.min.apply(this,j)-l;var s=Math.min.apply(this,k),t=BI.indexOf(k,s),u=Math.max.apply(this,k),v=BI.indexOf(k,u);return this.canvas.line(j[t],s,r,s,r,u,j[v],u,i),BI.each(k,function(a,b){a!==t&&a!==v&&g.canvas.line(j[a],b,r,b,i)}),void this.canvas.line(r,b,a,b,i)}},stroke:function(a){this.canvas.stroke(a)}}),BI.shortcut("bi.complex_canvas",BI.ComplexCanvas),BI.ArrowTreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-arrow-tree-group-node",iconWidth:13,iconHeight:13})},_init:function(){BI.ArrowTreeGroupNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.removeClass("column-next-page-h-font").addClass("column-pre-page-h-font"):this.element.removeClass("column-pre-page-h-font").addClass("column-next-page-h-font")}}),BI.shortcut("bi.arrow_tree_group_node_checkbox",BI.ArrowTreeGroupNodeCheckbox),BI.CheckingMarkNode=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.CheckingMarkNode.superclass._defaultConfig.apply(this,arguments),{extraCls:"check-mark-font",iconWidth:13,iconHeight:13})},_init:function(){BI.CheckingMarkNode.superclass._init.apply(this,arguments),this.setSelected(this.options.selected)},setSelected:function(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),BI.FirstTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type2",iconWidth:25,iconHeight:25})},_init:function(){BI.FirstTreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),BI.LastTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type4",iconWidth:25,iconHeight:25})},_init:function(){BI.LastTreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),BI.MidTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type3",iconWidth:25,iconHeight:25})},_init:function(){BI.MidTreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),BI.TreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-node-triangle-collapse-font",iconWidth:13,iconHeight:13})},_init:function(){BI.TreeGroupNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.TreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.removeClass("tree-node-triangle-collapse-font").addClass("tree-node-triangle-expand-font"):this.element.removeClass("tree-node-triangle-expand-font").addClass("tree-node-triangle-collapse-font")}}),BI.shortcut("bi.tree_group_node_checkbox",BI.TreeGroupNodeCheckbox),BI.TreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type1",iconWidth:25,iconHeight:25})},_init:function(){BI.TreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox);try{!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Clipboard=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0&&void 0!==arguments[0]?arguments[0]:{};this.action=a.action,this.emitter=a.emitter,this.target=a.target,this.text=a.text,this.trigger=a.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var a=this,b="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return a.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[b?"right":"left"]="-9999px";var c=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=c+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,e["default"])(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,e["default"])(this.target),this.copyText()}},{key:"copyText",value:function(){var a=void 0;try{a=document.execCommand(this.action)}catch(b){a=!1}this.handleResult(a)}},{key:"handleResult",value:function(a){this.emitter.emit(a?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=a,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(a){if(void 0!==a){if(!a||"object"!==("undefined"==typeof a?"undefined":f(a))||1!==a.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&a.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(a.hasAttribute("readonly")||a.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=a}},get:function(){return this._target}}]),a}();a.exports=h})},{select:5}],8:[function(b,c,d){!function(e,f){if("function"==typeof a&&a.amd)a(["module","./clipboard-action","tiny-emitter","good-listener"],f);else if("undefined"!=typeof d)f(c,b("./clipboard-action"),b("tiny-emitter"),b("good-listener"));else{var g={exports:{}};f(g,e.clipboardAction,e.tinyEmitter,e.goodListener),e.clipboard=g.exports}}(this,function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a,b){var c="data-clipboard-"+a;if(b.hasAttribute(c))return b.getAttribute(c)}var j=e(b),k=e(c),l=e(d),m=function(){function a(a,b){for(var c=0;c0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof a.action?a.action:this.defaultAction,this.target="function"==typeof a.target?a.target:this.defaultTarget,this.text="function"==typeof a.text?a.text:this.defaultText}},{key:"listenClick",value:function(a){var b=this;this.listener=(0,l["default"])(a,"click",function(a){return b.onClick(a)})}},{key:"onClick",value:function(a){var b=a.delegateTarget||a.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new j["default"]({action:this.action(b),target:this.target(b),text:this.text(b),trigger:b,emitter:this})}},{key:"defaultAction",value:function(a){return i("action",a)}},{key:"defaultTarget",value:function(a){var b=i("target",a);if(b)return document.querySelector(b)}},{key:"defaultText",value:function(a){return i("text",a)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],b="string"==typeof a?[a]:a,c=!!document.queryCommandSupported;return b.forEach(function(a){c=c&&!!document.queryCommandSupported(a)}),c}}]),b}(k["default"]);a.exports=n})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)})}catch(e){!function(a){a.fn.zclip=function(b){if("object"==typeof b&&!b.length){var c=a.extend({path:"ZeroClipboard.swf",copy:null,beforeCopy:null,afterCopy:null,clickAfter:!0,setHandCursor:!0,setCSSEffects:!0},b);return this.each(function(){var b=a(this);if(b.is(":visible")&&("string"==typeof c.copy||a.isFunction(c.copy))){ZeroClipboard.setMoviePath(c.path);var d=new ZeroClipboard.Client;a.isFunction(c.copy)&&b.bind("zClip_copy",c.copy),a.isFunction(c.beforeCopy)&&b.bind("zClip_beforeCopy",c.beforeCopy),a.isFunction(c.afterCopy)&&b.bind("zClip_afterCopy",c.afterCopy),d.setHandCursor(c.setHandCursor),d.setCSSEffects(c.setCSSEffects),d.addEventListener("mouseOver",function(a){b.trigger("mouseenter")}),d.addEventListener("mouseOut",function(a){b.trigger("mouseleave")}),d.addEventListener("mouseDown",function(e){b.trigger("mousedown"),a.isFunction(c.copy)?d.setText(b.triggerHandler("zClip_copy")):d.setText(c.copy),a.isFunction(c.beforeCopy)&&b.trigger("zClip_beforeCopy")}),d.addEventListener("complete",function(d,e){a.isFunction(c.afterCopy)?b.trigger("zClip_afterCopy"):(e.length>500&&(e=e.substr(0,500)+"...\n\n("+(e.length-500)+" characters not shown)"),b.removeClass("hover"),alert("Copied text to clipboard:\n\n "+e)),c.clickAfter&&b.trigger("click")}),d.glue(b[0],b.parent()[0]),a(window).bind("load resize",function(){d.reposition()})}})}if("string"==typeof b)return this.each(function(){var c=a(this);b=b.toLowerCase();var d=c.data("zclipId"),e=a("#"+d+".zclip");"remove"==b?(e.remove(),c.removeClass("active hover")):"hide"==b?(e.hide(),c.removeClass("active hover")):"show"==b&&e.show()})}}(jQuery);var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){return"string"==typeof a&&(a=document.getElementById(a)),a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a),this.className+=" "+a},a.removeClass=function(a){for(var b=this.className.split(/\s+/),c=-1,d=0;d-1&&(b.splice(c,1),this.className=b.join(" ")),this},a.hasClass=function(a){return!!this.className.match(new RegExp("\\s*"+a+"\\s*"))}),a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,c){var d=this.clients[a];d&&d.receiveEvent(b,c)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a,b){var c={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};return a&&a!=b&&(c.left+=a.offsetLeft,c.top+=a.offsetTop),c},Client:function(a){this.handlers={},this.id=ZeroClipboard.nextId++,this.movieId="ZeroClipboardMovie_"+this.id,ZeroClipboard.register(this.id,this),a&&this.glue(a)}};ZeroClipboard.Client.prototype={id:0,ready:!1,movie:null,clipText:"",handCursorEnabled:!0,cssEffects:!0,handlers:null,glue:function(a,b,c){this.domElement=ZeroClipboard.$(a);var d=99;this.domElement.style.zIndex&&(d=parseInt(this.domElement.style.zIndex,10)+1),"string"==typeof b?b=ZeroClipboard.$(b):"undefined"==typeof b&&(b=document.getElementsByTagName("body")[0]);var e=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div"),this.div.className="zclip",this.div.id="zclip-"+this.movieId,$(this.domElement).data("zclipId","zclip-"+this.movieId);var f=this.div.style;if(f.position="absolute",f.left=""+e.left+"px",f.top=""+e.top+"px",f.width=""+e.width+"px",f.height=""+e.height+"px",f.zIndex=d,"object"==typeof c)for(addedStyle in c)f[addedStyle]=c[addedStyle];b.appendChild(this.div),this.div.innerHTML=this.getHTML(e.width,e.height)},getHTML:function(a,b){var c="",d="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+=''}else c+='';return c},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide(),this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null,this.div=null}},reposition:function(a){if(a&&(this.domElement=ZeroClipboard.$(a),this.domElement||this.hide()),this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement),c=this.div.style;c.left=""+b.left+"px",c.top=""+b.top+"px"}},setText:function(a){this.clipText=a,this.ready&&this.movie.setText(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,""),this.handlers[a]||(this.handlers[a]=[]),this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a,this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){switch(a=a.toString().toLowerCase().replace(/^on/,"")){case"load":if(this.movie=document.getElementById(this.movieId),!this.movie){var c=this;return void setTimeout(function(){c.receiveEvent("load",null)},1)}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;return setTimeout(function(){c.receiveEvent("load",null)},100),void(this.ready=!0)}this.ready=!0;try{this.movie.setText(this.clipText)}catch(d){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(d){}break;case"mouseover":this.domElement&&this.cssEffects&&(this.domElement.addClass("hover"),this.recoverActive&&this.domElement.addClass("active"));break;case"mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0),this.domElement.removeClass("hover"));break;case"mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case"mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var e=0,f=this.handlers[a].length;e=0&&(0|a)<=255},d=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:c,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:32,height:20});BI.each(d,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=d[0],this.G=d[1],this.B=d[2],this.none=BI.createWidget({type:"bi.checkbox",title:BI.i18nText("BI-Basic_Auto")}),this.none.on(BI.Checkbox.EVENT_CHANGE,function(){this.isSelected()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#000000"),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))}),this.transparent=BI.createWidget({type:"bi.checkbox",title:BI.i18nText("BI-Transparent_Color")}),this.transparent.on(BI.Checkbox.EVENT_CHANGE,function(){this.isSelected()?(a.lastColor=a.getValue(),a.setValue("transparent")):a.setValue(a.lastColor||"#000000"),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.colorShow,width:"fill"},{el:b[0],lgap:10,width:16},{el:this.R,width:32},{el:b[1],lgap:10,width:16},{el:this.G,width:32},{el:b[2],lgap:10,width:16},{el:this.B,width:32},{el:{type:"bi.center_adapt",items:[this.none]},width:18},{el:{type:"bi.center_adapt",items:[this.transparent]},width:18}]})},setValue:function(a){if("transparent"===a)return this.transparent.setSelected(!0),this.none.setSelected(!1),this.R.setValue(""),this.G.setValue(""),void this.B.setValue("");a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this.colorShow.element.css("background-color",a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.b)},getValue:function(){return this.transparent.isSelected()?"transparent":BI.DOM.rgb2hex(BI.DOM.json2rgb({r:this.R.getValue(),g:this.G.getValue(),b:this.B.getValue()}))}}),BI.ColorPickerEditor.EVENT_CHANGE="ColorPickerEditor.EVENT_CHANGE",BI.shortcut("bi.color_picker_editor",BI.ColorPickerEditor),BI.Farbtastic=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Farbtastic.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-farbtastic",width:195,height:195})},_init:function(){BI.Farbtastic.superclass._init.apply(this,arguments)},mounted:function(){var a=this;this.farbtastic=$.farbtastic(this.element,function(b){a.fireEvent(BI.Farbtastic.EVENT_CHANGE,a.getValue(),a)})},setValue:function(a){this.farbtastic.setColor(a)},getValue:function(){return this.farbtastic.color}}),BI.Farbtastic.EVENT_CHANGE="Farbtastic.EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),jQuery.fn.farbtastic=function(a){return $.farbtastic(this,a),this},jQuery.farbtastic=function(a,b){var a=$(a).get(0);return a.farbtastic||(a.farbtastic=new jQuery._farbtastic(a,b))},jQuery._farbtastic=function(a,b){var c=this;$(a).html('
    ');var d=$(".farbtastic",a);c.wheel=$(".wheel",a).get(0),c.radius=84,c.square=100,c.width=194,navigator.appVersion.match(/MSIE [0-6]\./)&&$("*",d).each(function(){if("none"!=this.currentStyle.backgroundImage){var a=this.currentStyle.backgroundImage;a=this.currentStyle.backgroundImage.substring(5,a.length-2),$(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+a+"')"})}}),c.linkTo=function(a){return"object"==typeof c.callback&&$(c.callback).unbind("keyup",c.updateValue),c.color=null,"function"==typeof a?c.callback=a:"object"!=typeof a&&"string"!=typeof a||(c.callback=$(a),c.callback.bind("keyup",c.updateValue),c.callback.get(0).value&&c.setColor(c.callback.get(0).value)),this},c.updateValue=function(a){this.value&&this.value!=c.color&&c.setColor(this.value)},c.setColor=function(a){var b=c.unpack(a);return c.color!=a&&b&&(c.color=a,c.rgb=b,c.hsl=c.RGBToHSL(c.rgb),c.updateDisplay()),this},c.setHSL=function(a){return c.hsl=a,c.rgb=c.HSLToRGB(a),c.color=c.pack(c.rgb),c.updateDisplay(),this},c.widgetCoords=function(a){var b,d,e=a.target||a.srcElement,f=c.wheel;if("undefined"!=typeof a.offsetX){for(var g={x:a.offsetX,y:a.offsetY},h=e;h;)h.mouseX=g.x,h.mouseY=g.y,g.x+=h.offsetLeft,g.y+=h.offsetTop,h=h.offsetParent;for(var h=f,i={x:0,y:0};h;){if("undefined"!=typeof h.mouseX){b=h.mouseX-i.x,d=h.mouseY-i.y;break}i.x+=h.offsetLeft,i.y+=h.offsetTop,h=h.offsetParent}for(h=e;h;)h.mouseX=void 0,h.mouseY=void 0,h=h.offsetParent}else{var g=c.absolutePosition(f);b=(a.pageX||0*(a.clientX+$("html").get(0).scrollLeft))-g.x,d=(a.pageY||0*(a.clientY+$("html").get(0).scrollTop))-g.y}return{x:b-c.width/2,y:d-c.width/2}},c.click=function(a){var b=c.widgetCoords(a);return c.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>c.square,c.mousemove(a),!1},c.mousemove=function(a){var b=c.widgetCoords(a);if(c.circleDrag){var d=Math.atan2(b.x,-b.y)/6.28;d<0&&(d+=1),c.setHSL([d,c.hsl[1],c.hsl[2]])}else{var e=Math.max(0,Math.min(1,-(b.x/c.square)+.5)),f=Math.max(0,Math.min(1,-(b.y/c.square)+.5));c.setHSL([c.hsl[0],e,f])}return!1},c.updateDisplay=function(){var a=6.28*c.hsl[0];$(".h-marker",d).css({left:Math.round(Math.sin(a)*c.radius+c.width/2)+"px",top:Math.round(-Math.cos(a)*c.radius+c.width/2)+"px"}),$(".sl-marker",d).css({left:Math.round(c.square*(.5-c.hsl[1])+c.width/2)+"px",top:Math.round(c.square*(.5-c.hsl[2])+c.width/2)+"px"}),$(".color",d).css("backgroundColor",c.pack(c.HSLToRGB([c.hsl[0],1,.5]))),"object"==typeof c.callback?($(c.callback).css({backgroundColor:c.color,color:c.hsl[2]>.5?"#000":"#fff"}),$(c.callback).each(function(){this.value&&this.value!=c.color&&(this.value=c.color); -})):"function"==typeof c.callback&&c.callback.call(c,c.color)},c.absolutePosition=function(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var d=c.absolutePosition(a.offsetParent);b.x+=d.x,b.y+=d.y}return b},c.pack=function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},c.unpack=function(a){return 7==a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4==a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},c.HSLToRGB=function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this.hueToRGB(b,c,d+.33333),this.hueToRGB(b,c,d),this.hueToRGB(b,c,d-.33333)]},c.hueToRGB=function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},c.RGBToHSL=function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},$("*",d).click(c.click),c.setColor("#000000"),b&&c.linkTo(b)},BI.BubbleCombo=BI.inherit(BI.Widget,{_const:{TRIANGLE_LENGTH:6},_defaultConfig:function(){return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-bubble-combo",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!1,destroyWhenHide:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopPropagation:!1,adjustLength:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{}})},_init:function(){BI.BubbleCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a+" bi-high-light-border"}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.dir){case"left,top":case"left,bottom":this._createLeftTriangle(),this.combo.getView().showLine("right");break;case"right,top":case"right,bottom":this._createRightTriangle(),this.combo.getView().showLine("left");break;case"top,left":case"top,right":this._createTopTriangle(),this.combo.getView().showLine("bottom");break;case"bottom,left":case"bottom,right":this._createBottomTriangle(),this.combo.getView().showLine("top")}},_hideTriangle:function(){this.triangle&&this.triangle.destroy(),this.triangle=null,this.combo.getView()&&this.combo.getView().hideLine()},hideView:function(){this._hideTriangle(),this.combo&&this.combo.hideView()},showView:function(){this.combo&&this.combo.showView()},isViewVisible:function(){return this.combo.isViewVisible()}}),BI.BubbleCombo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.BubbleCombo.EVENT_CHANGE="EVENT_CHANGE",BI.BubbleCombo.EVENT_EXPAND="EVENT_EXPAND",BI.BubbleCombo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.BubbleCombo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.BubbleCombo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.BubbleCombo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.bubble_combo",BI.BubbleCombo),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.baseCls+" bi-bubble-popup-view"})},_init:function(){BI.BubblePopupView.superclass._init.apply(this,arguments)},showLine:function(a){var b={},c={};switch(a){case"left":b={top:0,bottom:0,left:-1},c={width:3};break;case"right":b={top:0,bottom:0,right:-1},c={width:3};break;case"top":b={left:0,right:0,top:-1},c={height:3};break;case"bottom":b={left:0,right:0,bottom:-1},c={height:3}}this.line=BI.createWidget(c,{type:"bi.layout",cls:"bubble-popup-line bi-high-light-background"}),b.el=this.line,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},hideLine:function(){this.line&&this.line.destroy()}}),BI.shortcut("bi.bubble_popup_view",BI.BubblePopupView),BI.BubblePopupBarView=BI.inherit(BI.BubblePopupView,{_defaultConfig:function(){return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-bubble-bar-popup-view",buttons:[{value:BI.i18nText(BI.i18nText("BI-Basic_Sure"))},{value:BI.i18nText("BI-Basic_Cancel"),level:"ignore"}]})},_init:function(){BI.BubblePopupBarView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this,c=[];return BI.each(a.buttons.reverse(),function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:30,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.right_vertical_adapt",height:40,hgap:10,bgap:10,items:c})}}),BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.bubble_bar_popup_view",BI.BubblePopupBarView),BI.EditorIconCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-check-editor-combo",width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:""})},_init:function(){BI.EditorIconCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),BI.IconCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-combo",width:24,height:24,iconClass:"",el:{},popup:{},minWidth:100,maxWidth:"auto",maxHeight:300,direction:"bottom",adjustLength:3,adjustXOffset:0,adjustYOffset:0,offsetStyle:"left",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconClass:b.iconClass,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.iconCombo.setValue(a)},getValue:function(){return this.iconCombo.getValue()},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),BI.IconComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi.icon-combo-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:30}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:30}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),BI.IconComboTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-combo-trigger",el:{},items:[],iconClass:"",width:25,height:25,isShowDown:!0})},_init:function(){BI.IconComboTrigger.superclass._init.apply(this,arguments);var a=this.options;this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon "+a.iconClass,disableSelected:!0,width:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),this.down=BI.createWidget({type:"bi.icon_button",disableSelected:!0,cls:"icon-combo-down-icon trigger-triangle-font",width:12,height:8}),this.down.setVisible(a.isShowDown),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.button,left:0,right:0,top:0,bottom:0},{el:this.down,right:0,bottom:0}]}),BI.isKey(a.value)&&this.setValue(a.value)},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconClass),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c="";a=BI.isArray(a)?a[0]:a,BI.any(this.options.items,function(b,d){if(a===d.value)return c=d.iconClass,!0})?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconClass),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),BI.IconTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-icon-text-value-combo",height:30,value:"",el:{}})},_init:function(){BI.IconTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.select_icon_text_trigger",items:b.items,height:b.height,value:b.value}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setValue:function(a){this.textIconCombo.setValue(a)},getValue:function(){return this.textIconCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),BI.IconTextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-text-icon-popup"})},_init:function(){BI.IconTextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:30}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},populate:function(a){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:30}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),BI.StaticCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-static-combo",height:24,text:"",el:{},items:[],chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.StaticCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.text_icon_item",cls:"bi-select-text-trigger bi-border pull-down-font",text:b.text,readonly:!0,textLgap:5,height:b.height-2}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",textAlign:b.textAlign,chooseType:b.chooseType,items:b.items}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.combo.hideView(),a.fireEvent(BI.StaticCombo.EVENT_CHANGE,arguments)}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}})},populate:function(a){this.combo.populate(a)},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.StaticCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_combo",BI.StaticCombo),BI.TextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-text-value-check-combo",width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:""})},_init:function(){BI.TextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",items:b.items,height:b.height}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.textIconCheckCombo.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){return this.textIconCheckCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.SmallTextIconCheckCombo.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),BI.TextValueCheckComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueCheckComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.icon_text_item",cls:"item-check-font bi-list-item",height:30},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),BI.TextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-text-value-combo",height:30,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:"",el:{}})},_init:function(){BI.TextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.select_text_trigger",items:b.items,height:b.height}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setValue:function(a){this.textIconCombo.setValue(a)},getValue:function(){return this.textIconCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextValueCombo.setValue(a)},getValue:function(){return this.SmallTextValueCombo.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:30}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:30}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),BI.TextValueDownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-value-down-list-combo",height:30})},_init:function(){BI.TextValueDownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this._createValueMap(),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",height:b.height,items:b.items}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){a.setValue(a.combo.getValue()[0].value),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE)}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){a.setValue(a.combo.getValue()[0].childValue),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE)})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},setValue:function(a){a=this.valueMap[a],this.combo.setValue([a]),this.trigger.setValue(a.childValue||a.value)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.ClearEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isValid:function(){return this.editor.isValid()}}),BI.ClearEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ClearEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ClearEditor.EVENT_BLUR="EVENT_BLUR",BI.ClearEditor.EVENT_CLICK="EVENT_CLICK",BI.ClearEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ClearEditor.EVENT_SPACE="EVENT_SPACE",BI.ClearEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.ClearEditor.EVENT_CLEAR="EVENT_CLEAR",BI.ClearEditor.EVENT_START="EVENT_START",BI.ClearEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ClearEditor.EVENT_STOP="EVENT_STOP",BI.ClearEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ClearEditor.EVENT_VALID="EVENT_VALID",BI.ClearEditor.EVENT_ERROR="EVENT_ERROR",BI.ClearEditor.EVENT_ENTER="EVENT_ENTER",BI.ClearEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ClearEditor.EVENT_REMOVE="EVENT_REMOVE",BI.ClearEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.clear_editor",BI.ClearEditor),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-shelter-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0, -validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24,textAlign:"left"})},_init:function(){BI.ShelterEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:4}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.text.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setTextStyle:function(a){this.text.setStyle(a)},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),BI.ShelterEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ShelterEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ShelterEditor.EVENT_BLUR="EVENT_BLUR",BI.ShelterEditor.EVENT_CLICK="EVENT_CLICK",BI.ShelterEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ShelterEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.ShelterEditor.EVENT_START="EVENT_START",BI.ShelterEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ShelterEditor.EVENT_STOP="EVENT_STOP",BI.ShelterEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ShelterEditor.EVENT_VALID="EVENT_VALID",BI.ShelterEditor.EVENT_ERROR="EVENT_ERROR",BI.ShelterEditor.EVENT_ENTER="EVENT_ENTER",BI.ShelterEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ShelterEditor.EVENT_SPACE="EVENT_SPACE",BI.ShelterEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.shelter_editor",BI.ShelterEditor),BI.SignInitialEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignInitialEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",value:"",text:"",height:24})},_init:function(){BI.SignInitialEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignInitialEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignInitialEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignInitialEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignInitialEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignInitialEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignInitialEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignInitialEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignInitialEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignInitialEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignInitialEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+"("+a.text+")",this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){var b=this.options;this.editor.setValue(a.value),b.text=a.text||b.text,this._checkText()},getValue:function(){return{value:this.editor.getValue(),text:this.options.text}},getState:function(){return this.text.getValue()},setState:function(a){var b=this.options;this._showHint(),a=BI.isEmpty(a)||a==b.text?b.text:a+"("+b.text+")",this.text.setValue(a)}}),BI.SignInitialEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignInitialEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignInitialEditor.EVENT_BLUR="EVENT_BLUR",BI.SignInitialEditor.EVENT_CLICK="EVENT_CLICK",BI.SignInitialEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignInitialEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignInitialEditor.EVENT_START="EVENT_START",BI.SignInitialEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignInitialEditor.EVENT_STOP="EVENT_STOP",BI.SignInitialEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignInitialEditor.EVENT_VALID="EVENT_VALID",BI.SignInitialEditor.EVENT_ERROR="EVENT_ERROR",BI.SignInitialEditor.EVENT_ENTER="EVENT_ENTER",BI.SignInitialEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignInitialEditor.EVENT_SPACE="EVENT_SPACE",BI.SignInitialEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_initial_editor",BI.SignInitialEditor),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24})},_init:function(){BI.SignEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),BI.SignEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignEditor.EVENT_BLUR="EVENT_BLUR",BI.SignEditor.EVENT_CLICK="EVENT_CLICK",BI.SignEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignEditor.EVENT_START="EVENT_START",BI.SignEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignEditor.EVENT_STOP="EVENT_STOP",BI.SignEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignEditor.EVENT_VALID="EVENT_VALID",BI.SignEditor.EVENT_ERROR="EVENT_ERROR",BI.SignEditor.EVENT_ENTER="EVENT_ENTER",BI.SignEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignEditor.EVENT_SPACE="EVENT_SPACE",BI.SignEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_editor",BI.SignEditor),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text bi-disabled",textAlign:"left",height:b.height,text:BI.i18nText("BI-Basic_Unrestricted"),hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this.options.disabled===!1&&(this._showInput(),this.editor.focus())},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){return BI.StateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.setTitle(""),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),this.text.setTitle(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.setTitle(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text"))))}}),BI.StateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.StateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.StateEditor.EVENT_BLUR="EVENT_BLUR",BI.StateEditor.EVENT_CLICK="EVENT_CLICK",BI.StateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.StateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.StateEditor.EVENT_START="EVENT_START",BI.StateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.StateEditor.EVENT_STOP="EVENT_STOP",BI.StateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.StateEditor.EVENT_VALID="EVENT_VALID",BI.StateEditor.EVENT_ERROR="EVENT_ERROR",BI.StateEditor.EVENT_ENTER="EVENT_ENTER",BI.StateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.StateEditor.EVENT_SPACE="EVENT_SPACE",BI.StateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.state_editor",BI.StateEditor),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-simple-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,mouseOut:!1,allowBlank:!0,watermark:"",errorText:"",height:24})},_init:function(){BI.SimpleStateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text bi-disabled",textAlign:"left",height:b.height,text:BI.i18nText("BI-Basic_Unrestricted"),hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),BI.SimpleStateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SimpleStateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SimpleStateEditor.EVENT_BLUR="EVENT_BLUR",BI.SimpleStateEditor.EVENT_CLICK="EVENT_CLICK",BI.SimpleStateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SimpleStateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SimpleStateEditor.EVENT_START="EVENT_START",BI.SimpleStateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SimpleStateEditor.EVENT_STOP="EVENT_STOP",BI.SimpleStateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SimpleStateEditor.EVENT_VALID="EVENT_VALID",BI.SimpleStateEditor.EVENT_ERROR="EVENT_ERROR",BI.SimpleStateEditor.EVENT_ENTER="EVENT_ENTER",BI.SimpleStateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SimpleStateEditor.EVENT_SPACE="EVENT_SPACE",BI.SimpleStateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.simple_state_editor",BI.SimpleStateEditor),BI.BarPopoverSection=BI.inherit(BI.PopoverSection,{_defaultConfig:function(){return BI.extend(BI.BarPopoverSection.superclass._defaultConfig.apply(this,arguments),{btns:[BI.i18nText(BI.i18nText("BI-Basic_Sure")),BI.i18nText(BI.i18nText("BI-Basic_Cancel"))]})},_init:function(){BI.BarPopoverSection.superclass._init.apply(this,arguments)},rebuildSouth:function(a){var b=this,c=this.options;this.sure=BI.createWidget({type:"bi.button",text:this.options.btns[0],warningTitle:c.warningTitle,height:30,value:0,handler:function(a){b.end(),b.close(a)}}),this.cancel=BI.createWidget({type:"bi.button",text:this.options.btns[1],height:30,value:1,level:"ignore",handler:function(a){b.close(a)}}),BI.createWidget({type:"bi.right_vertical_adapt",element:a,lgap:10,items:[this.cancel,this.sure]})},setConfirmButtonEnable:function(a){this.sure.setEnable(!!a)}}),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-border-top",height:30,items:BI.createItems(c,{type:"bi.text_button",once:!1,shadow:!0,isShadowShowingOnSelected:!0}),layouts:[{type:"bi.center",hgap:0,vgap:0}]}),this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE,function(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.fireEvent(BI.PopupPanel.EVENT_CLOSE)}),BI.createWidget({type:"bi.htape",cls:"popup-panel-title bi-background bi-border",height:25,items:[{el:{type:"bi.label",textAlign:"left",text:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-list-pane",logic:{dynamic:!0},lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.button_group"}})},_init:function(){BI.ListPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group) -}))))},hasPrev:function(){return this.button_group.hasPrev&&this.button_group.hasPrev()},hasNext:function(){return this.button_group.hasNext&&this.button_group.hasNext()},prependItems:function(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void this.button_group.populate.apply(this.button_group,arguments))},empty:function(){this.button_group.empty()},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),BI.Panel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-panel bi-border",title:"",titleButtons:[],el:{},logic:{dynamic:!1}})},_init:function(){BI.Panel.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{el:{type:"bi.left_right_vertical_adapt",cls:"panel-title bi-tips bi-border-bottom bi-background",height:30,items:{left:[this.text],right:[this.button_group]},lhgap:10,rhgap:10},height:30}},setTitle:function(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="Panel.EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),BI.SelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,toolbar:{type:"bi.multi_select_bar"},el:{type:"bi.list_pane"}})},_init:function(){BI.SelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1))},_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:""})},_init:function(){BI.RichEditorAction.superclass._init.apply(this,arguments);var a=this,b=this.options;b.editor.on(BI.NicEditor.EVENT_SELECTED,function(b){a.setEnable(!0),a.checkNodes(b.target),a.key(b)}),b.editor.on(BI.NicEditor.EVENT_BLUR,function(){a.setEnable(!1)}),b.editor.on(BI.NicEditor.EVENT_KEYDOWN,BI.bind(this.keydown,this))},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($(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),{})},_init:function(){BI.RichEditorParamAction.superclass._init.apply(this,arguments)},_isParam:function(a){return"param"===a.attr("data-type")},_createBlankNode:function(){return $("").html(" ")},_addBlank:function(a){var b=this.options,c=b.editor.selectedInstance,d=a.next();if(0===d.length||this._isParam(d)){var e=this._createBlankNode(),f=this._createBlankNode();a.before(e),a.after(f),c.setFocus(f[0])}else c.setFocus(d[0])},_get$Sel:function(){var a=this.options,b=a.editor.selectedInstance,c=$(b.selElm());return 3===c[0].nodeType&&this._isParam(c.parent())&&(c=c.parent()),c},addParam:function(a){var b=this.options,c=this._get$Sel(),d=$("").attr({"data-type":"param","data-value":a}).css({color:"white",backgroundColor:"#009de3",padding:"0 5px"}).text(a).keydown(function(a){return a.keyCode!==BI.KeyCode.BACKSPACE&&a.keyCode!==BI.KeyCode.DELETE||d.destroy(),a.stopEvent(),!1}),e=b.editor.instance.getElm().element;e.find(c).length<=0?e.append(d):c.after(d),this._addBlank(d)},keydown:function(a){var b=(this.options,this._get$Sel());return 229===a.keyCode&&this._isParam(b)?(this._addBlank(b),a.stopEvent(),!1):(BI.Key[a.keyCode]||a.keyCode===BI.KeyCode.TAB||a.keyCode===BI.KeyCode.ENTER||a.keyCode===BI.KeyCode.SPACE)&&this._isParam(b)?(a.stopEvent(),!1):a.keyCode!==BI.KeyCode.BACKSPACE&&a.keyCode!==BI.KeyCode.DELETE||!this._isParam(b)?void 0:(b.destroy(),a.preventDefault(),!1)},key:function(a){}}),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_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"})},_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()},deactivate:function(){this.colorchooser.setValue("")}}),BI.shortcut("bi.rich_editor_color_chooser",BI.RichEditorColorChooser),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,{_defaultConfig:function(){return BI.extend(BI.RichEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-rich-editor bi-card",toolbar:{}})},_init:function(){BI.RichEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.nic_editor",width:b.width,height:b.height}),this.editor.on(BI.NicEditor.EVENT_BLUR,function(){a.fireEvent(BI.RichEditor.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,toggle:!1,direction:"top,left",isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,adjustLength:1,el:this.editor,popup:{el:BI.extend({type:"bi.rich_editor_text_toolbar",editor:this.editor},b.toolbar),height:30,stopPropagation:!0,stopEvent:!0}}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){})},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.RichEditor.EVENT_CONFIRM="EVENT_CONFIRM",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",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();(!e||e>a.width-10||e<10)&&(e=(f>a.columnSize.length/2?2/3:1/3)*a.width),0===f&&(e=0),d.length>=b.length&&(d=[]),BI.isNumber(b[0])||(b=a.minColumnSize.slice());var g=0,h=0;return BI.each(b,function(a,b){a0&&(b[f-1]=BI.clamp(e-(g-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-(h-g-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=[];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,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,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}})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())}}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)}}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,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.checkbox.on(BI.Checkbox.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:36,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]}),this.half.invisible()},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._half=!!a,a===!0?(this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!!this._half},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))}}),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(){},_transformToTreeFormat:function(a){var b,c;if(!a)return[];if(BI.isArray(a)){var d=[],e=[];for(b=0,c=a.length;b0&&(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:[]})},_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),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){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a)},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()},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},setValue:function(a){a||(a=[]);var b=this,c={},d=[];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]++)}}),this.tree.setValue(BI.makeObject(a.concat(d)))},_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",cls:"bi-border-left",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})},_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",cls:"bi-border-left",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.iconClass,ref:function(b){a.icon=b},disableSelected:!0},width:b.triggerWidth||b.height},{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(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),this.text.setTitle(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})},_init:function(){this.options.height-=2,BI.SelectIconTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,height:a.height}),BI.isKey(a.value)&&this.setValue(a.value)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c,d=BI.Tree.transformToArrayFormat(this.options.items);BI.any(d,function(b,d){if(BI.deepContains(a,d.value))return c={text:d.text||d.value,iconClass:d.iconClass},!0}),BI.isNotNull(c)?(this.trigger.setText(c.text),this.trigger.setIcon(c.iconClass)):(this.trigger.setText(b.value),this.trigger.setIcon(""))},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.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap,readonly:a.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",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),this.text.setTitle(a)},setText:function(a){this.text.setText(a),this.text.setTitle(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}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?this.trigger.setText(c.join(",")):this.trigger.setText(b.text)},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;this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?(this.trigger.element.removeClass("bi-water-mark"),this.trigger.setText(c.join(","))):(this.trigger.element.addClass("bi-water-mark"),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:null,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",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.AdaptiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AdaptiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.FREE,items:[]})},_init:function(){BI.AdaptiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement",element:this,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.Arrangement.EVENT_SCROLL,function(){a.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL,arguments)}),this.zIndex=0,BI.each(b.items,function(b,c){a._initResizable(c.el)}),$(document).mousedown(function(b){BI.each(a.getAllRegions(),function(a,c){0===c.el.element.find(b.target).length&&c.el.element.removeClass("selected")})}),BI.ResizeDetector.addResizeListener(this,function(){a.arrangement.resize(),a.fireEvent(BI.AdaptiveArrangement.EVENT_RESIZE)})},_isEqual:function(){return this.arrangement._isEqual.apply(this.arrangement,arguments)},_setSelect:function(a){a.element.hasClass("selected")||(a.element.css("zIndex",++this.zIndex),BI.each(this.getAllRegions(),function(a,b){b.el.element.removeClass("selected")}),a.element.addClass("selected"))},_initResizable:function(a){var b=this;this.options;a.element.css("zIndex",++this.zIndex),a.element.mousedown(function(){b._setSelect(a)})},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},addRegion:function(a,b){this._initResizable(a.el),this._setSelect(a.el);var c,d=this.arrangement.getAllRegions();return(c=this.arrangement.addRegion(a,b))&&(this._old=d),c},deleteRegion:function(a){var b,c=this.getAllRegions();return(b=this.arrangement.deleteRegion(a))?this._old=c:(this._old=this.getAllRegions(),this.relayout()),b},setRegionSize:function(a,b){var c,d=this.getAllRegions();return(c=this.arrangement.setRegionSize(a,b))&&(this._old=d),c},setPosition:function(a,b){return this.arrangement.setPosition(a,b)},setRegionPosition:function(a,b){this.getRegionByName(a);return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){return this.arrangement.setDropPosition(a,b)},scrollInterval:function(a,b,c,d){d({offsetX:0,offsetY:0})},scrollEnd:function(){this.lastActiveRegion="",this._scrollInterval&&(clearInterval(this._scrollInterval),this._scrollInterval=null)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){this._old&&this.populate(BI.toArray(this._old))},populate:function(a){var b=this;BI.each(a,function(a,c){b._initResizable(c.el)}),this.arrangement.populate(a)}}),BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE",BI.AdaptiveArrangement.EVENT_RESIZE="AdaptiveArrangement.EVENT_RESIZE",BI.AdaptiveArrangement.EVENT_SCROLL="AdaptiveArrangement.EVENT_SCROLL",BI.shortcut("bi.adaptive_arrangement",BI.AdaptiveArrangement),BI.ArrangementBlock=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementBlock.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-block bi-mask"})}}),BI.shortcut("bi.arrangement_block",BI.ArrangementBlock),BI.ArrangementDroppable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementDroppable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-droppable bi-resizer"})}}),BI.shortcut("bi.arrangement_droppable",BI.ArrangementDroppable),BI.Arrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Arrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement",layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.Arrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement_droppable",cls:"arrangement-block",invisible:!0}),this.block=BI.createWidget({type:"bi.arrangement_block",invisible:!0}),this.container=BI.createWidget({type:"bi.absolute",scrollable:!0,cls:"arrangement-container",items:b.items.concat([this.block,this.arrangement])}),this.container.element.scroll(function(){a.fireEvent(BI.Arrangement.EVENT_SCROLL,{scrollLeft:a.container.element.scrollLeft(),scrollTop:a.container.element.scrollTop(),clientWidth:a.container.element[0].clientWidth,clientHeight:a.container.element[0].clientHeight})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.container,left:0,right:0,top:0,bottom:0}]}),this.regions={},b.items.length>0&&BI.nextTick(function(){a.populate(b.items)})},_calculateRegions:function(a){var b=this;this.options;this.regions={},BI.each(a,function(a,c){var d=b._createOneRegion(c);b.regions[d.id]=d})},_isEqual:function(a,b){return Math.abs(a-b)<2},_isLessThan:function(a,b){return ab&&!this._isEqual(a,b)},_isLessThanEqual:function(a,b){return a<=b||this._isEqual(a,b)},_isMoreThanEqual:function(a,b){return a>=b||this._isEqual(a,b)},_getRegionOccupied:function(a){this.options;if(BI.size(a||this.regions)<=0)return{left:0,top:0,width:0,height:0};var b=BI.MAX,c=BI.MIN,d=BI.MAX,e=BI.MIN;return BI.each(a||this.regions,function(a,f){b=Math.min(b,f.left),c=Math.max(c,f.left+f.width),d=Math.min(d,f.top),e=Math.max(e,f.top+f.height)}),{left:b,top:d,width:c-b,height:e-d}},_getCrossArea:function(a,b){if(a.left<=b.left){if(a.top<=b.top){if(a.top+a.height>b.top&&a.left+a.width>b.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(a.left+a.width,b.left)?0:(a.top+a.height-b.top)*(a.left+a.width-b.left)}else if(b.top+b.height>a.top&&a.left+a.width>b.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(a.left+a.width,b.left)?0:(b.top+b.height-a.top)*(a.left+a.width-b.left)}else if(a.top<=b.top){if(a.top+a.height>b.top&&b.left+b.width>a.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(b.left+b.width,a.left)?0:(a.top+a.height-b.top)*(b.left+b.width-a.left)}else if(b.top+b.height>a.top&&b.left+b.width>a.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(b.left+b.width,a.left)?0:(b.top+b.height-a.top)*(b.left+b.width-a.left);return 0},_isRegionOverlay:function(a){var b=[];BI.each(a||this.regions,function(a,c){b.push(new BI.Region(c.left,c.top,c.width,c.height))});for(var c=0,d=b.length;c1)return!0}return!1},_isArrangeFine:function(a){switch(this.options.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return!0;case BI.Arrangement.LAYOUT_TYPE.GRID:}return!0},_getRegionNames:function(a){var b=[];return BI.each(a||this.regions,function(a,c){b.push(c.id||c.attr("id"))}),b},_getRegionsByNames:function(a,b){if(a=BI.isArray(a)?a:[a],b=b||this.regions,BI.isArray(b)){var c=[];BI.each(b,function(b,d){a.contains(d.id||d.attr("id"))&&c.push(d)})}else{var c={};BI.each(a,function(a,d){c[d]=b[d]})}return c},_cloneRegion:function(a){var b={};return BI.each(a||this.regions,function(a,c){b[a]={},b[a].el=c.el,b[a].id=c.id,b[a].left=c.left,b[a].top=c.top,b[a].width=c.width,b[a].height=c.height}),b},_test:function(a){return!BI.any(a||this.regions,function(a,b){if(BI.isNaN(b.width)||BI.isNaN(b.height)||b.width<=21||b.height<=21)return!0})},_getScrollOffset:function(){return{left:this.container.element[0].scrollLeft,top:this.container.element[0].scrollTop}},_createOneRegion:function(a){var b=BI.createWidget(a.el);return b.setVisible(!0),{id:b.attr("id"),left:a.left,top:a.top,width:a.width,height:a.height,el:b}},_applyRegion:function(a){this.options;BI.each(a||this.regions,function(a,b){b.el.element.css({left:b.left,top:b.top,width:b.width,height:b.height})}),this._applyContainer(),this.ratio=this.getLayoutRatio()},_renderRegion:function(){var a=BI.toArray(this.regions);BI.each(a,function(a,b){BI.isNotNull(b.el)?b.el.options.key=b.id:b.key=b.id}),BI.isNull(this.wrapper)&&(this.wrapper=BI.createWidget({type:"bi.absolute",element:this.container})),this.wrapper.addItems(a)},getClientWidth:function(){return this.container.element[0].clientWidth},getClientHeight:function(){return this.container.element[0].clientHeight},_applyContainer:function(){var a=this._getRegionOccupied();return a},_modifyRegion:function(a){BI.each(this.regions,function(b,c){a[b]&&(c.left=a[b].left,c.top=a[b].top,c.width=a[b].width,c.height=a[b].height)})},_addRegion:function(a){var b=this._createOneRegion(a);this.regions[b.id]=b,BI.createWidget({type:"bi.absolute",element:this.container,items:[b]})},_deleteRegionByName:function(a){this.regions[a].el.setVisible(!1),delete this.regions[a]},_setArrangeSize:function(a){this.arrangement.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getOneWidthPortion:function(){return this.getClientWidth()/BI.Arrangement.PORTION},_getOneHeightPortion:function(){return this.getClientHeight()/BI.Arrangement.H_PORTION},_getGridPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion(),d=Math.round(a.width/b),e=Math.round(a.left/b),f=Math.round(a.top/c),g=Math.round(a.height/c);return 0===d&&(d=1),0===g&&(g=1),{x:e,y:f,w:d,h:g}},_getBlockPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion();return{left:a.x*b,top:a.y*c,width:a.w*b,height:a.h*c}},_getLayoutsByRegions:function(a){var b=this,c=[];return BI.each(a||this.regions,function(a,d){c.push(BI.extend(b._getGridPositionAndSize(d),{i:d.id}))}),c},_getLayoutIndexByName:function(a,b){return BI.findIndex(a,function(a,c){return c.i===b})},_setBlockPositionAndSize:function(a){this.block.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getRegionsByLayout:function(a){var b=this,c={};return BI.each(a,function(a,d){c[d.i]=BI.extend(b._getBlockPositionAndSize(d),{id:d.i})}),c},_setRegionsByLayout:function(a,b){var c=this;return a||(a=this.regions),BI.each(b,function(b,d){a[d.i]&&BI.extend(a[d.i],c._getBlockPositionAndSize(d))}),a},_moveElement:function(a,b,c,d,e){function f(a,b){return BI.filter(a,function(a,c){return g._collides(c,b)})}var g=this;if(b._static)return a;if(b.y===d&&b.x===c)return a;var h=d&&b.y>d;"number"==typeof c&&(b.x=c),"number"==typeof d&&(b.y=d),b.moved=!0;var i=this._sortLayoutItemsByRowCol(a);h&&(i=i.reverse());for(var j=f(i,b),k=0,l=j.length;km.y&&b.y-m.y>m.h/4||(a=m._static?this._moveElementAwayFromCollision(a,m,b,e):this._moveElementAwayFromCollision(a,b,m,e))}return a},_sortLayoutItemsByRowCol:function(a){return[].concat(a).sort(function(a,b){return a.y>b.y||a.y===b.y&&a.x>b.x?1:-1})},_collides:function(a,b){return a!==b&&(!(a.x+a.w<=b.x)&&(!(a.x>=b.x+b.w)&&(!(a.y+a.h<=b.y)&&!(a.y>=b.y+b.h))))},_getFirstCollision:function(a,b){for(var c=0,d=a.length;c0&&!this._getFirstCollision(a,b);)b.y--;for(var d;d=this._getFirstCollision(a,b);)b.y=d.y+d.h;return b},compact:function(a,b){function c(a){return BI.filter(a,function(a,b){return b._static})}for(var d=c(a),e=this._sortLayoutItemsByRowCol(a),f=[],g=0,h=e.length;g=c.options.min&&d<=c.options.max},f=function(a){return Date.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&Date.checkLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=Date.getDate();this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=Date.getDate(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=Date.getDate(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=Date.getDate(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=Date.getDate(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=Date.getDate().getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=Date.getDate().getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=Date.getDate().getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=Date.getDate().getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=Date.getDate().getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=Date.getDate().getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=Date.getDate(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=Date.getDate(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=Date.getDate(),f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.DatePaneWidget=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePaneWidget.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.DatePaneWidget.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=Date.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth(),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(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),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)})},_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=Date.getDate();return{year:a.getFullYear(),month:a.getMonth()}},_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.date_pane",BI.DatePaneWidget),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,Date.getDate());this.storeValue={year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_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.popup.on(BI.DateTimePopup.CALENDAR_EVENT_CHANGE,function(){a.trigger.setValue(a.popup.getValue()),a.fireEvent(BI.DateTimeCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,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 c=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font bi-border-right",width:24,height:24});c.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:c,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:290})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this;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}}]});var b=Date.getDate();this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds()),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=Date.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),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:BI.i18nText("BI-Please_Input_Natural_Number"),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),a0&&a[c-1].xb)return!0});return c.y}var c=this,d=(this.options,this.pathChooser.routes),e=this.pathChooser.pathes,f=this.pathChooser.cache;this.arrows={},BI.each(d,function(d,g){c.arrows[d]=[],BI.each(g,function(g,h){c.arrows[d][g]=[];var i=e[d][g];BI.each(i,function(a,b){if(a>0&&a0&&(e=c._drawOneArrow(i[a-1],3)):e=c._drawOneArrow(i[a],1)):b.x===i[a-1].x&&(e=b.y>i[a-1].y?f[BI.first(h)].direction===-1?c._drawOneArrow(i[a-1],0):c._drawOneArrow(b,2):f[h[h.length-2]].direction===-1?c._drawOneArrow(i[a-1],2):c._drawOneArrow(b,0)),e&&c.arrows[d][g].push(e)}}),BI.each(h,function(e,j){if(0!==e){var k,l=h[e-1];if(f[l].direction===-1){var m=c.pathChooser.getRegionIndexById(l),n=a(m,-1),o=b(i,n);k=c._drawOneArrow({x:n,y:o},3)}else{var m=c.pathChooser.getRegionIndexById(j),n=a(m),o=b(i,n);k=c._drawOneArrow({x:n,y:o},1)}k&&c.arrows[d][g].push(k)}})})})},_setValue:function(a,b){var c=this,d=this._const.lineColor,e=this._const.selectLineColor,f=this.pathChooser.routes,g=this.pathChooser.start,h=[a];g.contains(a)&&(h=g),BI.each(h,function(a,b){BI.each(c.arrows[b],function(a,b){BI.each(b,function(a,b){b.attr({fill:d,stroke:d}).toFront()})})}),BI.each(this.arrows[a][b],function(a,b){b.attr({fill:e,stroke:e}).toFront()});for(var i=BI.last(f[a][b]);i&&f[i]&&1===f[i].length;)BI.each(c.arrows[i][0],function(a,b){b.attr({fill:e,stroke:e}).toFront()}),i=BI.last(f[i][0])},setValue:function(a){this.pathChooser.setValue(a),this._unselectAllArrows();var b=this.pathChooser.routes,c=BI.keys(b),d=this,e=[],f=[];BI.each(a,function(a,b){ -BI.contains(c,b)&&f.length>0&&(f.push(b),e.push(f),f=[]),f.push(b)}),f.length>0&&e.push(f),BI.each(e,function(a,c){var e=c[0],f=BI.findIndex(b[e],function(a,b){if(BI.isEqual(c,b))return!0});f>=0&&d._setValue(e,f)})},getValue:function(){return this.pathChooser.getValue()},populate:function(a){this.pathChooser.populate(a),this._drawArrows()}}),BI.DirectionPathChooser.EVENT_CHANGE="DirectionPathChooser.EVENT_CHANGE",BI.shortcut("bi.direction_path_chooser",BI.DirectionPathChooser),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-combo",invalid:!1,height:25,items:[],adjustLength:0,direction:"bottom",trigger:"click",container:null,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}),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,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!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}]}),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:25,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}),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:25,forceNotSelected:!0}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:25,forceNotSelected:!0});var c=BI.createWidget({type:"bi.layout",width:25});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()})},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){var b=this,c=this.options;a=BI.isArray(a)?a:[a],BI.find(a,function(a,d){return BI.contains(c.childValues,d)?(b.icon1.setSelected(!0),!0):void b.icon1.setSelected(!1)})}}),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:25,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={};var a=this,b=this.options,c=this._createChildren(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],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"}]}},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?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.InteractiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.InteractiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interactive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.InteractiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.adaptive_arrangement",element:this,resizable:b.resizable,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE,function(b,c){var d=a._getRegionClientPosition(b);a.draw({left:d.left,top:d.top},c,b)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE,function(b,c){a.stopDraw(),a.setRegionSize(b,c)}),this.tags=[]},_isEqual:function(a,b){return this.arrangement._isEqual(a,b)},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},_positionAt:function(a,b){var c=this;b=b||this.getAllRegions();var d=[],e=[],f=[],g=[],h=[],i=[];return BI.each(b,function(b,j){var k=c._getRegionClientPosition(j.id);Math.abs(k.left-a.left)<=3&&d.push(j),Math.abs(k.left+k.width/2-a.left)<=3&&e.push(j),Math.abs(k.left+k.width-a.left)<=3&&f.push(j),Math.abs(k.top-a.top)<=3&&g.push(j),Math.abs(k.top+k.height/2-a.top)<=3&&h.push(j),Math.abs(k.top+k.height-a.top)<=3&&i.push(j)}),{left:d,center:e,right:f,top:g,middle:h,bottom:i}},_getRegionClientPosition:function(a){var b=this.getRegionByName(a),c=this.arrangement._getScrollOffset();return{top:b.top-c.top,left:b.left-c.left,width:b.width,height:b.height,id:b.id}},_vAlign:function(a,b){ -var c,d=this,e=this._positionAt(a,b),f=[];if(e.left.length>0)c=this._getRegionClientPosition(e.left[0].id).left;else if(e.right.length>0){var g=this._getRegionClientPosition(e.right[0].id);c=g.left+g.width}else if(e.center.length>0){var g=this._getRegionClientPosition(e.center[0].id);c=g.left+g.width/2}var h=e.left.concat(e.right).concat(e.center);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.left,c)||d._isEqual(g.left+g.width,c)||d._isEqual(g.left+g.width/2,c)){var h={top:g.top+g.height/2,left:c};f.push({id:e.id,start:h,end:{left:c,top:a.top}})}}),f},_leftAlign:function(a,b,c){return this._vAlign({left:a.left,top:a.top+b.height/2},c)},_rightAlign:function(a,b,c){return this._vAlign({left:a.left+b.width,top:a.top+b.height/2},c)},_hAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.top.length>0){var g=this._getRegionClientPosition(e.top[0].id);c=g.top}else if(e.bottom.length>0){var g=this._getRegionClientPosition(e.bottom[0].id);c=g.top+g.height}else if(e.middle.length>0){var g=this._getRegionClientPosition(e.middle[0].id);c=g.top+g.height/2}var h=e.top.concat(e.bottom).concat(e.middle);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.top,c)||d._isEqual(g.top+g.height,c)||d._isEqual(g.top+g.height/2,c)){var h={top:c,left:g.left+g.width/2};f.push({id:g.id,start:h,end:{left:a.left,top:c}})}}),f},_topAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top},c)},_bottomAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top+b.height},c)},_centerAlign:function(a,b,c){return this._vAlign({left:a.left+b.width/2,top:a.top+b.height/2},c)},_middleAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top+b.height/2},c)},_drawOneTag:function(a,b){var c=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"}),d=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"});if(this._isEqual(a.left,b.left))var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",width:1,height:Math.abs(a.top-b.top)});else var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",height:1,width:Math.abs(a.left-b.left)});BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:a.left-6,top:a.top-7},{el:d,left:b.left-6,top:b.top-7},{el:e,left:Math.min(a.left,b.left),top:Math.min(a.top,b.top)}]}),this.tags.push(c),this.tags.push(d),this.tags.push(e)},stopDraw:function(){BI.each(this.tags,function(a,b){b.destroy()}),this.tags=[]},_getRegionExcept:function(a,b){var c=[];return BI.each(b||this.getAllRegions(),function(b,d){a&&d.id===a||c.push(d)}),c},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},getPosition:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){b.left=d.end.left-c.width/2}),BI.each(h,function(a,d){b.left=d.end.left-c.width}),BI.each(g,function(a,c){b.left=c.end.left}),BI.each(l,function(a,d){b.top=d.end.top-c.height/2}),BI.each(j,function(a,d){b.top=d.end.top-c.height}),BI.each(i,function(a,c){b.top=c.end.top}),b},getSize:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){c.width=2*(d.end.left-b.left)}),BI.each(h,function(a,d){c.width=d.end.left-b.left}),BI.each(g,function(a,b){}),BI.each(l,function(a,d){c.height=2*(d.end.top-b.top)}),BI.each(j,function(a,d){c.height=d.end.top-b.top}),BI.each(i,function(a,b){}),c},draw:function(a,b,c){var d=this;switch(this.stopDraw(),this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._getRegionExcept(c),f=this._leftAlign(a,b,e),g=this._rightAlign(a,b,e),h=this._topAlign(a,b,e),i=this._bottomAlign(a,b,e),j=this._centerAlign(a,b,e),k=this._middleAlign(a,b,e);BI.each(j,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(g,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(f,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(k,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(i,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(h,function(a,b){d._drawOneTag(b.start,b.end)});break;case BI.Arrangement.LAYOUT_TYPE.GRID:}},addRegion:function(a,b){return this.stopDraw(),this.arrangement.addRegion(a,b)},deleteRegion:function(a){return this.arrangement.deleteRegion(a)},setRegionSize:function(a,b){return b=this.getSize(a,null,b),this.arrangement.setRegionSize(a,b)},setPosition:function(a,b){if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var c=this.arrangement.setPosition(a,b);return c},setRegionPosition:function(a,b){if(b.left>0&&b.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:b=this.getPosition(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){var c=this;if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var d=c.arrangement.setDropPosition(a,b);return function(){d(),c.stopDraw()}},scrollInterval:function(){this.arrangement.scrollInterval.apply(this.arrangement,arguments)},scrollEnd:function(){this.arrangement.scrollEnd.apply(this.arrangement,arguments)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){return this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){return this.arrangement.revoke()},populate:function(a){this.arrangement.populate(a)}}),BI.InteractiveArrangement.EVENT_RESIZE="InteractiveArrangement.EVENT_RESIZE",BI.InteractiveArrangement.EVENT_SCROLL="InteractiveArrangement.EVENT_SCROLL",BI.shortcut("bi.interactive_arrangement",BI.InteractiveArrangement),BI.IntervalSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""})},_init:function(){BI.IntervalSlider.superclass._init.apply(this,arguments);var a=this,b=this._constant;this.enable=!1,this.valueOne="",this.valueTwo="",this.calculation=new BI.AccurateCalculationModel,this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.labelOne=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,errorText:"",allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueOne=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelOnePosition(d),a._setSliderOnePosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.labelTwo=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",errorText:"",text:this.options.unit,allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueTwo=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelTwoPosition(d),a._setSliderTwoPosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.sliderTwo=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.sliderOne,!0),this._draggable(this.sliderTwo,!1),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]})},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit),b?(this._setLabelOnePosition(e),this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f):(this._setLabelTwoPosition(e),this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},document);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.labelOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.labelTwo,top:0,left:"100%"}]}],rgap:a.EDITOR_R_GAP,height:70},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.sliderOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.sliderTwo,top:0,left:"100%"}]}],hgap:a.SLIDER_WIDTH_HALF,height:a.SLIDER_HEIGHT},top:20,left:0,width:"100%"}},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_setLabelOnePosition:function(a){this.labelOne.element.css({left:a+"%"}),this._checkOverlap()},_setLabelTwoPosition:function(a){this.labelTwo.element.css({left:a+"%"}),this._checkOverlap()},_setSliderOnePosition:function(a){this.sliderOne.element.css({left:a+"%"})},_setSliderTwoPosition:function(a){this.sliderTwo.element.css({left:a+"%"})},_setBlueTrackLeft:function(a){this.blueTrack.element.css({left:a+"%"})},_setBlueTrackWidth:function(a){this.blueTrack.element.css({width:a+"%"})},_setBlueTrack:function(){var a=this._getPercentByValue(this.labelOne.getValue()),b=this._getPercentByValue(this.labelTwo.getValue());a<=b?(this._setBlueTrackLeft(a),this._setBlueTrackWidth(b-a)):(this._setBlueTrackLeft(b),this._setBlueTrackWidth(a-b))},_setAllPosition:function(a,b){this._setSliderOnePosition(a),this._setLabelOnePosition(a),this._setSliderTwoPosition(b),this._setLabelTwoPosition(b),this._setBlueTrack()},_setVisible:function(a){this.sliderOne.setVisible(a),this.sliderTwo.setVisible(a),this.labelOne.setVisible(a),this.labelTwo.setVisible(a)},_setErrorText:function(){var a=BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number");this.labelOne.setErrorText(a),this.labelTwo.setErrorText(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=this.calculation.accurateSubtraction(this.max,this.min),c=this.calculation.accurateMultiplication(b,a),d=this.calculation.accurateDivisionTenExponent(c,2);if(this.precision<0){var e=BI.parseFloat(this.calculation.accurateAddition(d,this.min)),f=Math.round(this.calculation.accurateDivisionTenExponent(e,-this.precision));return this.calculation.accurateMultiplication(f,Math.pow(10,-this.precision))}return BI.parseFloat(this.calculation.accurateAddition(d,this.min).toFixed(this.precision))},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},_setDraggableEnable:function(a){this.sliderOne.setEnable(a),this.sliderTwo.setEnable(a)},_getPrecision:function(){var a=this.calculation.accurateSubtraction(this.max,this.min),b=a.toPrecision(4),c=b.indexOf("e"),d=[];if(c>-1){d=b.split("e");var e=BI.size(d[0].split(".")[1]),f=BI.parseInt(d[1].substring(1));return e-f}return d=b.split("."),d.length>1?d[1].length:0},_assertValue:function(a){return a<=this.min?this.min:a>=this.max?this.max:a},getValue:function(){return this.valueOne<=this.valueTwo?{min:this.valueOne,max:this.valueTwo}:{min:this.valueTwo,max:this.valueOne}},setMinAndMax:function(a){var b=BI.parseFloat(a.min),c=BI.parseFloat(a.max);!isNaN(b)&&!isNaN(c)&&c>=b&&(this.min=b,this.max=c,this.valueOne=b,this.valueTwo=c,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),c===b&&this._setDraggableEnable(!1)},setValue:function(a){var b=this.options,c=BI.parseFloat(a.min),d=BI.parseFloat(a.max);c=b.digit===!1?c:c.toFixed(b.digit),d=b.digit===!1?d:d.toFixed(b.digit),isNaN(c)||isNaN(d)||(this._checkValidation(c)&&(this.valueOne=c),this._checkValidation(d)&&(this.valueTwo=d),cthis.max&&(this.valueTwo=this.max))},reset:function(){this._setVisible(!1),this.enable=!1,this.valueOne="",this.valueTwo="",this.min=NaN,this.max=NaN,this._setBlueTrackWidth(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this.enable=!0,this._setVisible(!0),this._setErrorText(),(BI.isNumeric(this.valueOne)||BI.isNotEmptyString(this.valueOne))&&(BI.isNumeric(this.valueTwo)||BI.isNotEmptyString(this.valueTwo))?(this.labelOne.setValue(this.valueOne),this.labelTwo.setValue(this.valueTwo),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider),BI.AccurateCalculationModel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this,arguments),{baseCls:""})},_init:function(){BI.AccurateCalculationModel.superclass._init.apply(this,arguments)},_getMagnitude:function(a){for(var b="1",c=0;c0)var d=b;else{var d=a;c=0-c}for(var e=0;e=b.numDecimal.length?a.numDecimal.length:b.numDecimal.length}function d(a,b){for(var c=b-a.length,d=0;d=BI.parseInt(f.numDecimal))var i=(BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h);else{g--;var k=this._getMagnitude(h),i=(k+BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h)}var l=g+"."+j;return BI.parseFloat(l)},_accurateAddition:function(a,b){function c(a,b){for(var c=b-a.length,d=0;db)var e=d.numInteger.slice(0,d.numInteger.length-b),f=d.numInteger.slice(-b);else var e="0",f=c(d.numInteger,b);var g=e+"."+f+d.numDecimal;return BI.parseFloat(g)},accurateSubtraction:function(a,b){return a>=0&&b>=0?a>=b?this._accurateSubtraction(a,b):-this._accurateSubtraction(b,a):a>=0&&b<0?this._accurateAddition(a,-b):a<0&&b>=0?-this._accurateAddition(-a,b):a<0&&b<0?a>=b?this._accurateSubtraction(-b,-a):this._accurateSubtraction(-a,-b):void 0},accurateAddition:function(a,b){return a>=0&&b>=0?this._accurateAddition(a,b):a>=0&&b<0?this.accurateSubtraction(a,-b):a<0&&b>=0?this.accurateSubtraction(b,-a):a<0&&b<0?-this._accurateAddition(-a,-b):void 0},accurateMultiplication:function(a,b){return a>=0&&b>=0?this._accurateMultiplication(a,b):a>=0&&b<0?-this._accurateMultiplication(a,-b):a<0&&b>=0?-this._accurateMultiplication(-a,b):a<0&&b<0?this._accurateMultiplication(-a,-b):void 0},accurateDivisionTenExponent:function(a,b){return a>=0?this._accurateDivisionTenExponent(a,b):-this._accurateDivisionTenExponent(-a,b)}}),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:25})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger"}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM))}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),BI.MonthPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-popup",behaviors:{}})},_init:function(){BI.MonthPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[0,6,1,7,2,8,3,9,4,10,5,11],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b+1}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}]}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:24})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]})},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(""),this.editor.setValue(""),void this.editor.setTitle(""))},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.MultiDateCard=BI.inherit(BI.Widget,{constants:{lgap:80,itemHeight:35,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateCard.superclass._defaultConfig.apply(this,arguments),{})},dateConfig:function(){},defaultSelectedItem:function(){},_init:function(){BI.MultiDateCard.superclass._init.apply(this,arguments);var a=this;this.options;this.label=BI.createWidget({type:"bi.label",height:this.constants.itemHeight,textAlign:"left",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),cls:"bi-multidate-inner-label bi-tips"}),this.radioGroup=BI.createWidget({type:"bi.button_group",chooseType:0,items:BI.createItems(this.dateConfig(),{type:"bi.multidate_segment",height:this.constants.itemHeight}),layouts:[{type:"bi.vertical"}]}),this.radioGroup.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CONFIRM&&a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),this.radioGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.setValue(a.getValue()),a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),BI.createWidget({element:this,type:"bi.center_adapt",lgap:this.constants.lgap,items:[{type:"bi.vertical",items:[this.label,this.radioGroup]}]})},getValue:function(){var a=this.radioGroup.getSelectedButtons()[0],b=a.getValue(),c=a.getInputValue();return{type:b,value:c}},_isTypeAvaliable:function(a){var b=!1;return BI.find(this.dateConfig(),function(c,d){if(d.value===a)return b=!0,!0}),b},setValue:function(a){var b=this;BI.isNotNull(a)&&this._isTypeAvaliable(a.type)?(this.radioGroup.setValue(a.type),BI.each(this.radioGroup.getAllButtons(),function(c,d){d.isEditorExist()===!0&&d.isSelected()?d.setInputValue(a.value):d.setInputValue(b.constants.defaultEditorValue)})):(this.radioGroup.setValue(this.defaultSelectedItem()),BI.each(this.radioGroup.getAllButtons(),function(a,c){c.setInputValue(b.constants.defaultEditorValue)}))},getCalculationValue:function(){var a=this.getValue(),b=a.type,c=a.value;switch(b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:return Date.getDate().getOffsetDate(-1*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:return Date.getDate().getOffsetDate(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:return Date.getDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:return Date.getDate().getBeforeMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:return Date.getDate().getAfterMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:return Date.getDate(Date.getDate().getFullYear(),Date.getDate().getMonth(),1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:return Date.getDate(Date.getDate().getFullYear(),Date.getDate().getMonth(),Date.getDate().getLastDateOfMonth().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:return Date.getDate().getBeforeMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:return Date.getDate().getAfterMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:return Date.getDate().getQuarterStartDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:return Date.getDate().getQuarterEndDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:return Date.getDate().getOffsetDate(-7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:return Date.getDate().getOffsetDate(7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:return Date.getDate(Date.getDate().getFullYear()-1*c,Date.getDate().getMonth(),Date.getDate().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:return Date.getDate(Date.getDate().getFullYear()+1*c,Date.getDate().getMonth(),Date.getDate().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:return Date.getDate(Date.getDate().getFullYear(),0,1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:return Date.getDate(Date.getDate().getFullYear(),11,31)}}}),BI.MultiDateCard.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo=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"},_defaultConfig:function(){return BI.extend(BI.MultiDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-combo bi-border",height:24})},_init:function(){BI.MultiDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.storeTriggerValue="";var b=Date.getDate();this.storeValue=null,this.trigger=BI.createWidget({type:"bi.date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.trigger.on(BI.DateTrigger.EVENT_KEY_DOWN,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DateTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.trigger.on(BI.DateTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.MultiDateCombo.EVENT_FOCUS)}),this.trigger.on(BI.DateTrigger.EVENT_ERROR,function(){a.storeValue={year:b.getFullYear(),month:b.getMonth()},a.popup.setValue(),a.fireEvent(BI.MultiDateCombo.EVENT_ERROR)}),this.trigger.on(BI.DateTrigger.EVENT_VALID,function(){a.fireEvent(BI.MultiDateCombo.EVENT_VALID)}),this.trigger.on(BI.DateTrigger.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDateCombo.EVENT_CHANGE)}),this.trigger.on(BI.DateTrigger.EVENT_CONFIRM,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.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}}),this.popup=BI.createWidget({type:"bi.multidate_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup.on(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE,function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE,function(){var b=Date.getDate();a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.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,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),this.changeIcon=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24});var d=BI.createWidget({type:"bi.absolute",items:[{el:this.combo,top:0,left:0, -right:0,bottom:0},{el:c,top:0,left:0}]});BI.createWidget({type:"bi.htape",element:this,items:[d,{el:this.changeIcon,width:30}],ref:function(b){a.comboWrapper=b}})},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[1].width=30,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[1].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.popup.setValue(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.shortcut("bi.multidate_combo",BI.MultiDateCombo),BI.MultiDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo.EVENT_VALID="EVENT_VALID",BI.MultiDateCombo.EVENT_ERROR="EVENT_ERROR",BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW="BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW",BI.extend(BI.MultiDateCombo,{MULTI_DATE_YMD_CARD:1,MULTI_DATE_YEAR_CARD:2,MULTI_DATE_QUARTER_CARD:3,MULTI_DATE_MONTH_CARD:4,MULTI_DATE_WEEK_CARD:5,MULTI_DATE_DAY_CARD:6}),BI.extend(BI.MultiDateCombo,{DATE_TYPE:{MULTI_DATE_YEAR_PREV:1,MULTI_DATE_YEAR_AFTER:2,MULTI_DATE_YEAR_BEGIN:3,MULTI_DATE_YEAR_END:4,MULTI_DATE_MONTH_PREV:5,MULTI_DATE_MONTH_AFTER:6,MULTI_DATE_MONTH_BEGIN:7,MULTI_DATE_MONTH_END:8,MULTI_DATE_QUARTER_PREV:9,MULTI_DATE_QUARTER_AFTER:10,MULTI_DATE_QUARTER_BEGIN:11,MULTI_DATE_QUARTER_END:12,MULTI_DATE_WEEK_PREV:13,MULTI_DATE_WEEK_AFTER:14,MULTI_DATE_DAY_PREV:15,MULTI_DATE_DAY_AFTER:16,MULTI_DATE_DAY_TODAY:17,MULTI_DATE_PARAM:18,MULTI_DATE_CALENDAR:19,YEAR_QUARTER:20,YEAR_MONTH:21,YEAR_WEEK:22,YEAR_DAY:23,MONTH_WEEK:24,MONTH_DAY:25,YEAR:26,SAME_PERIOD:27,LAST_SAME_PERIOD:28}}),BI.DayCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.DayCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-daycard"})},_init:function(){BI.DayCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{isEditorExist:!0,selected:!0,text:BI.i18nText("BI-Multi_Date_Day_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Day_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY,text:BI.i18nText("BI-Multi_Date_Today")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV}}),BI.DayCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.daycard",BI.DayCard),BI.MonthCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.MonthCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-monthcard"})},_init:function(){BI.MonthCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV,text:BI.i18nText("BI-Multi_Date_Month_Prev")},{isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER,text:BI.i18nText("BI-Multi_Date_Month_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV}}),BI.MonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.monthcard",BI.MonthCard),BI.MultiDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,tabWidth:42,titleHeight:27,itemHeight:30,triggerHeight:24,buttonWidth:90,buttonHeight:25,cardHeight:229,cardWidth:270,popupHeight:259,popupWidth:270,comboAdjustHeight:1,ymdWidth:58,lgap:2,border:1},_defaultConfig:function(){return BI.extend(BI.MultiDatePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-popup",width:268,height:260})},_init:function(){BI.MultiDatePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.storeValue="",this.textButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-label bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today")}),this.textButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE)}),this.clearButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear")}),this.clearButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-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.MultiDatePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateTab=BI.createWidget({type:"bi.tab",tab:{cls:"bi-multidate-popup-tab bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.MultiDateCombo.MULTI_DATE_YMD_CARD,width:this.constants.ymdWidth},{text:BI.i18nText("BI-Multi_Date_Year"),value:BI.MultiDateCombo.MULTI_DATE_YEAR_CARD},{text:BI.i18nText("BI-Multi_Date_Quarter"),value:BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD},{text:BI.i18nText("BI-Multi_Date_Month"),value:BI.MultiDateCombo.MULTI_DATE_MONTH_CARD},{text:BI.i18nText("BI-Multi_Date_Week"),value:BI.MultiDateCombo.MULTI_DATE_WEEK_CARD},{text:BI.i18nText("BI-Multi_Date_Day"),value:BI.MultiDateCombo.MULTI_DATE_DAY_CARD}],{width:this.constants.tabWidth,textAlign:"center",height:this.constants.itemHeight,cls:"bi-multidate-popup-item bi-list-item-active"}),layouts:[{type:"bi.left"}]},cardCreator:function(b){switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return a.ymd=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.ymd.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE)}),a.ymd;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return a.year=BI.createWidget({type:"bi.yearcard"}),a.year.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.year,b)}),a.year;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return a.quarter=BI.createWidget({type:"bi.quartercard"}),a.quarter.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.quarter,b)}),a.quarter;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return a.month=BI.createWidget({type:"bi.monthcard"}),a.month.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.month,b)}),a.month;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return a.week=BI.createWidget({type:"bi.weekcard"}),a.week.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.week,b)}),a.week;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return a.day=BI.createWidget({type:"bi.daycard"}),a.day.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.day,b)}),a.day}}}),this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_YMD_CARD,this.dateTab.on(BI.Tab.EVENT_CHANGE,function(){var b=a.dateTab.getSelect();switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:var c=this.getTab(a.cur).getCalculationValue();a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue(a.ymd);break;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:a.year.setValue(a.storeValue),a._setInnerValue(a.year);break;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:a.quarter.setValue(a.storeValue),a._setInnerValue(a.quarter);break;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:a.month.setValue(a.storeValue),a._setInnerValue(a.month);break;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:a.week.setValue(a.storeValue),a._setInnerValue(a.week);break;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:a.day.setValue(a.storeValue),a._setInnerValue(a.day)}a.cur=b}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.clearButton,this.textButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateTab},{el:this.dateButton,height:30}]})},_setInnerValue:function(a){if(this.dateTab.getSelect()===BI.MultiDateCombo.MULTI_DATE_YMD_CARD)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var b=a.getCalculationValue();b=b.print("%Y-%x-%e"),this.textButton.setValue(b),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,e=this;switch(BI.isNotNull(a)&&(c=a.type||BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_CALENDAR,d=a.value,BI.isNull(d)&&(d=a)),c){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YEAR_CARD),this.year.setValue({type:c,value:d}),this.cur=BI.MultiDateCombo.MULTI_DATE_YEAR_CARD,e._setInnerValue(this.year);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD,this.quarter.setValue({type:c,value:d}),e._setInnerValue(this.quarter);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_MONTH_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_MONTH_CARD,this.month.setValue({type:c,value:d}),e._setInnerValue(this.month);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_WEEK_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_WEEK_CARD,this.week.setValue({type:c,value:d}),e._setInnerValue(this.week);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_DAY_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_DAY_CARD,this.day.setValue({type:c,value:d}),e._setInnerValue(this.day);break;default:if(this._checkValueValid(d)){var b=Date.getDate();this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue(d),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();switch(a){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return this.ymd.getValue();case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return this.year.getValue();case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return this.quarter.getValue();case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return this.month.getValue();case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return this.week.getValue();case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return this.day.getValue()}}}),BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.MultiDatePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.multidate_popup",BI.MultiDatePopup),BI.QuarterCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.QuarterCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-quartercard"})},_init:function(){BI.QuarterCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Prev")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV}}),BI.QuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quartercard",BI.QuarterCard),BI.MultiDateSegment=BI.inherit(BI.Single,{constants:{itemHeight:24,maxGap:15,minGap:10,textWidth:60,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateSegment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-segment",text:"",height:30,isEditorExist:!0,selected:!1,defaultEditorValue:"1"})},_init:function(){BI.MultiDateSegment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio",selected:b.selected}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textEditor=BI.createWidget({type:"bi.text_editor",value:this.constants.defaultEditorValue,title:function(){return a.textEditor.getValue()},tipType:"success",cls:"bi-multidate-editor",width:this.constants.textWidth,height:this.constants.itemHeight}),this.textEditor.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",cls:"bi-multidate-normal-label",text:b.text,height:this.constants.itemHeight}),this._createSegment()},_createSegment:function(){return this.options.isEditorExist===!0?BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:{type:"bi.center_adapt",items:[this.textEditor],widgetName:"textEditor"},lgap:this.constants.maxGap},{el:this.text,lgap:this.constants.minGap}]}):BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:this.text,lgap:this.constants.maxGap}]})},setSelected:function(a){BI.isNotNull(this.radio)&&(this.radio.setSelected(a),this.textEditor.setEnable(a))},isSelected:function(){return this.radio.isSelected()},getValue:function(){return this.options.value},getInputValue:function(){return 0|this.textEditor.getValue()},setInputValue:function(a){this.textEditor.setValue(a)},isEditorExist:function(){return this.options.isEditorExist}}),BI.MultiDateSegment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multidate_segment",BI.MultiDateSegment),BI.WeekCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.WeekCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-weekcard"})},_init:function(){BI.WeekCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV}}),BI.WeekCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.weekcard",BI.WeekCard),BI.YearCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.YearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-yearcard"})},_init:function(){BI.YearCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN,text:BI.i18nText("BI-Multi_Date_Year_Begin")},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END,text:BI.i18nText("BI-Multi_Date_Year_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV}}),BI.YearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.yearcard",BI.YearCard),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[]})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSelectLevelTree.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={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_select_tree_last_plus_group_node";break;default:f.type="bi.multilayer_select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:c.itemsCreator,el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},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.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),BI.MultiLayerSelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.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={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},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.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments); -}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectInsertCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK); -}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.matched.concat(f.finded)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])}}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()}},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue)};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keyword=a.trigger.getKeyword(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane(),a._setStartValue(""),this.setValue(BI.deepClone(a.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),a._setStartValue(""),a.adapter.setValue(a.storeValue),a.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var b=this.getKeyword();this.hasMatched()?a._join({type:BI.Selection.Multi,value:[b]},function(){a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):(a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE))}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeyword(),d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.adapter.setValue(a.storeValue),c(),a.adapter.populate(),a._setStartValue("")):(a.adapter.setValue(a.storeValue),c())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.pluck(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void b()}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),b()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertList.EVENT_CHANGE="BI.MultiSelectInsertList.EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_list",BI.MultiSelectInsertList),BI.MultiSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue)};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keyword=a.trigger.getKeyword(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane(),a._setStartValue(""),this.setValue(BI.deepClone(a.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),a._setStartValue(""),a.adapter.setValue(a.storeValue),a.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var b=this.getKeyword();this.hasMatched()&&a._join({type:BI.Selection.Multi,value:[b]},function(){a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeyword(),d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.adapter.setValue(a.storeValue),c(),a.adapter.populate(),a._setStartValue("")):(a.adapter.setValue(a.storeValue),c())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA},function(a){d._allData=BI.pluck(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)}}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.trigger=BI.createWidget({ -type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===j.element.find(a.target).length}}),this.storeValue={value:{}};var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),b={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(b)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button bi-border-left"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)}}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)})},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var c="",d=0,e=BI.size(a);return BI.each(a,function(a,f){d++;var g=b(f);c+=a+(""===g?"":":"+g)+(d===e?"":",")}),c}if(a||(a={}),a.value||(a.value={}),BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var c="";BI.each(a.value,function(a,d){var e=b(d);c+=a+(""===e?"":":"+e)+"; "}),this.editor.setState(c)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),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:23}]})},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){a=a||{};var b,c=this;(BI.isNumeric(a.min)||BI.isEmptyString(a.min))&&c.smallEditor.setValue(a.min),BI.isNotNull(a.min)||c.smallEditor.setValue(""),(BI.isNumeric(a.max)||BI.isEmptyString(a.max))&&c.bigEditor.setValue(a.max),BI.isNotNull(a.max)||c.bigEditor.setValue(""),BI.isNull(a.closemin)||(b=a.closemin===!0?1:0,c.smallCombo.setValue(b)),BI.isNull(a.closemax)||(b=a.closemax===!0?1:0,c.bigCombo.setValue(b))},getValue:function(){var a=this,b={},c=a.smallCombo.getValue(),d=a.bigCombo.getValue();return b.min=a.smallEditor.getValue(),b.max=a.bigEditor.getValue(),0===c[0]?b.closemin=!1:b.closemin=!0,0===d[0]?b.closemax=!1:b.closemax=!0,b}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.PageTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PageTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table-cell",text:"",title:""})},_init:function(){BI.PageTableCell.superclass._init.apply(this,arguments);BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"nowrap",height:this.options.height,text:this.options.text,title:this.options.title,value:this.options.value,lgap:5,rgap:5});BI.isNotNull(this.options.styles)&&BI.isObject(this.options.styles)&&this.element.css(this.options.styles)}}),BI.shortcut("bi.page_table_cell",BI.PageTableCell),BI.PageTable=BI.inherit(BI.Widget,{_const:{scrollWidth:18,minScrollWidth:100},_defaultConfig:function(){return BI.extend(BI.PageTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table",el:{type:"bi.sequence_table"},pager:{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}},itemsCreator:BI.emptyFn,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,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:[]})},_init:function(){BI.PageTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hCurr=1,this.vCurr=1,this.table=BI.createWidget(b.el,{type:"bi.sequence_table",width:b.width,height:b.height&&b.height-30,isNeedResize:!0,isResizeAdapt:!1,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,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,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(),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)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#d4dadd",selectLineColor:"#3f8ce8"},_defaultConfig:function(){return BI.extend(BI.PathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-chooser",items:[]})},_init:function(){BI.PathChooser.superclass._init.apply(this,arguments),this.populate(this.options.items)},_createRegions:function(a){var b=this;this.regions=BI.createWidgets(BI.map(a,function(a,c){return{type:"bi.path_region",title:b.texts[c]||c}})),this.regionMap={},BI.each(a,function(a,c){b.regionMap[c]=a}),this.container=BI.createWidget({type:"bi.horizontal",verticalAlign:"top",scrollx:!1,scrolly:!1,hgap:10,items:this.regions}),BI.createWidget({type:"bi.vertical_adapt",element:this,scrollable:!0,hgap:10,items:[this.container]})},getRegionIndexById:function(a){var b=this.cache[a],c=b.get("region");return this.regionMap[c]},_drawPath:function(a,b,c){var d=this,e=[];e=BI.contains(this.start,a)?this.start:[a],BI.each(e,function(a,b){BI.each(d.radios[b],function(a,b){b.setSelected(!1)}),BI.each(d.lines[b],function(a,b){b.attr("stroke",d._const.lineColor)}),BI.each(d.regionIndexes[b],function(a,b){d.regions[b].reset()})}),BI.each(this.routes[a][c],function(a,e){var f=d.getRegionIndexById(e);d.regions[f].setSelect(b+c,e)});for(var f=BI.last(this.routes[a][c]);f&&this.routes[f]&&1===this.routes[f].length;)BI.each(this.routes[f][0],function(a,b){var c=d.getRegionIndexById(b);d.regions[c].setSelect(0,b)}),this.lines[f][0].attr("stroke",d._const.selectLineColor).toFront(),f=BI.last(this.routes[f][0]);this.lines[a][c].attr("stroke",d._const.selectLineColor).toFront(),this.radios[a]&&this.radios[a][c]&&this.radios[a][c].setSelected(!0)},_drawRadio:function(a,b,c,d,e){var f=this,g=BI.createWidget({type:"bi.radio",cls:"path-chooser-radio",selected:b+c===0,start:a,index:c});g.on(BI.Radio.EVENT_CHANGE,function(){f._drawPath(a,b,c),f.fireEvent(BI.PathChooser.EVENT_CHANGE,a,c)}),this.radios[a]||(this.radios[a]=[]),this.radios[a].push(g),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:g,left:d-6.5,top:e-6.5}]})},_drawLine:function(a,b){var c=this;this.lines[a]||(this.lines[a]=[]),this.pathes[a]||(this.pathes[a]=[]);var d=this.getRegionIndexById(a),e=this.regions[d].getIndexByValue(a);BI.each(b,function(f,g){c.pathes[a][f]=[];var h=f+e,i="",j=47.5+29*h,k=50+100*d,l=k,m=j,n=j,o=c.getRegionIndexById(BI.last(g)),p=c.regions[o].getIndexByValue(BI.last(g)),q=50+100*o;if(BI.contains(c.start,a)?(l=k-50,i+="M"+(k-50)+","+j,c.pathes[a][f].push({x:k-50,y:j})):0===h?(l=k+50,i+="M"+k+","+j,c.pathes[a][f].push({x:k,y:j})):(l=k+50,i+="M"+k+",47.5L"+(k+50)+",47.5L"+(k+50)+","+j,c.pathes[a][f].push({x:k,y:47.5}),c.pathes[a][f].push({x:k+50,y:47.5}),c.pathes[a][f].push({x:k+50,y:j})),h>0){var r=29*p+47.5;i+="L"+(q-50)+","+n+"L"+(q-50)+","+r+"L"+q+","+r,c.pathes[a][f].push({x:q-50,y:n}),c.pathes[a][f].push({x:q-50,y:r}),c.pathes[a][f].push({x:q,y:r})}else i+="L"+q+","+n,c.pathes[a][f].push({x:q,y:n});var s=c.svg.path(i).attr({stroke:0===h?c._const.selectLineColor:c._const.lineColor,"stroke-dasharray":"-"});c.lines[a].push(s),b.length>1&&c.lines[a][0].toFront(),BI.contains(c.start,a)&&c.lines[c.regions[0].getValueByIndex(0)][0].toFront(),(b.length>1||BI.contains(c.start,a))&&c._drawRadio(a,e,f,l,m)})},_drawLines:function(a){var b=this;this.lines={},this.pathes={},this.radios={},this.regionIndexes={},BI.each(a,function(a,c){b.regionIndexes[a]||(b.regionIndexes[a]=[]),BI.each(c,function(c,d){BI.each(d,function(c,d){var e=b.getRegionIndexById(d);BI.contains(b.regionIndexes[a],e)||b.regionIndexes[a].push(e)})})}),BI.each(a,function(a,c){b._drawLine(a,c)})},_pushNodes:function(a){for(var b=this,c=[],d=0;d0||BI.contains(b.start,e))&&g.addItem(e,b.texts[e])}for(var d=BI.first(c);d0&&(h=c[b-1]);var i=a.cache[h.value||""],j=a.cache[g.value]||new BI.Node(g.value);j.set(g),a.cache[g.value]=j,a.texts[g.value]=g.text,a.texts[g.region]=g.regionText,i=BI.isNull(i)?d.getRoot():i, -i.getChildIndex(g.value)===-1&&d.addNode(i,j)})}),d.traverse(function(a){BI.each(a.getChildren(),function(b,d){if(BI.contains(c,d.get("region"))){var e=BI.indexOf(c,a.get("region")),f=BI.indexOf(c,d.get("region"));if(e>f){for(var g=c[f],h=f;h0&&(e.push(c),d.push(e),e=[]),e.push(c)}),e.length>0&&d.push(e),BI.each(d,function(a,b){var d=b[0],e=BI.findIndex(c.routes[d],function(a,c){if(BI.isEqual(b,c))return!0});if(e>=0){var f=c.getRegionIndexById(d),g=c.regions[f].getIndexByValue(d);c._drawPath(d,g,e)}})},getValue:function(){var a=[];return BI.each(this.regions,function(b,c){var d=c.getValue();BI.isKey(d)&&a.push(d)}),a}}),BI.PathChooser.EVENT_CHANGE="PathChooser.EVENT_CHANGE",BI.shortcut("bi.path_chooser",BI.PathChooser),BI.PathRegion=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PathRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-region bi-background",width:80,title:""})},_init:function(){BI.PathRegion.superclass._init.apply(this,arguments);var a=this.options;this.zIndex=100;var b=BI.createWidget({type:"bi.label",text:a.title,title:a.title,height:30});b.element.css("zIndex",this.zIndex--),this.items=[],this.vertical=BI.createWidget({type:"bi.vertical",element:this,bgap:5,hgap:10,items:[b]})},hasItem:function(a){return BI.any(this.items,function(b,c){return a===c.getValue()})},addItem:function(a,b){if(BI.isKey(a))var c=BI.createWidget({type:"bi.label",cls:"path-region-label bi-card bi-border bi-list-item-select",text:b,value:a,title:b||a,height:24});else var c=BI.createWidget({type:"bi.layout",height:24});c.element.css("zIndex",this.zIndex--),this.items.push(c),this.vertical.addItem(c),1===this.items.length&&this.setSelect(0,a)},reset:function(){BI.each(this.items,function(a,b){b.element.removeClass("active")})},setSelect:function(a,b){if(this.reset(),!(this.items.length<=0))return 1===this.items.length?void this.items[0].element.addClass("active"):void(this.items[a].attr("value")===b&&this.items[a].element.addClass("active"))},setValue:function(a){this.setSelect(this.getIndexByValue(a),a)},getValueByIndex:function(a){return this.items[a].attr("value")},getIndexByValue:function(a){return BI.findIndex(this.items,function(b,c){return c.attr("value")===a})},getValue:function(){var a;return BI.any(this.items,function(b,c){if(c.element.hasClass("active"))return a=c.getValue(),!0}),a}}),BI.PathRegion.EVENT_CHANGE="PathRegion.EVENT_CHANGE",BI.shortcut("bi.path_region",BI.PathRegion),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger"}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}]}),this.quarter.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]})},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.RelationViewItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-item bi-list-item-active",height:25,hoverIn:BI.emptyFn,hoverOut:BI.emptyFn})},_init:function(){BI.RelationViewItem.superclass._init.apply(this,arguments);var a=this.options;this.element.hover(a.hoverIn,a.hoverOut);var b=[];a.isPrimary&&b.push({type:"bi.icon",width:16,height:16,title:BI.i18nText("BI-Primary_Key")}),b.push({type:"bi.label",text:a.text,value:a.value,height:a.height,textAlign:"left",width:a.isPrimary?70:90,lgap:a.isPrimary?0:10}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:b,cls:"primary-key-font",lgap:5})},enableHover:function(a){BI.RelationViewRegion.superclass.enableHover.apply(this,[{container:"body"}])},setSelected:function(a){this.element[a?"addClass":"removeClass"]("active")}}),BI.shortcut("bi.relation_view_item",BI.RelationViewItem),BI.RelationView=BI.inherit(BI.Widget,{_const:{lineColor:"#c4c6c6",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.RelationView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view",items:[]})},_init:function(){BI.RelationView.superclass._init.apply(this,arguments),this.populate(this.options.items)},_calculateWidths:function(){var a=[];return BI.each(this.views,function(b,c){BI.each(c,function(b,c){a[b]||(a[b]=BI.MIN),a[b]=Math.max(a[b],c.getWidth())})}),a},_calculateHeights:function(){var a=BI.makeArray(BI.size(this.views),BI.MIN);return BI.each(this.views,function(b,c){BI.each(c,function(c,d){a[b]=Math.max(a[b],d.getHeight())})}),a},_hoverIn:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.selectLineColor).toFront(),b.storeViews[d].setValue(f[0].primary.value),b.storeViews[e].setValue(f[0].foreign.value))})})},_hoverOut:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.lineColor),b.storeViews[d].setValue([]),b.storeViews[e].setValue([]))})})},previewRelationTables:function(a,b){return b?(BI.each(this.storeViews,function(b,c){a.contains(b)?c.setPreviewSelected(!0):c.toggleRegion(!1)}),void BI.each(this.lines,function(b,c){BI.each(c,function(c,d){a.contains(b)&&a.contains(c)||d.hide()})})):(BI.each(this.storeViews,function(a,b){b.toggleRegion(!0),b.setPreviewSelected(!1)}),void BI.each(this.lines,function(a,b){BI.each(b,function(a,b){b.show()})}))},populate:function(a){var b=this,c=this.options,d=this._const;c.items=a||[],this.empty(),this.svg=BI.createWidget({type:"bi.svg"});var e=this.regions={},f=this.relations={};BI.each(a,function(a,b){var c=b.primary.region,d=b.foreign&&b.foreign.region;c&&!f[c]&&(f[c]={}),c&&d&&!f[c][d]&&(f[c][d]=[]),c&&!e[c]&&(e[c]=[]),d&&!e[d]&&(e[d]=[]),c&&!BI.deepContains(e[c],b.primary)&&e[c].push(b.primary),d&&!BI.deepContains(e[d],b.foreign)&&e[d].push(b.foreign),c&&d&&f[c][d].push(b)});for(var g=[],h=BI.clone(e),i={};!BI.isEmpty(h);){var j=BI.clone(h);BI.each(c.items,function(a,b){i[b.primary.region]||delete j[b.foreign&&b.foreign.region]}),g.push(BI.keys(j)),BI.extend(i,j),BI.each(j,function(a,b){delete h[a]})}var k=this.views={},l=this.storeViews={},m=this.indexes={},n=[];BI.each(g,function(a,c){k[a]||(k[a]={});var d=[];BI.each(c,function(c,f){var g=e[f];k[a][c]=l[f]=BI.createWidget({type:"bi.relation_view_region_container",value:f,header:g[0].regionTitle,text:g.length>0?g[0].regionText:"",handler:g.length>0?g[0].regionHandler:BI.emptyFn,items:g,belongPackage:!(g.length>0)||g[0].belongPackage}),BI.isNotNull(g[0])&&BI.isNotNull(g[0].keyword)&&k[a][c].doRedMark(g[0].keyword),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN,function(a){b._hoverIn(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,function(a){b._hoverOut(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_PREVIEW,function(a){b.fireEvent(BI.RelationView.EVENT_PREVIEW,f,a)}),m[f]={i:a,j:c},d.push(k[a][c])}),n.push({type:"bi.horizontal",items:d})});var o=this._calculateHeights(),p=this._calculateWidths(),q=[0],r=[0];BI.each(o,function(a,b){0!==a&&(r[a]=r[a-1]+o[a-1])}),BI.each(p,function(a,b){0!==a&&(q[a]=q[a-1]+p[a-1])});var s=this.lines={};BI.each(f,function(a,c){BI.each(c,function(c,e){var f=m[a],g=m[c],h=0,i=1,j=2,n=3,t=j,u=h,v=function(a,b,c,d){var e,f=q[b]+(p[b]-k[a][b].getWidth())/2,g=r[a]+(o[a]-k[a][b].getHeight())/2,l="";switch(c){case h:e=d?k[a][b].getTopRightPosition():k[a][b].getTopLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g-10),g-=10;break;case i:e=k[a][b].getRightPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f+10)+","+g,f+=10;break;case j:e=k[a][b].getBottomPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g+10),g+=10;break;case n:e=k[a][b].getLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f-10)+","+g,f-=10}return{x:f,y:g,path:l}},w="",x=v(f.i,f.j,t),y=v(g.i,g.j,u,!0);w+=x.path+y.path,s[a]||(s[a]={}),w+="M"+x.x+","+x.y+"L"+y.x+","+y.y;var z=s[a][c]=b.svg.path(w).attr({stroke:d.lineColor,"stroke-width":"2"}).hover(function(){z.attr("stroke",d.selectLineColor).toFront(),l[a].setValue(e[0].primary.value),l[c].setValue(e[0].foreign.value)},function(){z.attr("stroke",d.lineColor),l[a].setValue([]),l[c].setValue([])})})});var t=BI.createWidget();BI.createWidget({type:"bi.vertical",element:t,items:n}),BI.createWidget({type:"bi.absolute",element:t,items:[{el:this.svg,left:0,right:0,top:0,bottom:0}]}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[t]})}}),BI.RelationView.EVENT_CHANGE="RelationView.EVENT_CHANGE",BI.RelationView.EVENT_PREVIEW="EVENT_PREVIEW",BI.shortcut("bi.relation_view",BI.RelationView),BI.RelationViewRegionContainer=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegionContainer.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region-container",width:150})},_init:function(){BI.RelationViewRegionContainer.superclass._init.apply(this,arguments);var a=this,b=this.options;this.region=BI.createWidget({type:"bi.relation_view_region",value:b.value,header:b.header,text:b.text,handler:b.handler,items:b.items,belongPackage:b.belongPackage}),this.region.on(BI.RelationViewRegion.EVENT_PREVIEW,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_IN,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_IN,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_OUT,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,b)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.region],width:this.region.getWidth(),height:this.region.getHeight()})},doRedMark:function(){this.region.doRedMark.apply(this.region,arguments)},unRedMark:function(){this.region.unRedMark.apply(this.region,arguments)},getWidth:function(){return this.region.getWidth()},getHeight:function(){return this.region.getHeight()},getTopLeftPosition:function(){return this.region.getTopLeftPosition()},getTopRightPosition:function(){return this.region.getTopRightPosition()},getBottomPosition:function(){return this.region.getBottomPosition()},getLeftPosition:function(){return this.region.getLeftPosition()},getRightPosition:function(){return this.region.getRightPosition()},setValue:function(a){this.region.setValue(a)},toggleRegion:function(a){a===!0?this.region.element.fadeIn():this.region.element.fadeOut()},setPreviewSelected:function(a){this.region.setPreviewSelected(a)}}),BI.RelationViewRegionContainer.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegionContainer.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegionContainer.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region_container",BI.RelationViewRegionContainer),BI.RelationViewRegion=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region cursor-pointer",width:150,text:"",value:"",header:"",items:[],belongPackage:!0})},_init:function(){BI.RelationViewRegion.superclass._init.apply(this,arguments);var a=this,b=this.options;this.preview=BI.createWidget({type:"bi.icon_button",cls:"relation-table-preview-font",width:25,height:25,stopPropagation:!0}),this.preview.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW,this.isSelected())}),this.title=BI.createWidget({type:"bi.label",height:25,width:70,text:b.text,value:b.value,textAlign:"left"}),BI.isKey(b.header)&&this.title.setTitle(b.header,{container:"body"}),this.button_group=BI.createWidget({type:"bi.button_group",items:this._createItems(b.items),layouts:[{type:"bi.vertical"}]}),BI.createWidget({type:"bi.vertical",element:this,items:[{type:"bi.vertical",cls:"relation-view-region-container bi-card bi-border "+(b.belongPackage?"":"other-package"),items:[{type:"bi.vertical_adapt",cls:"relation-view-region-title bi-border-bottom",items:[this.preview,this.title]},this.button_group]}],hgap:25,vgap:20})},_createItems:function(a){var b=this;return BI.map(a,function(a,c){return BI.extend(c,{type:"bi.relation_view_item",hoverIn:function(){b.setValue(c.value),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_IN,c.value)},hoverOut:function(){b.setValue([]),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_OUT,c.value)}})})},doRedMark:function(){this.title.doRedMark.apply(this.title,arguments)},unRedMark:function(){this.title.unRedMark.apply(this.title,arguments)},getWidth:function(){return this.options.width},getHeight:function(){return 25*this.button_group.getAllButtons().length+25+40+3},getTopLeftPosition:function(){return{x:35,y:20}},getTopRightPosition:function(){return{x:this.getWidth()-25-10,y:20}},getBottomPosition:function(){return{x:35,y:this.getHeight()-20}},getLeftPosition:function(){return{x:25,y:30}},getRightPosition:function(){return{x:this.getWidth()-25,y:30}},setValue:function(a){this.button_group.setValue(a)},setPreviewSelected:function(a){this.preview.setSelected(a)}}),BI.RelationViewRegion.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegion.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegion.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region",BI.RelationViewRegion),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]0&&a.freezeCols.length=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},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()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments); -},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[]})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}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},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&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}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,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:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-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(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_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",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=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,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){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=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,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:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60: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,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),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)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.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),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.matched.concat(f.finded)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"single-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])}}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue="",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a="")},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"}})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){b.itemsCreator(c,function(b){d.apply(a,arguments)})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.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.list)}))))},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){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:this.options.logic,height:25,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a="")},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader), -BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SingleSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_PAUSE="SingleSelectEditor.EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}if(g){for(var j=!1,k=0;k0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_add_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue="",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_add_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a="")},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_add_combo",BI.SingleSelectCombo),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_add_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_add_trigger",BI.SingleSelectTrigger),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_add_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_add_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",text:"",height:24})},_init:function(){BI.SignTextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+a.text,this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){var b=this.options;this._showHint(),a=BI.isEmpty(a)||a==b.text?b.text:a+b.text,this.text.setValue(a)}}),BI.SignTextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignTextEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.shortcut("bi.sign_text_editor",BI.SignTextEditor),BI.SliderIconButton=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SliderIconButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider-button"})},_init:function(){BI.extend(BI.SliderIconButton.superclass._init.apply(this,arguments)),this.slider=BI.createWidget({type:"bi.icon_button",cls:"slider-icon slider-button",iconWidth:14,iconHeight:14,height:14,width:14}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.slider,top:7,left:-7}],width:0,height:14})}}),BI.shortcut("bi.single_slider_button",BI.SliderIconButton),BI.SingleSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider bi-slider-track",digit:!1,unit:""})},_init:function(){BI.SingleSlider.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._constant;this.enable=!1,this.value="",this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var d=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:c.SLIDER_WIDTH_HALF,height:c.SLIDER_HEIGHT});d.element.click(function(d){if(a.enable){var e=d.clientX-a.element.offset().left-c.SLIDER_WIDTH_HALF,f=a.track.element[0].scrollWidth,g=0;e<0&&(g=0),e>0&&ef-c.SLIDER_WIDTH&&(g=100);var h=BI.parseFloat(g.toFixed(1));a._setAllPosition(h);var i=a._getValueByPercent(h);i=b.digit===!1?i:i.toFixed(b.digit),a.label.setValue(i),a.value=i,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",errorText:"",text:b.unit,width:c.EDITOR_WIDTH-2,allowBlank:!1,validationChecker:function(b){return a._checkValidation(b)}}),this.label.element.hover(function(){a.label.element.removeClass("bi-border").addClass("bi-border")},function(){a.label.element.removeClass("bi-border")}),this.label.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue()),c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setAllPosition(d),this.setValue(b),a.value=b,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:23,left:0,width:"100%"},{el:d,top:20,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},document);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0), -this.enable=!0,this.label.setErrorText(BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number")),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:20,HEIGHT:20,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider-label bi-slider-track",digit:!1,unit:""})},_init:function(){BI.SingleSliderLabel.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._constant;this.enable=!1,this.value="",this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var d=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:c.SLIDER_WIDTH_HALF,height:c.SLIDER_HEIGHT});d.element.click(function(d){if(a.enable){var e=d.clientX-a.element.offset().left-c.SLIDER_WIDTH_HALF,f=a.track.element[0].scrollWidth,g=0;e<0&&(g=0),e>0&&ef-c.SLIDER_WIDTH&&(g=100);var h=BI.parseFloat(g.toFixed(1));a._setAllPosition(h);var i=a._getValueByPercent(h);i=b.digit===!1?i:i.toFixed(b.digit),a.label.setText(i+b.unit),a.value=i,a.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.label",height:c.HEIGHT,width:c.EDITOR_WIDTH-2}),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:13,left:0,width:"100%"},{el:d,top:10,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},document);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var d=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},document);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[]})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[]})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,defaultShowIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items)}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items))}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this;BI.TimeInterval.superclass._init.apply(this,arguments),this.left=this._createCombo(),this.right=this._createCombo(),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(){var a=this,b=BI.createWidget({type:"bi.multidate_combo"});return b.on(BI.MultiDateCombo.EVENT_ERROR,function(){a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)}),b.on(BI.MultiDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW,function(){a.left.hidePopupView(),a.right.hidePopupView()}),b.on(BI.MultiDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),b},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&Date.checkLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&Date.checkLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=Date.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.YearCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.year_trigger",min:b.min,max:b.max}),this.trigger.on(BI.YearTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.YearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.YearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",element:this,destroyWhenHide:!0,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.YearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max}}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){var b=a.trigger.getKey();BI.isNotNull(b)?a.popup.setValue(b):b||b===a.storeValue?a.setValue():a.popup.setValue(a.storeValue),a.fireEvent(BI.YearCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.combo.setValue(a||"")},getValue:function(){return this.popup.getValue()}}),BI.YearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_combo",BI.YearCombo),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;this.selectedYear=this._year=Date.getDate().getFullYear();var b=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1}),c=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,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:25,items:[b,c]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var d=this.getSelectedCard();b.setEnable(!d.isFrontYear()),c.setEnable(!d.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)})},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;Date.checkVoid(a,1,1,b.min,b.max)[0]?(a=Date.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.YearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.YearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger bi-border",min:"1900-01-01",max:"2099-12-31",height:24})},_init:function(){BI.YearTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(d){return a.editor.setErrorText(BI.isPositiveInteger(d)?c.errorTextInvalid:c.errorText),""===d||BI.isPositiveInteger(d)&&!Date.checkVoid(d,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.YearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.YearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.YearTrigger.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.YearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.YearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return 0|this.editor.getValue()}}),BI.YearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.YearTrigger.EVENT_ERROR="EVENT_ERROR",BI.YearTrigger.EVENT_START="EVENT_START",BI.YearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.year_trigger",BI.YearTrigger),BI.YearMonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearMonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-month-combo",yearBehaviors:{},monthBehaviors:{},height:25})},_init:function(){BI.YearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.month=BI.createWidget({type:"bi.month_combo",behaviors:b.monthBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),this.month.on(BI.MonthCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.month.on(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.month]})},setValue:function(a){a=a||{},this.month.setValue(a.month),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.YearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_month_combo",BI.YearMonthCombo),BI.YearQuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearQuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-quarter-combo",yearBehaviors:{},quarterBehaviors:{},height:25})},_init:function(){BI.YearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.quarter=BI.createWidget({type:"bi.quarter_combo",behaviors:b.quarterBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),this.quarter.on(BI.QuarterCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.quarter.on(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.quarter]})},setValue:function(a){a=a||{},this.quarter.setValue(a.quarter),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),quarter:this.quarter.getValue()}}}),BI.YearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_quarter_combo",BI.YearQuarterCombo),BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_itemsCreator:function(a,b){function c(c){var d=(a.keywords||[]).slice();if(a.keyword&&d.push(a.keyword),BI.each(d,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var e=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!e[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:c,hasNext:!1})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.combo.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="AllValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo),BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){ -var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;bj._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.finded.length>0||e.matched.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d(0|h[0])&&(a=0|h[0]),f.setFullYear(a,b,c),e.ymd=[f.getFullYear(),f.getMonth(),f.getDate()];var i=Date._MD.slice(0);i[1]=Date.isLeap(e.ymd[0])?29:28,f.setFullYear(e.ymd[0],e.ymd[1],1),e.FDay=f.getDay(),e.PDay=i[0===b?11:b-1]-e.FDay+1,e.NDay=1;var j=[];return BI.each(BI.range(42),function(a){var b,c={},d=e.ymd[0],f=e.ymd[1]+1;a=e.FDay&&a=0?c%12:(12+c%12)%12;return{year:Date.getDate().getFullYear()+d,month:e}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(a){var b=this.options;a=0|a;var c=BI.YearCalendar.getStartYear(a),d=[];return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(a){var e={};Date.checkVoid(c+a,1,1,b.min,b.max)[0]&&(e.disabled=!0),e.text=c+a,d.push(e)}),d},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.currentYear=Date.getDate().getFullYear();var c=this._yearCreator(b.year||this.currentYear),d=c.length,e=BI.makeArray(d,""),f=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(c,function(a,b){e[a]=c[f[a]]});var g=[];g.push(e.slice(0,2)),g.push(e.slice(2,4)),g.push(e.slice(4,6)),g.push(e.slice(6,8)),g.push(e.slice(8,10)),g.push(e.slice(10,12)),g=BI.map(g,function(a,b){return BI.map(b,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:23,width:38,value:b.text,disabled:b.disabled})})}),this.years=BI.createWidget({type:"bi.button_group",behaviors:b.behaviors,items:BI.createItems(g,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},b.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var a=this.options,b=a.year;return b=0|b,!!Date.checkVoid(BI.YearCalendar.getStartYear(b)-1,1,1,a.min,a.max)[0]},isFinalYear:function(){var a=this.options,b=(this._const,a.year);return b=0|b,!!Date.checkVoid(BI.YearCalendar.getEndYear(b)+1,1,1,a.min,a.max)[0]},setValue:function(a){this.years.setValue([a])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(a){var b=Date.getDate().getFullYear();return a-((a-b+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(a){return BI.YearCalendar.getStartYear(a)+BI.YearCalendar.INTERVAL},getPageByYear:function(a){var b=Date.getDate().getFullYear();return a=BI.YearCalendar.getStartYear(a),(a-b+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),BI.ComplexCanvas=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ComplexCanvas.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-complex-canvas"})},_init:function(){BI.ComplexCanvas.superclass._init.apply(this,arguments);var a=this.options;this.canvas=BI.createWidget({type:"bi.canvas",element:this,width:a.width,height:a.height})},branch:function(a,b,c,d,e,f){var g=this,h=[].slice.call(arguments);if(h.length<=5)return this.canvas.line.apply(this.canvas,arguments);var i;BI.isOdd(h.length)&&(i=BI.last(h),h=BI.initial(h)),h=[].slice.call(h,2);var j=BI.filter(h,function(a){return a%2===0}),k=BI.filter(h,function(a){return a%2!==0});i||(i={});var l=i.offset||20;if(b>d&&b>f||bd&&b>f)var m=Math.max.apply(this,k)+l;else var m=Math.min.apply(this,k)-l;var n=Math.min.apply(this,j),o=BI.indexOf(j,n),p=Math.max.apply(this,j),q=BI.indexOf(j,p);return this.canvas.line(n,k[o],n,m,p,m,p,k[q],i),BI.each(j,function(a,b){a!==q&&a!==o&&g.canvas.line(b,k[a],b,m,i)}),void this.canvas.line(a,m,a,b,i)}if(a>c&&a>e||ac&&a>e)var r=Math.max.apply(this,j)+l;else var r=Math.min.apply(this,j)-l;var s=Math.min.apply(this,k),t=BI.indexOf(k,s),u=Math.max.apply(this,k),v=BI.indexOf(k,u);return this.canvas.line(j[t],s,r,s,r,u,j[v],u,i),BI.each(k,function(a,b){a!==t&&a!==v&&g.canvas.line(j[a],b,r,b,i)}),void this.canvas.line(r,b,a,b,i)}},stroke:function(a){this.canvas.stroke(a)}}),BI.shortcut("bi.complex_canvas",BI.ComplexCanvas),BI.ArrowTreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-arrow-tree-group-node",iconWidth:13,iconHeight:13})},_init:function(){BI.ArrowTreeGroupNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.removeClass("pull-down-font").addClass("pull-right-font"):this.element.removeClass("pull-right-font").addClass("pull-down-font")}}),BI.shortcut("bi.arrow_tree_group_node_checkbox",BI.ArrowTreeGroupNodeCheckbox),BI.CheckingMarkNode=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.CheckingMarkNode.superclass._defaultConfig.apply(this,arguments),{extraCls:"check-mark-font",iconWidth:13,iconHeight:13})},_init:function(){BI.CheckingMarkNode.superclass._init.apply(this,arguments),this.setSelected(this.options.selected)},setSelected:function(a){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),BI.FirstTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type2",iconWidth:25,iconHeight:25})},_init:function(){BI.FirstTreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),BI.LastTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type4",iconWidth:25,iconHeight:25})},_init:function(){BI.LastTreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),BI.MidTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type3",iconWidth:25,iconHeight:25})},_init:function(){BI.MidTreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),BI.TreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-node-triangle-collapse-font",iconWidth:13,iconHeight:13})},_init:function(){BI.TreeGroupNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.TreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.removeClass("tree-node-triangle-collapse-font").addClass("tree-node-triangle-expand-font"):this.element.removeClass("tree-node-triangle-expand-font").addClass("tree-node-triangle-collapse-font")}}),BI.shortcut("bi.tree_group_node_checkbox",BI.TreeGroupNodeCheckbox),BI.TreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type1",iconWidth:25,iconHeight:25})},_init:function(){BI.TreeNodeCheckbox.superclass._init.apply(this,arguments)},setSelected:function(a){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),a?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox);try{!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Clipboard=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0&&void 0!==arguments[0]?arguments[0]:{};this.action=a.action,this.emitter=a.emitter,this.target=a.target,this.text=a.text,this.trigger=a.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var a=this,b="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return a.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[b?"right":"left"]="-9999px";var c=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=c+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,e["default"])(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,e["default"])(this.target),this.copyText()}},{key:"copyText",value:function(){var a=void 0;try{a=document.execCommand(this.action)}catch(b){a=!1}this.handleResult(a)}},{key:"handleResult",value:function(a){this.emitter.emit(a?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=a,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(a){if(void 0!==a){if(!a||"object"!==("undefined"==typeof a?"undefined":f(a))||1!==a.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&a.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(a.hasAttribute("readonly")||a.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=a}},get:function(){return this._target}}]),a}();a.exports=h})},{select:5}],8:[function(b,c,d){!function(e,f){if("function"==typeof a&&a.amd)a(["module","./clipboard-action","tiny-emitter","good-listener"],f);else if("undefined"!=typeof d)f(c,b("./clipboard-action"),b("tiny-emitter"),b("good-listener"));else{var g={exports:{}};f(g,e.clipboardAction,e.tinyEmitter,e.goodListener),e.clipboard=g.exports}}(this,function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a,b){var c="data-clipboard-"+a;if(b.hasAttribute(c))return b.getAttribute(c)}var j=e(b),k=e(c),l=e(d),m=function(){function a(a,b){for(var c=0;c0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof a.action?a.action:this.defaultAction,this.target="function"==typeof a.target?a.target:this.defaultTarget,this.text="function"==typeof a.text?a.text:this.defaultText}},{key:"listenClick",value:function(a){var b=this;this.listener=(0,l["default"])(a,"click",function(a){return b.onClick(a)})}},{key:"onClick",value:function(a){var b=a.delegateTarget||a.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new j["default"]({action:this.action(b),target:this.target(b),text:this.text(b),trigger:b,emitter:this})}},{key:"defaultAction",value:function(a){return i("action",a)}},{key:"defaultTarget",value:function(a){var b=i("target",a);if(b)return document.querySelector(b)}},{key:"defaultText",value:function(a){return i("text",a)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],b="string"==typeof a?[a]:a,c=!!document.queryCommandSupported;return b.forEach(function(a){c=c&&!!document.queryCommandSupported(a)}),c}}]),b}(k["default"]);a.exports=n})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)})}catch(e){!function(a){a.fn.zclip=function(b){if("object"==typeof b&&!b.length){var c=a.extend({path:"ZeroClipboard.swf",copy:null,beforeCopy:null,afterCopy:null,clickAfter:!0,setHandCursor:!0,setCSSEffects:!0},b);return this.each(function(){var b=a(this);if(b.is(":visible")&&("string"==typeof c.copy||a.isFunction(c.copy))){ZeroClipboard.setMoviePath(c.path);var d=new ZeroClipboard.Client;a.isFunction(c.copy)&&b.bind("zClip_copy",c.copy),a.isFunction(c.beforeCopy)&&b.bind("zClip_beforeCopy",c.beforeCopy),a.isFunction(c.afterCopy)&&b.bind("zClip_afterCopy",c.afterCopy),d.setHandCursor(c.setHandCursor),d.setCSSEffects(c.setCSSEffects),d.addEventListener("mouseOver",function(a){b.trigger("mouseenter")}),d.addEventListener("mouseOut",function(a){b.trigger("mouseleave")}),d.addEventListener("mouseDown",function(e){b.trigger("mousedown"),a.isFunction(c.copy)?d.setText(b.triggerHandler("zClip_copy")):d.setText(c.copy),a.isFunction(c.beforeCopy)&&b.trigger("zClip_beforeCopy")}),d.addEventListener("complete",function(d,e){a.isFunction(c.afterCopy)?b.trigger("zClip_afterCopy"):(e.length>500&&(e=e.substr(0,500)+"...\n\n("+(e.length-500)+" characters not shown)"),b.removeClass("hover"),alert("Copied text to clipboard:\n\n "+e)),c.clickAfter&&b.trigger("click")}),d.glue(b[0],b.parent()[0]),a(window).bind("load resize",function(){d.reposition()})}})}if("string"==typeof b)return this.each(function(){var c=a(this);b=b.toLowerCase();var d=c.data("zclipId"),e=a("#"+d+".zclip");"remove"==b?(e.remove(),c.removeClass("active hover")):"hide"==b?(e.hide(),c.removeClass("active hover")):"show"==b&&e.show()})}}(jQuery);var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){return"string"==typeof a&&(a=document.getElementById(a)),a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a),this.className+=" "+a},a.removeClass=function(a){for(var b=this.className.split(/\s+/),c=-1,d=0;d-1&&(b.splice(c,1),this.className=b.join(" ")),this},a.hasClass=function(a){return!!this.className.match(new RegExp("\\s*"+a+"\\s*"))}),a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,c){var d=this.clients[a];d&&d.receiveEvent(b,c)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a,b){var c={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};return a&&a!=b&&(c.left+=a.offsetLeft,c.top+=a.offsetTop),c},Client:function(a){this.handlers={},this.id=ZeroClipboard.nextId++,this.movieId="ZeroClipboardMovie_"+this.id,ZeroClipboard.register(this.id,this),a&&this.glue(a)}};ZeroClipboard.Client.prototype={id:0,ready:!1,movie:null,clipText:"",handCursorEnabled:!0,cssEffects:!0,handlers:null,glue:function(a,b,c){this.domElement=ZeroClipboard.$(a);var d=99;this.domElement.style.zIndex&&(d=parseInt(this.domElement.style.zIndex,10)+1),"string"==typeof b?b=ZeroClipboard.$(b):"undefined"==typeof b&&(b=document.getElementsByTagName("body")[0]);var e=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div"),this.div.className="zclip",this.div.id="zclip-"+this.movieId,$(this.domElement).data("zclipId","zclip-"+this.movieId);var f=this.div.style;if(f.position="absolute",f.left=""+e.left+"px",f.top=""+e.top+"px",f.width=""+e.width+"px",f.height=""+e.height+"px",f.zIndex=d,"object"==typeof c)for(addedStyle in c)f[addedStyle]=c[addedStyle];b.appendChild(this.div),this.div.innerHTML=this.getHTML(e.width,e.height)},getHTML:function(a,b){var c="",d="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+=''}else c+='';return c},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide(),this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null,this.div=null}},reposition:function(a){if(a&&(this.domElement=ZeroClipboard.$(a),this.domElement||this.hide()),this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement),c=this.div.style;c.left=""+b.left+"px",c.top=""+b.top+"px"}},setText:function(a){this.clipText=a,this.ready&&this.movie.setText(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,""),this.handlers[a]||(this.handlers[a]=[]),this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a,this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){switch(a=a.toString().toLowerCase().replace(/^on/,"")){case"load":if(this.movie=document.getElementById(this.movieId),!this.movie){var c=this;return void setTimeout(function(){c.receiveEvent("load",null)},1)}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;return setTimeout(function(){c.receiveEvent("load",null)},100),void(this.ready=!0)}this.ready=!0;try{this.movie.setText(this.clipText)}catch(d){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(d){}break;case"mouseover":this.domElement&&this.cssEffects&&(this.domElement.addClass("hover"),this.recoverActive&&this.domElement.addClass("active"));break;case"mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0),this.domElement.removeClass("hover"));break;case"mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case"mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var e=0,f=this.handlers[a].length;e=0&&(0|a)<=255},d=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:c,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:32,height:20});BI.each(d,function(b,c){c.on(BI.TextEditor.EVENT_CHANGE,function(){a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=d[0],this.G=d[1],this.B=d[2],this.none=BI.createWidget({type:"bi.checkbox",title:BI.i18nText("BI-Basic_Auto")}),this.none.on(BI.Checkbox.EVENT_CHANGE,function(){this.isSelected()?(a.lastColor=a.getValue(),a.setValue("")):a.setValue(a.lastColor||"#000000"),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))}),this.transparent=BI.createWidget({type:"bi.checkbox",title:BI.i18nText("BI-Transparent_Color")}),this.transparent.on(BI.Checkbox.EVENT_CHANGE,function(){this.isSelected()?(a.lastColor=a.getValue(),a.setValue("transparent")):a.setValue(a.lastColor||"#000000"),a.R.isValid()&&a.G.isValid()&&a.B.isValid()&&(a.colorShow.element.css("background-color",a.getValue()),a.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.colorShow,width:"fill"},{el:b[0],lgap:10,width:16},{el:this.R,width:32},{el:b[1],lgap:10,width:16},{el:this.G,width:32},{el:b[2],lgap:10,width:16},{el:this.B,width:32},{el:{type:"bi.center_adapt",items:[this.none]},width:18},{el:{type:"bi.center_adapt",items:[this.transparent]},width:18}]})},setValue:function(a){if("transparent"===a)return this.transparent.setSelected(!0),this.none.setSelected(!1),this.R.setValue(""),this.G.setValue(""),void this.B.setValue("");a?this.none.setSelected(!1):(a="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this.colorShow.element.css("background-color",a);var b=BI.DOM.rgb2json(BI.DOM.hex2rgb(a));this.R.setValue(BI.isNull(b.r)?"":b.r),this.G.setValue(BI.isNull(b.g)?"":b.g),this.B.setValue(BI.isNull(b.b)?"":b.b)},getValue:function(){return this.transparent.isSelected()?"transparent":BI.DOM.rgb2hex(BI.DOM.json2rgb({r:this.R.getValue(),g:this.G.getValue(),b:this.B.getValue()}))}}),BI.ColorPickerEditor.EVENT_CHANGE="ColorPickerEditor.EVENT_CHANGE",BI.shortcut("bi.color_picker_editor",BI.ColorPickerEditor),BI.Farbtastic=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Farbtastic.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-farbtastic",width:195,height:195})},_init:function(){BI.Farbtastic.superclass._init.apply(this,arguments)},mounted:function(){var a=this;this.farbtastic=$.farbtastic(this.element,function(b){a.fireEvent(BI.Farbtastic.EVENT_CHANGE,a.getValue(),a)})},setValue:function(a){this.farbtastic.setColor(a)},getValue:function(){return this.farbtastic.color}}),BI.Farbtastic.EVENT_CHANGE="Farbtastic.EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic),jQuery.fn.farbtastic=function(a){return $.farbtastic(this,a),this},jQuery.farbtastic=function(a,b){var a=$(a).get(0);return a.farbtastic||(a.farbtastic=new jQuery._farbtastic(a,b))},jQuery._farbtastic=function(a,b){var c=this;$(a).html('
    ');var d=$(".farbtastic",a);c.wheel=$(".wheel",a).get(0),c.radius=84,c.square=100,c.width=194,navigator.appVersion.match(/MSIE [0-6]\./)&&$("*",d).each(function(){if("none"!=this.currentStyle.backgroundImage){var a=this.currentStyle.backgroundImage;a=this.currentStyle.backgroundImage.substring(5,a.length-2),$(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+a+"')"})}}),c.linkTo=function(a){return"object"==typeof c.callback&&$(c.callback).unbind("keyup",c.updateValue),c.color=null,"function"==typeof a?c.callback=a:"object"!=typeof a&&"string"!=typeof a||(c.callback=$(a),c.callback.bind("keyup",c.updateValue),c.callback.get(0).value&&c.setColor(c.callback.get(0).value)),this},c.updateValue=function(a){this.value&&this.value!=c.color&&c.setColor(this.value)},c.setColor=function(a){var b=c.unpack(a);return c.color!=a&&b&&(c.color=a,c.rgb=b,c.hsl=c.RGBToHSL(c.rgb),c.updateDisplay()),this},c.setHSL=function(a){return c.hsl=a,c.rgb=c.HSLToRGB(a),c.color=c.pack(c.rgb),c.updateDisplay(),this},c.widgetCoords=function(a){var b,d,e=a.target||a.srcElement,f=c.wheel;if("undefined"!=typeof a.offsetX){for(var g={x:a.offsetX,y:a.offsetY},h=e;h;)h.mouseX=g.x,h.mouseY=g.y,g.x+=h.offsetLeft,g.y+=h.offsetTop,h=h.offsetParent;for(var h=f,i={x:0,y:0};h;){if("undefined"!=typeof h.mouseX){b=h.mouseX-i.x,d=h.mouseY-i.y;break}i.x+=h.offsetLeft,i.y+=h.offsetTop,h=h.offsetParent}for(h=e;h;)h.mouseX=void 0,h.mouseY=void 0,h=h.offsetParent}else{var g=c.absolutePosition(f);b=(a.pageX||0*(a.clientX+$("html").get(0).scrollLeft))-g.x,d=(a.pageY||0*(a.clientY+$("html").get(0).scrollTop))-g.y}return{x:b-c.width/2,y:d-c.width/2}},c.click=function(a){var b=c.widgetCoords(a);return c.circleDrag=2*Math.max(Math.abs(b.x),Math.abs(b.y))>c.square,c.mousemove(a),!1},c.mousemove=function(a){var b=c.widgetCoords(a);if(c.circleDrag){var d=Math.atan2(b.x,-b.y)/6.28;d<0&&(d+=1),c.setHSL([d,c.hsl[1],c.hsl[2]])}else{var e=Math.max(0,Math.min(1,-(b.x/c.square)+.5)),f=Math.max(0,Math.min(1,-(b.y/c.square)+.5));c.setHSL([c.hsl[0],e,f])}return!1},c.updateDisplay=function(){var a=6.28*c.hsl[0];$(".h-marker",d).css({left:Math.round(Math.sin(a)*c.radius+c.width/2)+"px",top:Math.round(-Math.cos(a)*c.radius+c.width/2)+"px"}),$(".sl-marker",d).css({left:Math.round(c.square*(.5-c.hsl[1])+c.width/2)+"px",top:Math.round(c.square*(.5-c.hsl[2])+c.width/2)+"px"}),$(".color",d).css("backgroundColor",c.pack(c.HSLToRGB([c.hsl[0],1,.5]))),"object"==typeof c.callback?($(c.callback).css({backgroundColor:c.color,color:c.hsl[2]>.5?"#000":"#fff"}),$(c.callback).each(function(){this.value&&this.value!=c.color&&(this.value=c.color)})):"function"==typeof c.callback&&c.callback.call(c,c.color); +},c.absolutePosition=function(a){var b={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var d=c.absolutePosition(a.offsetParent);b.x+=d.x,b.y+=d.y}return b},c.pack=function(a){var b=Math.round(255*a[0]),c=Math.round(255*a[1]),d=Math.round(255*a[2]);return"#"+(b<16?"0":"")+b.toString(16)+(c<16?"0":"")+c.toString(16)+(d<16?"0":"")+d.toString(16)},c.unpack=function(a){return 7==a.length?[parseInt("0x"+a.substring(1,3))/255,parseInt("0x"+a.substring(3,5))/255,parseInt("0x"+a.substring(5,7))/255]:4==a.length?[parseInt("0x"+a.substring(1,2))/15,parseInt("0x"+a.substring(2,3))/15,parseInt("0x"+a.substring(3,4))/15]:void 0},c.HSLToRGB=function(a){var b,c,d=a[0],e=a[1],f=a[2];return c=f<=.5?f*(e+1):f+e-f*e,b=2*f-c,[this.hueToRGB(b,c,d+.33333),this.hueToRGB(b,c,d),this.hueToRGB(b,c,d-.33333)]},c.hueToRGB=function(a,b,c){return c=c<0?c+1:c>1?c-1:c,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(.66666-c)*6:a},c.RGBToHSL=function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,g=(b+c)/2,f=0,g>0&&g<1&&(f=d/(g<.5?2*g:2-2*g)),e=0,d>0&&(c==h&&c!=i&&(e+=(i-j)/d),c==i&&c!=j&&(e+=2+(j-h)/d),c==j&&c!=h&&(e+=4+(h-i)/d),e/=6),[e,f,g]},$("*",d).click(c.click),c.setColor("#000000"),b&&c.linkTo(b)},BI.BubbleCombo=BI.inherit(BI.Widget,{_const:{TRIANGLE_LENGTH:6},_defaultConfig:function(){return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-bubble-combo",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!1,destroyWhenHide:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopPropagation:!1,adjustLength:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{}})},_init:function(){BI.BubbleCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,destroyWhenHide:b.destroyWhenHide,isNeedAdjustHeight:b.isNeedAdjustHeight,isNeedAdjustWidth:b.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:b.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:b.hideChecker,offsetStyle:b.offsetStyle,el:b.el,popup:BI.extend({type:"bi.bubble_popup_view"},b.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){a.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){a.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){a.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){a._showTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a._hideTriangle(),a.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(a){var b={},c={},d=this.options.adjustLength,e=this.element.offset(),f=e.left,g=e.left+this.element.outerWidth(),h=e.top,i=e.top+this.element.outerHeight();switch(a){case"left":b={top:h,height:this.element.outerHeight(),left:f-d-this._const.TRIANGLE_LENGTH},c={width:this._const.TRIANGLE_LENGTH};break;case"right":b={top:h,height:this.element.outerHeight(),left:g+d},c={width:this._const.TRIANGLE_LENGTH};break;case"top":b={left:f,width:this.element.outerWidth(),top:h-d-this._const.TRIANGLE_LENGTH},c={height:this._const.TRIANGLE_LENGTH};break;case"bottom":b={left:f,width:this.element.outerWidth(),top:i+d},c={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(c,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+a+" bi-high-light-border"}]}),b.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var a=this.combo.getPopupPosition();switch(a.dir){case"left,top":case"left,bottom":this._createLeftTriangle(),this.combo.getView().showLine("right");break;case"right,top":case"right,bottom":this._createRightTriangle(),this.combo.getView().showLine("left");break;case"top,left":case"top,right":this._createTopTriangle(),this.combo.getView().showLine("bottom");break;case"bottom,left":case"bottom,right":this._createBottomTriangle(),this.combo.getView().showLine("top")}},_hideTriangle:function(){this.triangle&&this.triangle.destroy(),this.triangle=null,this.combo.getView()&&this.combo.getView().hideLine()},hideView:function(){this._hideTriangle(),this.combo&&this.combo.hideView()},showView:function(){this.combo&&this.combo.showView()},isViewVisible:function(){return this.combo.isViewVisible()}}),BI.BubbleCombo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.BubbleCombo.EVENT_CHANGE="EVENT_CHANGE",BI.BubbleCombo.EVENT_EXPAND="EVENT_EXPAND",BI.BubbleCombo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.BubbleCombo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.BubbleCombo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.BubbleCombo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.bubble_combo",BI.BubbleCombo),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:a.baseCls+" bi-bubble-popup-view"})},_init:function(){BI.BubblePopupView.superclass._init.apply(this,arguments)},showLine:function(a){var b={},c={};switch(a){case"left":b={top:0,bottom:0,left:-1},c={width:3};break;case"right":b={top:0,bottom:0,right:-1},c={width:3};break;case"top":b={left:0,right:0,top:-1},c={height:3};break;case"bottom":b={left:0,right:0,bottom:-1},c={height:3}}this.line=BI.createWidget(c,{type:"bi.layout",cls:"bubble-popup-line bi-high-light-background"}),b.el=this.line,BI.createWidget({type:"bi.absolute",element:this,items:[b]})},hideLine:function(){this.line&&this.line.destroy()}}),BI.shortcut("bi.bubble_popup_view",BI.BubblePopupView),BI.BubblePopupBarView=BI.inherit(BI.BubblePopupView,{_defaultConfig:function(){return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-bubble-bar-popup-view",buttons:[{value:BI.i18nText(BI.i18nText("BI-Basic_Sure"))},{value:BI.i18nText("BI-Basic_Cancel"),level:"ignore"}]})},_init:function(){BI.BubblePopupBarView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this,c=[];return BI.each(a.buttons.reverse(),function(a,d){BI.isWidget(d)?c.push(d):c.push(BI.extend({type:"bi.button",height:30,handler:function(a){b.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,a)}},d))}),BI.createWidget({type:"bi.right_vertical_adapt",height:40,hgap:10,bgap:10,items:c})}}),BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.bubble_bar_popup_view",BI.BubblePopupBarView),BI.EditorIconCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-check-editor-combo",width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:""})},_init:function(){BI.EditorIconCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:b.items,height:b.height,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){a.popup.setValue(this.getValue()),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.editorIconCheckCombo.hideView(),a.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.editorIconCheckCombo.setValue(a)},getValue:function(){return this.trigger.getValue()},populate:function(a){this.options.items=a,this.editorIconCheckCombo.populate(a)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),BI.IconCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-combo",width:24,height:24,iconClass:"",el:{},popup:{},minWidth:100,maxWidth:"auto",maxHeight:300,direction:"bottom",adjustLength:3,adjustXOffset:0,adjustYOffset:0,offsetStyle:"left",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.icon_combo_trigger",iconClass:b.iconClass,title:b.title,items:b.items,width:b.width,height:b.height,iconWidth:b.iconWidth,iconHeight:b.iconHeight}),this.popup=BI.createWidget(b.popup,{type:"bi.icon_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.iconCombo.hideView(),a.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:b.direction,trigger:b.trigger,container:b.container,adjustLength:b.adjustLength,adjustXOffset:b.adjustXOffset,adjustYOffset:b.adjustYOffset,offsetStyle:b.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(a){this.iconCombo.setValue(a)},getValue:function(){return this.iconCombo.getValue()},populate:function(a){this.options.items=a,this.iconCombo.populate(a)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),BI.IconComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi.icon-combo-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:30}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},populate:function(a){BI.IconComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:30}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup),BI.IconComboTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-combo-trigger",el:{},items:[],iconClass:"",width:25,height:25,isShowDown:!0})},_init:function(){BI.IconComboTrigger.superclass._init.apply(this,arguments);var a=this.options;this.button=BI.createWidget(a.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon "+a.iconClass,disableSelected:!0,width:a.width,height:a.height,iconWidth:a.iconWidth,iconHeight:a.iconHeight}),this.down=BI.createWidget({type:"bi.icon_button",disableSelected:!0,cls:"icon-combo-down-icon trigger-triangle-font",width:12,height:8}),this.down.setVisible(a.isShowDown),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.button,left:0,right:0,top:0,bottom:0},{el:this.down,right:0,bottom:0}]}),BI.isKey(a.value)&&this.setValue(a.value)},populate:function(a){var b=this.options;this.options.items=a||[],this.button.setIcon(b.iconClass),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(a){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var b=this.options,c="";a=BI.isArray(a)?a[0]:a,BI.any(this.options.items,function(b,d){if(a===d.value)return c=d.iconClass,!0})?(this.button.setIcon(c),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(b.iconClass),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger),BI.IconTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-icon-text-value-combo",height:30,value:"",el:{}})},_init:function(){BI.IconTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.select_icon_text_trigger",items:b.items,height:b.height,value:b.value}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:b.items}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setValue:function(a){this.textIconCombo.setValue(a)},getValue:function(){return this.textIconCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo),BI.IconTextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-text-icon-popup"})},_init:function(){BI.IconTextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_icon_text_item",height:30}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},populate:function(a){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_icon_text_item",height:30}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup),BI.StaticCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-static-combo",height:24,text:"",el:{},items:[],chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.StaticCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.text_icon_item",cls:"bi-select-text-trigger bi-border pull-down-font",text:b.text,readonly:!0,textLgap:5,height:b.height-2}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",textAlign:b.textAlign,chooseType:b.chooseType,items:b.items}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.combo.hideView(),a.fireEvent(BI.StaticCombo.EVENT_CHANGE,arguments)}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}})},populate:function(a){this.combo.populate(a)},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()}}),BI.StaticCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_combo",BI.StaticCombo),BI.TextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-text-value-check-combo",width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:""})},_init:function(){BI.TextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",items:b.items,height:b.height}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCheckCombo.hideView(),a.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setTitle:function(a){this.trigger.setTitle(a)},setValue:function(a){this.textIconCheckCombo.setValue(a)},setWarningTitle:function(a){this.trigger.setWarningTitle(a)},getValue:function(){return this.textIconCheckCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCheckCombo.populate(a)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo),BI.SmallTextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:""})},_init:function(){BI.SmallTextValueCheckCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextIconCheckCombo.hideView(),a.fireEvent(BI.SmallTextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextIconCheckCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextIconCheckCombo.setValue(a)},getValue:function(){return this.SmallTextIconCheckCombo.getValue()},populate:function(a){this.options.items=a,this.SmallTextIconCheckCombo.populate(a)}}),BI.SmallTextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_check_combo",BI.SmallTextValueCheckCombo),BI.TextValueCheckComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueCheckComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(a.items),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_formatItems:function(a){return BI.map(a,function(a,b){return BI.extend({type:"bi.icon_text_item",cls:"item-check-font bi-list-item",height:30},b)})},populate:function(a){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(a))},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup),BI.TextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-text-value-combo",height:30,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:"",el:{}})},_init:function(){BI.TextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.select_text_trigger",items:b.items,height:b.height}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.textIconCombo.hideView(),a.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(b.value)&&this.setValue(b.value)},setValue:function(a){this.textIconCombo.setValue(a)},getValue:function(){return this.textIconCombo.getValue()},populate:function(a){this.options.items=a,this.textIconCombo.populate(a)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el,{type:"bi.small_select_text_trigger",items:b.items,height:b.height,text:b.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:b.chooseType,items:b.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.SmallTextValueCombo.hideView(),a.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(a){this.SmallTextValueCombo.setValue(a)},getValue:function(){return this.SmallTextValueCombo.getValue()},populate:function(a){this.options.items=a,this.SmallTextValueCombo.populate(a)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var a=this.options,b=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(a.items,{type:"bi.single_select_item",textAlign:a.textAlign,height:30}),chooseType:a.chooseType,layouts:[{type:"bi.vertical"}]}),this.popup.on(BI.Controller.EVENT_CHANGE,function(a,c,d){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,c,d)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},populate:function(a){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),a=BI.createItems(a,{type:"bi.single_select_item",height:30}),this.popup.populate(a)},getValue:function(){return this.popup.getValue()},setValue:function(a){this.popup.setValue(a)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),BI.TextValueDownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-value-down-list-combo",height:30})},_init:function(){BI.TextValueDownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this._createValueMap(),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",height:b.height,items:b.items}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:b.height,el:this.trigger,items:BI.deepClone(b.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){a.setValue(a.combo.getValue()[0].value),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE)}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){a.setValue(a.combo.getValue()[0].childValue),a.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE)})},_createValueMap:function(){var a=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(b,c){BI.has(c,"el")?BI.each(c.children,function(b,d){a.valueMap[d.value]={value:c.el.value,childValue:d.value}}):a.valueMap[c.value]={value:c.value}})},setValue:function(a){a=this.valueMap[a],this.combo.setValue([a]),this.trigger.setValue(a.childValue||a.value)},getValue:function(){var a=this.combo.getValue()[0];return[a.childValue||a.value]},populate:function(a){this.options.items=BI.flatten(a),this.combo.populate(a),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:a.height,items:this._formatItemArray(a.items),text:a.text})},_formatItemArray:function(){var a=BI.flatten(BI.deepClone(this.options.items)),b=[];return BI.each(a,function(a,c){BI.has(c,"el")?(BI.each(c.children,function(a,b){b.text=c.el.text+"("+b.text+")"}),b=BI.concat(b,c.children)):b.push(c)}),b},setValue:function(a){this.trigger.setValue(a)},populate:function(a){this.trigger.populate(this._formatItemArray(a))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.ClearEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ClearEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isValid:function(){return this.editor.isValid()}}),BI.ClearEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ClearEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ClearEditor.EVENT_BLUR="EVENT_BLUR",BI.ClearEditor.EVENT_CLICK="EVENT_CLICK",BI.ClearEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ClearEditor.EVENT_SPACE="EVENT_SPACE",BI.ClearEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.ClearEditor.EVENT_CLEAR="EVENT_CLEAR",BI.ClearEditor.EVENT_START="EVENT_START",BI.ClearEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ClearEditor.EVENT_STOP="EVENT_STOP",BI.ClearEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ClearEditor.EVENT_VALID="EVENT_VALID",BI.ClearEditor.EVENT_ERROR="EVENT_ERROR",BI.ClearEditor.EVENT_ENTER="EVENT_ENTER",BI.ClearEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ClearEditor.EVENT_REMOVE="EVENT_REMOVE",BI.ClearEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.clear_editor",BI.ClearEditor),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-shelter-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0, +watermark:"",errorText:"",height:24,textAlign:"left"})},_init:function(){BI.ShelterEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:b.textAlign,height:b.height,hgap:4}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.text.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setTextStyle:function(a){this.text.setStyle(a)},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),BI.ShelterEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ShelterEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ShelterEditor.EVENT_BLUR="EVENT_BLUR",BI.ShelterEditor.EVENT_CLICK="EVENT_CLICK",BI.ShelterEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ShelterEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.ShelterEditor.EVENT_START="EVENT_START",BI.ShelterEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ShelterEditor.EVENT_STOP="EVENT_STOP",BI.ShelterEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ShelterEditor.EVENT_VALID="EVENT_VALID",BI.ShelterEditor.EVENT_ERROR="EVENT_ERROR",BI.ShelterEditor.EVENT_ENTER="EVENT_ENTER",BI.ShelterEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ShelterEditor.EVENT_SPACE="EVENT_SPACE",BI.ShelterEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.shelter_editor",BI.ShelterEditor),BI.SignInitialEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignInitialEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",value:"",text:"",height:24})},_init:function(){BI.SignInitialEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignInitialEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignInitialEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignInitialEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignInitialEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignInitialEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignInitialEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignInitialEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignInitialEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignInitialEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignInitialEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignInitialEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+"("+a.text+")",this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){var b=this.options;this.editor.setValue(a.value),b.text=a.text||b.text,this._checkText()},getValue:function(){return{value:this.editor.getValue(),text:this.options.text}},getState:function(){return this.text.getValue()},setState:function(a){var b=this.options;this._showHint(),a=BI.isEmpty(a)||a==b.text?b.text:a+"("+b.text+")",this.text.setValue(a)}}),BI.SignInitialEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignInitialEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignInitialEditor.EVENT_BLUR="EVENT_BLUR",BI.SignInitialEditor.EVENT_CLICK="EVENT_CLICK",BI.SignInitialEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignInitialEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignInitialEditor.EVENT_START="EVENT_START",BI.SignInitialEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignInitialEditor.EVENT_STOP="EVENT_STOP",BI.SignInitialEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignInitialEditor.EVENT_VALID="EVENT_VALID",BI.SignInitialEditor.EVENT_ERROR="EVENT_ERROR",BI.SignInitialEditor.EVENT_ENTER="EVENT_ENTER",BI.SignInitialEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignInitialEditor.EVENT_SPACE="EVENT_SPACE",BI.SignInitialEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_initial_editor",BI.SignInitialEditor),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24})},_init:function(){BI.SignEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText(),a.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){this._showHint(),this.text.setValue(a)}}),BI.SignEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignEditor.EVENT_BLUR="EVENT_BLUR",BI.SignEditor.EVENT_CLICK="EVENT_CLICK",BI.SignEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignEditor.EVENT_START="EVENT_START",BI.SignEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignEditor.EVENT_STOP="EVENT_STOP",BI.SignEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignEditor.EVENT_VALID="EVENT_VALID",BI.SignEditor.EVENT_ERROR="EVENT_ERROR",BI.SignEditor.EVENT_ENTER="EVENT_ENTER",BI.SignEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignEditor.EVENT_SPACE="EVENT_SPACE",BI.SignEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_editor",BI.SignEditor),BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text bi-disabled",textAlign:"left",height:b.height,text:BI.i18nText("BI-Basic_Unrestricted"),hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this.options.disabled===!1&&(this._showInput(),this.editor.focus())},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){return BI.StateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Select_All")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.setTitle(""),this.text.element.addClass("state-editor-infinite-text"))):BI.isString(a)?(this.text.setText(a),this.text.setTitle(a),void this.text.element.removeClass("state-editor-infinite-text")):void(BI.isArray(a)&&(BI.isEmpty(a)?(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text")):1===a.length?(this.text.setText(a[0]),this.text.setTitle(a[0]),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Select_Part")),this.text.setTitle(""),this.text.element.removeClass("state-editor-infinite-text"))))}}),BI.StateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.StateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.StateEditor.EVENT_BLUR="EVENT_BLUR",BI.StateEditor.EVENT_CLICK="EVENT_CLICK",BI.StateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.StateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.StateEditor.EVENT_START="EVENT_START",BI.StateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.StateEditor.EVENT_STOP="EVENT_STOP",BI.StateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.StateEditor.EVENT_VALID="EVENT_VALID",BI.StateEditor.EVENT_ERROR="EVENT_ERROR",BI.StateEditor.EVENT_ENTER="EVENT_ENTER",BI.StateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.StateEditor.EVENT_SPACE="EVENT_SPACE",BI.StateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.state_editor",BI.StateEditor),BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-simple-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,mouseOut:!1,allowBlank:!0,watermark:"",errorText:"",height:24})},_init:function(){BI.SimpleStateEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"state-editor-infinite-text bi-disabled",textAlign:"left",height:b.height,text:BI.i18nText("BI-Basic_Unrestricted"),hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(a){return BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(a)?void(a===BI.Selection.All?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):a===BI.Selection.Multi?(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text"))):void(BI.isArray(a)&&1!==a.length?BI.isEmpty(a)?(this.text.setText(BI.i18nText("BI-Basic_Unrestricted")),this.text.element.addClass("state-editor-infinite-text")):(this.text.setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("state-editor-infinite-text")):(this.text.setText(a),this.text.setTitle(a),this.text.element.removeClass("state-editor-infinite-text")))}}),BI.SimpleStateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SimpleStateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SimpleStateEditor.EVENT_BLUR="EVENT_BLUR",BI.SimpleStateEditor.EVENT_CLICK="EVENT_CLICK",BI.SimpleStateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SimpleStateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SimpleStateEditor.EVENT_START="EVENT_START",BI.SimpleStateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SimpleStateEditor.EVENT_STOP="EVENT_STOP",BI.SimpleStateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SimpleStateEditor.EVENT_VALID="EVENT_VALID",BI.SimpleStateEditor.EVENT_ERROR="EVENT_ERROR",BI.SimpleStateEditor.EVENT_ENTER="EVENT_ENTER",BI.SimpleStateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SimpleStateEditor.EVENT_SPACE="EVENT_SPACE",BI.SimpleStateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.simple_state_editor",BI.SimpleStateEditor),BI.BarPopoverSection=BI.inherit(BI.PopoverSection,{_defaultConfig:function(){return BI.extend(BI.BarPopoverSection.superclass._defaultConfig.apply(this,arguments),{btns:[BI.i18nText(BI.i18nText("BI-Basic_Sure")),BI.i18nText(BI.i18nText("BI-Basic_Cancel"))]})},_init:function(){BI.BarPopoverSection.superclass._init.apply(this,arguments)},rebuildSouth:function(a){var b=this,c=this.options;this.sure=BI.createWidget({type:"bi.button",text:this.options.btns[0],warningTitle:c.warningTitle,height:30,value:0,handler:function(a){b.end(),b.close(a)}}),this.cancel=BI.createWidget({type:"bi.button",text:this.options.btns[1],height:30,value:1,level:"ignore",handler:function(a){b.close(a)}}),BI.createWidget({type:"bi.right_vertical_adapt",element:a,lgap:10,items:[this.cancel,this.sure]})},setConfirmButtonEnable:function(a){this.sure.setEnable(!!a)}}),BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var a=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var a=this.options,b=this;if(0!==a.buttons.length){var c=[];return BI.each(a.buttons,function(a,b){c.push({text:b,value:a})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-border-top",height:30,items:BI.createItems(c,{type:"bi.text_button",once:!1,shadow:!0,isShadowShowingOnSelected:!0}),layouts:[{type:"bi.center",hgap:0,vgap:0}]}),this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE,function(a,c){b.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,a,c)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var a=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var a=this,b=this.options,c=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return c.on(BI.IconButton.EVENT_CHANGE,function(){a.setVisible(!1),a.fireEvent(BI.PopupPanel.EVENT_CLOSE)}),BI.createWidget({type:"bi.htape",cls:"popup-panel-title bi-background bi-border",height:25,items:[{el:{type:"bi.label",textAlign:"left",text:b.title,height:25,lgap:10}},{el:c,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var a=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-list-pane",logic:{dynamic:!0},lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.button_group"}})},_init:function(){BI.ListPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget(b.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:b.items,itemsCreator:function(c,d){1===c.times&&(a.empty(),BI.nextTick(function(){a.loading()})),b.itemsCreator(c,function(){d.apply(a,arguments),1===c.times&&BI.nextTick(function(){a.loaded()})})},hasNext:b.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.ListPane.EVENT_CHANGE,c,d)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,vgap:b.vgap,hgap:b.hgap},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)}))))},hasPrev:function(){return this.button_group.hasPrev&&this.button_group.hasPrev(); +},hasNext:function(){return this.button_group.hasNext&&this.button_group.hasNext()},prependItems:function(a){this.options.items=a.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(a){this.options.items=this.options.items.concat(a),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(a){a=a||[],BI.removeAt(this.options.items,a),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(a){var b=this;this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");b.populate.apply(b,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void this.button_group.populate.apply(this.button_group,arguments))},empty:function(){this.button_group.empty()},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(a){return this.button_group.getIndexByValue(a)},getNodeById:function(a){return this.button_group.getNodeById(a)},getNodeByValue:function(a){return this.button_group.getNodeByValue(a)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),BI.Panel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-panel bi-border",title:"",titleButtons:[],el:{},logic:{dynamic:!1}})},_init:function(){BI.Panel.superclass._init.apply(this,arguments);var a=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var a=this,b=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:b.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:b.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.Panel.EVENT_CHANGE,b,c)}),{el:{type:"bi.left_right_vertical_adapt",cls:"panel-title bi-tips bi-border-bottom bi-background",height:30,items:{left:[this.text],right:[this.button_group]},lhgap:10,rhgap:10},height:30}},setTitle:function(a){this.text.setValue(a)}}),BI.Panel.EVENT_CHANGE="Panel.EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),BI.SelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,toolbar:{type:"bi.multi_select_bar"},el:{type:"bi.list_pane"}})},_init:function(){BI.SelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.toolbar=BI.createWidget(b.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(b,c,d){a.allSelected=this.isSelected(),b===BI.Events.CLICK&&(a.setAllSelected(a.allSelected),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar.setVisible(b&&b.length>0),a.toolbar.setEnable(b&&b.length>0)),a._checkAllSelected()})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&(a._checkAllSelected(),a.fireEvent(BI.SelectList.EVENT_CHANGE,c,d)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(b.direction,this.toolbar,this.list)})))),b.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1))},_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:""})},_init:function(){BI.RichEditorAction.superclass._init.apply(this,arguments);var a=this,b=this.options;b.editor.on(BI.NicEditor.EVENT_SELECTED,function(b){a.setEnable(!0),a.checkNodes(b.target),a.key(b)}),b.editor.on(BI.NicEditor.EVENT_BLUR,function(){a.setEnable(!1)}),b.editor.on(BI.NicEditor.EVENT_KEYDOWN,BI.bind(this.keydown,this))},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($(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),{})},_init:function(){BI.RichEditorParamAction.superclass._init.apply(this,arguments)},_isParam:function(a){return"param"===a.attr("data-type")},_createBlankNode:function(){return $("").html(" ")},_addBlank:function(a){var b=this.options,c=b.editor.selectedInstance,d=a.next();if(0===d.length||this._isParam(d)){var e=this._createBlankNode(),f=this._createBlankNode();a.before(e),a.after(f),c.setFocus(f[0])}else c.setFocus(d[0])},_get$Sel:function(){var a=this.options,b=a.editor.selectedInstance,c=$(b.selElm());return 3===c[0].nodeType&&this._isParam(c.parent())&&(c=c.parent()),c},addParam:function(a){var b=this.options,c=this._get$Sel(),d=$("").attr({"data-type":"param","data-value":a}).css({color:"white",backgroundColor:"#009de3",padding:"0 5px"}).text(a).keydown(function(a){return a.keyCode!==BI.KeyCode.BACKSPACE&&a.keyCode!==BI.KeyCode.DELETE||d.destroy(),a.stopEvent(),!1}),e=b.editor.instance.getElm().element;e.find(c).length<=0?e.append(d):c.after(d),this._addBlank(d)},keydown:function(a){var b=(this.options,this._get$Sel());return 229===a.keyCode&&this._isParam(b)?(this._addBlank(b),a.stopEvent(),!1):(BI.Key[a.keyCode]||a.keyCode===BI.KeyCode.TAB||a.keyCode===BI.KeyCode.ENTER||a.keyCode===BI.KeyCode.SPACE)&&this._isParam(b)?(a.stopEvent(),!1):a.keyCode!==BI.KeyCode.BACKSPACE&&a.keyCode!==BI.KeyCode.DELETE||!this._isParam(b)?void 0:(b.destroy(),a.preventDefault(),!1)},key:function(a){}}),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_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"})},_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()},deactivate:function(){this.colorchooser.setValue("")}}),BI.shortcut("bi.rich_editor_color_chooser",BI.RichEditorColorChooser),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,{_defaultConfig:function(){return BI.extend(BI.RichEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-rich-editor bi-card",toolbar:{}})},_init:function(){BI.RichEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.nic_editor",width:b.width,height:b.height}),this.editor.on(BI.NicEditor.EVENT_BLUR,function(){a.fireEvent(BI.RichEditor.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,toggle:!1,direction:"top,left",isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,adjustLength:1,el:this.editor,popup:{el:BI.extend({type:"bi.rich_editor_text_toolbar",editor:this.editor},b.toolbar),height:30,stopPropagation:!0,stopEvent:!0}}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){})},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.RichEditor.EVENT_CONFIRM="EVENT_CONFIRM",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",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();(!e||e>a.width-10||e<10)&&(e=(f>a.columnSize.length/2?2/3:1/3)*a.width),0===f&&(e=0),d.length>=b.length&&(d=[]),BI.isNumber(b[0])||(b=a.minColumnSize.slice());var g=0,h=0;return BI.each(b,function(a,b){a0&&(b[f-1]=BI.clamp(e-(g-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-(h-g-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=[];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,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,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}})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){a.setSelected(a.isSelected())}}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){a.setSelected(!0)}}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,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.checkbox.on(BI.Checkbox.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:36,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]}),this.half.invisible()},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._half=!!a,a===!0?(this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!!this._half},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))}}),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(){},_transformToTreeFormat:function(a){var b,c;if(!a)return[];if(BI.isArray(a)){var d=[],e=[];for(b=0,c=a.length;b0&&(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:[]})},_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),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){a=this._formatItems(BI.Tree.transformToTreeFormat(a),0),this.tree.populate(a)},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()},populate:function(a,b){a&&(this.options.items=a),this.tree.stroke({keyword:b})},setValue:function(a){a||(a=[]);var b=this,c={},d=[];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]++)}}),this.tree.setValue(BI.makeObject(a.concat(d)))},_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",cls:"bi-border-left",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})},_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",cls:"bi-border-left",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.iconClass,ref:function(b){a.icon=b},disableSelected:!0},width:b.triggerWidth||b.height},{el:this.text},{el:this.trigerButton,width:b.triggerWidth||b.height}]})},setValue:function(a){this.text.setValue(a),this.text.setTitle(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),this.text.setTitle(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})},_init:function(){this.options.height-=2,BI.SelectIconTextTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,height:a.height}),BI.isKey(a.value)&&this.setValue(a.value)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c,d=BI.Tree.transformToArrayFormat(this.options.items);BI.any(d,function(b,d){if(BI.deepContains(a,d.value))return c={text:d.text||d.value,iconClass:d.iconClass},!0}),BI.isNotNull(c)?(this.trigger.setText(c.text),this.trigger.setIcon(c.iconClass)):(this.trigger.setText(b.value),this.trigger.setIcon(""))},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.options,b=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:a.height,text:a.text,hgap:b.hgap,readonly:a.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",cls:"bi-border-left",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),this.text.setTitle(a)},setText:function(a){this.text.setText(a),this.text.setTitle(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}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?this.trigger.setText(c.join(",")):this.trigger.setText(b.text)},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;this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:a.height-2}),BI.isKey(a.text)&&this.setValue(a.text)},setValue:function(a){var b=this.options;a=BI.isArray(a)?a:[a];var c=[],d=BI.Tree.transformToArrayFormat(this.options.items);BI.each(d,function(b,d){BI.deepContains(a,d.value)&&!c.contains(d.text||d.value)&&c.push(d.text||d.value)}),c.length>0?(this.trigger.element.removeClass("bi-water-mark"),this.trigger.setText(c.join(","))):(this.trigger.element.addClass("bi-water-mark"),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:null,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",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.AdaptiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AdaptiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-adaptive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.FREE,items:[]})},_init:function(){BI.AdaptiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement",element:this,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.Arrangement.EVENT_SCROLL,function(){a.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL,arguments)}),this.zIndex=0,BI.each(b.items,function(b,c){a._initResizable(c.el)}),$(document).mousedown(function(b){BI.each(a.getAllRegions(),function(a,c){0===c.el.element.find(b.target).length&&c.el.element.removeClass("selected")})}),BI.ResizeDetector.addResizeListener(this,function(){a.arrangement.resize(),a.fireEvent(BI.AdaptiveArrangement.EVENT_RESIZE)})},_isEqual:function(){return this.arrangement._isEqual.apply(this.arrangement,arguments)},_setSelect:function(a){a.element.hasClass("selected")||(a.element.css("zIndex",++this.zIndex),BI.each(this.getAllRegions(),function(a,b){b.el.element.removeClass("selected")}),a.element.addClass("selected"))},_initResizable:function(a){var b=this;this.options;a.element.css("zIndex",++this.zIndex),a.element.mousedown(function(){b._setSelect(a)})},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},addRegion:function(a,b){this._initResizable(a.el),this._setSelect(a.el);var c,d=this.arrangement.getAllRegions();return(c=this.arrangement.addRegion(a,b))&&(this._old=d),c},deleteRegion:function(a){var b,c=this.getAllRegions();return(b=this.arrangement.deleteRegion(a))?this._old=c:(this._old=this.getAllRegions(),this.relayout()),b},setRegionSize:function(a,b){var c,d=this.getAllRegions();return(c=this.arrangement.setRegionSize(a,b))&&(this._old=d),c},setPosition:function(a,b){return this.arrangement.setPosition(a,b)},setRegionPosition:function(a,b){this.getRegionByName(a);return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){return this.arrangement.setDropPosition(a,b)},scrollInterval:function(a,b,c,d){d({offsetX:0,offsetY:0})},scrollEnd:function(){this.lastActiveRegion="",this._scrollInterval&&(clearInterval(this._scrollInterval),this._scrollInterval=null)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){this._old&&this.populate(BI.toArray(this._old))},populate:function(a){var b=this;BI.each(a,function(a,c){b._initResizable(c.el)}),this.arrangement.populate(a)}}),BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_RESIZE",BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE="AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE",BI.AdaptiveArrangement.EVENT_RESIZE="AdaptiveArrangement.EVENT_RESIZE",BI.AdaptiveArrangement.EVENT_SCROLL="AdaptiveArrangement.EVENT_SCROLL",BI.shortcut("bi.adaptive_arrangement",BI.AdaptiveArrangement),BI.ArrangementBlock=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementBlock.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-block bi-mask"})}}),BI.shortcut("bi.arrangement_block",BI.ArrangementBlock),BI.ArrangementDroppable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ArrangementDroppable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement-droppable bi-resizer"})}}),BI.shortcut("bi.arrangement_droppable",BI.ArrangementDroppable),BI.Arrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Arrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-arrangement",layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.Arrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.arrangement_droppable",cls:"arrangement-block",invisible:!0}),this.block=BI.createWidget({type:"bi.arrangement_block",invisible:!0}),this.container=BI.createWidget({type:"bi.absolute",scrollable:!0,cls:"arrangement-container",items:b.items.concat([this.block,this.arrangement])}),this.container.element.scroll(function(){a.fireEvent(BI.Arrangement.EVENT_SCROLL,{scrollLeft:a.container.element.scrollLeft(),scrollTop:a.container.element.scrollTop(),clientWidth:a.container.element[0].clientWidth,clientHeight:a.container.element[0].clientHeight})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.container,left:0,right:0,top:0,bottom:0}]}),this.regions={},b.items.length>0&&BI.nextTick(function(){a.populate(b.items)})},_calculateRegions:function(a){var b=this;this.options;this.regions={},BI.each(a,function(a,c){var d=b._createOneRegion(c);b.regions[d.id]=d})},_isEqual:function(a,b){return Math.abs(a-b)<2},_isLessThan:function(a,b){return ab&&!this._isEqual(a,b)},_isLessThanEqual:function(a,b){return a<=b||this._isEqual(a,b)},_isMoreThanEqual:function(a,b){return a>=b||this._isEqual(a,b)},_getRegionOccupied:function(a){this.options;if(BI.size(a||this.regions)<=0)return{left:0,top:0,width:0,height:0};var b=BI.MAX,c=BI.MIN,d=BI.MAX,e=BI.MIN;return BI.each(a||this.regions,function(a,f){b=Math.min(b,f.left),c=Math.max(c,f.left+f.width),d=Math.min(d,f.top),e=Math.max(e,f.top+f.height)}),{left:b,top:d,width:c-b,height:e-d}},_getCrossArea:function(a,b){if(a.left<=b.left){if(a.top<=b.top){if(a.top+a.height>b.top&&a.left+a.width>b.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(a.left+a.width,b.left)?0:(a.top+a.height-b.top)*(a.left+a.width-b.left)}else if(b.top+b.height>a.top&&a.left+a.width>b.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(a.left+a.width,b.left)?0:(b.top+b.height-a.top)*(a.left+a.width-b.left)}else if(a.top<=b.top){if(a.top+a.height>b.top&&b.left+b.width>a.left)return this._isEqual(a.top+a.height,b.top)||this._isEqual(b.left+b.width,a.left)?0:(a.top+a.height-b.top)*(b.left+b.width-a.left)}else if(b.top+b.height>a.top&&b.left+b.width>a.left)return this._isEqual(b.top+b.height,a.top)||this._isEqual(b.left+b.width,a.left)?0:(b.top+b.height-a.top)*(b.left+b.width-a.left);return 0},_isRegionOverlay:function(a){var b=[];BI.each(a||this.regions,function(a,c){b.push(new BI.Region(c.left,c.top,c.width,c.height))});for(var c=0,d=b.length;c1)return!0}return!1},_isArrangeFine:function(a){switch(this.options.layoutType){case BI.Arrangement.LAYOUT_TYPE.FREE:return!0;case BI.Arrangement.LAYOUT_TYPE.GRID:}return!0},_getRegionNames:function(a){var b=[];return BI.each(a||this.regions,function(a,c){b.push(c.id||c.attr("id"))}),b},_getRegionsByNames:function(a,b){if(a=BI.isArray(a)?a:[a],b=b||this.regions,BI.isArray(b)){var c=[];BI.each(b,function(b,d){a.contains(d.id||d.attr("id"))&&c.push(d)})}else{var c={};BI.each(a,function(a,d){c[d]=b[d]})}return c},_cloneRegion:function(a){var b={};return BI.each(a||this.regions,function(a,c){b[a]={},b[a].el=c.el,b[a].id=c.id,b[a].left=c.left,b[a].top=c.top,b[a].width=c.width,b[a].height=c.height}),b},_test:function(a){return!BI.any(a||this.regions,function(a,b){if(BI.isNaN(b.width)||BI.isNaN(b.height)||b.width<=21||b.height<=21)return!0})},_getScrollOffset:function(){return{left:this.container.element[0].scrollLeft,top:this.container.element[0].scrollTop}},_createOneRegion:function(a){var b=BI.createWidget(a.el);return b.setVisible(!0),{id:b.attr("id"),left:a.left,top:a.top,width:a.width,height:a.height,el:b}},_applyRegion:function(a){this.options;BI.each(a||this.regions,function(a,b){b.el.element.css({left:b.left,top:b.top,width:b.width,height:b.height})}),this._applyContainer(),this.ratio=this.getLayoutRatio()},_renderRegion:function(){var a=BI.toArray(this.regions);BI.each(a,function(a,b){BI.isNotNull(b.el)?b.el.options.key=b.id:b.key=b.id}),BI.isNull(this.wrapper)&&(this.wrapper=BI.createWidget({type:"bi.absolute",element:this.container})),this.wrapper.addItems(a)},getClientWidth:function(){return this.container.element[0].clientWidth},getClientHeight:function(){return this.container.element[0].clientHeight},_applyContainer:function(){var a=this._getRegionOccupied();return a},_modifyRegion:function(a){BI.each(this.regions,function(b,c){a[b]&&(c.left=a[b].left,c.top=a[b].top,c.width=a[b].width,c.height=a[b].height)})},_addRegion:function(a){var b=this._createOneRegion(a);this.regions[b.id]=b,BI.createWidget({type:"bi.absolute",element:this.container,items:[b]})},_deleteRegionByName:function(a){this.regions[a].el.setVisible(!1),delete this.regions[a]},_setArrangeSize:function(a){this.arrangement.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getOneWidthPortion:function(){return this.getClientWidth()/BI.Arrangement.PORTION},_getOneHeightPortion:function(){return this.getClientHeight()/BI.Arrangement.H_PORTION},_getGridPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion(),d=Math.round(a.width/b),e=Math.round(a.left/b),f=Math.round(a.top/c),g=Math.round(a.height/c);return 0===d&&(d=1),0===g&&(g=1),{x:e,y:f,w:d,h:g}},_getBlockPositionAndSize:function(a){var b=this._getOneWidthPortion(),c=this._getOneHeightPortion();return{left:a.x*b,top:a.y*c,width:a.w*b,height:a.h*c}},_getLayoutsByRegions:function(a){var b=this,c=[];return BI.each(a||this.regions,function(a,d){c.push(BI.extend(b._getGridPositionAndSize(d),{i:d.id}))}),c},_getLayoutIndexByName:function(a,b){return BI.findIndex(a,function(a,c){return c.i===b})},_setBlockPositionAndSize:function(a){this.block.element.css({left:a.left,top:a.top,width:a.width,height:a.height})},_getRegionsByLayout:function(a){var b=this,c={};return BI.each(a,function(a,d){c[d.i]=BI.extend(b._getBlockPositionAndSize(d),{id:d.i})}),c},_setRegionsByLayout:function(a,b){var c=this;return a||(a=this.regions),BI.each(b,function(b,d){a[d.i]&&BI.extend(a[d.i],c._getBlockPositionAndSize(d))}),a},_moveElement:function(a,b,c,d,e){function f(a,b){return BI.filter(a,function(a,c){return g._collides(c,b)})}var g=this;if(b._static)return a;if(b.y===d&&b.x===c)return a;var h=d&&b.y>d;"number"==typeof c&&(b.x=c),"number"==typeof d&&(b.y=d),b.moved=!0;var i=this._sortLayoutItemsByRowCol(a);h&&(i=i.reverse());for(var j=f(i,b),k=0,l=j.length;km.y&&b.y-m.y>m.h/4||(a=m._static?this._moveElementAwayFromCollision(a,m,b,e):this._moveElementAwayFromCollision(a,b,m,e))}return a},_sortLayoutItemsByRowCol:function(a){return[].concat(a).sort(function(a,b){return a.y>b.y||a.y===b.y&&a.x>b.x?1:-1})},_collides:function(a,b){return a!==b&&(!(a.x+a.w<=b.x)&&(!(a.x>=b.x+b.w)&&(!(a.y+a.h<=b.y)&&!(a.y>=b.y+b.h))))},_getFirstCollision:function(a,b){for(var c=0,d=a.length;c0&&!this._getFirstCollision(a,b);)b.y--;for(var d;d=this._getFirstCollision(a,b);)b.y=d.y+d.h;return b},compact:function(a,b){function c(a){return BI.filter(a,function(a,b){return b._static})}for(var d=c(a),e=this._sortLayoutItemsByRowCol(a),f=[],g=0,h=e.length;g=c.options.min&&d<=c.options.max},f=function(a){return Date.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&Date.checkLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=Date.getDate();this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=Date.getDate(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=Date.getDate(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=Date.getDate(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=Date.getDate(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=Date.getDate().getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=Date.getDate().getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=Date.getDate().getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=Date.getDate().getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=Date.getDate().getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=Date.getDate().getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=Date.getDate(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=Date.getDate(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=Date.getDate(),f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.DatePaneWidget=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DatePaneWidget.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.DatePaneWidget.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=Date.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth(),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(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),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)})},_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=Date.getDate();return{year:a.getFullYear(),month:a.getMonth()}},_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.date_pane",BI.DatePaneWidget),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,Date.getDate());this.storeValue={year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_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.popup.on(BI.DateTimePopup.CALENDAR_EVENT_CHANGE,function(){a.trigger.setValue(a.popup.getValue()),a.fireEvent(BI.DateTimeCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,maxHeight:this.constants.popupHeight,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 c=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font bi-border-right",width:24,height:24});c.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:c,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:290})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this;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}}]});var b=Date.getDate();this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds()),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=Date.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),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:BI.i18nText("BI-Please_Input_Natural_Number"),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),a0&&a[c-1].xb)return!0});return c.y}var c=this,d=(this.options,this.pathChooser.routes),e=this.pathChooser.pathes,f=this.pathChooser.cache;this.arrows={},BI.each(d,function(d,g){c.arrows[d]=[],BI.each(g,function(g,h){c.arrows[d][g]=[];var i=e[d][g];BI.each(i,function(a,b){if(a>0&&a0&&(e=c._drawOneArrow(i[a-1],3)):e=c._drawOneArrow(i[a],1)):b.x===i[a-1].x&&(e=b.y>i[a-1].y?f[BI.first(h)].direction===-1?c._drawOneArrow(i[a-1],0):c._drawOneArrow(b,2):f[h[h.length-2]].direction===-1?c._drawOneArrow(i[a-1],2):c._drawOneArrow(b,0)),e&&c.arrows[d][g].push(e)}}),BI.each(h,function(e,j){if(0!==e){var k,l=h[e-1];if(f[l].direction===-1){var m=c.pathChooser.getRegionIndexById(l),n=a(m,-1),o=b(i,n);k=c._drawOneArrow({x:n,y:o},3)}else{var m=c.pathChooser.getRegionIndexById(j),n=a(m),o=b(i,n);k=c._drawOneArrow({x:n,y:o},1)}k&&c.arrows[d][g].push(k)}})})})},_setValue:function(a,b){var c=this,d=this._const.lineColor,e=this._const.selectLineColor,f=this.pathChooser.routes,g=this.pathChooser.start,h=[a];g.contains(a)&&(h=g),BI.each(h,function(a,b){BI.each(c.arrows[b],function(a,b){BI.each(b,function(a,b){b.attr({fill:d,stroke:d}).toFront()})})}),BI.each(this.arrows[a][b],function(a,b){b.attr({fill:e,stroke:e}).toFront()});for(var i=BI.last(f[a][b]);i&&f[i]&&1===f[i].length;)BI.each(c.arrows[i][0],function(a,b){b.attr({fill:e,stroke:e}).toFront()}),i=BI.last(f[i][0])},setValue:function(a){this.pathChooser.setValue(a),this._unselectAllArrows();var b=this.pathChooser.routes,c=BI.keys(b),d=this,e=[],f=[];BI.each(a,function(a,b){BI.contains(c,b)&&f.length>0&&(f.push(b),e.push(f),f=[]),f.push(b)}),f.length>0&&e.push(f),BI.each(e,function(a,c){ +var e=c[0],f=BI.findIndex(b[e],function(a,b){if(BI.isEqual(c,b))return!0});f>=0&&d._setValue(e,f)})},getValue:function(){return this.pathChooser.getValue()},populate:function(a){this.pathChooser.populate(a),this._drawArrows()}}),BI.DirectionPathChooser.EVENT_CHANGE="DirectionPathChooser.EVENT_CHANGE",BI.shortcut("bi.direction_path_chooser",BI.DirectionPathChooser),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-combo",invalid:!1,height:25,items:[],adjustLength:0,direction:"bottom",trigger:"click",container:null,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}),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,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!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}]}),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:25,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}),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:25,forceNotSelected:!0}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:a.iconCls2,width:25,forceNotSelected:!0});var c=BI.createWidget({type:"bi.layout",width:25});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()})},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){var b=this,c=this.options;a=BI.isArray(a)?a:[a],BI.find(a,function(a,d){return BI.contains(c.childValues,d)?(b.icon1.setSelected(!0),!0):void b.icon1.setSelected(!1)})}}),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:25,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={};var a=this,b=this.options,c=this._createChildren(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],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"}]}},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?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.InteractiveArrangement=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.InteractiveArrangement.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interactive-arrangement",resizable:!0,layoutType:BI.Arrangement.LAYOUT_TYPE.GRID,items:[]})},_init:function(){BI.InteractiveArrangement.superclass._init.apply(this,arguments);var a=this,b=this.options;this.arrangement=BI.createWidget({type:"bi.adaptive_arrangement",element:this,resizable:b.resizable,layoutType:b.layoutType,items:b.items}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE,function(){a.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE,arguments)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE,function(b,c){var d=a._getRegionClientPosition(b);a.draw({left:d.left,top:d.top},c,b)}),this.arrangement.on(BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE,function(b,c){a.stopDraw(),a.setRegionSize(b,c)}),this.tags=[]},_isEqual:function(a,b){return this.arrangement._isEqual(a,b)},_getScrollOffset:function(){return this.arrangement._getScrollOffset()},_positionAt:function(a,b){var c=this;b=b||this.getAllRegions();var d=[],e=[],f=[],g=[],h=[],i=[];return BI.each(b,function(b,j){var k=c._getRegionClientPosition(j.id);Math.abs(k.left-a.left)<=3&&d.push(j),Math.abs(k.left+k.width/2-a.left)<=3&&e.push(j),Math.abs(k.left+k.width-a.left)<=3&&f.push(j),Math.abs(k.top-a.top)<=3&&g.push(j),Math.abs(k.top+k.height/2-a.top)<=3&&h.push(j),Math.abs(k.top+k.height-a.top)<=3&&i.push(j)}),{left:d,center:e,right:f,top:g,middle:h,bottom:i}},_getRegionClientPosition:function(a){var b=this.getRegionByName(a),c=this.arrangement._getScrollOffset();return{top:b.top-c.top,left:b.left-c.left,width:b.width,height:b.height,id:b.id}},_vAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.left.length>0)c=this._getRegionClientPosition(e.left[0].id).left;else if(e.right.length>0){ +var g=this._getRegionClientPosition(e.right[0].id);c=g.left+g.width}else if(e.center.length>0){var g=this._getRegionClientPosition(e.center[0].id);c=g.left+g.width/2}var h=e.left.concat(e.right).concat(e.center);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.left,c)||d._isEqual(g.left+g.width,c)||d._isEqual(g.left+g.width/2,c)){var h={top:g.top+g.height/2,left:c};f.push({id:e.id,start:h,end:{left:c,top:a.top}})}}),f},_leftAlign:function(a,b,c){return this._vAlign({left:a.left,top:a.top+b.height/2},c)},_rightAlign:function(a,b,c){return this._vAlign({left:a.left+b.width,top:a.top+b.height/2},c)},_hAlign:function(a,b){var c,d=this,e=this._positionAt(a,b),f=[];if(e.top.length>0){var g=this._getRegionClientPosition(e.top[0].id);c=g.top}else if(e.bottom.length>0){var g=this._getRegionClientPosition(e.bottom[0].id);c=g.top+g.height}else if(e.middle.length>0){var g=this._getRegionClientPosition(e.middle[0].id);c=g.top+g.height/2}var h=e.top.concat(e.bottom).concat(e.middle);return BI.each(h,function(b,e){var g=d._getRegionClientPosition(e.id);if(d._isEqual(g.top,c)||d._isEqual(g.top+g.height,c)||d._isEqual(g.top+g.height/2,c)){var h={top:c,left:g.left+g.width/2};f.push({id:g.id,start:h,end:{left:a.left,top:c}})}}),f},_topAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top},c)},_bottomAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top+b.height},c)},_centerAlign:function(a,b,c){return this._vAlign({left:a.left+b.width/2,top:a.top+b.height/2},c)},_middleAlign:function(a,b,c){return this._hAlign({left:a.left+b.width/2,top:a.top+b.height/2},c)},_drawOneTag:function(a,b){var c=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"}),d=BI.createWidget({type:"bi.icon_button",width:13,height:13,cls:"drag-tag-font interactive-arrangement-dragtag-icon"});if(this._isEqual(a.left,b.left))var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",width:1,height:Math.abs(a.top-b.top)});else var e=BI.createWidget({type:"bi.layout",cls:"interactive-arrangement-dragtag-line",height:1,width:Math.abs(a.left-b.left)});BI.createWidget({type:"bi.absolute",element:this,items:[{el:c,left:a.left-6,top:a.top-7},{el:d,left:b.left-6,top:b.top-7},{el:e,left:Math.min(a.left,b.left),top:Math.min(a.top,b.top)}]}),this.tags.push(c),this.tags.push(d),this.tags.push(e)},stopDraw:function(){BI.each(this.tags,function(a,b){b.destroy()}),this.tags=[]},_getRegionExcept:function(a,b){var c=[];return BI.each(b||this.getAllRegions(),function(b,d){a&&d.id===a||c.push(d)}),c},getClientWidth:function(){return this.arrangement.getClientWidth()},getClientHeight:function(){return this.arrangement.getClientHeight()},getPosition:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){b.left=d.end.left-c.width/2}),BI.each(h,function(a,d){b.left=d.end.left-c.width}),BI.each(g,function(a,c){b.left=c.end.left}),BI.each(l,function(a,d){b.top=d.end.top-c.height/2}),BI.each(j,function(a,d){b.top=d.end.top-c.height}),BI.each(i,function(a,c){b.top=c.end.top}),b},getSize:function(a,b,c){var d,e=this.getAllRegions();a&&(d=this._getRegionClientPosition(a));var f=this._getRegionExcept(a,e);b=b||{left:d.left,top:d.top},c=c||{width:d.width,height:d.height};var g=this._leftAlign(b,c,f),h=this._rightAlign(b,c,f),i=this._topAlign(b,c,f,f),j=this._bottomAlign(b,c,f),k=this._centerAlign(b,c,f),l=this._middleAlign(b,c,f);return BI.each(k,function(a,d){c.width=2*(d.end.left-b.left)}),BI.each(h,function(a,d){c.width=d.end.left-b.left}),BI.each(g,function(a,b){}),BI.each(l,function(a,d){c.height=2*(d.end.top-b.top)}),BI.each(j,function(a,d){c.height=d.end.top-b.top}),BI.each(i,function(a,b){}),c},draw:function(a,b,c){var d=this;switch(this.stopDraw(),this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:var e=this._getRegionExcept(c),f=this._leftAlign(a,b,e),g=this._rightAlign(a,b,e),h=this._topAlign(a,b,e),i=this._bottomAlign(a,b,e),j=this._centerAlign(a,b,e),k=this._middleAlign(a,b,e);BI.each(j,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(g,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(f,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(k,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(i,function(a,b){d._drawOneTag(b.start,b.end)}),BI.each(h,function(a,b){d._drawOneTag(b.start,b.end)});break;case BI.Arrangement.LAYOUT_TYPE.GRID:}},addRegion:function(a,b){return this.stopDraw(),this.arrangement.addRegion(a,b)},deleteRegion:function(a){return this.arrangement.deleteRegion(a)},setRegionSize:function(a,b){return b=this.getSize(a,null,b),this.arrangement.setRegionSize(a,b)},setPosition:function(a,b){if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var c=this.arrangement.setPosition(a,b);return c},setRegionPosition:function(a,b){if(b.left>0&&b.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:b=this.getPosition(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}return this.arrangement.setRegionPosition(a,b)},setDropPosition:function(a,b){var c=this;if(this.stopDraw(),a.left>0&&a.top>0)switch(this.getLayoutType()){case BI.Arrangement.LAYOUT_TYPE.FREE:a=this.getPosition(null,a,b),this.draw(a,b);break;case BI.Arrangement.LAYOUT_TYPE.GRID:}var d=c.arrangement.setDropPosition(a,b);return function(){d(),c.stopDraw()}},scrollInterval:function(){this.arrangement.scrollInterval.apply(this.arrangement,arguments)},scrollEnd:function(){this.arrangement.scrollEnd.apply(this.arrangement,arguments)},scrollTo:function(a){this.arrangement.scrollTo(a)},zoom:function(a){this.arrangement.zoom(a)},resize:function(){return this.arrangement.resize()},relayout:function(){return this.arrangement.relayout()},setLayoutType:function(a){this.arrangement.setLayoutType(a)},getLayoutType:function(){return this.arrangement.getLayoutType()},getLayoutRatio:function(){return this.arrangement.getLayoutRatio()},getHelper:function(){return this.arrangement.getHelper()},getRegionByName:function(a){return this.arrangement.getRegionByName(a)},getAllRegions:function(){return this.arrangement.getAllRegions()},revoke:function(){return this.arrangement.revoke()},populate:function(a){this.arrangement.populate(a)}}),BI.InteractiveArrangement.EVENT_RESIZE="InteractiveArrangement.EVENT_RESIZE",BI.InteractiveArrangement.EVENT_SCROLL="InteractiveArrangement.EVENT_SCROLL",BI.shortcut("bi.interactive_arrangement",BI.InteractiveArrangement),BI.IntervalSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""})},_init:function(){BI.IntervalSlider.superclass._init.apply(this,arguments);var a=this,b=this._constant;this.enable=!1,this.valueOne="",this.valueTwo="",this.calculation=new BI.AccurateCalculationModel,this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.labelOne=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,errorText:"",allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueOne=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelOnePosition(d),a._setSliderOnePosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.labelTwo=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",errorText:"",text:this.options.unit,allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueTwo=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelTwoPosition(d),a._setSliderTwoPosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.sliderTwo=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.sliderOne,!0),this._draggable(this.sliderTwo,!1),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]})},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit),b?(this._setLabelOnePosition(e),this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f):(this._setLabelTwoPosition(e),this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},document);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.labelOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.labelTwo,top:0,left:"100%"}]}],rgap:a.EDITOR_R_GAP,height:70},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.sliderOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.sliderTwo,top:0,left:"100%"}]}],hgap:a.SLIDER_WIDTH_HALF,height:a.SLIDER_HEIGHT},top:20,left:0,width:"100%"}},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_setLabelOnePosition:function(a){this.labelOne.element.css({left:a+"%"}),this._checkOverlap()},_setLabelTwoPosition:function(a){this.labelTwo.element.css({left:a+"%"}),this._checkOverlap()},_setSliderOnePosition:function(a){this.sliderOne.element.css({left:a+"%"})},_setSliderTwoPosition:function(a){this.sliderTwo.element.css({left:a+"%"})},_setBlueTrackLeft:function(a){this.blueTrack.element.css({left:a+"%"})},_setBlueTrackWidth:function(a){this.blueTrack.element.css({width:a+"%"})},_setBlueTrack:function(){var a=this._getPercentByValue(this.labelOne.getValue()),b=this._getPercentByValue(this.labelTwo.getValue());a<=b?(this._setBlueTrackLeft(a),this._setBlueTrackWidth(b-a)):(this._setBlueTrackLeft(b),this._setBlueTrackWidth(a-b))},_setAllPosition:function(a,b){this._setSliderOnePosition(a),this._setLabelOnePosition(a),this._setSliderTwoPosition(b),this._setLabelTwoPosition(b),this._setBlueTrack()},_setVisible:function(a){this.sliderOne.setVisible(a),this.sliderTwo.setVisible(a),this.labelOne.setVisible(a),this.labelTwo.setVisible(a)},_setErrorText:function(){var a=BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number");this.labelOne.setErrorText(a),this.labelTwo.setErrorText(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=this.calculation.accurateSubtraction(this.max,this.min),c=this.calculation.accurateMultiplication(b,a),d=this.calculation.accurateDivisionTenExponent(c,2);if(this.precision<0){var e=BI.parseFloat(this.calculation.accurateAddition(d,this.min)),f=Math.round(this.calculation.accurateDivisionTenExponent(e,-this.precision));return this.calculation.accurateMultiplication(f,Math.pow(10,-this.precision))}return BI.parseFloat(this.calculation.accurateAddition(d,this.min).toFixed(this.precision))},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},_setDraggableEnable:function(a){this.sliderOne.setEnable(a),this.sliderTwo.setEnable(a)},_getPrecision:function(){var a=this.calculation.accurateSubtraction(this.max,this.min),b=a.toPrecision(4),c=b.indexOf("e"),d=[];if(c>-1){d=b.split("e");var e=BI.size(d[0].split(".")[1]),f=BI.parseInt(d[1].substring(1));return e-f}return d=b.split("."),d.length>1?d[1].length:0},_assertValue:function(a){return a<=this.min?this.min:a>=this.max?this.max:a},getValue:function(){return this.valueOne<=this.valueTwo?{min:this.valueOne,max:this.valueTwo}:{min:this.valueTwo,max:this.valueOne}},setMinAndMax:function(a){var b=BI.parseFloat(a.min),c=BI.parseFloat(a.max);!isNaN(b)&&!isNaN(c)&&c>=b&&(this.min=b,this.max=c,this.valueOne=b,this.valueTwo=c,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),c===b&&this._setDraggableEnable(!1)},setValue:function(a){var b=this.options,c=BI.parseFloat(a.min),d=BI.parseFloat(a.max);c=b.digit===!1?c:c.toFixed(b.digit),d=b.digit===!1?d:d.toFixed(b.digit),isNaN(c)||isNaN(d)||(this._checkValidation(c)&&(this.valueOne=c),this._checkValidation(d)&&(this.valueTwo=d),cthis.max&&(this.valueTwo=this.max))},reset:function(){this._setVisible(!1),this.enable=!1,this.valueOne="",this.valueTwo="",this.min=NaN,this.max=NaN,this._setBlueTrackWidth(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this.enable=!0,this._setVisible(!0),this._setErrorText(),(BI.isNumeric(this.valueOne)||BI.isNotEmptyString(this.valueOne))&&(BI.isNumeric(this.valueTwo)||BI.isNotEmptyString(this.valueTwo))?(this.labelOne.setValue(this.valueOne),this.labelTwo.setValue(this.valueTwo),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider),BI.AccurateCalculationModel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this,arguments),{baseCls:""})},_init:function(){BI.AccurateCalculationModel.superclass._init.apply(this,arguments)},_getMagnitude:function(a){for(var b="1",c=0;c0)var d=b;else{var d=a;c=0-c}for(var e=0;e=b.numDecimal.length?a.numDecimal.length:b.numDecimal.length}function d(a,b){for(var c=b-a.length,d=0;d=BI.parseInt(f.numDecimal))var i=(BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h);else{g--;var k=this._getMagnitude(h),i=(k+BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h)}var l=g+"."+j;return BI.parseFloat(l)},_accurateAddition:function(a,b){function c(a,b){for(var c=b-a.length,d=0;db)var e=d.numInteger.slice(0,d.numInteger.length-b),f=d.numInteger.slice(-b);else var e="0",f=c(d.numInteger,b);var g=e+"."+f+d.numDecimal;return BI.parseFloat(g)},accurateSubtraction:function(a,b){return a>=0&&b>=0?a>=b?this._accurateSubtraction(a,b):-this._accurateSubtraction(b,a):a>=0&&b<0?this._accurateAddition(a,-b):a<0&&b>=0?-this._accurateAddition(-a,b):a<0&&b<0?a>=b?this._accurateSubtraction(-b,-a):this._accurateSubtraction(-a,-b):void 0},accurateAddition:function(a,b){return a>=0&&b>=0?this._accurateAddition(a,b):a>=0&&b<0?this.accurateSubtraction(a,-b):a<0&&b>=0?this.accurateSubtraction(b,-a):a<0&&b<0?-this._accurateAddition(-a,-b):void 0},accurateMultiplication:function(a,b){return a>=0&&b>=0?this._accurateMultiplication(a,b):a>=0&&b<0?-this._accurateMultiplication(a,-b):a<0&&b>=0?-this._accurateMultiplication(-a,b):a<0&&b<0?this._accurateMultiplication(-a,-b):void 0},accurateDivisionTenExponent:function(a,b){return a>=0?this._accurateDivisionTenExponent(a,b):-this._accurateDivisionTenExponent(-a,b)}}),BI.MonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",behaviors:{},height:25})},_init:function(){BI.MonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.month_trigger"}),this.trigger.on(BI.MonthTrigger.EVENT_CONFIRM,function(b){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getValue()):this.getKey()||a.setValue(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM))}),this.trigger.on(BI.MonthTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.MonthTrigger.EVENT_START,function(){a.combo.hideView()}),this.trigger.on(BI.MonthTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:b.behaviors}),this.popup.on(BI.MonthPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MonthCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.MonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.month_combo",BI.MonthCombo),BI.MonthPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-popup",behaviors:{}})},_init:function(){BI.MonthPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[0,6,1,7,2,8,3,9,4,10,5,11],d=[];d.push(c.slice(0,2)),d.push(c.slice(2,4)),d.push(c.slice(4,6)),d.push(c.slice(6,8)),d.push(c.slice(8,10)),d.push(c.slice(10,12)),d=BI.map(d,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b+1}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(d,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}]}),this.month.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(a){this.month.setValue([a])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.MonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Month_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.MonthTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-month-trigger bi-border",height:24})},_init:function(){BI.MonthTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=12},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MonthTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.MonthTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.MonthTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){a.editor.isValid()&&a.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.MonthTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]})},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(""),this.editor.setValue(""),void this.editor.setTitle(""))},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.MultiDateCard=BI.inherit(BI.Widget,{constants:{lgap:80,itemHeight:35,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateCard.superclass._defaultConfig.apply(this,arguments),{})},dateConfig:function(){},defaultSelectedItem:function(){},_init:function(){BI.MultiDateCard.superclass._init.apply(this,arguments);var a=this;this.options;this.label=BI.createWidget({type:"bi.label",height:this.constants.itemHeight,textAlign:"left",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),cls:"bi-multidate-inner-label bi-tips"}),this.radioGroup=BI.createWidget({type:"bi.button_group",chooseType:0,items:BI.createItems(this.dateConfig(),{type:"bi.multidate_segment",height:this.constants.itemHeight}),layouts:[{type:"bi.vertical"}]}),this.radioGroup.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CONFIRM&&a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),this.radioGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(){a.setValue(a.getValue()),a.fireEvent(BI.MultiDateCard.EVENT_CHANGE)}),BI.createWidget({element:this,type:"bi.center_adapt",lgap:this.constants.lgap,items:[{type:"bi.vertical",items:[this.label,this.radioGroup]}]})},getValue:function(){var a=this.radioGroup.getSelectedButtons()[0],b=a.getValue(),c=a.getInputValue();return{type:b,value:c}},_isTypeAvaliable:function(a){var b=!1;return BI.find(this.dateConfig(),function(c,d){if(d.value===a)return b=!0,!0}),b},setValue:function(a){var b=this;BI.isNotNull(a)&&this._isTypeAvaliable(a.type)?(this.radioGroup.setValue(a.type),BI.each(this.radioGroup.getAllButtons(),function(c,d){d.isEditorExist()===!0&&d.isSelected()?d.setInputValue(a.value):d.setInputValue(b.constants.defaultEditorValue)})):(this.radioGroup.setValue(this.defaultSelectedItem()),BI.each(this.radioGroup.getAllButtons(),function(a,c){c.setInputValue(b.constants.defaultEditorValue)}))},getCalculationValue:function(){var a=this.getValue(),b=a.type,c=a.value;switch(b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:return Date.getDate().getOffsetDate(-1*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:return Date.getDate().getOffsetDate(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:return Date.getDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:return Date.getDate().getBeforeMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:return Date.getDate().getAfterMultiMonth(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:return Date.getDate(Date.getDate().getFullYear(),Date.getDate().getMonth(),1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:return Date.getDate(Date.getDate().getFullYear(),Date.getDate().getMonth(),Date.getDate().getLastDateOfMonth().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:return Date.getDate().getBeforeMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:return Date.getDate().getAfterMulQuarter(c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:return Date.getDate().getQuarterStartDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:return Date.getDate().getQuarterEndDate();case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:return Date.getDate().getOffsetDate(-7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:return Date.getDate().getOffsetDate(7*c);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:return Date.getDate(Date.getDate().getFullYear()-1*c,Date.getDate().getMonth(),Date.getDate().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:return Date.getDate(Date.getDate().getFullYear()+1*c,Date.getDate().getMonth(),Date.getDate().getDate());case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:return Date.getDate(Date.getDate().getFullYear(),0,1);case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:return Date.getDate(Date.getDate().getFullYear(),11,31)}}}),BI.MultiDateCard.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo=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"},_defaultConfig:function(){return BI.extend(BI.MultiDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-combo bi-border",height:24})},_init:function(){BI.MultiDateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.storeTriggerValue="";var b=Date.getDate();this.storeValue=null,this.trigger=BI.createWidget({type:"bi.date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.trigger.on(BI.DateTrigger.EVENT_KEY_DOWN,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DateTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.trigger.on(BI.DateTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.MultiDateCombo.EVENT_FOCUS)}),this.trigger.on(BI.DateTrigger.EVENT_ERROR,function(){a.storeValue={year:b.getFullYear(),month:b.getMonth()},a.popup.setValue(),a.fireEvent(BI.MultiDateCombo.EVENT_ERROR)}),this.trigger.on(BI.DateTrigger.EVENT_VALID,function(){a.fireEvent(BI.MultiDateCombo.EVENT_VALID)}),this.trigger.on(BI.DateTrigger.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDateCombo.EVENT_CHANGE)}),this.trigger.on(BI.DateTrigger.EVENT_CONFIRM,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.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}}),this.popup=BI.createWidget({type:"bi.multidate_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE}),this.popup.on(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE,function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE,function(){var b=Date.getDate();a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.EVENT_CONFIRM)}),this.popup.on(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiDateCombo.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,maxHeight:this.constants.popupHeight,width:this.constants.popupWidth,stopPropagation:!1}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW)});var c=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});c.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),this.changeIcon=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24});var d=BI.createWidget({type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:c,top:0,left:0}]});BI.createWidget({type:"bi.htape",element:this,items:[d,{el:this.changeIcon,width:30}],ref:function(b){ +a.comboWrapper=b}})},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[1].width=30,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[1].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.popup.setValue(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.shortcut("bi.multidate_combo",BI.MultiDateCombo),BI.MultiDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiDateCombo.EVENT_VALID="EVENT_VALID",BI.MultiDateCombo.EVENT_ERROR="EVENT_ERROR",BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW="BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW",BI.extend(BI.MultiDateCombo,{MULTI_DATE_YMD_CARD:1,MULTI_DATE_YEAR_CARD:2,MULTI_DATE_QUARTER_CARD:3,MULTI_DATE_MONTH_CARD:4,MULTI_DATE_WEEK_CARD:5,MULTI_DATE_DAY_CARD:6}),BI.extend(BI.MultiDateCombo,{DATE_TYPE:{MULTI_DATE_YEAR_PREV:1,MULTI_DATE_YEAR_AFTER:2,MULTI_DATE_YEAR_BEGIN:3,MULTI_DATE_YEAR_END:4,MULTI_DATE_MONTH_PREV:5,MULTI_DATE_MONTH_AFTER:6,MULTI_DATE_MONTH_BEGIN:7,MULTI_DATE_MONTH_END:8,MULTI_DATE_QUARTER_PREV:9,MULTI_DATE_QUARTER_AFTER:10,MULTI_DATE_QUARTER_BEGIN:11,MULTI_DATE_QUARTER_END:12,MULTI_DATE_WEEK_PREV:13,MULTI_DATE_WEEK_AFTER:14,MULTI_DATE_DAY_PREV:15,MULTI_DATE_DAY_AFTER:16,MULTI_DATE_DAY_TODAY:17,MULTI_DATE_PARAM:18,MULTI_DATE_CALENDAR:19,YEAR_QUARTER:20,YEAR_MONTH:21,YEAR_WEEK:22,YEAR_DAY:23,MONTH_WEEK:24,MONTH_DAY:25,YEAR:26,SAME_PERIOD:27,LAST_SAME_PERIOD:28}}),BI.DayCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.DayCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-daycard"})},_init:function(){BI.DayCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{isEditorExist:!0,selected:!0,text:BI.i18nText("BI-Multi_Date_Day_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Day_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY,text:BI.i18nText("BI-Multi_Date_Today")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV}}),BI.DayCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.daycard",BI.DayCard),BI.MonthCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.MonthCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-monthcard"})},_init:function(){BI.MonthCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV,text:BI.i18nText("BI-Multi_Date_Month_Prev")},{isEditorExist:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER,text:BI.i18nText("BI-Multi_Date_Month_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Month_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV}}),BI.MonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.monthcard",BI.MonthCard),BI.MultiDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,tabWidth:42,titleHeight:27,itemHeight:30,triggerHeight:24,buttonWidth:90,buttonHeight:25,cardHeight:229,cardWidth:270,popupHeight:259,popupWidth:270,comboAdjustHeight:1,ymdWidth:58,lgap:2,border:1},_defaultConfig:function(){return BI.extend(BI.MultiDatePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-popup",width:268,height:260})},_init:function(){BI.MultiDatePopup.superclass._init.apply(this,arguments);var a=this;this.options;this.storeValue="",this.textButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-label bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today")}),this.textButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE)}),this.clearButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear")}),this.clearButton.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",forceCenter:!0,cls:"bi-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.MultiDatePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateTab=BI.createWidget({type:"bi.tab",tab:{cls:"bi-multidate-popup-tab bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.MultiDateCombo.MULTI_DATE_YMD_CARD,width:this.constants.ymdWidth},{text:BI.i18nText("BI-Multi_Date_Year"),value:BI.MultiDateCombo.MULTI_DATE_YEAR_CARD},{text:BI.i18nText("BI-Multi_Date_Quarter"),value:BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD},{text:BI.i18nText("BI-Multi_Date_Month"),value:BI.MultiDateCombo.MULTI_DATE_MONTH_CARD},{text:BI.i18nText("BI-Multi_Date_Week"),value:BI.MultiDateCombo.MULTI_DATE_WEEK_CARD},{text:BI.i18nText("BI-Multi_Date_Day"),value:BI.MultiDateCombo.MULTI_DATE_DAY_CARD}],{width:this.constants.tabWidth,textAlign:"center",height:this.constants.itemHeight,cls:"bi-multidate-popup-item bi-list-item-active"}),layouts:[{type:"bi.left"}]},cardCreator:function(b){switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return a.ymd=BI.createWidget({type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max}),a.ymd.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.MultiDatePopup.CALENDAR_EVENT_CHANGE)}),a.ymd;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return a.year=BI.createWidget({type:"bi.yearcard"}),a.year.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.year,b)}),a.year;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return a.quarter=BI.createWidget({type:"bi.quartercard"}),a.quarter.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.quarter,b)}),a.quarter;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return a.month=BI.createWidget({type:"bi.monthcard"}),a.month.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.month,b)}),a.month;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return a.week=BI.createWidget({type:"bi.weekcard"}),a.week.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.week,b)}),a.week;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return a.day=BI.createWidget({type:"bi.daycard"}),a.day.on(BI.MultiDateCard.EVENT_CHANGE,function(b){a._setInnerValue(a.day,b)}),a.day}}}),this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_YMD_CARD,this.dateTab.on(BI.Tab.EVENT_CHANGE,function(){var b=a.dateTab.getSelect();switch(b){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:var c=this.getTab(a.cur).getCalculationValue();a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue(a.ymd);break;case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:a.year.setValue(a.storeValue),a._setInnerValue(a.year);break;case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:a.quarter.setValue(a.storeValue),a._setInnerValue(a.quarter);break;case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:a.month.setValue(a.storeValue),a._setInnerValue(a.month);break;case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:a.week.setValue(a.storeValue),a._setInnerValue(a.week);break;case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:a.day.setValue(a.storeValue),a._setInnerValue(a.day)}a.cur=b}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.clearButton,this.textButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateTab},{el:this.dateButton,height:30}]})},_setInnerValue:function(a){if(this.dateTab.getSelect()===BI.MultiDateCombo.MULTI_DATE_YMD_CARD)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var b=a.getCalculationValue();b=b.print("%Y-%x-%e"),this.textButton.setValue(b),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,e=this;switch(BI.isNotNull(a)&&(c=a.type||BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_CALENDAR,d=a.value,BI.isNull(d)&&(d=a)),c){case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YEAR_CARD),this.year.setValue({type:c,value:d}),this.cur=BI.MultiDateCombo.MULTI_DATE_YEAR_CARD,e._setInnerValue(this.year);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD,this.quarter.setValue({type:c,value:d}),e._setInnerValue(this.quarter);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_BEGIN:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_MONTH_END:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_MONTH_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_MONTH_CARD,this.month.setValue({type:c,value:d}),e._setInnerValue(this.month);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_WEEK_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_WEEK_CARD,this.week.setValue({type:c,value:d}),e._setInnerValue(this.week);break;case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_PREV:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_AFTER:case BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_DAY_TODAY:this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_DAY_CARD),this.cur=BI.MultiDateCombo.MULTI_DATE_DAY_CARD,this.day.setValue({type:c,value:d}),e._setInnerValue(this.day);break;default:if(this._checkValueValid(d)){var b=Date.getDate();this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.dateTab.setSelect(BI.MultiDateCombo.MULTI_DATE_YMD_CARD),this.ymd.setValue(d),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();switch(a){case BI.MultiDateCombo.MULTI_DATE_YMD_CARD:return this.ymd.getValue();case BI.MultiDateCombo.MULTI_DATE_YEAR_CARD:return this.year.getValue();case BI.MultiDateCombo.MULTI_DATE_QUARTER_CARD:return this.quarter.getValue();case BI.MultiDateCombo.MULTI_DATE_MONTH_CARD:return this.month.getValue();case BI.MultiDateCombo.MULTI_DATE_WEEK_CARD:return this.week.getValue();case BI.MultiDateCombo.MULTI_DATE_DAY_CARD:return this.day.getValue()}}}),BI.MultiDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.MultiDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.MultiDatePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.multidate_popup",BI.MultiDatePopup),BI.QuarterCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.QuarterCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-quartercard"})},_init:function(){BI.QuarterCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Prev")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_AFTER,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Quarter_Next")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_BEGIN,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_Begin")},{value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_END,isEditorExist:!1,text:BI.i18nText("BI-Multi_Date_Quarter_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_QUARTER_PREV}}),BI.QuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quartercard",BI.QuarterCard),BI.MultiDateSegment=BI.inherit(BI.Single,{constants:{itemHeight:24,maxGap:15,minGap:10,textWidth:60,defaultEditorValue:"1"},_defaultConfig:function(){return $.extend(BI.MultiDateSegment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-segment",text:"",height:30,isEditorExist:!0,selected:!1,defaultEditorValue:"1"})},_init:function(){BI.MultiDateSegment.superclass._init.apply(this,arguments);var a=this,b=this.options;this.radio=BI.createWidget({type:"bi.radio",selected:b.selected}),this.radio.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textEditor=BI.createWidget({type:"bi.text_editor",value:this.constants.defaultEditorValue,title:function(){return a.textEditor.getValue()},tipType:"success",cls:"bi-multidate-editor",width:this.constants.textWidth,height:this.constants.itemHeight}),this.textEditor.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",cls:"bi-multidate-normal-label",text:b.text,height:this.constants.itemHeight}),this._createSegment()},_createSegment:function(){return this.options.isEditorExist===!0?BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:{type:"bi.center_adapt",items:[this.textEditor],widgetName:"textEditor"},lgap:this.constants.maxGap},{el:this.text,lgap:this.constants.minGap}]}):BI.createWidget({element:this,type:"bi.left",items:[{el:{type:"bi.center_adapt",items:[this.radio],height:this.constants.itemHeight},lgap:0},{el:this.text,lgap:this.constants.maxGap}]})},setSelected:function(a){BI.isNotNull(this.radio)&&(this.radio.setSelected(a),this.textEditor.setEnable(a))},isSelected:function(){return this.radio.isSelected()},getValue:function(){return this.options.value},getInputValue:function(){return 0|this.textEditor.getValue()},setInputValue:function(a){this.textEditor.setValue(a)},isEditorExist:function(){return this.options.isEditorExist}}),BI.MultiDateSegment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multidate_segment",BI.MultiDateSegment),BI.WeekCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.WeekCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-weekcard"})},_init:function(){BI.WeekCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Week_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_AFTER}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_WEEK_PREV}}),BI.WeekCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.weekcard",BI.WeekCard),BI.YearCard=BI.inherit(BI.MultiDateCard,{_defaultConfig:function(){return $.extend(BI.YearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multidate-yearcard"})},_init:function(){BI.YearCard.superclass._init.apply(this,arguments)},dateConfig:function(){return[{selected:!0,isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Prev"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV},{isEditorExist:!0,text:BI.i18nText("BI-Multi_Date_Year_Next"),value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_AFTER},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_BEGIN,text:BI.i18nText("BI-Multi_Date_Year_Begin")},{isEditorExist:!1,value:BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_END,text:BI.i18nText("BI-Multi_Date_Year_End")}]},defaultSelectedItem:function(){return BI.MultiDateCombo.DATE_TYPE.MULTI_DATE_YEAR_PREV}}),BI.YearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.yearcard",BI.YearCard),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[]})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSelectLevelTree.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={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_select_tree_last_plus_group_node";break;default:f.type="bi.multilayer_select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{type:"bi.select_tree_expander",isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:c.itemsCreator,el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},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.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),BI.MultiLayerSelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){a.setSelected(a.isSelected()),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.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={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children,b+1)}else{switch(d){case a.length-1:f.type="bi.multilayer_single_tree_last_tree_leaf_item";break;default:f.type="bi.multilayer_single_tree_mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_assertId:function(a){BI.each(a,function(a,b){b.id=b.id||BI.UUID()})},initTree:function(a){var b=this,c=this.options;this.empty(),this._assertId(a),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},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.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE); +}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,open:b.open,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var c=[];BI.count(0,b.layer,function(){c.push({type:"bi.layout",cls:"base-line-conn-background",width:13,height:b.height})}),c.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectInsertCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),d.apply(a,arguments)})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.trigger.getCounter().hideView(),a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){ +a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.matched.concat(f.finded)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])}}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()}},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue)};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keyword=a.trigger.getKeyword(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane(),a._setStartValue(""),this.setValue(BI.deepClone(a.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),a._setStartValue(""),a.adapter.setValue(a.storeValue),a.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var b=this.getKeyword();this.hasMatched()?a._join({type:BI.Selection.Multi,value:[b]},function(){a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):(a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE))}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeyword(),d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.adapter.setValue(a.storeValue),c(),a.adapter.populate(),a._setStartValue("")):(a.adapter.setValue(a.storeValue),c())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.pluck(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void b()}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),b()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertList.EVENT_CHANGE="BI.MultiSelectInsertList.EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_list",BI.MultiSelectInsertList),BI.MultiSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](a._startValue)};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keyword=a.trigger.getKeyword(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane(),a._setStartValue(""),this.setValue(BI.deepClone(a.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),a._setStartValue(""),a.adapter.setValue(a.storeValue),a.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var b=this.getKeyword();this.hasMatched()&&a._join({type:BI.Selection.Multi,value:[b]},function(){a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeyword(),d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.adapter.setValue(a.storeValue),c(),a.adapter.populate(),a._setStartValue("")):(a.adapter.setValue(a.storeValue),c())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value[d.storeValue.type===BI.Selection.Multi?"pushDistinct":"remove"](b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA},function(a){d._allData=BI.pluck(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)}}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset +},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===j.element.find(a.target).length}}),this.storeValue={value:{}};var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),b={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(b)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button bi-border-left"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)}}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)})},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var c="",d=0,e=BI.size(a);return BI.each(a,function(a,f){d++;var g=b(f);c+=a+(""===g?"":":"+g)+(d===e?"":",")}),c}if(a||(a={}),a.value||(a.value={}),BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var c="";BI.each(a.value,function(a,d){var e=b(d);c+=a+(""===e?"":":"+e)+"; "}),this.editor.setState(c)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),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:23}]})},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconClass:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconClass:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"center"});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){a=a||{};var b,c=this;(BI.isNumeric(a.min)||BI.isEmptyString(a.min))&&c.smallEditor.setValue(a.min),BI.isNotNull(a.min)||c.smallEditor.setValue(""),(BI.isNumeric(a.max)||BI.isEmptyString(a.max))&&c.bigEditor.setValue(a.max),BI.isNotNull(a.max)||c.bigEditor.setValue(""),BI.isNull(a.closemin)||(b=a.closemin===!0?1:0,c.smallCombo.setValue(b)),BI.isNull(a.closemax)||(b=a.closemax===!0?1:0,c.bigCombo.setValue(b))},getValue:function(){var a=this,b={},c=a.smallCombo.getValue(),d=a.bigCombo.getValue();return b.min=a.smallEditor.getValue(),b.max=a.bigEditor.getValue(),0===c[0]?b.closemin=!1:b.closemin=!0,0===d[0]?b.closemax=!1:b.closemax=!0,b}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.PageTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PageTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table-cell",text:"",title:""})},_init:function(){BI.PageTableCell.superclass._init.apply(this,arguments);BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"nowrap",height:this.options.height,text:this.options.text,title:this.options.title,value:this.options.value,lgap:5,rgap:5});BI.isNotNull(this.options.styles)&&BI.isObject(this.options.styles)&&this.element.css(this.options.styles)}}),BI.shortcut("bi.page_table_cell",BI.PageTableCell),BI.PageTable=BI.inherit(BI.Widget,{_const:{scrollWidth:18,minScrollWidth:100},_defaultConfig:function(){return BI.extend(BI.PageTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-page-table",el:{type:"bi.sequence_table"},pager:{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}},itemsCreator:BI.emptyFn,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,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:[]})},_init:function(){BI.PageTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hCurr=1,this.vCurr=1,this.table=BI.createWidget(b.el,{type:"bi.sequence_table",width:b.width,height:b.height&&b.height-30,isNeedResize:!0,isResizeAdapt:!1,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,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,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(),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)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PathChooser=BI.inherit(BI.Widget,{_const:{lineColor:"#d4dadd",selectLineColor:"#3f8ce8"},_defaultConfig:function(){return BI.extend(BI.PathChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-chooser",items:[]})},_init:function(){BI.PathChooser.superclass._init.apply(this,arguments),this.populate(this.options.items)},_createRegions:function(a){var b=this;this.regions=BI.createWidgets(BI.map(a,function(a,c){return{type:"bi.path_region",title:b.texts[c]||c}})),this.regionMap={},BI.each(a,function(a,c){b.regionMap[c]=a}),this.container=BI.createWidget({type:"bi.horizontal",verticalAlign:"top",scrollx:!1,scrolly:!1,hgap:10,items:this.regions}),BI.createWidget({type:"bi.vertical_adapt",element:this,scrollable:!0,hgap:10,items:[this.container]})},getRegionIndexById:function(a){var b=this.cache[a],c=b.get("region");return this.regionMap[c]},_drawPath:function(a,b,c){var d=this,e=[];e=BI.contains(this.start,a)?this.start:[a],BI.each(e,function(a,b){BI.each(d.radios[b],function(a,b){b.setSelected(!1)}),BI.each(d.lines[b],function(a,b){b.attr("stroke",d._const.lineColor)}),BI.each(d.regionIndexes[b],function(a,b){d.regions[b].reset()})}),BI.each(this.routes[a][c],function(a,e){var f=d.getRegionIndexById(e);d.regions[f].setSelect(b+c,e)});for(var f=BI.last(this.routes[a][c]);f&&this.routes[f]&&1===this.routes[f].length;)BI.each(this.routes[f][0],function(a,b){var c=d.getRegionIndexById(b);d.regions[c].setSelect(0,b)}),this.lines[f][0].attr("stroke",d._const.selectLineColor).toFront(),f=BI.last(this.routes[f][0]);this.lines[a][c].attr("stroke",d._const.selectLineColor).toFront(),this.radios[a]&&this.radios[a][c]&&this.radios[a][c].setSelected(!0)},_drawRadio:function(a,b,c,d,e){var f=this,g=BI.createWidget({type:"bi.radio",cls:"path-chooser-radio",selected:b+c===0,start:a,index:c});g.on(BI.Radio.EVENT_CHANGE,function(){f._drawPath(a,b,c),f.fireEvent(BI.PathChooser.EVENT_CHANGE,a,c)}),this.radios[a]||(this.radios[a]=[]),this.radios[a].push(g),BI.createWidget({type:"bi.absolute",element:this.container,items:[{el:g,left:d-6.5,top:e-6.5}]})},_drawLine:function(a,b){var c=this;this.lines[a]||(this.lines[a]=[]),this.pathes[a]||(this.pathes[a]=[]);var d=this.getRegionIndexById(a),e=this.regions[d].getIndexByValue(a);BI.each(b,function(f,g){c.pathes[a][f]=[];var h=f+e,i="",j=47.5+29*h,k=50+100*d,l=k,m=j,n=j,o=c.getRegionIndexById(BI.last(g)),p=c.regions[o].getIndexByValue(BI.last(g)),q=50+100*o;if(BI.contains(c.start,a)?(l=k-50,i+="M"+(k-50)+","+j,c.pathes[a][f].push({x:k-50,y:j})):0===h?(l=k+50,i+="M"+k+","+j,c.pathes[a][f].push({x:k,y:j})):(l=k+50,i+="M"+k+",47.5L"+(k+50)+",47.5L"+(k+50)+","+j,c.pathes[a][f].push({x:k,y:47.5}),c.pathes[a][f].push({x:k+50,y:47.5}),c.pathes[a][f].push({x:k+50,y:j})),h>0){var r=29*p+47.5;i+="L"+(q-50)+","+n+"L"+(q-50)+","+r+"L"+q+","+r,c.pathes[a][f].push({x:q-50,y:n}),c.pathes[a][f].push({x:q-50,y:r}),c.pathes[a][f].push({x:q,y:r})}else i+="L"+q+","+n,c.pathes[a][f].push({x:q,y:n});var s=c.svg.path(i).attr({stroke:0===h?c._const.selectLineColor:c._const.lineColor,"stroke-dasharray":"-"});c.lines[a].push(s),b.length>1&&c.lines[a][0].toFront(),BI.contains(c.start,a)&&c.lines[c.regions[0].getValueByIndex(0)][0].toFront(),(b.length>1||BI.contains(c.start,a))&&c._drawRadio(a,e,f,l,m)})},_drawLines:function(a){var b=this;this.lines={},this.pathes={},this.radios={},this.regionIndexes={},BI.each(a,function(a,c){b.regionIndexes[a]||(b.regionIndexes[a]=[]),BI.each(c,function(c,d){BI.each(d,function(c,d){var e=b.getRegionIndexById(d);BI.contains(b.regionIndexes[a],e)||b.regionIndexes[a].push(e)})})}),BI.each(a,function(a,c){b._drawLine(a,c)})},_pushNodes:function(a){for(var b=this,c=[],d=0;d0||BI.contains(b.start,e))&&g.addItem(e,b.texts[e])}for(var d=BI.first(c);d0&&(h=c[b-1]);var i=a.cache[h.value||""],j=a.cache[g.value]||new BI.Node(g.value);j.set(g),a.cache[g.value]=j,a.texts[g.value]=g.text,a.texts[g.region]=g.regionText,i=BI.isNull(i)?d.getRoot():i,i.getChildIndex(g.value)===-1&&d.addNode(i,j)})}),d.traverse(function(a){BI.each(a.getChildren(),function(b,d){ +if(BI.contains(c,d.get("region"))){var e=BI.indexOf(c,a.get("region")),f=BI.indexOf(c,d.get("region"));if(e>f){for(var g=c[f],h=f;h0&&(e.push(c),d.push(e),e=[]),e.push(c)}),e.length>0&&d.push(e),BI.each(d,function(a,b){var d=b[0],e=BI.findIndex(c.routes[d],function(a,c){if(BI.isEqual(b,c))return!0});if(e>=0){var f=c.getRegionIndexById(d),g=c.regions[f].getIndexByValue(d);c._drawPath(d,g,e)}})},getValue:function(){var a=[];return BI.each(this.regions,function(b,c){var d=c.getValue();BI.isKey(d)&&a.push(d)}),a}}),BI.PathChooser.EVENT_CHANGE="PathChooser.EVENT_CHANGE",BI.shortcut("bi.path_chooser",BI.PathChooser),BI.PathRegion=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PathRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-path-region bi-background",width:80,title:""})},_init:function(){BI.PathRegion.superclass._init.apply(this,arguments);var a=this.options;this.zIndex=100;var b=BI.createWidget({type:"bi.label",text:a.title,title:a.title,height:30});b.element.css("zIndex",this.zIndex--),this.items=[],this.vertical=BI.createWidget({type:"bi.vertical",element:this,bgap:5,hgap:10,items:[b]})},hasItem:function(a){return BI.any(this.items,function(b,c){return a===c.getValue()})},addItem:function(a,b){if(BI.isKey(a))var c=BI.createWidget({type:"bi.label",cls:"path-region-label bi-card bi-border bi-list-item-select",text:b,value:a,title:b||a,height:24});else var c=BI.createWidget({type:"bi.layout",height:24});c.element.css("zIndex",this.zIndex--),this.items.push(c),this.vertical.addItem(c),1===this.items.length&&this.setSelect(0,a)},reset:function(){BI.each(this.items,function(a,b){b.element.removeClass("active")})},setSelect:function(a,b){if(this.reset(),!(this.items.length<=0))return 1===this.items.length?void this.items[0].element.addClass("active"):void(this.items[a].attr("value")===b&&this.items[a].element.addClass("active"))},setValue:function(a){this.setSelect(this.getIndexByValue(a),a)},getValueByIndex:function(a){return this.items[a].attr("value")},getIndexByValue:function(a){return BI.findIndex(this.items,function(b,c){return c.attr("value")===a})},getValue:function(){var a;return BI.any(this.items,function(b,c){if(c.element.hasClass("active"))return a=c.getValue(),!0}),a}}),BI.PathRegion.EVENT_CHANGE="PathRegion.EVENT_CHANGE",BI.shortcut("bi.path_region",BI.PathRegion),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger"}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,el:this.popup}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}]}),this.quarter.on(BI.Controller.EVENT_CHANGE,function(b){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),b===BI.Events.CLICK&&a.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(a){return""===a||BI.isPositiveInteger(a)&&a>=1&&a<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.EVENT_CHANGE)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]})},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.RelationViewItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewItem.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-item bi-list-item-active",height:25,hoverIn:BI.emptyFn,hoverOut:BI.emptyFn})},_init:function(){BI.RelationViewItem.superclass._init.apply(this,arguments);var a=this.options;this.element.hover(a.hoverIn,a.hoverOut);var b=[];a.isPrimary&&b.push({type:"bi.icon",width:16,height:16,title:BI.i18nText("BI-Primary_Key")}),b.push({type:"bi.label",text:a.text,value:a.value,height:a.height,textAlign:"left",width:a.isPrimary?70:90,lgap:a.isPrimary?0:10}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:b,cls:"primary-key-font",lgap:5})},enableHover:function(a){BI.RelationViewRegion.superclass.enableHover.apply(this,[{container:"body"}])},setSelected:function(a){this.element[a?"addClass":"removeClass"]("active")}}),BI.shortcut("bi.relation_view_item",BI.RelationViewItem),BI.RelationView=BI.inherit(BI.Widget,{_const:{lineColor:"#c4c6c6",selectLineColor:"#009de3"},_defaultConfig:function(){return BI.extend(BI.RelationView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view",items:[]})},_init:function(){BI.RelationView.superclass._init.apply(this,arguments),this.populate(this.options.items)},_calculateWidths:function(){var a=[];return BI.each(this.views,function(b,c){BI.each(c,function(b,c){a[b]||(a[b]=BI.MIN),a[b]=Math.max(a[b],c.getWidth())})}),a},_calculateHeights:function(){var a=BI.makeArray(BI.size(this.views),BI.MIN);return BI.each(this.views,function(b,c){BI.each(c,function(c,d){a[b]=Math.max(a[b],d.getHeight())})}),a},_hoverIn:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.selectLineColor).toFront(),b.storeViews[d].setValue(f[0].primary.value),b.storeViews[e].setValue(f[0].foreign.value))})})},_hoverOut:function(a){var b=this,c=this._const;BI.each(this.relations,function(d,e){BI.each(e,function(e,f){f[0].primary.value!==a&&f[0].foreign.value!==a||(b.lines[d][e].attr("stroke",c.lineColor),b.storeViews[d].setValue([]),b.storeViews[e].setValue([]))})})},previewRelationTables:function(a,b){return b?(BI.each(this.storeViews,function(b,c){a.contains(b)?c.setPreviewSelected(!0):c.toggleRegion(!1)}),void BI.each(this.lines,function(b,c){BI.each(c,function(c,d){a.contains(b)&&a.contains(c)||d.hide()})})):(BI.each(this.storeViews,function(a,b){b.toggleRegion(!0),b.setPreviewSelected(!1)}),void BI.each(this.lines,function(a,b){BI.each(b,function(a,b){b.show()})}))},populate:function(a){var b=this,c=this.options,d=this._const;c.items=a||[],this.empty(),this.svg=BI.createWidget({type:"bi.svg"});var e=this.regions={},f=this.relations={};BI.each(a,function(a,b){var c=b.primary.region,d=b.foreign&&b.foreign.region;c&&!f[c]&&(f[c]={}),c&&d&&!f[c][d]&&(f[c][d]=[]),c&&!e[c]&&(e[c]=[]),d&&!e[d]&&(e[d]=[]),c&&!BI.deepContains(e[c],b.primary)&&e[c].push(b.primary),d&&!BI.deepContains(e[d],b.foreign)&&e[d].push(b.foreign),c&&d&&f[c][d].push(b)});for(var g=[],h=BI.clone(e),i={};!BI.isEmpty(h);){var j=BI.clone(h);BI.each(c.items,function(a,b){i[b.primary.region]||delete j[b.foreign&&b.foreign.region]}),g.push(BI.keys(j)),BI.extend(i,j),BI.each(j,function(a,b){delete h[a]})}var k=this.views={},l=this.storeViews={},m=this.indexes={},n=[];BI.each(g,function(a,c){k[a]||(k[a]={});var d=[];BI.each(c,function(c,f){var g=e[f];k[a][c]=l[f]=BI.createWidget({type:"bi.relation_view_region_container",value:f,header:g[0].regionTitle,text:g.length>0?g[0].regionText:"",handler:g.length>0?g[0].regionHandler:BI.emptyFn,items:g,belongPackage:!(g.length>0)||g[0].belongPackage}),BI.isNotNull(g[0])&&BI.isNotNull(g[0].keyword)&&k[a][c].doRedMark(g[0].keyword),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN,function(a){b._hoverIn(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,function(a){b._hoverOut(a)}),k[a][c].on(BI.RelationViewRegionContainer.EVENT_PREVIEW,function(a){b.fireEvent(BI.RelationView.EVENT_PREVIEW,f,a)}),m[f]={i:a,j:c},d.push(k[a][c])}),n.push({type:"bi.horizontal",items:d})});var o=this._calculateHeights(),p=this._calculateWidths(),q=[0],r=[0];BI.each(o,function(a,b){0!==a&&(r[a]=r[a-1]+o[a-1])}),BI.each(p,function(a,b){0!==a&&(q[a]=q[a-1]+p[a-1])});var s=this.lines={};BI.each(f,function(a,c){BI.each(c,function(c,e){var f=m[a],g=m[c],h=0,i=1,j=2,n=3,t=j,u=h,v=function(a,b,c,d){var e,f=q[b]+(p[b]-k[a][b].getWidth())/2,g=r[a]+(o[a]-k[a][b].getHeight())/2,l="";switch(c){case h:e=d?k[a][b].getTopRightPosition():k[a][b].getTopLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g-10),g-=10;break;case i:e=k[a][b].getRightPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f+10)+","+g,f+=10;break;case j:e=k[a][b].getBottomPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+f+","+(g+10),g+=10;break;case n:e=k[a][b].getLeftPosition(),f+=e.x,g+=e.y,l="M"+f+","+g+"L"+(f-10)+","+g,f-=10}return{x:f,y:g,path:l}},w="",x=v(f.i,f.j,t),y=v(g.i,g.j,u,!0);w+=x.path+y.path,s[a]||(s[a]={}),w+="M"+x.x+","+x.y+"L"+y.x+","+y.y;var z=s[a][c]=b.svg.path(w).attr({stroke:d.lineColor,"stroke-width":"2"}).hover(function(){z.attr("stroke",d.selectLineColor).toFront(),l[a].setValue(e[0].primary.value),l[c].setValue(e[0].foreign.value)},function(){z.attr("stroke",d.lineColor),l[a].setValue([]),l[c].setValue([])})})});var t=BI.createWidget();BI.createWidget({type:"bi.vertical",element:t,items:n}),BI.createWidget({type:"bi.absolute",element:t,items:[{el:this.svg,left:0,right:0,top:0,bottom:0}]}),BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[t]})}}),BI.RelationView.EVENT_CHANGE="RelationView.EVENT_CHANGE",BI.RelationView.EVENT_PREVIEW="EVENT_PREVIEW",BI.shortcut("bi.relation_view",BI.RelationView),BI.RelationViewRegionContainer=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegionContainer.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region-container",width:150})},_init:function(){BI.RelationViewRegionContainer.superclass._init.apply(this,arguments);var a=this,b=this.options;this.region=BI.createWidget({type:"bi.relation_view_region",value:b.value,header:b.header,text:b.text,handler:b.handler,items:b.items,belongPackage:b.belongPackage}),this.region.on(BI.RelationViewRegion.EVENT_PREVIEW,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_IN,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_IN,b)}),this.region.on(BI.RelationViewRegion.EVENT_HOVER_OUT,function(b){a.fireEvent(BI.RelationViewRegionContainer.EVENT_HOVER_OUT,b)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.region],width:this.region.getWidth(),height:this.region.getHeight()})},doRedMark:function(){this.region.doRedMark.apply(this.region,arguments)},unRedMark:function(){this.region.unRedMark.apply(this.region,arguments)},getWidth:function(){return this.region.getWidth()},getHeight:function(){return this.region.getHeight()},getTopLeftPosition:function(){return this.region.getTopLeftPosition()},getTopRightPosition:function(){return this.region.getTopRightPosition()},getBottomPosition:function(){return this.region.getBottomPosition()},getLeftPosition:function(){return this.region.getLeftPosition()},getRightPosition:function(){return this.region.getRightPosition()},setValue:function(a){this.region.setValue(a)},toggleRegion:function(a){a===!0?this.region.element.fadeIn():this.region.element.fadeOut()},setPreviewSelected:function(a){this.region.setPreviewSelected(a)}}),BI.RelationViewRegionContainer.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegionContainer.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegionContainer.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region_container",BI.RelationViewRegionContainer),BI.RelationViewRegion=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.RelationViewRegion.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-relation-view-region cursor-pointer",width:150,text:"",value:"",header:"",items:[],belongPackage:!0})},_init:function(){BI.RelationViewRegion.superclass._init.apply(this,arguments);var a=this,b=this.options;this.preview=BI.createWidget({type:"bi.icon_button",cls:"relation-table-preview-font",width:25,height:25,stopPropagation:!0}),this.preview.on(BI.IconButton.EVENT_CHANGE,function(){a.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW,this.isSelected())}),this.title=BI.createWidget({type:"bi.label",height:25,width:70,text:b.text,value:b.value,textAlign:"left"}),BI.isKey(b.header)&&this.title.setTitle(b.header,{container:"body"}),this.button_group=BI.createWidget({type:"bi.button_group",items:this._createItems(b.items),layouts:[{type:"bi.vertical"}]}),BI.createWidget({type:"bi.vertical",element:this,items:[{type:"bi.vertical",cls:"relation-view-region-container bi-card bi-border "+(b.belongPackage?"":"other-package"),items:[{type:"bi.vertical_adapt",cls:"relation-view-region-title bi-border-bottom",items:[this.preview,this.title]},this.button_group]}],hgap:25,vgap:20})},_createItems:function(a){var b=this;return BI.map(a,function(a,c){return BI.extend(c,{type:"bi.relation_view_item",hoverIn:function(){b.setValue(c.value),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_IN,c.value)},hoverOut:function(){b.setValue([]),b.fireEvent(BI.RelationViewRegion.EVENT_HOVER_OUT,c.value)}})})},doRedMark:function(){this.title.doRedMark.apply(this.title,arguments)},unRedMark:function(){this.title.unRedMark.apply(this.title,arguments)},getWidth:function(){return this.options.width},getHeight:function(){return 25*this.button_group.getAllButtons().length+25+40+3},getTopLeftPosition:function(){return{x:35,y:20}},getTopRightPosition:function(){return{x:this.getWidth()-25-10,y:20}},getBottomPosition:function(){return{x:35,y:this.getHeight()-20}},getLeftPosition:function(){return{x:25,y:30}},getRightPosition:function(){return{x:this.getWidth()-25,y:30}},setValue:function(a){this.button_group.setValue(a)},setPreviewSelected:function(a){this.preview.setSelected(a)}}),BI.RelationViewRegion.EVENT_HOVER_IN="RelationViewRegion.EVENT_HOVER_IN",BI.RelationViewRegion.EVENT_HOVER_OUT="RelationViewRegion.EVENT_HOVER_OUT",BI.RelationViewRegion.EVENT_PREVIEW="RelationViewRegion.EVENT_PREVIEW",BI.shortcut("bi.relation_view_region",BI.RelationViewRegion),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]0&&a.freezeCols.length=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},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()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments), +BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[]})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}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},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&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}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,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:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-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(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_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",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=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,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){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=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,isNeedFreeze:!1,freezeCols:[],isNeedMerge:!1,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:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60: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,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),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)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.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),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.matched.concat(f.finded)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"single-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])}}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue="",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a="")},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"}})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){b.itemsCreator(c,function(b){d.apply(a,arguments)})},onLoaded:b.onLoaded,hasNext:b.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.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.list)}))))},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){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:this.options.logic,height:25,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a="")},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{ +baseCls:"bi-single-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SingleSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_PAUSE="SingleSelectEditor.EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}if(g){for(var j=!1,k=0;k0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_add_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue="",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_add_trigger",height:b.height,masker:{offset:{left:1,top:1,right:2,bottom:33}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue("")})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING,function(b){var d=BI.last(b);b=BI.initial(b||[]),b.length>0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())})}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CLEAR,action:function(){a.setValue(),a._defaultState()}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(a.storeValue),BI.nextTick(function(){a.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){a.trigger.stopEditing(),a.requesting===!0?a.wants2Quit=!0:a.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button bi-border-left"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:d,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){a||(a="")},_makeMap:function(a){return BI.makeObject(a||[])},_joinKeywords:function(a,b){function c(c){var e=d._makeMap(c);BI.each(a,function(a,b){BI.isNotNull(e[b])&&d.storeValue.value.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.pluck(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.pluck(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_add_combo",BI.SingleSelectCombo),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_add_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_add_trigger",BI.SingleSelectTrigger),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_add_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_add_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",text:"",height:24})},_init:function(){BI.SignTextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+a.text,this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){this.text.setWarningTitle(a)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(a){var b=this.options;this._showHint(),a=BI.isEmpty(a)||a==b.text?b.text:a+b.text,this.text.setValue(a)}}),BI.SignTextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignTextEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.shortcut("bi.sign_text_editor",BI.SignTextEditor),BI.SliderIconButton=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SliderIconButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider-button"})},_init:function(){BI.extend(BI.SliderIconButton.superclass._init.apply(this,arguments)),this.slider=BI.createWidget({type:"bi.icon_button",cls:"slider-icon slider-button",iconWidth:14,iconHeight:14,height:14,width:14}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.slider,top:7,left:-7}],width:0,height:14})}}),BI.shortcut("bi.single_slider_button",BI.SliderIconButton),BI.SingleSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider bi-slider-track",digit:!1,unit:""})},_init:function(){BI.SingleSlider.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._constant;this.enable=!1,this.value="",this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var d=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:c.SLIDER_WIDTH_HALF,height:c.SLIDER_HEIGHT});d.element.click(function(d){if(a.enable){var e=d.clientX-a.element.offset().left-c.SLIDER_WIDTH_HALF,f=a.track.element[0].scrollWidth,g=0;e<0&&(g=0),e>0&&ef-c.SLIDER_WIDTH&&(g=100);var h=BI.parseFloat(g.toFixed(1));a._setAllPosition(h);var i=a._getValueByPercent(h);i=b.digit===!1?i:i.toFixed(b.digit),a.label.setValue(i),a.value=i,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",errorText:"",text:b.unit,width:c.EDITOR_WIDTH-2,allowBlank:!1,validationChecker:function(b){return a._checkValidation(b)}}),this.label.element.hover(function(){a.label.element.removeClass("bi-border").addClass("bi-border")},function(){a.label.element.removeClass("bi-border")}),this.label.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue()),c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setAllPosition(d),this.setValue(b),a.value=b,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:23,left:0,width:"100%"},{el:d,top:20,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},document);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,this.label.setErrorText(BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number")),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value), +this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:20,HEIGHT:20,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider-label bi-slider-track",digit:!1,unit:""})},_init:function(){BI.SingleSliderLabel.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._constant;this.enable=!1,this.value="",this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var d=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:c.SLIDER_WIDTH_HALF,height:c.SLIDER_HEIGHT});d.element.click(function(d){if(a.enable){var e=d.clientX-a.element.offset().left-c.SLIDER_WIDTH_HALF,f=a.track.element[0].scrollWidth,g=0;e<0&&(g=0),e>0&&ef-c.SLIDER_WIDTH&&(g=100);var h=BI.parseFloat(g.toFixed(1));a._setAllPosition(h);var i=a._getValueByPercent(h);i=b.digit===!1?i:i.toFixed(b.digit),a.label.setText(i+b.unit),a.value=i,a.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.label",height:c.HEIGHT,width:c.EDITOR_WIDTH-2}),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:13,left:0,width:"100%"},{el:d,top:10,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},document);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var d=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},document);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[]})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[]})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(a){a=BI.isArray(a)?a:[a],this.tree.setValue(a)},populate:function(a){BI.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[]})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,defaultShowIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items)}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items))}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this;BI.TimeInterval.superclass._init.apply(this,arguments),this.left=this._createCombo(),this.right=this._createCombo(),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(){var a=this,b=BI.createWidget({type:"bi.multidate_combo"});return b.on(BI.MultiDateCombo.EVENT_ERROR,function(){a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)}),b.on(BI.MultiDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),a,{offsetStyle:"center"}),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls))}),b.on(BI.MultiDateCombo.EVENT_BEFORE_POPUPVIEW,function(){a.left.hidePopupView(),a.right.hidePopupView()}),b.on(BI.MultiDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var b=a.left.getKey(),c=a.right.getKey();a._check(b,c)&&a._compare(b,c)?(a._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),a.element.addClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_ERROR)):(a._clearTitle(),a.element.removeClass(a.constants.timeErrorCls),a.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),b},_dateCheck:function(a){return Date.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||Date.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||Date.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!Date.checkVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&Date.checkLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&Date.checkLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=Date.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=Date.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.YearCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:25})},_init:function(){BI.YearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.year_trigger",min:b.min,max:b.max}),this.trigger.on(BI.YearTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.YearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.YearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.YearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",element:this,destroyWhenHide:!0,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.YearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.YearCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max}}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){var b=a.trigger.getKey();BI.isNotNull(b)?a.popup.setValue(b):b||b===a.storeValue?a.setValue():a.popup.setValue(a.storeValue),a.fireEvent(BI.YearCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.combo.setValue(a||"")},getValue:function(){return this.popup.getValue()}}),BI.YearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_combo",BI.YearCombo),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;this.selectedYear=this._year=Date.getDate().getFullYear();var b=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1}),c=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,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:25,items:[b,c]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var d=this.getSelectedCard();b.setEnable(!d.isFrontYear()),c.setEnable(!d.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)})},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;Date.checkVoid(a,1,1,b.min,b.max)[0]?(a=Date.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.YearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.YearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger bi-border",min:"1900-01-01",max:"2099-12-31",height:24})},_init:function(){BI.YearTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,validationChecker:function(d){return a.editor.setErrorText(BI.isPositiveInteger(d)?c.errorTextInvalid:c.errorText),""===d||BI.isPositiveInteger(d)&&!Date.checkVoid(d,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:c.errorText}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.YearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.YearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&(a.editor.setValue(b),a.editor.setTitle(b)),a.fireEvent(BI.YearTrigger.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.YearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.YearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]})},setValue:function(a){this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return 0|this.editor.getValue()}}),BI.YearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.YearTrigger.EVENT_ERROR="EVENT_ERROR",BI.YearTrigger.EVENT_START="EVENT_START",BI.YearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.year_trigger",BI.YearTrigger),BI.YearMonthCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearMonthCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-month-combo",yearBehaviors:{},monthBehaviors:{},height:25})},_init:function(){BI.YearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.month=BI.createWidget({type:"bi.month_combo",behaviors:b.monthBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),this.month.on(BI.MonthCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearMonthCombo.EVENT_CONFIRM)}),this.month.on(BI.MonthCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.month]})},setValue:function(a){a=a||{},this.month.setValue(a.month),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.YearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_month_combo",BI.YearMonthCombo),BI.YearQuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearQuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-quarter-combo",yearBehaviors:{},quarterBehaviors:{},height:25})},_init:function(){BI.YearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.year=BI.createWidget({type:"bi.year_combo",behaviors:b.yearBehaviors}),this.quarter=BI.createWidget({type:"bi.quarter_combo",behaviors:b.quarterBehaviors}),this.year.on(BI.YearCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.year.on(BI.YearCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),this.quarter.on(BI.QuarterCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_CONFIRM)}),this.quarter.on(BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.center",element:this,hgap:5,items:[this.year,this.quarter]})},setValue:function(a){a=a||{},this.quarter.setValue(a.quarter),this.year.setValue(a.year)},getValue:function(){return{year:this.year.getValue(),quarter:this.quarter.getValue()}}}),BI.YearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_quarter_combo",BI.YearQuarterCombo),BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_itemsCreator:function(a,b){function c(c){var d=(a.keywords||[]).slice();if(a.keyword&&d.push(a.keyword),BI.each(d,function(a,b){var d=BI.Func.getSearchResult(c,b);c=d.matched.concat(d.finded)}),a.selectedValues){var e=BI.makeObject(a.selectedValues,!0);c=BI.filter(c,function(a,b){return!e[b.value]})}return a.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void b({items:c}):a.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void b({count:c.length}):void b({items:c,hasNext:!1})}var d=this,e=this.options;e.cache&&this.items?c(this.items):e.itemsCreator({},function(a){d.items=a,c(a)})}}),BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.combo.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="AllValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo),BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){ +var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;bj._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.finded.length>0||e.matched.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(a){var b=a;return BI.isNotNull(this.items)&&BI.some(this.items,function(c,d){if(d.value===a)return b=d.text,!0}),b},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d