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

55 lines
1.5 MiB

/*! fineui 2020-02-11 10:52:41 */
5 years ago
function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}!function(e){function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}var r={};o.m=e,o.c=r,o.d=function(t,n,e){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var r in n)o.d(e,r,function(t){return n[t]}.bind(null,r));return e},o.n=function(t){var n=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s=70)}([function(r,t,n){"use strict";(function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var e=function e(t){return t&&t.Math==Math&&t};r.exports=e("object"==("undefined"==typeof globalThis?"undefined":n(globalThis))&&globalThis)||e("object"==("undefined"==typeof window?"undefined":n(window))&&window)||e("object"==("undefined"==typeof self?"undefined":n(self))&&self)||e("object"==(void 0===t?"undefined":n(t))&&t)||Function("return this")()}).call(this,n(74))},function(t,n,e){"use strict";var r=e(0),o=e(20),i=e(41),u=e(53),c=r.Symbol,s=o("wks");t.exports=function(t){return s[t]||(s[t]=u&&c[t]||(u?c:i)("Symbol."+t))}},function(t,n,e){"use strict";function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var l=e(0),p=e(24).f,y=e(6),d=e(11),v=e(40),h=e(77),g=e(51);t.exports=function(t,n){var e,r,o,i,u,c=t.target,s=t.global,f=t.stat;if(e=s?l:f?l[c]||v(c,{}):(l[c]||{}).prototype)for(r in n){if(i=n[r],o=t.noTargetGet?(u=p(e,r))&&u.value:e[r],!g(s?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(a(i)===a(o))continue;h(i,o)}(t.sham||o&&o.sham)&&y(i,"sham",!0),d(e,r,i,t)}}},function(t,n,e){"use strict";var r=e(7);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,n,e){"use strict";t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n,e){"use strict";var r=e(4);t.exports=!r(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){"use strict";var r=e(5),o=e(9),i=e(19);t.exports=r?function(t,n,e){return o.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return"object"===r(t)?null!==t:"function"==typeof t}},function(t,n,e){"use strict";var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,e){"use strict";var r=e(5),o=e(47),i=e(3),u=e(38),c=Object.defineProperty;n.f=r?c:function(t,n,e){if(i(t),n=u(n,!0),i(e),o)try{return c(t,n,e)}catch(r){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){"use strict";t.exports=e(0)},function(t,n,e){"use strict";var c=e(0),r=e(20),s=e(6),f=e(8),a=e(40),o=e(48),i=e(16),u=i.get,l=i.enforce,p=String(o).split("toString");r("inspectSource",function(t){return o.call(t)}),(t.exports=function(t,n,e,r){var o=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,u=!!r&&!!r.noTargetGet;"function"==typeof e&&("string"!=typeof n||f(e,"name")||s(e,"name",n),l(e).source=p.j
},it=function it(e,r,o,t){if(!r.done){r.done=!0,t&&(r=t);try{if(e===o)throw D("Promise can't be resolved itself");var i=Q(o);i?w(function(){var t={done:!1};try{i.call(o,rt(it,e,t,r),rt(ot,e,t,r))}catch(n){ot(e,t,n,r)}}):(r.value=o,r.state=1,X(e,r,!1))}catch(n){ot(e,{done:!1},n,r)}}};J&&(N=function(t){b(this,N,_),g(t),r.call(this);var n=F(this);try{t(rt(it,this,n),rt(ot,this,n))}catch(e){ot(this,n,e)}},(r=function(t){C(this,{type:_,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=y(N.prototype,{then:function(t,n){var e=R(this),r=W(O(this,N));return r.ok="function"!=typeof t||t,r.fail="function"==typeof n&&n,r.domain=B?V.domain:void 0,e.parent=!0,e.reactions.push(r),0!=e.state&&X(this,e,!1),r.promise},"catch":function(t){return this.then(void 0,t)}}),o=function o(){var t=new r,n=F(t);this.promise=t,this.resolve=rt(it,t,n),this.reject=rt(ot,t,n)},A.f=W=function W(t){return t===N||t===i?new o(t):q(t)},s||"function"!=typeof l||(u=l.prototype.then,p(l.prototype,"then",function(t,n){var e=this;return new N(function(t,n){u.call(e,t,n)}).then(t,n)},{unsafe:!0}),"function"==typeof $&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return P(N,$.apply(f,arguments))}}))),c({global:!0,wrap:!0,forced:J},{Promise:N}),d(N,_,!1,!0),v(_),i=a[_],c({target:_,stat:!0,forced:J},{reject:function(t){var n=W(this);return n.reject.call(void 0,t),n.promise}}),c({target:_,stat:!0,forced:s||J},{resolve:function(t){return P(s&&this===i?N:this,t)}}),c({target:_,stat:!0,forced:K},{all:function(t){var c=this,n=W(c),s=n.resolve,f=n.reject,e=T(function(){var r=g(c.resolve),o=[],i=0,u=1;x(t,function(t){var n=i++,e=!1;o.push(void 0),u++,r.call(c,t).then(function(t){e||(e=!0,o[n]=t,--u||s(o))},f)}),--u||s(o)});return e.error&&f(e.value),n.promise},race:function(t){var e=this,r=W(e),o=r.reject,n=T(function(){var n=g(e.resolve);x(t,function(t){n.call(e,t).then(r.resolve,o)})});return n.error&&o(n.value),r.promise}})},function(t,n,e){"use strict";var o=e(11);t.exports=function(t,n,e){for(var r in n)o(t,r,n[r],e);return t}},function(t,n,e){"use strict";var r=e(17),o=e(9),i=e(1),u=e(5),c=i("species");t.exports=function(t){var n=r(t),e=o.f;u&&n&&!n[c]&&e(n,c,{configurable:!0,get:function(){return this}})}},function(t,n,e){"use strict";t.exports=function(t,n,e){if(!(t instanceof n))throw TypeError("Incorrect "+(e?e+" ":"")+"invocation");return t}},function(t,n,e){"use strict";var r=e(1),o=e(22),i=r("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||u[i]===t)}},function(t,n,e){"use strict";var r=e(59),o=e(22),i=e(1)("iterator");t.exports=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,n,e){"use strict";var u=e(3);t.exports=function(t,n,e,r){try{return r?n(u(e)[0],e[1]):n(e)}catch(i){var o=t["return"];throw void 0!==o&&u(o.call(t)),i}}},function(t,n,e){"use strict";var o=e(1)("iterator"),i=!1;try{var r=0,u={next:function(){return{done:!!r++}},"return":function(){i=!0}};u[o]=function(){return this},Array.from(u,function(){throw 2})}catch(c){}t.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var r={};r[o]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch(c){}return e}},function(t,n,e){"use strict";var r,o,i,u,c,s,f,a,l=e(0),p=e(24).f,y=e(12),d=e(66).set,v=e(46),h=l.MutationObserver||l.WebKitMutationObserver,g=l.process,b=l.Promise,m="process"==y(g),x=p(l,"queueMicrotask"),S=x&&x.value;S||(r=function r(){var t,n;for(m&&(t=g.domain)&&t.exit();o;){n=o.fn,o=o.next;try{n()}catch(e){throw o?u():i=void 0,e}}i=void 0,t&&t.enter()},u=m?function u(){g.nextTick(r)}:h&&!/(iphone|ipod|ipad).*applewebkit/i.test(v)?(c=!0,s=document.createTextNode(""),new h(r).observe(s,{characterData:!0}),function u(){s.data=c=!c}):b&&b.resolve?(f=b.resolve(void 0),a=f.then,function u(){a.call(f,r)}):function u(){d.call(l,r)}),t.exports=S||function(t){var n={fn:t,next:void 0};i&&(i.next=n),o||(o=n,u()),i=n}},function(t,n,e){"use strict";var r=e(0);t.exports=function(t,n){var e=r.console;e&&e.error&&(1===arguments.length?e.error(t):e.error(t,n))}},function(t,n,e){"use
return stack||(stack=new Stack),equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack)}}return!!isSameTag&&(stack||(stack=new Stack),equalObjects(object,other,bitmask,customizer,equalFunc,stack))}function baseIsMap(value){return isObjectLike(value)&&getTag(value)==mapTag}function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=Object(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++index<length;){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined&&!(key in object))return!1}else{var stack=new Stack;if(customizer)var result=customizer(objValue,srcValue,key,object,source,stack);if(!(result===undefined?baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG,customizer,stack):result))return!1}}return!0}function baseIsNative(value){if(!isObject(value)||isMasked(value))return!1;var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function baseIsRegExp(value){return isObjectLike(value)&&baseGetTag(value)==regexpTag}function baseIsSet(value){return isObjectLike(value)&&getTag(value)==setTag}function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]}function baseIteratee(value){return"function"==typeof value?value:null==value?identity:"object"==typeof value?isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value):property(value)}function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty.call(object,key)&&"constructor"!=key&&result.push(key);return result}function baseKeysIn(object){if(!isObject(object))return nativeKeysIn(object);var isProto=isPrototype(object),result=[];for(var key in object)("constructor"!=key||!isProto&&hasOwnProperty.call(object,key))&&result.push(key);return result}function baseLt(value,other){return value<other}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection)}),result}function baseMatches(source){var matchData=getMatchData(source);return 1==matchData.length&&matchData[0][2]?matchesStrictComparable(matchData[0][0],matchData[0][1]):function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseMatchesProperty(path,srcValue){return isKey(path)&&isStrictComparable(srcValue)?matchesStrictComparable(toKey(path),srcValue):function(object){var objValue=get(object,path);return objValue===undefined&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}function baseMerge(object,source,srcIndex,customizer,stack){object!==source&&baseFor(source,function(srcValue,key){if(isObject(srcValue))stack||(stack=new Stack),baseMergeDeep(object,source,key,srcIndex,baseMerge,customizer,stack);else{var newValue=customizer?customizer(safeGet(object,key),srcValue,key+"",object,source,stack):undefined;newValue===undefined&&(newValue=srcValue),assignMergeValue(object,key,newValue)}},keysIn)}function baseMergeDeep(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=safeGet(object,key),srcValue=safeGet(source,key),stacked=stack.get(srcValue);if(stacked)return void assignMergeValue(object,key,stacked);var newValue=customizer?customizer(objValue,srcValue,key+"",object,source,stack):undefined,isCommon=newValue===undefined;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue,isArr||isBuff||isTyped?isArray(objValue)?newValue=objValue:isArrayLikeObject(objValue)?newValue=copyArray(objValue):isBuff?(isCommon=!1,newValue=cloneBuffer(srcValue,!0)):isTyped?(isCommon=!1,newValue=cloneTypedArray(srcValue,!0)):newValue=[]:isPl
return"0"==result&&1/value==-INFINITY?"-0":result}function toSource(func){if(null!=func){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function updateWrapDetails(details,bitmask){return arrayEach(wrapFlags,function(pair){var value="_."+pair[0];bitmask&pair[1]&&!arrayIncludes(details,value)&&details.push(value)}),details.sort()}function wrapperClone(wrapper){if(wrapper instanceof LazyWrapper)return wrapper.clone();var result=new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__);return result.__actions__=copyArray(wrapper.__actions__),result.__index__=wrapper.__index__,result.__values__=wrapper.__values__,result}function compact(array){for(var index=-1,length=null==array?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];value&&(result[resIndex++]=value)}return result}function concat(){var length=arguments.length;if(!length)return[];for(var args=Array(length-1),array=arguments[0],index=length;index--;)args[index-1]=arguments[index];return arrayPush(isArray(array)?copyArray(array):[array],baseFlatten(args,1))}function drop(array,n,guard){var length=null==array?0:array.length;return length?(n=guard||n===undefined?1:toInteger(n),baseSlice(array,n<0?0:n,length)):[]}function findIndex(array,predicate,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=null==fromIndex?0:toInteger(fromIndex);return index<0&&(index=nativeMax(length+index,0)),baseFindIndex(array,baseIteratee(predicate,3),index)}function findLastIndex(array,predicate,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=length-1;return fromIndex!==undefined&&(index=toInteger(fromIndex),index=fromIndex<0?nativeMax(length+index,0):nativeMin(index,length-1)),baseFindIndex(array,baseIteratee(predicate,3),index,!0)}function flatten(array){var length=null==array?0:array.length;return length?baseFlatten(array,1):[]}function flattenDeep(array){var length=null==array?0:array.length;return length?baseFlatten(array,INFINITY):[]}function head(array){return array&&array.length?array[0]:undefined}function indexOf(array,value,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=null==fromIndex?0:toInteger(fromIndex);return index<0&&(index=nativeMax(length+index,0)),baseIndexOf(array,value,index)}function initial(array){var length=null==array?0:array.length;return length?baseSlice(array,0,-1):[]}function last(array){var length=null==array?0:array.length;return length?array[length-1]:undefined}function reverse(array){return null==array?array:nativeReverse.call(array)}function slice(array,start,end){var length=null==array?0:array.length;return length?(end&&"number"!=typeof end&&isIterateeCall(array,start,end)?(start=0,end=length):(start=null==start?0:toInteger(start),end=end===undefined?length:toInteger(end)),baseSlice(array,start,end)):[]}function take(array,n,guard){return array&&array.length?(n=guard||n===undefined?1:toInteger(n),baseSlice(array,0,n<0?0:n)):[]}function takeRight(array,n,guard){var length=null==array?0:array.length;return length?(n=guard||n===undefined?1:toInteger(n),n=length-n,baseSlice(array,n<0?0:n,length)):[]}function uniq(array){return array&&array.length?baseUniq(array):[]}function uniqBy(array,iteratee){return array&&array.length?baseUniq(array,baseIteratee(iteratee,2)):[]}function unzip(array){if(!array||!array.length)return[];var length=0;return array=arrayFilter(array,function(group){if(isArrayLikeObject(group))return length=nativeMax(group.length,length),!0}),baseTimes(length,function(index){return arrayMap(array,baseProperty(index))})}function zipObject(props,values){return baseZipObject(props||[],values||[],assignValue)}function chain(value){var result=lodash(value);return result.__chain__=!0,result}function tap(value,interceptor){return interceptor(value),value}function thru(value,interceptor){return interceptor(value)}function wrapperChain(){return chain(this)}function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)}function wrapperNext(){this.__values__===undefined&&(this.__values__=to
var index=-1,length=sources.length,guard=length>2?sources[2]:undefined;for(guard&&isIterateeCall(sources[0],sources[1],guard)&&(length=1);++index<length;)for(var source=sources[index],props=keysIn(source),propsIndex=-1,propsLength=props.length;++propsIndex<propsLength;){var key=props[propsIndex],value=object[key];(value===undefined||eq(value,objectProto[key])&&!hasOwnProperty.call(object,key))&&(object[key]=source[key])}return object}),defaultsDeep=baseRest(function(args){return args.push(undefined,customDefaultsMerge),apply(mergeWith,undefined,args)}),invert=createInverter(function(result,value,key){null!=value&&"function"!=typeof value.toString&&(value=nativeObjectToString.call(value)),result[value]=key},constant(identity)),invertBy=createInverter(function(result,value,key){null!=value&&"function"!=typeof value.toString&&(value=nativeObjectToString.call(value)),hasOwnProperty.call(result,value)?result[value].push(key):result[value]=[key]},baseIteratee),merge=createAssigner(function(object,source,srcIndex){baseMerge(object,source,srcIndex)}),mergeWith=createAssigner(function(object,source,srcIndex,customizer){baseMerge(object,source,srcIndex,customizer)}),omit=flatRest(function(object,paths){var result={};if(null==object)return result;var isDeep=!1;paths=arrayMap(paths,function(path){return path=castPath(path,object),isDeep||(isDeep=path.length>1),path}),copyObject(object,getAllKeysIn(object),result),isDeep&&(result=baseClone(result,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone));for(var length=paths.length;length--;)baseUnset(result,paths[length]);return result}),pick=flatRest(function(object,paths){return null==object?{}:basePick(object,paths)}),range=createRange();lodash.assignIn=assignIn,lodash.before=before,lodash.bind=bind,lodash.chain=chain,lodash.compact=compact,lodash.concat=concat,lodash.countBy=countBy,lodash.create=create,lodash.debounce=debounce,lodash.defaults=defaults,lodash.defaultsDeep=defaultsDeep,lodash.defer=defer,lodash.delay=delay,lodash.difference=difference,lodash.drop=drop,lodash.filter=filter,lodash.flatten=flatten,lodash.flattenDeep=flattenDeep,lodash.groupBy=groupBy,lodash.initial=initial,lodash.intersection=intersection,lodash.invert=invert,lodash.invertBy=invertBy,lodash.iteratee=iteratee,lodash.keys=keys,lodash.map=map,lodash.matches=matches,lodash.merge=merge,lodash.mixin=mixin,lodash.negate=negate,lodash.omit=omit,lodash.omitBy=omitBy,lodash.once=once,lodash.pick=pick,lodash.range=range,lodash.reject=reject,lodash.rest=rest,lodash.set=set,lodash.slice=slice,lodash.sortBy=sortBy,lodash.take=take,lodash.takeRight=takeRight,lodash.tap=tap,lodash.throttle=throttle,lodash.thru=thru,lodash.toArray=toArray,lodash.union=union,lodash.uniq=uniq,lodash.uniqBy=uniqBy,lodash.unzip=unzip,lodash.values=values,lodash.without=without,lodash.zip=zip,lodash.zipObject=zipObject,lodash.extend=assignIn,mixin(lodash,lodash),lodash.clamp=clamp,lodash.clone=clone,lodash.cloneDeep=cloneDeep,lodash.escape=escape,lodash.every=every,lodash.find=find,lodash.findIndex=findIndex,lodash.findKey=findKey,lodash.findLastIndex=findLastIndex,lodash.findLastKey=findLastKey,lodash.forEach=forEach,lodash.get=get,lodash.has=has,lodash.head=head,lodash.identity=identity,lodash.indexOf=indexOf,lodash.isArguments=isArguments,lodash.isArray=isArray,lodash.isArrayLike=isArrayLike,lodash.isBoolean=isBoolean,lodash.isDate=isDate,lodash.isEmpty=isEmpty,lodash.isEqual=isEqual,lodash.isFinite=isFinite,lodash.isFunction=isFunction,lodash.isNaN=isNaN,lodash.isNull=isNull,lodash.isNumber=isNumber,lodash.isObject=isObject,lodash.isPlainObject=isPlainObject,lodash.isRegExp=isRegExp,lodash.isString=isString,lodash.isUndefined=isUndefined,lodash.last=last,lodash.max=max,lodash.min=min,lodash.noConflict=noConflict,lodash.noop=noop,lodash.random=random,lodash.reduce=reduce,lodash.result=result,lodash.size=size,lodash.some=some,lodash.trim=trim,lodash.uniqueId=uniqueId,lodash.each=forEach,lodash.first=head,mixin(lodash,function(){var source={};return baseForOwn(lodash,function(func,methodName){hasOwnProperty.call(lodash.protot
},_initEffects:function(){var o=this.options;(o.disabled||o.invalid)&&(this.options.disabled&&this.setEnable(!1),this.options.invalid&&this.setValid(!1))},_initState:function(){this._isMounted=!1},_initElement:function(){var self=this,els=this.render&&this.render();BI.isPlainObject(els)&&(els=[els]),BI.isArray(els)&&BI.each(els,function(i,el){BI.createWidget(el,{element:self})}),this._mount()},_setParent:function(parent){this._parent=parent},_mount:function(force,deep,lifeHook,predicate){var self=this;return!!(force||!this._isMounted&&this.isVisible()&&this.__asking!==!0&&(this._isRoot===!0||this._parent&&this._parent._isMounted===!0))&&(lifeHook!==!1&&this.beforeMount&&this.beforeMount(),this._isMounted=!0,this._mountChildren&&this._mountChildren(),BI.each(this._children,function(i,widget){!self.isEnabled()&&widget._setEnable(!1),!self.isValid()&&widget._setValid(!1),widget._mount&&widget._mount(!!deep&&force,deep,lifeHook,predicate)}),lifeHook!==!1&&this.mounted&&this.mounted(),this.fireEvent(BI.Events.MOUNT),predicate&&predicate(this),!0)},_mountChildren:null,isMounted:function(){return this._isMounted},setWidth:function(w){this.options.width=w,this._initElementWidth()},setHeight:function(h){this.options.height=h,this._initElementHeight()},_setEnable:function(enable){enable===!0?this.options.disabled=!1:enable===!1&&(this.options.disabled=!0),BI.each(this._children,function(i,child){!child._manualSetEnable&&child._setEnable&&child._setEnable(enable)})},_setValid:function(valid){valid===!0?this.options.invalid=!1:valid===!1&&(this.options.invalid=!0),BI.each(this._children,function(i,child){!child._manualSetValid&&child._setValid&&child._setValid(valid)})},_setVisible:function(visible){visible===!0?this.options.invisible=!1:visible===!1&&(this.options.invisible=!0)},setEnable:function(enable){this._manualSetEnable=!0,this._setEnable(enable),enable===!0?this.element.removeClass("base-disabled disabled"):enable===!1&&this.element.addClass("base-disabled disabled")},setVisible:function(visible){this._setVisible(visible),visible===!0?(this.element.css("display",""),this._mount()):visible===!1&&this.element.css("display","none"),this.fireEvent(BI.Events.VIEW,visible)},setValid:function(valid){this._manualSetValid=!0,this._setValid(valid),valid===!0?this.element.removeClass("base-invalid invalid"):valid===!1&&this.element.addClass("base-invalid invalid")},doBehavior:function(){var args=arguments;BI.each(this._children,function(i,child){child.doBehavior&&child.doBehavior.apply(child,args)})},getWidth:function(){return this.options.width},getHeight:function(){return this.options.height},isValid:function(){return!this.options.invalid},addWidget:function(name,widget){var self=this;if(name instanceof BI.Widget&&(widget=name,name=widget.getName()),BI.isKey(name)&&(name+=""),name=name||widget.getName()||BI.uniqueId("widget"),this._children[name])throw new Error("name has already been existed");return widget._setParent&&widget._setParent(this),widget.on(BI.Events.DESTROY,function(){BI.remove(self._children,this)}),this._children[name]=widget},getWidgetByName:function(name){if(!BI.isKey(name)||name===this.getName())return this;name+="";var widget=void 0,other={};return BI.any(this._children,function(i,wi){return i===name?(widget=wi,!0):void(other[i]=wi)}),widget||BI.any(other,function(i,wi){return widget=wi.getWidgetByName(i)}),widget},removeWidget:function(nameOrWidget){var self=this;BI.isWidget(nameOrWidget)?BI.remove(this._children,nameOrWidget):delete this._children[nameOrWidget]},hasWidget:function(name){return null!=this._children[name]},getName:function(){return this.widgetName},setTag:function(tag){this.options.tag=tag},getTag:function(){return this.options.tag},attr:function(key,value){var self=this;return BI.isPlainObject(key)?void BI.each(key,function(k,v){self.attr(k,v)}):BI.isNotNull(value)?this.options[key]=value:this.options[key]},css:function(name,value){return this.element.css(name,value)},getText:function(){},setText:function(text){},getValue:function(){},setValue:function(value){},isEnabled:function(){return!this.
return output=_utf8_decode(output)}})}(),BI.Cache={_prefix:"bi",setUsername:function(username){localStorage.setItem(BI.Cache._prefix+".username",(username+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(key){return BI.Cache._getKeyPrefix()+(key||"")},getItem:function(key){return localStorage.getItem(BI.Cache._generateKey(key))},setItem:function(key,value){localStorage.setItem(BI.Cache._generateKey(key),value)},removeItem:function(key){localStorage.removeItem(BI.Cache._generateKey(key))},clear:function(){for(var i=localStorage.length;i>=0;i--){var key=localStorage.key(i);key&&0===key.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(key)}},keys:function(){for(var result=[],i=localStorage.length;i>=0;i--){var key=localStorage.key(i);if(key){var prefix=BI.Cache._getKeyPrefix();0===key.indexOf(prefix)&&(result[result.length]=key.substring(prefix.length))}}return result},addCookie:function(name,value,path,expiresHours){var cookieString=name+"="+escape(value);if(expiresHours&&expiresHours>0){var date=new Date;date.setTime(date.getTime()+3600*expiresHours*1e3),cookieString=cookieString+"; expires="+date.toUTCString()}path&&(cookieString=cookieString+"; path="+path),document.cookie=cookieString},getCookie:function(name){var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");return(arr=document.cookie.match(reg))?unescape(arr[2]):null},deleteCookie:function(name,path){var date=new Date;date.setTime(date.getTime()-1e4);var cookieString=name+"=v; expires="+date.toUTCString();path&&(cookieString=cookieString+"; path="+path),document.cookie=cookieString}},BI.CellSizeAndPositionManager=function(cellCount,cellSizeGetter,estimatedCellSize){this._cellSizeGetter=cellSizeGetter,this._cellCount=cellCount,this._estimatedCellSize=estimatedCellSize,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(cellCount,estimatedCellSize){this._cellCount=cellCount,this._estimatedCellSize=estimatedCellSize},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(index){if(!(index<0||index>=this._cellCount)){if(index>this._lastMeasuredIndex){for(var lastMeasuredCellSizeAndPosition=this.getSizeAndPositionOfLastMeasuredCell(),offset=lastMeasuredCellSizeAndPosition.offset+lastMeasuredCellSizeAndPosition.size,i=this._lastMeasuredIndex+1;i<=index;i++){var size=this._cellSizeGetter(i);null==size||isNaN(size)||(this._cellSizeAndPositionData[i]={offset:offset,size:size},offset+=size)}this._lastMeasuredIndex=index}return this._cellSizeAndPositionData[index]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var lastMeasuredCellSizeAndPosition=this.getSizeAndPositionOfLastMeasuredCell();return lastMeasuredCellSizeAndPosition.offset+lastMeasuredCellSizeAndPosition.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(align,containerSize,currentOffset,targetIndex){var datum=this.getSizeAndPositionOfCell(targetIndex),maxOffset=datum.offset,minOffset=maxOffset-containerSize+datum.size,idealOffset;switch(align){case"start":idealOffset=maxOffset;break;case"end":idealOffset=minOffset;break;case"center":idealOffset=maxOffset-(containerSize-datum.size)/2;break;default:idealOffset=Math.max(minOffset,Math.min(maxOffset,currentOffset))}var totalSize=this.getTotalSize();return Math.max(0,Math.min(totalSize-containerSize,idealOffset))},getVisibleCellRange:function(containerSize,offset){var totalSize=this.getTotalSize();if(0===totalSize)return{};var maxOffset=offset+containerSize,start=this._findNearestCell(offset),datum=this.getSizeAndPositionOfCell(start);offset=datum
33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},_checkPYCh=function(ch){var uni=ch.charCodeAt(0);return uni>40869||uni<19968?ch:oMultiDiff[uni]?oMultiDiff[uni]:_ChineseFirstPY.charAt(uni-19968)},_mkPYRslt=function(arr,options){for(var ignoreMulti=options.ignoreMulti,splitChar=options.splitChar,arrRslt=[""],k,multiLen=0,i=0,len=arr.length;i<len;i++){var str=arr[i],strlen=str.length;if(1==strlen||multiLen>14||ignoreMulti){var tmpStr=str.substring(0,1);for(k=0;k<arrRslt.length;k++)arrRslt[k]+=tmpStr}else{var tmpArr=arrRslt.slice(0);for(arrRslt=[],multiLen++,k=0;k<strlen;k++){for(var tmp=tmpArr.slice(0),j=0;j<tmp.length;j++)tmp[j]+=str.charAt(k);arrRslt=arrRslt.concat(tmp)}}}return arrRslt.join(splitChar||"").toLowerCase()};_.extend(BI,{makeFirstPY:function(str,options){if(options=options||{},"string"!=typeof str)return""+str;for(var arrResult=[],i=0,len=str.length;i<len;i++){var ch=str.charAt(i);arrResult.push(_checkPYCh(ch))}return _mkPYRslt(arrResult,options)}})}(),!function(){var cancelAnimationFrame=_global.cancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.mozCancelAnimationFrame||_global.oCancelAnimationFrame||_global.msCancelAnimationFrame||_global.clearTimeout,requestAnimationFrame=_global.requestAnimationFrame||_global.webkitRequestAnimationFrame||_global.mozRequestAnimationFrame||_global.oRequestAnimationFrame||_global.msRequestAnimationFrame||_global.setTimeout;BI.MouseMoveTracker=function(onMove,onMoveEnd,domNode){this._isDragging=!1,this._animationFrameID=null,this._domNode=domNode,this._onMove=onMove,this._onMoveEnd=onMoveEnd,this._onMouseMove=BI.bind(this._onMouseMove,this),this._onMouseUp=BI.bind(this._onMouseUp,this),this._didMouseMove=BI.bind(this._didMouseMove,this)},BI.MouseMoveTracker.prototype={constructor:BI.MouseMoveTracker,captureMouseMoves:function(event){this._eventMoveToken||this._eventUpToken||(this._eventMoveToken=BI.EventListener.listen(this._domNode,"mousemove",this._onMouseMove),this._eventUpToken=BI.EventListener.listen(this._domNode,"mouseup",this._onMouseUp)),this._isDragging||(this._deltaX=0,this._deltaY=0,this._isDragging=!0,this._x=event.clientX,this._y=event.clientY),event.preventDefault?event.preventDefault():event.returnValue=!1},releaseMouseMoves:function(){this._eventMoveToken&&this._eventUpToken&&(this._eventMoveToken.remove(),this._eventMoveToken=null,this._eventUpToken.remove(),this._eventUpToken=null),null!==this._animationFrameID&&(cancelAnimationFrame(this._animationFrameID),this._animationFrameID=null),this._isDragging&&(this._isDragging=!1,this._x=null,this._y=null)},isDragging:function(){return this._isDragging},_onMouseMove:function(event){var x=event.clientX,y=event.clientY;this._deltaX+=x-this._x,this._deltaY+=y-this._y,null===this._animationFrameID&&(this._animationFrameID=requestAnimationFrame(this._didMouseMove)),this._x=x,this._y=y,event.preventDefault?event.preventDefault():event.returnValue=!1},_didMouseMove:function(){this._animationFrameID=null,this._onMove(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0},_onMouseUp:functi
children[key]._destroy()}}}function insertBefore(insert,before,isNext,index){insert=self._getOptions(insert),before=before&&self._getOptions(before);var insertKey=BI.isKey(insert.key)?insert.key:self._getChildName(index);if(before&&children[before.key]){var beforeKey=BI.isKey(before.key)?before.key:self._getChildName(index),next;next=isNext?children[beforeKey].element.next():children[beforeKey].element,next.length>0?next.before(children[insertKey].element):self._getWrapper().append(children[insertKey].element)}else self._getWrapper().append(children[insertKey].element)}function findOldVnode(vnodes,vNode,beginIdx,endIdx){var i,found;for(i=beginIdx;i<=endIdx;++i)vnodes[i]&&sameVnode(vnodes[i],vNode)&&(found=vnodes[i]);return found}var self=this,oldStartIdx=0,newStartIdx=0,oldEndIdx=oldCh.length-1,oldStartVnode=oldCh[0],oldEndVnode=oldCh[oldEndIdx],newEndIdx=newCh.length-1,newStartVnode=newCh[0],newEndVnode=newCh[newEndIdx],before,updated,children={};for(BI.each(oldCh,function(i,child){child=self._getOptions(child);var key=null==child.key?i:child.key;BI.isKey(key)&&(children[key]=self._children[self._getChildName(i)])});oldStartIdx<=oldEndIdx&&newStartIdx<=newEndIdx;)if(BI.isNull(oldStartVnode))oldStartVnode=oldCh[++oldStartIdx];else if(BI.isNull(oldEndVnode))oldEndVnode=oldCh[--oldEndIdx];else if(sameVnode(oldStartVnode,newStartVnode,oldStartIdx,newStartIdx))updated=this.patchItem(oldStartVnode,newStartVnode,oldStartIdx)||updated,children[null==oldStartVnode.key?this._getChildName(oldStartIdx):oldStartVnode.key]=this._children[this._getChildName(oldStartIdx)],oldStartVnode=oldCh[++oldStartIdx],newStartVnode=newCh[++newStartIdx];else if(sameVnode(oldEndVnode,newEndVnode,oldEndIdx,newEndIdx))updated=this.patchItem(oldEndVnode,newEndVnode,oldEndIdx)||updated,children[null==oldEndVnode.key?this._getChildName(oldEndIdx):oldEndVnode.key]=this._children[this._getChildName(oldEndIdx)],oldEndVnode=oldCh[--oldEndIdx],newEndVnode=newCh[--newEndIdx];else if(sameVnode(oldStartVnode,newEndVnode))updated=this.patchItem(oldStartVnode,newEndVnode,oldStartIdx)||updated,children[null==oldStartVnode.key?this._getChildName(oldStartIdx):oldStartVnode.key]=this._children[this._getChildName(oldStartIdx)],insertBefore(oldStartVnode,oldEndVnode,!0),oldStartVnode=oldCh[++oldStartIdx],newEndVnode=newCh[--newEndIdx];else if(sameVnode(oldEndVnode,newStartVnode))updated=this.patchItem(oldEndVnode,newStartVnode,oldEndIdx)||updated,children[null==oldEndVnode.key?this._getChildName(oldEndIdx):oldEndVnode.key]=this._children[this._getChildName(oldEndIdx)],insertBefore(oldEndVnode,oldStartVnode),oldEndVnode=oldCh[--oldEndIdx],newStartVnode=newCh[++newStartIdx];else{var sameOldVnode=findOldVnode(oldCh,newStartVnode,oldStartIdx,oldEndIdx);if(BI.isNull(sameOldVnode)){var node=addNode(newStartVnode);insertBefore(node,oldStartVnode),newStartVnode=newCh[++newStartIdx]}else BI.each(oldCh,function(index,child){child&&sameVnode(child,newStartVnode)&&(updated=self.patchItem(sameOldVnode,newStartVnode,index)||updated,children[null==sameOldVnode.key?self._getChildName(index):sameOldVnode.key]=self._children[self._getChildName(index)],oldCh[index]=void 0,insertBefore(sameOldVnode,oldStartVnode))}),newStartVnode=newCh[++newStartIdx]}return oldStartIdx>oldEndIdx?(before=BI.isNull(newCh[newEndIdx+1])?null:newCh[newEndIdx+1],addVnodes(before,newCh,newStartIdx,newEndIdx)):newStartIdx>newEndIdx&&removeVnodes(oldCh,oldStartIdx,oldEndIdx),this._children={},BI.each(newCh,function(i,child){var node=self._getOptions(child),key=null==node.key?self._getChildName(i):node.key;children[key]._mount(),self._children[self._getChildName(i)]=children[key]}),updated},update:function(opt){var o=this.options,items=opt.items||[],updated=this.updateChildren(o.items,items);return this.options.items=items,updated},stroke:function(items){var self=this;BI.each(items,function(i,item){item&&self._addElement(i,item)})},removeWidget:function(nameOrWidget){var removeIndex;BI.isWidget(nameOrWidget)?BI.each(this._children,function(name,child){child===nameOrWidget&&(removeIndex=name)}):removeIndex=nameOrWid
delete this.floatManager[name],delete this.floatLayer[name],delete this.zindexMap[name],delete this.floatContainer[name],delete this.floatOpened[name],this):this},removeAll:function(){var self=this;return BI.each(this.floatContainer,function(name,container){container.destroy(),self.modal&&self.floatContainer[name].element.__releaseZIndexMask__(self.zindexMap[name])}),this.floatManager={},this.floatLayer={},this.floatContainer={},this.floatOpened={},this.zindexMap={},this}}),BI.ResizeController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.ResizeController.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ResizeController.superclass._init.apply(this,arguments);var self=this;this.resizerManger={};var fn=BI.debounce(function(ev){self._resize(ev)},30);BI.Widget._renderEngine.createElement(_global).resize(fn)},_resize:function(ev){BI.each(this.resizerManger,function(key,resizer){return resizer instanceof BI.$?void(resizer.is(":visible")&&resizer.trigger("__resize__")):resizer instanceof BI.Layout?void resizer.resize():BI.isFunction(resizer)?void resizer(ev):void 0})},add:function(name,resizer){var self=this;return this.has(name)?this:(this.resizerManger[name]=resizer,function(){self.remove(name)})},get:function(name){return this.resizerManger[name]},has:function(name){return null!=this.resizerManger[name]},remove:function(name){return this.has(name)?(delete this.resizerManger[name],this):this}}),BI.TooltipsController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.TooltipsController.superclass._defaultConfig.apply(this,arguments),{})},_const:{height:18},_init:function(){BI.TooltipsController.superclass._init.apply(this,arguments),this.tooltipsManager={},this.showingTips={}},_createTooltip:function(text,level){return BI.createWidget({type:"bi.tooltip",text:text,level:level,stopEvent:!0})},hide:function(name,callback){return this.has(name)?(delete this.showingTips[name],this.get(name).element.hide(0,callback),this.get(name).invisible(),this):this},create:function(name,text,level,context){if(!this.has(name)){var tooltip=this._createTooltip(text,level);this.add(name,tooltip),BI.createWidget({type:"bi.absolute",element:context||"body",items:[{el:tooltip}]}),tooltip.invisible()}return this.get(name)},show:function(e,name,text,level,context,opt){opt||(opt={});var self=this;if(BI.each(this.showingTips,function(i,tip){self.hide(i)}),this.showingTips={},this.has(name)||this.create(name,text,level,opt.container||"body"),!opt.belowMouse){var offset=context.element.offset(),bounds=context.element.bounds();if(0===bounds.height||0===bounds.width)return;var top=offset.top+bounds.height+5}var tooltip=this.get(name);tooltip.setText(text),tooltip.element.css({left:"0px",top:"0px"}),tooltip.visible(),tooltip.element.height(tooltip.element[0].scrollHeight),this.showingTips[name]=!0;var x=(e.pageX||e.clientX)+15,y=(e.pageY||e.clientY)+15;x+tooltip.element.outerWidth()>BI.Widget._renderEngine.createElement("body").outerWidth()&&(x-=tooltip.element.outerWidth()+15);var bodyHeight=BI.Widget._renderEngine.createElement("body").outerHeight();return y+tooltip.element.outerHeight()>bodyHeight||top+tooltip.element.outerHeight()>bodyHeight?(y-=tooltip.element.outerHeight()+15,!opt.belowMouse&&(y=Math.min(y,offset.top-tooltip.element.outerHeight()-5))):!opt.belowMouse&&(y=Math.max(y,top)),tooltip.element.css({left:x<0?0:x+"px",top:y<0?0:y+"px"}),tooltip.element.hover(function(){self.remove(name),context.element.trigger("mouseleave.title"+context.getName())}),this},add:function(name,bubble){return this.has(name)?this:(this.set(name,bubble),this)},get:function(name){return this.tooltipsManager[name]},set:function(name,bubble){this.tooltipsManager[name]=bubble},has:function(name){return null!=this.tooltipsManager[name]},remove:function(name){return this.has(name)?(this.tooltipsManager[name].destroy(),delete this.tooltipsManager[name],this):this}}),_.extend(BI,{Events:{KEYDOWN:"_KEYDOWN",BACKSPACE:"_BACKSPACE",SPACE:"_SPACE",ENTER:"_ENTER",CONFIRM:"_CONFIRM",ERROR:"_ERROR",PAUSE:"_PAUSE",
var requestFrame=function(){var raf=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(fn){return _global.setTimeout(fn,20)};return function(fn){return raf(fn)}}(),cancelFrame=function(){var cancel=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(id){return cancel(id)}}(),resetTriggers=function(element){var triggers=element.__resizeTriggers__,expand=triggers.firstElementChild,contract=triggers.lastElementChild,expandChild=expand.firstElementChild;contract.scrollLeft=contract.scrollWidth,contract.scrollTop=contract.scrollHeight,expandChild.style.width=expand.offsetWidth+1+"px",expandChild.style.height=expand.offsetHeight+1+"px",expand.scrollLeft=expand.scrollWidth,expand.scrollTop=expand.scrollHeight},checkTriggers=function(element){return element.offsetWidth!==element.__resizeLast__.width||element.offsetHeight!==element.__resizeLast__.height},scrollListener=function(e){var element=this;resetTriggers(this),this.__resizeRAF__&&cancelFrame(this.__resizeRAF__),this.__resizeRAF__=requestFrame(function(){checkTriggers(element)&&(element.__resizeLast__.width=element.offsetWidth,element.__resizeLast__.height=element.offsetHeight,element.__resizeListeners__.forEach(function(fn){fn.call(element,e)}))})},animation=!1,animationstring="animation",keyframeprefix="",animationstartevent="animationstart",domPrefixes="Webkit Moz O ms".split(" "),startEvents="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),pfx="",elm=document.createElement("fakeelement");if(void 0!==elm.style.animationName&&(animation=!0),animation===!1)for(var i=0;i<domPrefixes.length;i++)if(void 0!==elm.style[domPrefixes[i]+"AnimationName"]){pfx=domPrefixes[i],animationstring=pfx+"Animation",keyframeprefix="-"+pfx.toLowerCase()+"-",animationstartevent=startEvents[i],animation=!0;break}var animationName="resizeanim",animationKeyframes="@"+keyframeprefix+"keyframes "+animationName+" { from { opacity: 0; } to { opacity: 0; } } ",animationStyle=keyframeprefix+"animation: 1ms "+animationName+"; "}var createStyles=function(){if(!stylesCreated){var css=(animationKeyframes?animationKeyframes:"")+".resize-triggers { "+(animationStyle?animationStyle:"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',head=document.head||document.getElementsByTagName("head")[0],style=document.createElement("style");style.type="text/css",style.styleSheet?style.styleSheet.cssText=css:style.appendChild(document.createTextNode(css)),head.appendChild(style),stylesCreated=!0}},addResizeListener=function(element,fn){attachEvent?(element.attachEvent("onresize",fn),BI.nextTick(fn)):(element.__resizeTriggers__||("static"===getComputedStyle(element).position&&(element.style.position="relative"),createStyles(),element.__resizeLast__={},element.__resizeListeners__=[],(element.__resizeTriggers__=document.createElement("div")).className="resize-triggers",element.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',element.appendChild(element.__resizeTriggers__),resetTriggers(element),element.addEventListener("scroll",scrollListener,!0),animationstartevent&&element.__resizeTriggers__.addEventListener(animationstartevent,function(e){e.animationName===animationName&&resetTriggers(element)})),element.__resizeListeners__.push(fn))},removeResizeListener=function(element,fn){attachEvent?element.detachEvent("onresize",fn):(element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn),1),element.__resizeListeners__.length||(element.removeEventListener("scroll",scrollListener),element.__resizeTriggers__=!element.removeChild(element.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:
var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){for(var i=extra===(isBorderBox?"border":"content")?4:"width"===name?1:0,val=0;i<4;i+=2)"margin"===extra&&(val+=jQuery.css(elem,extra+cssExpand[i],!0,styles)),isBorderBox?("content"===extra&&(val-=jQuery.css(elem,"padding"+cssExpand[i],!0,styles)),"margin"!==extra&&(val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles))):(val+=jQuery.css(elem,"padding"+cssExpand[i],!0,styles),"padding"!==extra&&(val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles)));return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=!0,val="width"===name?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox=jQuery.support.boxSizing&&"border-box"===jQuery.css(elem,"boxSizing",!1,styles);if(val<=0||null==val){if(val=curCSS(elem,name,styles),(val<0||null==val)&&(val=elem.style[name]),rnumnonpx.test(val))return val;valueIsBorderBox=isBorderBox&&(jQuery.support.boxSizingReliable||val===elem.style[name]),val=parseFloat(val)||0}return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles)+"px"}function css_defaultDisplay(nodeName){var doc=document,display=elemdisplay[nodeName];return display||(display=actualDisplay(nodeName,doc),"none"!==display&&display||(iframe=(iframe||jQuery("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(doc.documentElement),doc=(iframe[0].contentWindow||iframe[0].contentDocument).document,doc.write("<!doctype html><html><body>"),doc.close(),display=actualDisplay(nodeName,doc),iframe.detach()),elemdisplay[nodeName]=display),display}function actualDisplay(name,doc){var elem=jQuery(doc.createElement(name)).appendTo(doc.body),display=jQuery.css(elem[0],"display");return elem.remove(),display}function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj))jQuery.each(obj,function(i,v){traditional||rbracket.test(prefix)?add(prefix,v):buildParams(prefix+"["+("object"==typeof v?i:"")+"]",v,traditional,add)});else if(traditional||"object"!==jQuery.type(obj))add(prefix,obj);else for(name in obj)buildParams(prefix+"["+name+"]",obj[name],traditional,add)}function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){"string"!=typeof dataTypeExpression&&(func=dataTypeExpression,dataTypeExpression="*");var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(core_rnotwhite)||[];if(jQuery.isFunction(func))for(;dataType=dataTypes[i++];)"+"===dataType[0]?(dataType=dataType.slice(1)||"*",(structure[dataType]=structure[dataType]||[]).unshift(func)):(structure[dataType]=structure[dataType]||[]).push(func)}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){function inspect(dataType){var selected;return inspected[dataType]=!0,jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);return"string"!=typeof dataTypeOrTransport||seekingTransport||inspected[dataTypeOrTransport]?seekingTransport?!(selected=dataTypeOrTransport):void 0:(options.dataTypes.unshift(dataTypeOrTransport),inspect(dataTypeOrTransport),!1)}),selected}var inspected={},seekingTransport=structure===transports;return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src)src[key]!==undefined&&((flatOptions[key]?target:deep||(deep={}))[key]=src[key]);return deep&&jQuery.extend(!0,target,deep),target}function ajaxHandleResponses(s,jqXHR,responses){var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes,responseFields=s.responseFields;for(type in responseFields)type in responses&&(jqXHR[responseFields[type]]=responses[type]);for(;"*"===dataTypes[0];)dataTypes.shift(),ct===undefined&&(ct=s.mimeType||jqXHR.getResponseHeader("Content-Type"));if(ct)for(type in contents)if(cont
},_queueHooks:function(elem,type){var key=type+"queueHooks";return jQuery._data(elem,key)||jQuery._data(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){jQuery._removeData(elem,type+"queue"),jQuery._removeData(elem,key)})})}}),jQuery.fn.extend({queue:function(type,data){var setter=2;return"string"!=typeof type&&(data=type,type="fx",setter--),arguments.length<setter?jQuery.queue(this[0],type):data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type),"fx"===type&&"inprogress"!==queue[0]&&jQuery.dequeue(this,type)})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},delay:function(time,type){return time=jQuery.fx?jQuery.fx.speeds[time]||time:time,type=type||"fx",this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout)}})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){--count||defer.resolveWith(elements,[elements])};for("string"!=typeof type&&(obj=type,type=undefined),type=type||"fx";i--;)tmp=jQuery._data(elements[i],type+"queueHooks"),tmp&&tmp.empty&&(count++,tmp.empty.add(resolve));return resolve(),defer.promise(obj)}});var nodeHook,boolHook,rclass=/[\t\r\n]/g,rreturn=/\r/g,rfocusable=/^(?:input|select|textarea|button|object)$/i,rclickable=/^(?:a|area)$/i,rboolean=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,ruseDefault=/^(?:checked|selected)$/i,getSetAttribute=jQuery.support.getSetAttribute,getSetInput=jQuery.support.input;jQuery.fn.extend({attr:function(name,value){return jQuery.access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})},prop:function(name,value){return jQuery.access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return name=jQuery.propFix[name]||name,this.each(function(){try{this[name]=undefined,delete this[name]}catch(e){}})},addClass:function(value){var classes,elem,cur,clazz,j,i=0,len=this.length,proceed="string"==typeof value&&value;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))});if(proceed)for(classes=(value||"").match(core_rnotwhite)||[];i<len;i++)if(elem=this[i],cur=1===elem.nodeType&&(elem.className?(" "+elem.className+" ").replace(rclass," "):" ")){for(j=0;clazz=classes[j++];)cur.indexOf(" "+clazz+" ")<0&&(cur+=clazz+" ");elem.className=jQuery.trim(cur)}return this},removeClass:function(value){var classes,elem,cur,clazz,j,i=0,len=this.length,proceed=0===arguments.length||"string"==typeof value&&value;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).removeClass(value.call(this,j,this.className))});if(proceed)for(classes=(value||"").match(core_rnotwhite)||[];i<len;i++)if(elem=this[i],cur=1===elem.nodeType&&(elem.className?(" "+elem.className+" ").replace(rclass," "):"")){for(j=0;clazz=classes[j++];)for(;cur.indexOf(" "+clazz+" ")>=0;)cur=cur.replace(" "+clazz+" "," ");elem.className=value?jQuery.trim(cur):""}return this},toggleClass:function(value,stateVal){var type=typeof value,isBool="boolean"==typeof stateVal;return jQuery.isFunction(value)?this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)}):this.each(function(){if("string"===type)for(var className,i=0,self=jQuery(this),state=stateVal,classNames=value.match(core_rnotwhite)||[];className=classNames[i++];)state=isBool?state:!self.hasClass(className),self[state?"addClass":"removeClass"](className);else type!==core_strundefined&&"boolean"!==type||(this.className&&jQuery._data(this,"__className__",this.className),this.className=this.className||value===!1?"":jQuery._data(this,"__className__")||"")})},hasClass:function(selector){for(var className=" "+selector+" ",i=0,l=this.length;i<l;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replac
if(matcher&&matcher(matcherIn,matcherOut,context,xml),postFilter)for(temp=condense(matcherOut,postMap),postFilter(temp,[],context,xml),i=temp.length;i--;)(elem=temp[i])&&(matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem));if(seed){if(postFinder||preFilter){if(postFinder){for(temp=[],i=matcherOut.length;i--;)(elem=matcherOut[i])&&temp.push(matcherIn[i]=elem);postFinder(null,matcherOut=[],temp,xml)}for(i=matcherOut.length;i--;)(elem=matcherOut[i])&&(temp=postFinder?indexOf.call(seed,elem):preMap[i])>-1&&(seed[temp]=!(results[temp]=elem))}}else matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut),postFinder?postFinder(null,results,matcherOut,xml):push.apply(results,matcherOut)})}function matcherFromTokens(tokens){for(var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,!0),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1},implicitRelative,!0),matchers=[function(elem,context,xml){return!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml))}];i<len;i++)if(matcher=Expr.relative[tokens[i].type])matchers=[addCombinator(elementMatcher(matchers),matcher)];else{if(matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches),matcher[expando]){for(j=++i;j<len&&!Expr.relative[tokens[j].type];j++);return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1)).replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)),j<len&&toSelector(tokens))}matchers.push(matcher)}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var matcherCachedRuns=0,bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,expandContext){var elem,j,matcher,setMatched=[],matchedCount=0,i="0",unmatched=seed&&[],outermost=null!=expandContext,contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",expandContext&&context.parentNode||context),dirrunsUnique=dirruns+=null==contextBackup?1:Math.random()||.1;for(outermost&&(outermostContext=context!==document&&context,cachedruns=matcherCachedRuns);null!=(elem=elems[i]);i++){if(byElement&&elem){for(j=0;matcher=elementMatchers[j++];)if(matcher(elem,context,xml)){results.push(elem);break}outermost&&(dirruns=dirrunsUnique,cachedruns=++matcherCachedRuns)}bySet&&((elem=!matcher&&elem)&&matchedCount--,seed&&unmatched.push(elem))}if(matchedCount+=i,bySet&&i!==matchedCount){for(j=0;matcher=setMatchers[j++];)matcher(unmatched,setMatched,context,xml);if(seed){if(matchedCount>0)for(;i--;)unmatched[i]||setMatched[i]||(setMatched[i]=pop.call(results));setMatched=condense(setMatched)}push.apply(results,setMatched),outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1&&Sizzle.uniqueSort(results)}return outermost&&(dirruns=dirrunsUnique,outermostContext=contextBackup),unmatched};return bySet?markFunction(superMatcher):superMatcher}function multipleContexts(selector,contexts,results){for(var i=0,len=contexts.length;i<len;i++)Sizzle(selector,contexts[i],results);return results}function select(selector,context,results,seed){var i,tokens,token,type,find,match=tokenize(selector);if(!seed&&1===match.length){if(tokens=match[0]=match[0].slice(0),tokens.length>2&&"ID"===(token=tokens[0]).type&&9===context.nodeType&&!documentIsXML&&Expr.relative[tokens[1].type]){if(context=Expr.find.ID(token.matches[0].replace(runescape,funescape),context)[0],!context)return results;selector=selector.slice(tokens.shift().value.length)}for(i=matchExpr.needsContext.test(selector)?0:tokens.length;i--&&(token=tokens[i],!Expr.relative[type=token.type]);)if((find=Expr.find[type])&&(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&context.pa
hasScripts&&jQuery.merge(scripts,getAll(node,"script"))),callback.call(table&&jQuery.nodeName(this[i],"table")?findOrAppend(this[i],"tbody"):this[i],node,i);if(hasScripts)for(doc=scripts[scripts.length-1].ownerDocument,jQuery.map(scripts,restoreScript),i=0;i<hasScripts;i++)node=scripts[i],rscriptType.test(node.type||"")&&!jQuery._data(node,"globalEval")&&jQuery.contains(doc,node)&&(node.src?jQuery.ajax({url:node.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):jQuery.globalEval((node.text||node.textContent||node.innerHTML||"").replace(rcleanScript,"")));fragment=first=null}return this}}),jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){for(var elems,i=0,ret=[],insert=jQuery(selector),last=insert.length-1;i<=last;i++)elems=i===last?this:this.clone(!0),jQuery(insert[i])[original](elems),core_push.apply(ret,elems.get());return this.pushStack(ret)}}),jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var destElements,node,clone,i,srcElements,inPage=jQuery.contains(elem.ownerDocument,elem);if(jQuery.support.html5Clone||jQuery.isXMLDoc(elem)||!rnoshimcache.test("<"+elem.nodeName+">")?clone=elem.cloneNode(!0):(fragmentDiv.innerHTML=elem.outerHTML,fragmentDiv.removeChild(clone=fragmentDiv.firstChild)),!(jQuery.support.noCloneEvent&&jQuery.support.noCloneChecked||1!==elem.nodeType&&11!==elem.nodeType||jQuery.isXMLDoc(elem)))for(destElements=getAll(clone),srcElements=getAll(elem),i=0;null!=(node=srcElements[i]);++i)destElements[i]&&fixCloneNodeIssues(node,destElements[i]);if(dataAndEvents)if(deepDataAndEvents)for(srcElements=srcElements||getAll(elem),destElements=destElements||getAll(clone),i=0;null!=(node=srcElements[i]);i++)cloneCopyEvent(node,destElements[i]);else cloneCopyEvent(elem,clone);return destElements=getAll(clone,"script"),destElements.length>0&&setGlobalEval(destElements,!inPage&&getAll(elem,"script")),destElements=srcElements=node=null,clone},buildFragment:function(elems,context,scripts,selection){for(var j,elem,contains,tmp,tag,tbody,wrap,l=elems.length,safe=createSafeFragment(context),nodes=[],i=0;i<l;i++)if(elem=elems[i],elem||0===elem)if("object"===jQuery.type(elem))jQuery.merge(nodes,elem.nodeType?[elem]:elem);else if(rhtml.test(elem)){for(tmp=tmp||safe.appendChild(context.createElement("div")),tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,tmp.innerHTML=wrap[1]+elem.replace(rxhtmlTag,"<$1></$2>")+wrap[2],j=wrap[0];j--;)tmp=tmp.lastChild;if(!jQuery.support.leadingWhitespace&&rleadingWhitespace.test(elem)&&nodes.push(context.createTextNode(rleadingWhitespace.exec(elem)[0])),!jQuery.support.tbody)for(elem="table"!==tag||rtbody.test(elem)?"<table>"!==wrap[1]||rtbody.test(elem)?0:tmp:tmp.firstChild,j=elem&&elem.childNodes.length;j--;)jQuery.nodeName(tbody=elem.childNodes[j],"tbody")&&!tbody.childNodes.length&&elem.removeChild(tbody);for(jQuery.merge(nodes,tmp.childNodes),tmp.textContent="";tmp.firstChild;)tmp.removeChild(tmp.firstChild);tmp=safe.lastChild}else nodes.push(context.createTextNode(elem));for(tmp&&safe.removeChild(tmp),jQuery.support.appendChecked||jQuery.grep(getAll(nodes,"input"),fixDefaultChecked),i=0;elem=nodes[i++];)if((!selection||jQuery.inArray(elem,selection)===-1)&&(contains=jQuery.contains(elem.ownerDocument,elem),tmp=getAll(safe.appendChild(elem),"script"),contains&&setGlobalEval(tmp),scripts))for(j=0;elem=tmp[j++];)rscriptType.test(elem.type||"")&&scripts.push(elem);return tmp=null,safe},cleanData:function(elems,acceptData){for(var elem,type,id,data,i=0,internalKey=jQuery.expando,cache=jQuery.cache,deleteExpando=jQuery.support.deleteExpando,special=jQuery.event.special;null!=(elem=elems[i]);i++)if((acceptData||jQuery.acceptData(elem))&&(id=elem[internalKey],data=id&&cache[id])){if(data.events)for(type in data.events)special[type]?jQuery.event.remove(elem,type):jQuery.removeEvent(elem,type,data.handle);cache[id]&&(delete cache[id],deleteExpando?delete elem[internalKey]:typeof elem.removeAttr
left:box.left+(win.pageXOffset||docElem.scrollLeft)-(docElem.clientLeft||0)}):box},jQuery.offset={setOffset:function(elem,options,i){var position=jQuery.css(elem,"position");"static"===position&&(elem.style.position="relative");var curElem=jQuery(elem),curOffset=curElem.offset(),curCSSTop=jQuery.css(elem,"top"),curCSSLeft=jQuery.css(elem,"left"),calculatePosition=("absolute"===position||"fixed"===position)&&jQuery.inArray("auto",[curCSSTop,curCSSLeft])>-1,props={},curPosition={},curTop,curLeft;calculatePosition?(curPosition=curElem.position(),curTop=curPosition.top,curLeft=curPosition.left):(curTop=parseFloat(curCSSTop)||0,curLeft=parseFloat(curCSSLeft)||0),jQuery.isFunction(options)&&(options=options.call(elem,i,curOffset)),null!=options.top&&(props.top=options.top-curOffset.top+curTop),null!=options.left&&(props.left=options.left-curOffset.left+curLeft),"using"in options?options.using.call(elem,props):curElem.css(props)}},jQuery.fn.extend({position:function(){if(this[0]){var offsetParent,offset,parentOffset={top:0,left:0},elem=this[0];return"fixed"===jQuery.css(elem,"position")?offset=elem.getBoundingClientRect():(offsetParent=this.offsetParent(),offset=this.offset(),jQuery.nodeName(offsetParent[0],"html")||(parentOffset=offsetParent.offset()),parentOffset.top+=jQuery.css(offsetParent[0],"borderTopWidth",!0),parentOffset.left+=jQuery.css(offsetParent[0],"borderLeftWidth",!0)),{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",!0),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var offsetParent=this.offsetParent||document.documentElement;offsetParent&&!jQuery.nodeName(offsetParent,"html")&&"static"===jQuery.css(offsetParent,"position");)offsetParent=offsetParent.offsetParent;return offsetParent||document.documentElement})}}),jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top=/Y/.test(prop);jQuery.fn[method]=function(val){return jQuery.access(this,function(elem,method,val){var win=getWindow(elem);return val===undefined?win?prop in win?win[prop]:win.document.documentElement[method]:elem[method]:void(win?win.scrollTo(top?jQuery(win).scrollLeft():val,top?val:jQuery(win).scrollTop()):elem[method]=val)},method,val,arguments.length,null)}}),jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||"boolean"!=typeof margin),extra=defaultExtra||(margin===!0||value===!0?"margin":"border");return jQuery.access(this,function(elem,type,value){var doc;return jQuery.isWindow(elem)?elem.document.documentElement["client"+name]:9===elem.nodeType?(doc=elem.documentElement,Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name])):value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:undefined,chainable,null)}})}),BI.jQuery=BI.$=jQuery,window.$=window.$||jQuery,window.jQuery=window.jQuery||jQuery,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return jQuery})}(window),BI.$.extend(BI.$.Event.prototype,{stopEvent:function(){this.stopPropagation(),this.preventDefault()}}),BI.jQuery&&(!function($){$.fn.insets||($.fn.insets=function(){var p=this.padding(),b=this.border();return{top:p.top,bottom:p.bottom+b.bottom+b.top,left:p.left,right:p.right+b.right+b.left}}),$.fn.bounds||($.fn.bounds=function(value){var tmp={hasIgnoredBounds:!0};return value?(isNaN(value.x)||(tmp.left=value.x),isNaN(value.y)||(tmp.top=value.y),null!=value.width&&(tmp.width=value.width-(this.outerWidth(!0)-this.width()),tmp.width=tmp.width>=0?tmp.width:value.width),null!=value.height&&(tmp.height=value.height-(this.outerHeight(!0)-this.height()),tmp.height=tmp.height>=0?tmp.height:value.height),this.css(tmp),this):(tmp=this.position(),{x:tmp.left,y:tmp.top,width:this.outerWidth(),height:this.outerHeight()})})}(B
o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-bottom":o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)+"px"}),w},resize:function(){},populate:function(items){BI.FlexVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical",BI.FlexVerticalLayout),BI.FlexWrapperCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-center-adapt-layout clearfix",scrollable:!0})},render:function(){BI.FlexWrapperCenterLayout.superclass.render.apply(this,arguments),this.$wrapper=BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-center-adapt-layout-wrapper"),this.populate(this.options.items)},_addElement:function(i,item){var o=this.options,w=BI.FlexWrapperCenterLayout.superclass._addElement.apply(this,arguments);return w.element.css({position:"relative","margin-left":(0===i?o.hgap:0)+"px","margin-right":o.hgap+"px","margin-top":o.vgap+"px","margin-bottom":o.vgap+"px"}),w},appendFragment:function(frag){this.$wrapper.append(frag),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(items){BI.FlexWrapperCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_center_adapt",BI.FlexWrapperCenterLayout),BI.FlexWrapperHorizontalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-center-adapt-layout clearfix",verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrollable:!0,scrolly:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var self=this,o=this.options;return{type:"bi.flex_scrollable_vertical",ref:function(_ref){self.wrapper=_ref},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:o.verticalAlign,rowSize:o.rowSize,scrollx:o.scrollx,scrolly:o.scrolly,scrollable:o.scrollable,hgap:o.hgap,vgap:o.vgap,tgap:o.tgap,bgap:o.bgap,items:o.items}},update:function(opt){return this.wrapper.update(opt)},populate:function(items){this.wrapper.populate(items)}}),BI.shortcut("bi.flex_scrollable_horizontal_adapt",BI.FlexWrapperHorizontalCenter),BI.shortcut("bi.flex_scrollable_horizontal_center_adapt",BI.FlexWrapperHorizontalCenter),BI.FlexWrapperHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-horizontal-layout clearfix",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollable:null,scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexWrapperHorizontalLayout.superclass.render.apply(this,arguments);var o=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-horizontal-layout-wrapper v-"+o.verticalAlign).addClass("h-"+o.horizontalAlign),this.populate(this.options.items)},_addElement:function(i,item){var o=this.options,w=BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this,arguments);return w.element.css({position:"relative","flex-shrink":"0"}),o.columnSize[i]>0&&w.element.width(o.columnSize[i]),"fill"===o.columnSize[i]&&w.element.css("flex","1"),o.vgap+o.tgap+(item.tgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-top":o.vgap+o.tgap+(item.tgap||0)+(item.vgap||0)+"px"}),o.hgap+o.lgap+(item.lgap||0)+(item.hgap||0)!==0&&w.element.css({"margin-left":(0===i?o.hgap:0)+o.lgap+(item.lgap||0)+(item.hgap||0)+"px"}),o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)!==0&&w.element.css({"margin-right":o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)+"px"}),o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-bottom":o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)+"px"}),w},appendFragment:function(frag){this.$wrapper.append(frag),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(items){BI.FlexWrapperHorizontalLayout.super
cls+=BI.isOdd(col+1)?" odd-col":" even-col",item.cls=(item.cls||"")+cls+" center-element"}function first(item,row,col){item instanceof BI.Widget?firstElement(item.element,row,col):item.el instanceof BI.Widget?firstElement(item.el.element,row,col):item.el?firstObject(item.el,row,col):firstObject(item,row,col)}var o=this.options,abs=[],left=0,right=0,i,j;for(i=0;i<arr.length&&BI.isNumber(o.columnSize[i]);i++)first(arr[i],this.rows,i),abs.push(BI.extend({top:0,bottom:0,left:o.columnSize[i]<=1?100*left+"%":left,width:o.columnSize[i]<=1?100*o.columnSize[i]+"%":o.columnSize[i]},arr[i])),left+=o.columnSize[i]+(o.columnSize[i]<1?0:o.hgap);for(j=arr.length-1;j>i;j--){if(!BI.isNumber(o.columnSize[j]))throw new Error("item with fill can only be one");first(arr[j],this.rows,j),abs.push(BI.extend({top:0,bottom:0,right:o.columnSize[j]<=1?100*right+"%":right,width:o.columnSize[j]<=1?100*o.columnSize[j]+"%":o.columnSize[j]},arr[j])),right+=o.columnSize[j]+(o.columnSize[j]<1?0:o.hgap)}i>=0&&i<arr.length&&(first(arr[i],this.rows,i),abs.push(BI.extend({top:0,bottom:0,left:left<=1?100*left+"%":left,right:right<=1?100*right+"%":right},arr[i])));var w=BI.createWidget({type:"bi.absolute",height:BI.isArray(o.rowSize)?o.rowSize[this.rows]:o.rowSize,items:abs});return this.rows>0&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":o.vgap}),w.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,w),w},resize:function(){},addItem:function(arr){if(!BI.isArray(arr))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},update:function(){},populate:function(items){BI.TableLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table",BI.TableLayout),BI.HTapeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HTapeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-h-tape-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[{width:100,el:{type:"bi.button",text:"button1"}},{width:"fill",el:{type:"bi.button",text:"button2"}},{width:200,el:{type:"bi.button",text:"button3"}}]})},render:function(){BI.HTapeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(item){throw new Error("cannot be added")},stroke:function(items){var self=this,o=this.options;items=BI.compact(items),BI.each(items,function(i,item){if(self.hasWidget(self.getName()+i+""))w=self.getWidgetByName(self.getName()+i+"");else{var w=BI.createWidget(item);self.addWidget(self.getName()+i+"",w)}w.element.css({position:"absolute",top:(item.vgap||0)+(item.tgap||0)+o.vgap+o.tgap+"px",bottom:(item.bgap||0)+(item.vgap||0)+o.vgap+o.bgap+"px"})});var left={},right={};left[0]=0,right[items.length-1]=0,BI.any(items,function(i,item){var w=self.getWidgetByName(self.getName()+i+"");if(BI.isNull(left[i])&&(left[i]=left[i-1]+items[i-1].width+(items[i-1].lgap||0)+2*(items[i-1].hgap||0)+o.hgap+o.lgap+o.rgap),item.width<1&&item.width>=0?w.element.css({left:100*left[i]+"%",width:100*item.width+"%"}):w.element.css({left:left[i]+(item.lgap||0)+(item.hgap||0)+o.hgap+o.lgap+"px",width:BI.isNumber(item.width)?item.width:""}),!BI.isNumber(item.width))return!0}),BI.backAny(items,function(i,item){var w=self.getWidgetByName(self.getName()+i+"");if(BI.isNull(right[i])&&(right[i]=right[i+1]+items[i+1].width+(items[i+1].rgap||0)+2*(items[i+1].hgap||0)+o.hgap+o.lgap+o.rgap),item.width<1&&item.width>=0?w.element.css({right:100*right[i]+"%",width:100*item.width+"%"}):w.element.css({right:right[i]+(item.rgap||0)+(item.hgap||0)+o.hgap+o.rgap+"px",width:BI.isNumber(item.width)?item.width:""}),!BI.isNumber(item.width))return!0})},update:function(){var updated;return BI.each(this._children,function(i,child){updated=child.update()||updated}),updated},populate:function(items){BI.HTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.htape",BI.HTapeLayout),BI.VTapeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.VTapeLayout.superclass.props.apply
if(aCtor!==bCtor&&!(_$1.isFunction(aCtor)&&aCtor instanceof aCtor&&_$1.isFunction(bCtor)&&bCtor instanceof bCtor)&&"constructor"in a&&"constructor"in b)return!1}aStack=aStack||[],bStack=bStack||[];for(var length=aStack.length;length--;)if(aStack[length]===a)return bStack[length]===b;if(aStack.push(a),bStack.push(b),areArrays){if(length=a.length,length!==b.length)return!1;for(;length--;)if(!eq(a[length],b[length],aStack,bStack))return!1}else{var keys=_$1.keys(a),key=void 0;if(length=keys.length,_$1.keys(b).length!==length)return!1;for(;length--;){if(key=keys[length],$$skips.indexOf(key)!==-1)return!0;if(Object.keys(b).indexOf(key)===-1||!eq(a[key],b[key],aStack,bStack))return!1}}return aStack.pop(),bStack.pop(),!0},eq=function eq(a,b,aStack,bStack){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return!1;if(a!==a)return b!==b;var type=typeof a;return("function"===type||"object"===type||"object"==typeof b)&&("function"===type||deepEq(a,b,aStack,bStack))},mixinInjection={},falsy$1=void 0,operators={"||":falsy$1,"&&":falsy$1,"(":falsy$1,")":falsy$1},allModelInstances={},allDefineModelInstances={},emptyFn=function emptyFn(){},TTL=10,Watcher=function(){function Watcher(_ref){var get=_ref.get,last=_ref.last,listener=_ref.listener,sync=_ref.sync,deep=_ref.deep,id=_ref.id;return _classCallCheck(this,Watcher),this.id=id,this.get=get,this.last=cloneShadow(last),this.listener=listener||emptyFn,this.sync=sync||!1,{id:this.id,get:this.get,last:this.last,listener:this.listener}}return Watcher.prototype.getInstance=function getInstance(){return this},Watcher}(),nextListener=function(){var callbackMap={};return function queueNextListener(listener,ctx){var id=listener.id,cb=listener.cb;id&&callbackMap[id]||(nextTick(function(){cb(),callbackMap[id]=!1},ctx),callbackMap[id]=!0)}}(),Model=function(){function Model(){_classCallCheck(this,Model)}return Model.prototype._constructor=function _constructor(model){this.alive=!0,this.options=model||{},this.model={$vm:this},this._modelHashId=makeHashCode("model"),this.syncListeners=[],this.asyncListeners=[],this.contextListeners=[],this._parent=Model.target;var state=_$1.isFunction(this.state)?this.state():this.state,computed=this.computed,context=this.context,childContext=this.childContext,watch$$1=this.watch,actions=this.actions,mixins=this.mixins;context&&defineContext(this,context),initMixins(this,mixins),this.init(),initState(this,state),initComputed(this,computed),digest(this),initWatch(this,watch$$1),initMethods(this,actions),this.created&&this.created(),allModelInstances[this._modelHashId]=this},Model.prototype._init=function _init(){},Model.prototype.init=function init(){this._init()},Model.prototype.destroy=function destroy(){this.alive=!1,allModelInstances[this._modelHashId]=null,this._watchers&&(this._watchers=[]),this._computedWatchers&&(this._computedWatchers=[]),this._stateWatchers&&(this._stateWatchers=[]),this._contextWatchers&&(this._contextWatchers=[]),this.destroyed&&this.destroyed()},Model.prototype.$watch=function $watch(expOrFn,cb,options){var watcher=createWatcher(this,expOrFn,cb,options);this._watchers.push(watcher)},Model.prototype.$digest=function $digest(){digest(this),executeWatchListeners(this),this.options.define||refreshAllDefineModel()},Model.prototype.getModelID=function getModelID(){return this._modelHashId},Model}(),version="2.0";exports.version=version,exports.$$skipArray=$$skipArray,exports.mixin=mixin,exports.toJSON=toJSON,exports.nextListener=nextListener,exports.Model=Model,exports.getAllModelInstances=getAllModelInstances,exports.refreshAll=refreshAll,exports.define=define,exports.inherit=inherit,exports.watch=watch,exports.__esModule=!0}),function(factory){"function"==typeof define&&define.amd?define(["../core/jquery"],factory):"object"==typeof exports?module.exports=factory:factory(BI.jQuery)}(function($){function handler(event){var orgEvent=event||_global.event,args=slice.call(arguments,1),delta=0,deltaX=0,deltaY=0,absDelta=0,offsetX=0,offsetY=0;if(event=$.event.fix(orgEvent),event.type="mousewheel","detail"in orgEvent&&(deltaY=orgEvent.detail*-1),"w
paras:{selectedValues:{}},itemsCreator:BI.emptyFn})},_init:function(){BI.TreeView.superclass._init.apply(this,arguments);var o=this.options;this._stop=!1,this._createTree(),this.tip=BI.createWidget({type:"bi.loading_bar",invisible:!0,handler:BI.bind(this._loadMore,this)}),BI.createWidget({type:"bi.vertical",scrollable:!0,scrolly:!1,element:this,items:[this.tip]}),BI.isNotNull(o.value)&&this.setSelectedValue(o.value),BI.isIE9Below&&BI.isIE9Below()&&this.element.addClass("hack")},_createTree:function(){this.id="bi-tree"+BI.UUID(),this.nodes&&this.nodes.destroy(),this.tree&&this.tree.destroy(),this.tree=BI.createWidget({type:"bi.layout",element:"<ul id='"+this.id+"' class='ztree'></ul>"}),BI.createWidget({type:"bi.default",element:this.element,items:[this.tree]})},_selectTreeNode:function(treeId,treeNode){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,treeNode,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,treeNode,this)},_configSetting:function(){function onClick(event,treeId,treeNode){var checked=treeNode.checked,status=treeNode.getCheckStatus();status.half===!0&&status.checked===!0&&(checked=!1),self.nodes.checkNode(treeNode,!checked,!0,!0)}function getUrl(treeId,treeNode){var parentNode=self._getParentValues(treeNode);treeNode.times=treeNode.times||1;var param="id="+treeNode.id+"&times="+treeNode.times++ +"&parentValues= "+_global.encodeURIComponent(BI.jsonEncode(parentNode))+"&checkState="+_global.encodeURIComponent(BI.jsonEncode(treeNode.getCheckStatus()));return"&"+param}function beforeExpand(treeId,treeNode){return treeNode.isAjaxing?(BI.Msg.toast("Please Wait。","warning"),!1):(treeNode.children||(treeNode.times=1,ajaxGetNodes(treeNode,"refresh")),!0)}function onAsyncSuccess(event,treeId,treeNode,msg){if(treeNode.halfCheck=!1,msg&&0!==msg.length&&!/^<html>[\s,\S]*<\/html>$/gi.test(msg)&&!self._stop){var zTree=self.nodes,totalCount=treeNode.count||0;treeNode.children.length>totalCount?(treeNode.count=treeNode.children.length,BI.delay(function(){ajaxGetNodes(treeNode)},perTime)):(zTree.updateNode(treeNode),zTree.selectNode(treeNode.children[0]))}}function onAsyncError(event,treeId,treeNode,XMLHttpRequest,textStatus,errorThrown){var zTree=self.nodes;BI.Msg.toast("Error!","warning")}function ajaxGetNodes(treeNode,reloadType){var zTree=self.nodes;"refresh"==reloadType&&zTree.updateNode(treeNode),zTree.reAsyncChildNodes(treeNode,reloadType,!0)}function beforeCheck(treeId,treeNode){function track(children){BI.each(children,function(i,ch){ch.halfCheck===!0&&(ch.halfCheck=!1,track(ch.children))})}if(treeNode.halfCheck=!1,treeNode.checked===!0){track(treeNode.children);var treeObj=self.nodes,nodes=treeObj.getSelectedNodes();BI.$.each(nodes,function(index,node){node.halfCheck=!1})}var status=treeNode.getCheckStatus();status.half===!0&&status.checked===!0&&(treeNode.checked=!1)}function onCheck(event,treeId,treeNode){self._selectTreeNode(treeId,treeNode)}function onExpand(event,treeId,treeNode){treeNode.halfCheck=!1}function onCollapse(event,treeId,treeNode){}var paras=this.options.paras,self=this,setting={async:{enable:!0,url:getUrl,autoParam:["id","name"],otherParam:BI.cjkEncodeDO(paras)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:beforeExpand,onAsyncSuccess:onAsyncSuccess,onAsyncError:onAsyncError,beforeCheck:beforeCheck,onCheck:onCheck,onExpand:onExpand,onCollapse:onCollapse,onClick:onClick}},className="dark",perTime=100;return setting},_getParentValues:function(treeNode){if(!treeNode.getParentNode())return[];var parentNode=treeNode.getParentNode(),result=this._getParentValues(parentNode);return result=result.concat([this._getNodeValue(parentNode)])},_getNodeValue:function(node){return null==node.value?BI.replaceAll(node.text.replace(/<[^>]+>/g,""),"&nbsp;"," "):node.value},_getHalfSelectedValues:function(map,node){var self=this,checkState=node.getCheckStatus();if(checkState.checked!==!1||checkState.half!==!1){if(BI.isNotEmptyArray(node.children)&&checkState.half===!0){var children=node.
_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){function hide(){self.isEnabled()&&self.isValid()&&self.combo.isEnabled()&&self.combo.isValid()&&o.toggle===!0&&(self._hideView(),self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",self.combo),self.fireEvent(BI.Combo.EVENT_COLLAPSE)),self.popupView&&self.popupView.element.off("mouseenter."+self.getName()).off("mouseleave."+self.getName()),enterPopup=!1}var self=this,o=this.options,evs=(this.options.trigger||"").split(","),st=function(e){o.stopEvent&&e.stopEvent(),o.stopPropagation&&e.stopPropagation()},enterPopup=!1;BI.each(evs,function(i,ev){switch(ev){case"hover":self.element.on("mouseenter."+self.getName(),function(e){self.isEnabled()&&self.isValid()&&self.combo.isEnabled()&&self.combo.isValid()&&(self._popupView(),self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",self.combo),self.fireEvent(BI.Combo.EVENT_EXPAND))}),self.element.on("mouseleave."+self.getName(),function(e){self.popupView&&(self.popupView.element.on("mouseenter."+self.getName(),function(e){enterPopup=!0,self.popupView.element.on("mouseleave."+self.getName(),function(e){hide()}),self.popupView.element.off("mouseenter."+self.getName())}),BI.defer(function(){enterPopup||hide()},50))});break;case"click":var debounce=BI.debounce(function(e){self.combo.element.__isMouseInBounds__(e)&&self.isEnabled()&&self.isValid()&&self.combo.isEnabled()&&self.combo.isValid()&&(o.toggle?self._toggle():self._popupView(),self.isViewVisible()?(self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",self.combo),self.fireEvent(BI.Combo.EVENT_EXPAND)):(self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",self.combo),self.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});self.element.off(ev+"."+self.getName()).on(ev+"."+self.getName(),function(e){debounce(e),st(e)});break;case"click-hover":var debounce=BI.debounce(function(e){self.combo.element.__isMouseInBounds__(e)&&self.isEnabled()&&self.isValid()&&self.combo.isEnabled()&&self.combo.isValid()&&(self._popupView(),self.isViewVisible()&&(self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",self.combo),self.fireEvent(BI.Combo.EVENT_EXPAND)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});self.element.off("click."+self.getName()).on("click."+self.getName(),function(e){debounce(e),st(e)}),self.element.on("mouseleave."+self.getName(),function(e){self.popupView&&(self.popupView.element.on("mouseenter."+self.getName(),function(e){enterPopup=!0,self.popupView.element.on("mouseleave."+self.getName(),function(e){hide()}),self.popupView.element.off("mouseenter."+self.getName())}),BI.defer(function(){enterPopup||hide()},50))})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var self=this,o=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view",value:o.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(type,value,obj){type===BI.Events.CLICK&&(self.combo.setValue(self.getValue()),self.fireEvent(BI.Combo.EVENT_CHANGE,value,obj)),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){self.fireEvent(BI.Combo.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this.options.container||this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideIf:function(e){if(this.element.find(e.target).length>0||this.popupView&&this.popupView.element.find(e.target).length>0||"CodeMirror-cursor"===e.target.className||BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length>0){var directions=this.options.direction.split(",");return void((BI.contains(directions,"innerLeft")||BI.contains(directions,"innerRight"))&&(this.adjustWidth(),this.adjustHeight()))}var isHide=this.options.hideChecker.apply(t
o.isAutoSync&&o.adapter&&o.adapter.getValue&&self.popupView.setValue(o.adapter.getValue()),self.popupView.loaded&&self.popupView.loaded(),self.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},_getLastSearchKeyword:function(){if(this.isValid()){var res=this.editor.getValue().match(/[\S]+/g);return BI.isNull(res)?"":res[res.length-1]}},setAdapter:function(adapter){this.options.adapter=adapter,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(e){if(!this.editor.blur)throw new Error("editor没有实现blur方法")}finally{this.editor.setValue("")}},isSearching:function(){return this._isSearching},isViewVisible:function(){return this.editor.isEnabled()&&BI.Maskers.isVisible(this.getName())},getView:function(){return this.popupView},hasMatched:function(){return this._assertPopupView(),this.popupView.hasMatched()},adjustHeight:function(){BI.Maskers.has(this.getName())&&BI.Maskers.get(this.getName()).isVisible()&&BI.Maskers.show(this.getName())},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},setValue:function(v){BI.isNull(this.popupView)?this.options.popup.value=v:this.popupView.setValue(v)},getKeyword:function(){return this._getLastSearchKeyword()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var o=this.options;return o.isAutoSync&&o.adapter&&o.adapter.getValue?o.adapter.getValue():this.isSearching()?this.popupView.getValue():o.adapter&&o.adapter.getValue?o.adapter.getValue():BI.isNull(this.popupView)?o.popup.value:this.popupView.getValue()},populate:function(result,searchResult,keyword){var o=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),o.isAutoSync&&o.adapter&&o.adapter.getValue&&this.popupView.setValue(o.adapter.getValue())},empty:function(){this.popupView&&this.popupView.empty()},destroyed:function(){BI.Maskers.remove(this.getName())}}),BI.Searcher.EVENT_CHANGE="EVENT_CHANGE",BI.Searcher.EVENT_START="EVENT_START",BI.Searcher.EVENT_STOP="EVENT_STOP",BI.Searcher.EVENT_PAUSE="EVENT_PAUSE",BI.Searcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.Searcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.shortcut("bi.searcher",BI.Searcher),BI.Switcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switcher",direction:BI.Direction.Top,trigger:"click",toggle:!0,el:{},popup:{},adapter:null,masker:{},switcherClass:"bi-switcher-popup",hoverClass:"bi-switcher-hover"})},_init:function(){BI.Switcher.superclass._init.apply(this,arguments);var self=this,o=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(type,value,obj){self.isEnabled()&&self.isValid()&&(type===BI.Events.EXPAND&&self._popupView(),type===BI.Events.COLLAPSE&&self._hideView(),type===BI.Events.EXPAND&&(self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),self.fireEvent(BI.Switcher.EVENT_EXPAND)),type===BI.Events.COLLAPSE&&(self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),self.isViewVisible()&&self.fireEvent(BI.Switcher.EVENT_COLLAPSE)),type===BI.Events.CLICK&&self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,value,obj))}),this.element.hover(function(){self.isEnabled()&&self.switcher.isEnabled()&&self.element.addClass(o.hoverClass)},function(){self.isEnabled()&&self.switcher.isEnabled()&&self.element.removeClass(o.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),o.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var self=this,o=this.options,evs=this.options.trigger.split(",");BI.each(evs,function(i,e){switch(e){case"hover":self.element[e](function(e){self.isEnabled()&&self.switcher.isEnabled()&&(self._popupView(),self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",self.switcher),self.fireEvent(BI.Switcher.EVENT_EXPAND))},function()
this.view.setValue(selectedValues)},getValue:function(){return this.view.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView),BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var conf=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-searcher-view bi-card",tipText:BI.i18nText("BI-No_Select"),chooseType:BI.Selection.Single,matcher:{type:"bi.button_group",behaviors:{redmark:function(){return!0}},items:[],layouts:[{type:"bi.vertical"}]},searcher:{type:"bi.button_group",behaviors:{redmark:function(){return!0}},items:[],layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.SearcherView.superclass._init.apply(this,arguments);var self=this,o=this.options;this.matcher=BI.createWidget(o.matcher,{type:"bi.button_group",chooseType:o.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:o.value}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(type,val,ob){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.SearcherView.EVENT_CHANGE,val,ob)}),this.spliter=BI.createWidget({type:"bi.vertical",height:1,hgap:10,items:[{type:"bi.layout",height:1,cls:"searcher-view-spliter bi-background"}]}),this.searcher=BI.createWidget(o.searcher,{type:"bi.button_group",chooseType:o.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:o.value}),this.searcher.on(BI.Controller.EVENT_CHANGE,function(type,val,ob){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.SearcherView.EVENT_CHANGE,val,ob)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.matcher,this.spliter,this.searcher]})},startSearch:function(){},stopSearch:function(){},setValue:function(v){this.matcher.setValue(v),this.searcher.setValue(v)},getValue:function(){return this.matcher.getValue().concat(this.searcher.getValue())},populate:function(searchResult,matchResult,keyword){searchResult||(searchResult=[]),matchResult||(matchResult=[]),this.setTipVisible(searchResult.length+matchResult.length===0),this.spliter.setVisible(BI.isNotEmptyArray(matchResult)&&BI.isNotEmptyArray(searchResult)),this.matcher.populate(matchResult,keyword),this.searcher.populate(searchResult,keyword)},empty:function(){this.searcher.empty(),this.matcher.empty()},hasMatched:function(){return this.matcher.getAllButtons().length>0}}),BI.SearcherView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.searcher_view",BI.SearcherView),BI.ListView=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-list-view",overscanHeight:100,blockSize:10,scrollTop:0,el:{},items:[]}},init:function(){var self=this;this.renderedIndex=-1,this.cache={}},render:function(){var self=this,o=this.options;return{type:"bi.vertical",items:[BI.extend({type:"bi.vertical",scrolly:!1,ref:function(){self.container=this}},o.el)],element:this}},mounted:function(){var self=this,o=this.options;this._populate(),this.element.scroll(function(e){o.scrollTop=self.element.scrollTop(),self._calculateBlocksToRender()});var lastWidth=this.element.width(),lastHeight=this.element.height();BI.ResizeDetector.addResizeListener(this,function(){var width=self.element.width(),height=self.element.height();width===lastWidth&&height===lastHeight||(lastWidth=width,lastHeight=height,self._calculateBlocksToRender())})},_renderMoreIf:function(){for(var self=this,o=this.options,height=this.element.height(),minContentHeight=o.scrollTop+height+o.overscanHeight,index=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+o.blockSize||0,cnt=this.renderedIndex+1,lastHeight,getElementHeight=function(){return self.container.element.height()};(lastHeight=getElementHeight())<minContentHeight&&index<o.items.length;){var items=o.items.slice(index,index+o.blockSize);this.container.addItems(items,this);var addedHeight=getElementHeight()-lastHeight;this.cache[cnt]={index:index,scrollTop:lastHeight,height:addedHeight},this.renderedIndex=cnt,cnt++,index+=o.blockSize}},_calculateBlocksToRender:fun
this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:o.textHgap,vgap:o.textVgap,lgap:o.textLgap,rgap:o.textRgap,text:o.text,value:o.value,keyword:o.keyword,height:o.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:o.height,height:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.text,this.icon)}))))},doClick:function(){BI.TextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextIconItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.TextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_icon_item",BI.TextIconItem),BI.TextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var conf=BI.TextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-text-item",textAlign:"left",whiteSpace:"nowrap",textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextItem.superclass._init.apply(this,arguments);var o=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:o.textAlign,whiteSpace:o.whiteSpace,textHeight:"nowrap"==o.whiteSpace?o.height:o.textHeight,height:o.height,hgap:o.textHgap,vgap:o.textVgap,lgap:o.textLgap,rgap:o.textRgap,text:o.text,value:o.value,keyword:o.keyword,py:o.py})},doClick:function(){BI.TextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.TextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_item",BI.TextItem),BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-icon-text-icon-node",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextIconNode.superclass._init.apply(this,arguments);var o=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:o.textHgap,vgap:o.textVgap,lgap:o.textLgap,rgap:o.textRgap,text:o.text,value:o.value,keyword:o.keyword,height:o.height});var icon1=BI.createWidget({type:"bi.icon_label",cls:o.iconCls1,width:o.height,height:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight}),blank=BI.createWidget({type:"bi.layout",width:o.height,height:o.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:o.iconCls2,width:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",icon1,this.text,blank)}))))},doClick:function(){BI.IconTextIconNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEve
handler.onloadprogress(rpe,{readyState:{loading:2,interactive:3,loaded:4,complete:4}[iframe.readyState]||1}))},form.setAttribute("action",handler.url+"&filename="+_global.encodeURIComponent(handler.file.fileName)),form.setAttribute("target",iframe.id),form.setAttribute("method","post"),form.appendChild(handler.file),form.style.display="none",isFunction(handler.onloadstart)&&handler.onloadstart(rpe,{}),document.body||document.documentElement)appendChild(iframe),appendChild(form),form.submit();return handler},xhr=null,sendFile}(Object.prototype.toString),sendFiles=function(handler,maxSize,width,height){var length=handler.files.length,i=0,onload=handler.onload,onloadstart=handler.onloadstart;for(handler.current=0,handler.total=0,handler.sent=0;handler.current<length;)handler.total+=handler.files[handler.current].fileSize||handler.files[handler.current].size,handler.current++;return handler.current=0,length&&handler.files[0].fileSize!==-1?(handler.file=handler.files[handler.current],sendFile(handler,maxSize,width,height).onload=function(rpe,xhr){handler.onloadstart=null,handler.sent+=handler.files[handler.current].fileSize||handler.files[handler.current].size,++handler.current<length?(handler.file=handler.files[handler.current],sendFile(handler,maxSize,width,height).onload=arguments.callee):onload&&(handler.onloadstart=onloadstart,handler.onload=onload,handler.onload(rpe,xhr))}):length&&(handler.total=100*length,handler.file=handler.files[handler.current],sendFile(handler,maxSize,width,height).onload=function(rpe,xhr){var callee=arguments.callee;handler.onloadstart=null,handler.sent+=100,++handler.current<length?(/\b(chrome|safari)\b/i.test(navigator.userAgent)&&(handler.iframe.parentNode.removeChild(handler.iframe),handler.iframe=null),setTimeout(function(){handler.file=handler.files[handler.current],sendFile(handler,maxSize,width,height).onload=callee},15)):onload&&setTimeout(function(){handler.iframe.parentNode.removeChild(handler.iframe),handler.iframe=null,handler.onloadstart=onloadstart,handler.onload=onload,handler.onload(rpe,xhr)},15)}),handler};BI.File=BI.inherit(BI.Single,{_defaultConfig:function(){var conf=BI.File.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-file display-block",tagName:"input",attributes:{type:"file"},name:"",url:"",multiple:!0,accept:"",maxSize:-1})},_init:function(){var self=this,o=this.options;BI.File.superclass._init.apply(this,arguments),o.multiple===!0&&this.element.attr("multiple","multiple"),this.element.attr("name",o.name||this.getName()),this.element.attr("title",o.title||"")},created:function(){var self=this,o=this.options,_wrap=this.wrap=this._wrap(this.element[0],o.maxSize);_wrap.onloadstart=function(rpe,xhr){self.fireEvent(BI.File.EVENT_UPLOADSTART,arguments)},_wrap.onprogress=function(rpe,xhr){this.file.fileSize!==-1&&rpe.simulation,self.fireEvent(BI.File.EVENT_PROGRESS,{file:this.file,total:rpe.total,loaded:rpe.loaded,simulation:rpe.simulation})},_wrap.onerror=function(){self.fireEvent(BI.File.EVENT_ERROR)},_wrap.onload=function(rpe,xhr){var self_=this;setTimeout(function(){if(self_.clean(),self_.hide(),200>xhr.status||xhr.status>399)return BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void self.fireEvent(BI.File.EVENT_ERROR);var error=BI.some(_wrap.attach_array,function(index,attach){if(attach.errorCode)return BI.Msg.toast(attach.errorMsg,{level:"error"}),self.fireEvent(BI.File.EVENT_ERROR,attach),!0});!error&&self.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},_wrap.url=o.url,_wrap.fileType=o.accept,_wrap.attach_array=[],_wrap.attach_names=[],_wrap.attachNum=0},_events:function(wrap){var self=this;return event.add(wrap.dom.input,"change",function(){event.del(wrap.dom.input,"change",arguments.callee);for(var input=wrap.dom.input.cloneNode(!0),i=0,files=F(wrap.dom.input);i<files.length;i++){var item=files.item(i),tempFile=item.value||item.name,value=item.fileName||(item.fileName=tempFile.split("\\").pop()),ext=-1!==value.indexOf(".")?value.split(".").pop().toLowerCase():"unknown",size=item.fileSize||item.size;
tools.apply(setting.callback.onAsyncError,[event,treeId,node,XMLHttpRequest,textStatus,errorThrown])}),o.bind(c.REMOVE,function(event,treeId,treeNode){tools.apply(setting.callback.onRemove,[event,treeId,treeNode])}),o.bind(c.SELECTED,function(event,srcEvent,treeId,node){tools.apply(setting.callback.onSelected,[srcEvent,treeId,node])}),o.bind(c.UNSELECTED,function(event,srcEvent,treeId,node){tools.apply(setting.callback.onUnSelected,[srcEvent,treeId,node])})},_unbindEvent=function(setting){var o=setting.treeObj,c=consts.event;o.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(event){var target=event.target,setting=data.getSetting(event.data.treeId),tId="",node=null,nodeEventType="",treeEventType="",nodeEventCallback=null,treeEventCallback=null,tmp=null;if(tools.eqs(event.type,"mousedown")?treeEventType="mousedown":tools.eqs(event.type,"mouseup")?treeEventType="mouseup":tools.eqs(event.type,"contextmenu")?treeEventType="contextmenu":tools.eqs(event.type,"click")?tools.eqs(target.tagName,"span")&&null!==target.getAttribute("treeNode"+consts.id.SWITCH)?(tId=tools.getNodeMainDom(target).id,nodeEventType="switchNode"):(tmp=tools.getMDom(setting,target,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),tmp&&(tId=tools.getNodeMainDom(tmp).id,nodeEventType="clickNode")):tools.eqs(event.type,"dblclick")&&(treeEventType="dblclick",tmp=tools.getMDom(setting,target,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),tmp&&(tId=tools.getNodeMainDom(tmp).id,nodeEventType="switchNode")),treeEventType.length>0&&0==tId.length&&(tmp=tools.getMDom(setting,target,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),tmp&&(tId=tools.getNodeMainDom(tmp).id)),tId.length>0)switch(node=data.getNodeCache(setting,tId),nodeEventType){case"switchNode":node.isParent&&(tools.eqs(event.type,"click")||tools.eqs(event.type,"dblclick")&&tools.apply(setting.view.dblClickExpand,[setting.treeId,node],setting.view.dblClickExpand))?nodeEventCallback=handler.onSwitchNode:nodeEventType="";break;case"clickNode":nodeEventCallback=handler.onClickNode}switch(treeEventType){case"mousedown":treeEventCallback=handler.onZTreeMousedown;break;case"mouseup":treeEventCallback=handler.onZTreeMouseup;break;case"dblclick":treeEventCallback=handler.onZTreeDblclick;break;case"contextmenu":treeEventCallback=handler.onZTreeContextmenu}var proxyResult={stop:!1,node:node,nodeEventType:nodeEventType,nodeEventCallback:nodeEventCallback,treeEventType:treeEventType,treeEventCallback:treeEventCallback};return proxyResult},_initNode=function(setting,level,n,parentNode,isFirstNode,isLastNode,openFlag){if(n){var r=data.getRoot(setting),childKey=setting.data.key.children;n.level=level,n.tId=setting.treeId+"_"+ ++r.zId,n.parentTId=parentNode?parentNode.tId:null,n.open="string"==typeof n.open?tools.eqs(n.open,"true"):!!n.open,n[childKey]&&n[childKey].length>0?(n.isParent=!0,n.zAsync=!0):(n.isParent="string"==typeof n.isParent?tools.eqs(n.isParent,"true"):!!n.isParent,n.open=!(!n.isParent||setting.async.enable)&&n.open,n.zAsync=!n.isParent),n.isFirstNode=isFirstNode,n.isLastNode=isLastNode,n.getParentNode=function(){return data.getNodeCache(setting,n.parentTId)},n.getPreNode=function(){return data.getPreNode(setting,n)},n.getNextNode=function(){return data.getNextNode(setting,n)},n.isAjaxing=!1,data.fixPIdKeyValue(setting,n)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(setting,node){data.getCache(setting).nodes[data.getNodeCacheId(node.tId)]=node},getNodeCacheId:function(tId){return tId.substring(tId.lastIndexOf("_")+1)},addAfterA:function(afterA){_init.afterA.push(afterA)},addBeforeA:function(beforeA){_init.beforeA.push(beforeA)},addInnerAfterA:function(innerAfterA){_init.innerAfterA.push(innerAfterA)},addInnerBeforeA:function(innerBeforeA){_init.innerBeforeA.push(innerBeforeA)},addIn
switch(newName){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:tmpList[0]=view.makeNodeLineClassEx(node)+newName;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:tmpList[1]=newName}obj.attr("class",tmpList.join("_")),newName!==consts.folder.DOCU?obj.removeAttr("disabled"):obj.attr("disabled","disabled")}}},selectNode:function(setting,node,addFlag){addFlag||view.cancelPreSelectedNode(setting,null,node),$$(node,consts.id.A,setting).addClass(consts.node.CURSELECTED),data.addSelectedNode(setting,node),setting.treeObj.trigger(consts.event.SELECTED,[event,setting.treeId,node])},setNodeFontCss:function(setting,treeNode){var aObj=$$(treeNode,consts.id.A,setting),fontCss=view.makeNodeFontCss(setting,treeNode);fontCss&&aObj.css(fontCss)},setNodeLineIcos:function(setting,node){if(node){var switchObj=$$(node,consts.id.SWITCH,setting),ulObj=$$(node,consts.id.UL,setting),icoObj=$$(node,consts.id.ICON,setting),ulLine=view.makeUlLineClass(setting,node);0==ulLine.length?ulObj.removeClass(consts.line.LINE):ulObj.addClass(ulLine),switchObj.attr("class",view.makeNodeLineClass(setting,node)),node.isParent?switchObj.removeAttr("disabled"):switchObj.attr("disabled","disabled"),icoObj.removeAttr("style"),icoObj.attr("style",view.makeNodeIcoStyle(setting,node)),icoObj.attr("class",view.makeNodeIcoClass(setting,node))}},setNodeName:function(setting,node){var title=data.getNodeTitle(setting,node),nObj=$$(node,consts.id.SPAN,setting);if(nObj.empty(),setting.view.nameIsHTML?nObj.html(data.getNodeName(setting,node)):nObj.text(data.getNodeName(setting,node)),tools.apply(setting.view.showTitle,[setting.treeId,node],setting.view.showTitle)){var aObj=$$(node,consts.id.A,setting);aObj.attr("title",title?title:"")}},setNodeTarget:function(setting,node){var aObj=$$(node,consts.id.A,setting);aObj.attr("target",view.makeNodeTarget(node))},setNodeUrl:function(setting,node){var aObj=$$(node,consts.id.A,setting),url=view.makeNodeUrl(setting,node);null==url||0==url.length?aObj.removeAttr("href"):aObj.attr("href",url)},switchNode:function(setting,node){if(node.open||!tools.canAsync(setting,node))view.expandCollapseNode(setting,node,!node.open);else if(setting.async.enable){if(!view.asyncNode(setting,node))return void view.expandCollapseNode(setting,node,!node.open)}else node&&view.expandCollapseNode(setting,node,!node.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(treeId){var o=data.getZTreeTools(treeId);return o?o:null},destroy:function(treeId){if(treeId&&treeId.length>0)view.destroy(data.getSetting(treeId));else for(var s in settings)view.destroy(settings[s])},init:function(obj,zSetting,zNodes){var setting=tools.clone(_setting);$.extend(!0,setting,zSetting),setting.treeId=obj.attr("id"),setting.treeObj=obj,setting.treeObj.empty(),settings[setting.treeId]=setting,"undefined"==typeof document.body.style.maxHeight&&(setting.view.expandSpeed=""),data.initRoot(setting);var root=data.getRoot(setting),childKey=setting.data.key.children;zNodes=zNodes?tools.clone(tools.isArray(zNodes)?zNodes:[zNodes]):[],setting.data.simpleData.enable?root[childKey]=data.transformTozTreeFormat(setting,zNodes):root[childKey]=zNodes,data.initCache(setting),event.unbindTree(setting),event.bindTree(setting),event.unbindEvent(setting),event.bindEvent(setting);var zTreeTools={setting:setting,addNodes:function(parentNode,newNodes,isSilent){function addCallback(){view.addNodes(setting,parentNode,xNewNodes,1==isSilent)}if(!newNodes)return null;if(parentNode||(parentNode=null),parentNode&&!parentNode.isParent&&setting.data.keep.leaf)return null;var xNewNodes=tools.clone(tools.isArray(newNodes)?newNodes:[newNodes]);return tools.canAsync(setting,parentNode)?view.asyncNode(setting,parentNode,isSilent,addCallback):addCallback(),xNewNodes},cancelSelectedNode:function(node){view.cancelPreSelectedNode(setting,node)},destroy:function(){view.destroy(setting)},expandAll:function(expandFlag){return expandFlag=!!expandFlag,view.expandCollapseSonNode(set
extraCls:"bi-single-select-radio-item",logic:{dynamic:!1},hgap:10,height:24})},_init:function(){BI.SingleSelectRadioItem.superclass._init.apply(this,arguments);var self=this,o=this.options;this.radio=BI.createWidget({type:"bi.radio",once:o.once}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,keyword:o.keyword,value:o.value,py:o.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:16},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectRadioItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.SingleSelectRadioItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(v){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(v)}}),BI.SingleSelectRadioItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var self=this,o=this.options;BI.ArrowNode.superclass._init.apply(this,arguments),this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&self.setSelected(self.isSelected()),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var type=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),items=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:16,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(type,BI.extend(o.logic,{items:items}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.ArrowNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isOpened())},setText:function(text){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(text)},setOpened:function(v){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(v)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode),BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-first-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){BI.FirstPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=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:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py,keyword:o.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&(this.isSelected()?self.triggerExpand():self.triggerCollapse())});var type=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),items=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(type,BI.extend(o.logic,{items:items}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this
}}),BI.shortcut("bi.arrow_group_node_checkbox",BI.ArrowTreeGroupNodeCheckbox),BI.CheckingMarkNode=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.CheckingMarkNode.superclass._defaultConfig.apply(this,arguments),{extraCls:"check-mark-font"})},_init:function(){BI.CheckingMarkNode.superclass._init.apply(this,arguments),this.setSelected(this.options.selected)},setSelected:function(v){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),v===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),BI.FirstTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type2",iconWidth:24,iconHeight:24})},setSelected:function(v){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),v===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),BI.LastTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type4",iconWidth:24,iconHeight:24})},setSelected:function(v){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),v===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),BI.MidTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type3",iconWidth:24,iconHeight:24})},setSelected:function(v){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),v===!0?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox),BI.TreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type1",iconWidth:24,iconHeight:24})},setSelected:function(v){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),v?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox),BI.CustomColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-color-chooser",width:227,height:245})},_init:function(){BI.CustomColorChooser.superclass._init.apply(this,arguments);var self=this,o=this.options;this.editor=BI.createWidget(o.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){self.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){self.setValue(this.getValue())}),BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.absolute",items:[{el:this.editor,left:0,top:0,right:0}],height:30},{type:"bi.absolute",items:[{el:this.farbtastic,left:15,right:15,top:7}],height:215}]})},setValue:function(color){this.editor.setValue(color),this.farbtastic.setValue(color)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser),BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:"",height:24})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var self=this,o=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:o.container,adjustLength:1,
},op={width:this._const.TRIANGLE_LENGTH};break;case"right":pos={top:top,height:this.element.outerHeight(),left:right+adjustLength},op={width:this._const.TRIANGLE_LENGTH};break;case"top":pos={left:left,width:this.element.outerWidth(),top:top-adjustLength-this._const.TRIANGLE_LENGTH},op={height:this._const.TRIANGLE_LENGTH};break;case"bottom":pos={left:left,width:this.element.outerWidth(),top:bottom+adjustLength},op={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(op,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+direction}]}),pos.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[pos]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var pos=this.combo.getPopupPosition();switch(pos.dir){case"left,top":case"left,bottom":this._createLeftTriangle();break;case"right,top":case"right,bottom":this._createRightTriangle();break;case"top,left":case"top,right":this._createTopTriangle();break;case"bottom,left":case"bottom,right":this._createBottomTriangle()}},_hideTriangle:function(){this.triangle&&this.triangle.destroy(),this.triangle=null},hideView:function(){this._hideTriangle(),this.combo&&this.combo.hideView()},showView:function(){this.combo&&this.combo.showView()},isViewVisible:function(){return this.combo.isViewVisible()}}),BI.BubbleCombo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.BubbleCombo.EVENT_CHANGE="EVENT_CHANGE",BI.BubbleCombo.EVENT_EXPAND="EVENT_EXPAND",BI.BubbleCombo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.BubbleCombo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.BubbleCombo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.BubbleCombo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.bubble_combo",BI.BubbleCombo),BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var config=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(config,{baseCls:config.baseCls+" bi-bubble-popup-view",minWidth:220,maxWidth:300,minHeight:90})},_init:function(){BI.BubblePopupView.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.bubble_popup_view",BI.BubblePopupView),BI.BubblePopupBarView=BI.inherit(BI.BubblePopupView,{_defaultConfig:function(){return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-bubble-bar-popup-view",buttons:[{value:!1,text:BI.i18nText("BI-Basic_Cancel"),ghost:!0},{text:BI.i18nText(BI.i18nText("BI-Basic_Sure")),value:!0}]})},_init:function(){BI.BubblePopupBarView.superclass._init.apply(this,arguments)},_createToolBar:function(){var o=this.options,self=this,items=[];return BI.each(o.buttons,function(i,buttonOpt){BI.isWidget(buttonOpt)?items.push(buttonOpt):items.push(BI.extend({type:"bi.button",height:24,handler:function(v){self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,v)}},buttonOpt))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:items}]})},_createView:function(){var o=this.options,button=BI.createWidget({type:"bi.button_group",items:[o.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return button.element.css("min-height",o.minHeight-44),button}}),BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.bubble_bar_popup_view",BI.BubblePopupBarView),BI.TextBubblePopupBarView=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-text-bubble-bar-popup-view",text:"",buttons:[{level:"ignore",value:!1,stopPropagation:!0,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,stopPropagation:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var self=this,o=this.options,buttons=BI.map(o.bu
BI.ClearEditor.EVENT_CLEAR="EVENT_CLEAR",BI.ClearEditor.EVENT_START="EVENT_START",BI.ClearEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ClearEditor.EVENT_STOP="EVENT_STOP",BI.ClearEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ClearEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.ClearEditor.EVENT_VALID="EVENT_VALID",BI.ClearEditor.EVENT_ERROR="EVENT_ERROR",BI.ClearEditor.EVENT_ENTER="EVENT_ENTER",BI.ClearEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ClearEditor.EVENT_REMOVE="EVENT_REMOVE",BI.ClearEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.clear_editor",BI.ClearEditor),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var conf=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.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 self=this,o=this.options;this.editor=BI.createWidget({type:"bi.editor",height:o.height,hgap:o.hgap,vgap:o.vgap,lgap:o.lgap,rgap:o.rgap,tgap:o.tgap,bgap:o.bgap,value:o.value,validationChecker:o.validationChecker,quitChecker:o.quitChecker,allowBlank:o.allowBlank,watermark:o.watermark,errorText:o.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:o.title,warningTitle:o.warningTitle,tipType:o.tipType,textAlign:o.textAlign,height:o.height,hgap:o.hgap}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.text.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=self,self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){self.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){self.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){self.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){self.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){self.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(v){self.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){self.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){self._showHint(),self._checkText(),self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){self._showHint(),self._checkText(),self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){self.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){self.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){self.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){self.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){self._checkText(),self.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){self.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){self.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){self.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),self._checkText()},_checkText:function(){var o=this.options;""===this.editor.getValue()?(this.text.setValue(o.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass(
}},setTitle:function(title){this.text.setValue(title)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),BI.LinearSegmentButton=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-line-segment-button bi-list-item-effect",once:!0,readonly:!0,hgap:10,height:25},render:function(){var self=this,o=this.options;return[{type:"bi.label",text:o.text,height:o.height,value:o.value,hgap:o.hgap,ref:function(){self.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){self.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(v){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),v?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(text){this.text.setText(text)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var self=this,o=this.options;return{type:"bi.button_group",items:BI.createItems(o.items,{type:"bi.linear_segment_button",height:o.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){self.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){self.fireEvent("EVENT_CHANGE")}}],ref:function(){self.buttonGroup=this}}},setValue:function(v){this.buttonGroup.setValue(v)},setEnabledValue:function(v){this.buttonGroup.setEnabledValue(v)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment),BI.SelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,toolbar:{type:"bi.multi_select_bar",iconWrapperWidth:36},el:{type:"bi.list_pane"}})},_init:function(){BI.SelectList.superclass._init.apply(this,arguments);var self=this,o=this.options;this.toolbar=BI.createWidget(o.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(type,value,obj){self.allSelected=this.isSelected(),type===BI.Events.CLICK&&(self.setAllSelected(self.allSelected),self.fireEvent(BI.SelectList.EVENT_CHANGE,value,obj)),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(o.el,{type:"bi.list_pane",items:o.items,itemsCreator:function(op,callback){1===op.times&&self.toolbar.setVisible(!1),o.itemsCreator(op,function(items){callback.apply(self,arguments),1===op.times&&(self.toolbar.setVisible(items&&items.length>0),self.toolbar.setEnable(self.isEnabled()&&items&&items.length>0)),self._checkAllSelected()})},onLoaded:o.onLoaded,hasNext:o.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(type,value,obj){type===BI.Events.CLICK&&(self._checkAllSelected(),self.fireEvent(BI.SelectList.EVENT_CHANGE,value,obj)),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction),BI.extend({scrolly:!0},o.logic,{items:BI.LogicFactory.createLogicItemsByDirection(o.direction,this.toolbar,this.list)})))),o.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(o.value)&&this.setValue(o.value)},_checkAllSelected:function(){var selectLength=this.list.getValue().length,notSelectLength=this.getAllLeaves().length-selectLength,hasNext=this.list.hasNext(),isAlreadyAllSelected=this.toolbar.isSelected(),isHalf=selectLength>0&&(notSelectLength>0||!isAlreadyAllSelected&&hasNext);isHalf=isHalf||notSelectLength>0&&hasNext&&isAlreadyAllSelected,this.toolbar.setHalfSelected(isHalf),!isHalf&&this.toolbar.setSelected(selectLength>0&&notSelectLength<=0&&(!hasNext||isAlreadyAllSelected))},setAllSelected:function(v){BI.each(this.getAllButtons(),function(i,btn){(btn.setSelected||btn.setAllSelected).apply(btn,[v])}),this.allSelected=!!v,this.tool
this.halfSelected=!!b,b===!0?(this.checkbox.setSelected(!1),this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!this.isSelected()&&!!this.halfSelected},isSelected:function(){return this.checkbox.isSelected()},setValue:function(selectedValues){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var isAllChecked=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(isAllChecked),!isAllChecked&&this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this,arguments))},doClick:function(){BI.MultiSelectBar.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,this.isSelected(),this)}}),BI.MultiSelectBar.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.LevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-level-tree",el:{chooseType:0},expander:{},items:[],value:""})},_init:function(){BI.LevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(nodes,layer,pNode){var self=this;return BI.each(nodes,function(i,node){var extend={layer:layer};BI.isKey(node.id)||(node.id=BI.UUID()),extend.pNode=pNode,node.isParent===!0||node.parent===!0||BI.isNotEmptyArray(node.children)?(extend.type="bi.mid_plus_group_node",i===nodes.length-1&&(extend.type="bi.last_plus_group_node",extend.isLastNode=!0),0!==i||pNode||(extend.type="bi.first_plus_group_node"),0===i&&i===nodes.length-1&&(extend.type="bi.plus_group_node"),BI.defaults(node,extend),self._formatItems(node.children,layer+1,node)):(extend.type="bi.mid_tree_leaf_item",0!==i||pNode||(extend.type="bi.first_tree_leaf_item"),i===nodes.length-1&&(extend.type="bi.last_tree_leaf_item"),BI.defaults(node,extend))}),nodes},_assertId:function(sNodes){BI.each(sNodes,function(i,node){BI.isKey(node.id)||(node.id=BI.UUID())})},initTree:function(nodes){var self=this,o=this.options;this.empty(),this._assertId(nodes),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},o.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(nodes),0),value:o.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},o.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(type,value,ob){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.LevelTree.EVENT_CHANGE,value,ob)})},stroke:function(nodes){this.tree.stroke.apply(this.tree,arguments)},populate:function(items,keyword){items=this._formatItems(BI.Tree.transformToTreeFormat(items),0),this.tree.populate(items,keyword)},setValue:function(v){this.tree.setValue(v)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(id){return this.tree.getNodeById(id)},getNodeByValue:function(id){return this.tree.getNodeByValue(id)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree),BI.DisplayTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-display-tree"})},_init:function(){BI.DisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){function beforeCollapse(treeId,treeNode){return!1}var setting={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:beforeCollapse}};return setting},_dealWidthNodes:function(nodes){nodes=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);var self=this,o=this.options;return BI.each(nodes,function(i,node){node.isParent=node.isParent||node.parent,null==node.text&&node.count>0&&(node.text=node.value+"("+BI.i18nText("BI-Basic_Altogether")+node.count+BI.i18nText("BI-Basic_Count")+")")}),nodes},initTree:function(nodes,setting){var s
baseCls:"bi-date-triangle-trigger pull-down-ha-font cursor-pointer",height:24})},_init:function(){BI.DateTriangleTrigger.superclass._init.apply(this,arguments);var o=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:o.text,value:o.value,height:c.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(v){this.text.setValue(v)},getValue:function(){return this.text.getValue()},setText:function(v){this.text.setText(v)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var conf=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var self=this,o=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=o.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:o.behaviors,min:o.min,max:o.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var value=self.datePicker.getValue(),monthDay=BI.getMonthDays(BI.getDate(value.year,value.month-1,1)),day=self.selectedTime.day||0;day>monthDay&&(day=monthDay),self.selectedTime={year:value.year,month:value.month},0!==day&&(self.selectedTime.day=day),self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime)),self.calendar.setValue(self.selectedTime),0!==day&&self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.calendar=BI.createWidget({direction:"custom",type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){self.selectedTime=self.calendar.getValue(),self.calendar.empty(),self.setValue(self.selectedTime),self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(o.selectedTime),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.datePicker,height:40},this.calendar],hgap:10}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},_createNav:function(v){var date=BI.Calendar.getDateJSONByPage(v),calendar=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:date.year,month:date.month,day:this.selectedTime.day});return calendar},_getNewCurrentDate:function(){var today=BI.getDate();return{year:today.getFullYear(),month:today.getMonth()+1}},_setCalenderValue:function(date){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(date)),this.calendar.setValue(date),this.selectedTime=date},_setDatePicker:function(timeOb){BI.isNull(timeOb)||BI.isNull(timeOb.year)||BI.isNull(timeOb.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(timeOb)},_setCalendar:function(timeOb){BI.isNull(timeOb)||BI.isNull(timeOb.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(timeOb)},setValue:function(timeOb){this._setDatePicker(timeOb),this._setCalendar(timeOb)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var self=this,o=this.options;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-split-bottom",height:30,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDatePane.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDatePane.Dynamic}],{textAlign:"center"}),listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){var value=this.getValue()[0];switch(self.dateTab.setSelect(value),value){case BI.DynamicDatePane.Static:var date=BI.DynamicDate
lgap:10},tgap:10,bgap:5},{type:"bi.button_group",ref:function(){self.checkgroup=this},chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,lgap:4,value:[BI.DynamicDateCard.TYPE.YEAR],items:BI.createItems([{text:BI.i18nText("BI-Basic_Year"),value:BI.DynamicDateCard.TYPE.YEAR},{text:BI.i18nText("BI-Basic_Single_Quarter"),value:BI.DynamicDateCard.TYPE.QUARTER},{text:BI.i18nText("BI-Basic_Month"),value:BI.DynamicDateCard.TYPE.MONTH},{text:BI.i18nText("BI-Basic_Week"),value:BI.DynamicDateCard.TYPE.WEEK},{text:BI.i18nText("BI-Basic_Day"),value:BI.DynamicDateCard.TYPE.DAY}],{type:"bi.multi_select_item",logic:{dynamic:!0}}),layouts:[{type:"bi.left",rgap:4}],listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){var value=self.checkgroup.getValue();0!==value.length&&self.workDayBox.setSelected(!1);var plainValue={};BI.each(self.resultPane.getAllButtons(),function(idx,button){var value=button.getValue();BI.isNotNull(value.dateType)&&(plainValue[value.dateType]={value:value.value,offset:value.offset})}),self.resultPane.populate(self._getParamJson(BI.map(self.checkgroup.getValue(),function(idx,v){var obj={dateType:v};return BI.has(plainValue,v)&&(obj.value=plainValue[v].value,obj.offset=plainValue[v].offset),obj}))),self.position=BI.DynamicDateCard.OFFSET.CURRENT,self.fireEvent("EVENT_CHANGE")}}]},{type:"bi.vertical_adapt",lgap:2,items:[{el:{type:"bi.multi_select_item",ref:function(){self.workDayBox=this},logic:{dynamic:!0},text:BI.i18nText("BI-Basic_Work_Day"),value:BI.DynamicDateCard.TYPE.WORK_DAY,listeners:[{eventName:BI.MultiSelectItem.EVENT_CHANGE,action:function(){this.isSelected()&&self.checkgroup.setValue(),self.resultPane.populate(this.isSelected()?self._getParamJson([{dateType:BI.DynamicDateCard.TYPE.WORK_DAY}]):[]),self.position=BI.DynamicDateCard.OFFSET.CURRENT,self.fireEvent("EVENT_CHANGE")}}]}}],ref:function(){self.workDay=this}},{type:"bi.button_group",items:this._getParamJson([{dateType:BI.DynamicDateCard.TYPE.YEAR}]),ref:function(){self.resultPane=this},layouts:[{type:"bi.vertical",bgap:10,hgap:10}]}]}},_getParamJson:function(values,positionValue){var self=this,items=BI.map(values,function(idx,value){return{el:{type:"bi.dynamic_date_param_item",dateType:value.dateType,value:value.value,offset:value.offset,listeners:[{eventName:"EVENT_CHANGE",action:function(){self.fireEvent("EVENT_CHANGE")}}]},tgap:0===idx?5:0}});if(1===values.length&&values[0].dateType===BI.DynamicDateCard.TYPE.DAY){var comboItems=this._getText(BI.DynamicDateCard.TYPE.MONTH);comboItems[0].text=BI.i18nText("BI-Basic_Empty"),items.push({type:"bi.text_value_combo",height:24,items:comboItems,container:null,value:positionValue||BI.DynamicDateCard.OFFSET.CURRENT,listeners:[{eventName:"EVENT_CHANGE",action:function(){self.position=this.getValue()[0],self.fireEvent("EVENT_CHANGE")}}]})}else 0!==values.length&&BI.last(values).dateType!==BI.DynamicDateCard.TYPE.DAY&&BI.last(values).dateType!==BI.DynamicDateCard.TYPE.WORK_DAY&&items.push({type:"bi.text_value_combo",height:24,container:null,items:this._getText(BI.last(values).dateType),value:positionValue||BI.DynamicDateCard.OFFSET.CURRENT,listeners:[{eventName:"EVENT_CHANGE",action:function(){self.position=this.getValue()[0],self.fireEvent("EVENT_CHANGE")}}]});return items},_getText:function(lastValue){switch(lastValue){case BI.DynamicDateCard.TYPE.YEAR:return[{text:BI.i18nText("BI-Basic_Current_Day"),value:BI.DynamicDateCard.OFFSET.CURRENT},{text:BI.i18nText("BI-Basic_Year_Begin"),value:BI.DynamicDateCard.OFFSET.BEGIN},{text:BI.i18nText("BI-Basic_Year_End"),value:BI.DynamicDateCard.OFFSET.END}];case BI.DynamicDateCard.TYPE.QUARTER:return[{text:BI.i18nText("BI-Basic_Current_Day"),value:BI.DynamicDateCard.OFFSET.CURRENT},{text:BI.i18nText("BI-Basic_Quarter_Begin"),value:BI.DynamicDateCard.OFFSET.BEGIN},{text:BI.i18nText("BI-Basic_Quarter_End"),value:BI.DynamicDateCard.OFFSET.END}];case BI.DynamicDateCard.TYPE.MONTH:return[{text:BI.i18nText("BI-Basic_Current_Day"),value:BI.DynamicDateCard.OFFSET.CURRENT},{text:BI.i18nText("BI-Basic_Month_Begin"),value:BI.DynamicDateCard.OFFSET.BEGIN},{text:BI.i18nText("BI-
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){self.popup.setValue(self.storeValue),self.popup.setMinDate(opts.minDate),self.popup.setMaxDate(opts.maxDate),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(e){return 0===self.triggerBtn.element.find(e.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:opts.height,height:opts.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){self.combo.isViewVisible()||self.combo.showView()}}],ref:function(){self.triggerBtn=this}},top:0,right:0}]}],ref:function(_ref){self.comboWrapper=_ref}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(v){var o=this.options,type=null;switch(BI.isNotNull(v)&&(type=v.type),type){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=o.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(v){switch(v.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(v.value);case BI.DynamicDateCombo.Static:default:return!0}},setMinDate:function(minDate){var o=this.options;o.minDate=minDate,this.trigger.setMinDate(minDate),this.popup&&this.popup.setMinDate(minDate)},setMaxDate:function(maxDate){var o=this.options;o.maxDate=maxDate,this.trigger.setMaxDate(maxDate),this.popup&&this.popup.setMaxDate(maxDate)},setValue:function(v){this.storeValue=v,this.trigger.setValue(v),this._checkDynamicValue(v)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()},isValid:function(){return this.trigger.isValid()}}),BI.DynamicDateTimeCombo.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.DynamicDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTimeCombo.EVENT_BLUR="EVENT_BLUR",BI.DynamicDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimeCombo.EVENT_VALID="EVENT_VALID",BI.DynamicDateTimeCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_date_time_combo",BI.DynamicDateTimeCombo),BI.extend(BI.DynamicDateTimeCombo,{Static:1,Dynamic:2}),BI.DynamicDateTimePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-dynamic-date-time-popup",width:248,height:385},_init:function(){BI.DynamicDateTimePopup.superclass._init.apply(this,arguments);var self=this,opts=this.options,c=this.constants;this.storeValue={type:BI.DynamicDateCombo.Static},BI.createWidget({element:this,type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){self.fireEvent(BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){self.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){self.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){self.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(opts.value)},_getTabJson:function(){var self=this,o=this.options;return{type:"bi.tab",ref:function(){self.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateCombo.
validationChecker:function(v){return self._checkValidation(v)}}),this.labelTwo.element.hover(function(){self.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){self.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var oldValueTwo=self.valueTwo,v=BI.parseFloat(this.getValue());self.valueTwo=v;var percent=self._getPercentByValue(v),significantPercent=BI.parseFloat(percent.toFixed(1));self._setSliderTwoPosition(significantPercent),self._setBlueTrack(),self._checkLabelPosition(self.valueOne,oldValueTwo,self.valueOne,self.valueTwo),self.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.sliderTwo=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.sliderOne,!0),this._draggable(this.sliderTwo,!1),this._setVisible(!1),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]}},_rePosBySizeAfterMove:function(size,isLeft){var o=this.options,percent=100*size/this._getGrayTrackLength(),significantPercent=BI.parseFloat(percent.toFixed(1)),v=this._getValueByPercent(significantPercent);v=this._assertValue(v),v=o.digit===!1?v:v.toFixed(o.digit);var oldValueOne=this.valueOne,oldValueTwo=this.valueTwo;isLeft?(this._setSliderOnePosition(significantPercent),this.labelOne.setValue(v),this.valueOne=v,this._checkLabelPosition(oldValueOne,oldValueTwo,v,this.valueTwo)):(this._setSliderTwoPosition(significantPercent),this.labelTwo.setValue(v),this.valueTwo=v,this._checkLabelPosition(oldValueOne,oldValueTwo,this.valueOne,v)),this._setBlueTrack()},_rePosBySizeAfterStop:function(size,isLeft){var percent=100*size/this._getGrayTrackLength(),significantPercent=BI.parseFloat(percent.toFixed(1));isLeft?this._setSliderOnePosition(significantPercent):this._setSliderTwoPosition(significantPercent)},_draggable:function(widget,isLeft){function optimizeSize(s){return BI.clamp(s,0,self._getGrayTrackLength())}var self=this,o=this.options,startDrag=!1,size=0,offset=0,defaultSize=0,mouseMoveTracker=new BI.MouseMoveTracker(function(deltaX){mouseMoveTracker.isDragging()&&(startDrag=!0,offset+=deltaX,size=optimizeSize(defaultSize+offset),widget.element.addClass("dragging"),self._rePosBySizeAfterMove(size,isLeft))},function(){startDrag===!0&&(size=optimizeSize(size),self._rePosBySizeAfterStop(size,isLeft),size=0,offset=0,defaultSize=size,startDrag=!1),widget.element.removeClass("dragging"),mouseMoveTracker.releaseMouseMoves(),self.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);widget.element.on("mousedown",function(event){widget.isEnabled()&&(defaultSize=this.offsetLeft,optimizeSize(defaultSize),mouseMoveTracker.captureMouseMoves(event))})},_createLabelWrapper:function(){var c=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:c.EDITOR_R_GAP,height:c.SLIDER_HEIGHT},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var c=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:c.SLIDER_WIDTH_HALF,height:c.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(v){var o=this.options,valid=!1,dotText=(v+"").split(".")[1];return BI.isEmptyString(dotText)||BI.isNumeric(v)&&!(BI.isNull(v)||v<this.min||v>this.max)&&(o.digit===!1||BI.isInteger(v)?valid=!0:(dotText=dotText||"",valid=dotText.length===o.digit)),valid},_checkOverlap:function(){var labelOne
callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items),op.node?op.node.layer+1:0,op.node)),self.setValue(self.storeValue),1===op.times&&!op.node&&BI.nextTick(function(){self.loaded()})})},value:o.value,el:{type:"bi.loader",isDefaultInit:o.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:o.chooseType,behaviors:o.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return hasNext}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(type,value){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&(self.setValue(value),self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:o.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(nodes){this._populate(nodes),BI.isNull(nodes)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes),0))},setValue:function(v){this.options.chooseType===BI.Selection.None||(this.storeValue=v,this.tree.setValue(v))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:BI.isNull(this.storeValue)?[]:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(id){return this.tree.getNodeById(id)},getNodeByValue:function(id){return this.tree.getNodeByValue(id)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),BI.MultiLayerSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[],value:"",onLoaded:BI.emptyFn})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var self=this,o=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:o.isDefaultInit,items:o.items,itemsCreator:o.itemsCreator,keywordGetter:o.keywordGetter,value:o.value,scrollable:null,onLoaded:function(){self.tree.check(),o.onLoaded()}}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)})},getValue:function(){return this.tree.getValue()},setValue:function(v){v=BI.isArray(v)?v:[v],this.tree.setValue(v)},populate:function(items){this.tree.populate(items)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup),BI.MultiLayerSelectTreeTrigger=BI.inherit(BI.Trigger,{props:function(){return{extraCls:"bi-multi-layer-select-tree-trigger bi-border bi-focus-shadow bi-border-radius",height:24,valueFormatter:function(v){return v},itemsCreator:BI.emptyFn,watermark:BI.i18nText("BI-Basic_Search"),allowSearchValue:!1}},render:function(){var self=this,o=this.options;o.itemsCreator===BI.emptyFn&&this._initData();var content={type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){self.searcher=this},masker:BI.isNotNull(o.container)?{offset:{},container:o.container}:{offset:{}},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){self.editor=this},defaultText:o.text,text:this._digest(o.value),value:o.value,height:o.height,tipText:"",watermark:o.watermark,listeners:[{eventName:BI.StateEditor.EVENT_FOCUS,action:function(){self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS)}},{eventName:BI.StateEditor.EVENT_BLUR,action:function(){self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_BLUR)}},{eventName:BI.StateEditor.EVENT_CHANGE,action:function(){self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING)}}]},popup:{type:o.allowInsertValue?"bi.multilayer_select_tree_insert_search_pane":"bi.multil
BI.isNotNull(this.node)&&this.node.setOpened(v)},_createNode:function(){var self=this,o=this.options;return BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:o.id,pId:o.pId,open:o.open,isLastNode:o.isLastNode,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py,keyword:o.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(type){type!==BI.Events.CLICK&&self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.node=this._createNode();for(var needBlankLayers=[],pNode=o.pNode;pNode;)pNode.isLastNode&&needBlankLayers.push(pNode.layer),pNode=pNode.pNode;var items=[];BI.count(0,o.layer,function(index){items.push({type:"bi.layout",cls:BI.contains(needBlankLayers,index)?"":"base-line-conn-background",width:12,height:o.height})}),items.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(o.layer,12),items:[items]})},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(v){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(v)},_createNode:function(){var self=this,o=this.options;return BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:o.id,pId:o.pId,open:o.open,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py,keyword:o.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(type){type!==BI.Events.CLICK&&self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.node=this._createNode();for(var needBlankLayers=[],pNode=o.pNode;pNode;)pNode.isLastNode&&needBlankLayers.push(pNode.layer),pNode=pNode.pNode;var items=[];BI.count(0,o.layer,function(index){items.push({type:"bi.layout",cls:BI.contains(needBlankLayers,index)?"":"base-line-conn-background",width:12,height:o.height})}),items.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(o.layer,12),items:[items]})},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(v){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(v)},_createNode:function(){var self=this,o=this.options;return BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:o.id,pId:o.pId,open:o.open,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py,keyword:o.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(typ
void self._adjust(callback)}this._joinAll(res,callback)},_setStartValue:function(value){this._startValue=value,this.popup.setStartValue(value)},setValue:function(v){this.storeValue={type:BI.Selection.Multi,value:v||[]},this.combo.setValue(this.storeValue),this.numberCounter.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments),this.numberCounter.populate.apply(this.numberCounter,arguments)}}),BI.extend(BI.MultiSelectNoBarCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectNoBarCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectNoBarCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectNoBarCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectNoBarCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectNoBarCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_no_bar_combo",BI.MultiSelectNoBarCombo),BI.MultiSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.MultiSelectInsertCombo.superclass._init.apply(this,arguments);var self=this,o=this.options,assertShowValue=function(){BI.isKey(self._startValue)&&(self.storeValue.type===BI.Selection.All?BI.remove(self.storeValue.value,self._startValue):BI.pushDistinct(self.storeValue.value,self._startValue)),self.trigger.getSearcher().setState(self.storeValue),self.numberCounter.setButtonChecked(self.storeValue)};this.storeValue=o.value||{},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_insert_trigger",allowEdit:o.allowEdit,height:o.height,text:o.text,watermark:o.watermark,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:o.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:o.value}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_FOCUS,function(){self.fireEvent(BI.MultiSelectInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BLUR,function(){self.fireEvent(BI.MultiSelectInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START,function(){self._setStartValue(""),this.getSearcher().setValue(self.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP,function(){self._setStartValue(""),self.fireEvent(BI.MultiSelectInsertCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE,function(){this.getSearcher().hasMatched()&&self._addItem(assertShowValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM,function(){this.getSearcher().hasMatched()||(self._addItem(assertShowValue),self._stopEditing())}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,function(keywords){var last=BI.last(keywords);keywords=BI.initial(keywords||[]),keywords.length>0&&self._joinKeywords(keywords,function(){BI.isEndWithBlank(last)?(self.combo.setValue(self.storeValue),assertShowValue(),self.combo.populate(),self._setStartValue("")):(self.combo.setValue(self.storeValue),assertShowValue())}),self.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE,function(value,obj){obj instanceof BI.MultiSelectBar?self._joinAll(this.getValue(),function(){assertShowValue()}):self._join(this.getValue(),function(){assertShowValue()}),self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){self.numberCounter.updateSelectedValue(self.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){self.combo.isViewVisible()||self.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!o.allowEdit,el:this.trigger,adjustLength:1,container:o.container,popup:{type:"bi.multi_select_popup_view",ref:function(){self.popup=this,self.trigger.setAdapter(this),self.numberCoun
this.popupView.resetWidth(w)}}),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.MultiSelectNoBarPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarPopupView.superclass._init.apply(this,arguments);var self=this,opts=this.options;this.loader=BI.createWidget({type:"bi.multi_select_no_bar_loader",itemsCreator:opts.itemsCreator,valueFormatter:opts.valueFormatter,onLoaded:opts.onLoaded,value:opts.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:opts.maxWidth,minWidth:opts.minWidth,maxHeight:opts.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:opts.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(index){switch(index){case 0:self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);break;case 1:self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(v){this.loader.setStartValue(v)},setValue:function(v){this.popupView.setValue(v)},getValue:function(){return this.popupView.getValue()},populate:function(items){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(h){this.popupView.resetHeight(h)},resetWidth:function(w){this.popupView.resetWidth(w)}}),BI.MultiSelectNoBarPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_no_bar_popup_view",BI.MultiSelectNoBarPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border bi-border-radius",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var self=this,o=this.options;o.height&&this.setHeight(o.height-2),this.searcher=BI.createWidget(o.searcher,{type:"bi.multi_select_searcher",height:o.height,text:o.text,itemsCreator:o.itemsCreator,valueFormatter:o.valueFormatter,watermark:o.watermark,popup:{},adapter:o.adapter,masker:o.masker,value:o.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){self.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){self.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){self.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){self.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR,function(){self.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS,function(){self.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS)}),this.wrapNumberCounter=BI.createWidget({type:"bi.layout"}),this.wrapper=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:this.wrapNumberCounter,width:0},{el:BI.createWidget(),width:24}]}),!o.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]})},re
}this._joinAll(res,callback)},_setStartValue:function(value){this._startValue=value,this.adapter.setStartValue(value)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(v){this.storeValue=v||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_list",BI.MultiSelectInsertList),BI.MultiSelectInsertNoBarList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertNoBarList.superclass._init.apply(this,arguments);var self=this,o=this.options;this.storeValue={type:BI.Selection.Multi,value:o.value||[]};var assertShowValue=function(){BI.isKey(self._startValue)&&(self.storeValue.type===BI.Selection.All?BI.remove(self.storeValue.value,self._startValue):BI.pushDistinct(self.storeValue.value,self._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_no_bar_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:o.itemsCreator,valueFormatter:o.valueFormatter,logic:{dynamic:!1},el:{},value:{type:BI.Selection.Multi,value:o.value||[]}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){self.storeValue=this.getValue(),assertShowValue(),self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:o.valueFormatter,keywordGetter:function(){return self.trigger.getKeyword()},itemsCreator:function(op,callback){op.keywords=[self.trigger.getKeyword()],this.setKeyword(op.keywords[0]),o.itemsCreator(op,callback)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var keyword=self.trigger.getKeyword();self.trigger.hasMatched()||(self.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(self.storeValue.value,keyword),self._showAdapter(),self.adapter.setValue(self.storeValue),self.adapter.populate(),self.storeValue.type===BI.Selection.Multi&&self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE))}}]}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(op,callback){callback()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){self._showSearcherPane(),self._setStartValue(""),this.setValue(BI.deepClone(self.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){self._showAdapter(),self._setStartValue(""),self.adapter.setValue(self.storeValue),self.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var keyword=this.getKeyword();this.hasMatched()&&self._join({type:BI.Selection.Multi,value:[keyword]},function(){self.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(self.storeValue.value,keyword),self._showAdapter(),self.adapter.setValue(self.storeValue),self._setStartValue(keyword),assertShowValue(),self.adapter.populate(),self._setStartValue(""),self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var keywords=this.getKeywords(),last=BI.last(keywords);keywords=BI.initial(keywords||[]),keywords.length>0&&self._joinKeywords(keywords,function(){BI.isEndWithBlank(last)?(self.adapter.setValue(self.storeValue),assertShowValue(),self.adapter.populate(),self._setStartValue("")):(self.adapter.setValue(self.storeValue),assertShowValue()),self.fireEvent(BI.MultiSelectInsertNoBarList.EVEN
},popup:{type:"bi.multi_tree_check_pane"},itemsCreator:o.itemsCreator,masker:{offset:this.constants.offset},valueFormatter:o.valueFormatter,value:o.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){self.combo.isViewVisible()||self.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){want2showCounter===!1&&(want2showCounter=!0),isInit===!0&&(want2showCounter=null,showCounter())}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){self.trigger.refreshPlaceHolderWidth(b===!0?self.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){self.trigger.element.find(e.target).length>0&&self.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:triggerBtn,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:o.height,top:0,height:o.height}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.numberCounter.setButtonChecked(this.storeValue)},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},setValue:function(v){this.storeValue.value=v||{},this.combo.setValue({value:v||{}}),this.numberCounter.setValue({value:v||{}})},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_insert_combo",BI.MultiTreeInsertCombo),BI.MultiTreeListCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-list-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0,allowInsertValue:!0})},_init:function(){function showCounter(){isSearching()?self.storeValue={value:self.trigger.getValue()}:isPopupView()&&(self.storeValue={value:self.combo.getValue()}),self.trigger.setValue(self.storeValue),self.numberCounter.setValue(self.storeValue)}BI.MultiTreeListCombo.superclass._init.apply(this,arguments);var self=this,o=this.options,isInit=!1,want2showCounter=!1;this.storeValue={value:o.value||[]},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:o.allowEdit,text:o.text,watermark:o.watermark,height:o.height,valueFormatter:o.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_list_tree_searcher",itemsCreator:o.itemsCreator,popup:{type:o.allowInsertValue?"bi.multi_tree_search_insert_pane":"bi.multi_tree_search_pane",el:{type:"bi.list_part_tree"},listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){self.storeValue.value.unshift([self.trigger.getSearcher().getKeyword()]),self._assertShowValue(),self.combo.setValue(self.storeValue),self.numberCounter.setValue(self.storeValue),self._stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",el:{type:"bi.list_display_tree"},itemsCreator:o.itemsCreator}},value:{value:o.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!o.allowEdit,container:o.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){self.popup=this,self.trigger.setAdapter(this),self.numberCounter.setAdapter(this)},el:{type:"bi.list_async_tree"},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){self.numberCounter.adjustView(),isInit=!0,want2showCounter===!0&&showCounter()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){change=!0;var val={type:BI.Sel
offsetStyle:"left",adjustYOffset:c.adjustYOffset}),self.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(w){var self=this,c=this.constants;w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(self._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),self.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),self.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:self.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(w){var self=this,c=this.constants;w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(self._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}self.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){self.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(w){var self=this,c=this.constants;w.on(BI.IconCombo.EVENT_CHANGE,function(){switch(self._checkValidation()){case c.typeError:self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),self.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),self.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),self.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:self.fireEvent(BI.NumberInterval.EVENT_CHANGE),self.fireEvent(BI.NumberInterval.EVENT_CONFIRM),self.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(b){this.smallEditor.setEnable(b)},setCloseMinEnable:function(b){this.smallCombo.setEnable(b)},setMaxEnable:function(b){this.bigEditor.setEnable(b)},setCloseMaxEnable:function(b){this.bigCombo.setEnable(b)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(numTip){this.smallTip.setText(numTip),this.bigTip.setText(numTip)},getNumTip:function(){return this.smallTip.getText()},setValue:function(data){data=data||{};var self=this,combo_value;(BI.isNumeric(data.min)||BI.isEmptyString(data.min))&&self.smallEditor.setValue(data.min),BI.isNotNull(data.min)||self.smallEditor.setValue(""),(BI.isNumeric(data.max)||BI.isEmptyString(data.max))&&self.bigEditor.setValue(data.max),BI.isNotNull(data.max)||self.bigEditor.setValue(""),BI.isNull(data.closeMin)||(combo_value=data.closeMin===!0?1:0,self.smallCombo.setValue(combo_value)),BI.isNull(data.closeMax)||(combo_value=data.closeMax===!0?1:0,self.bigCombo.setValue(combo_value)),this._checkValidation()},getValue:function(){var self=this,value={},minComboValue=self.smallCombo.getValue(),maxComboValue=self.bigCombo.getValue();return value.min=self.smallEditor.getValue(),value.max=self.bigEditor.getValue(),0===minComboValue[0]?value.closeMin=!1:value.closeMin=!0,0===maxComboValue[0]?value.closeMax=!1:value.closeMax=!0,value},destroyed:function(){var c=this.constants;BI.Bubbles.remove(c.typeError),BI.Bubbles.remove(c.numberError),BI.Bubbles.remove(c.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.Number
BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=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:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,keyword:o.keyword,py:o.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&(this.isSelected()?self.triggerExpand():self.triggerCollapse())});var type=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),items=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(type,BI.extend(o.logic,{items:items}))))},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(v){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(v)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-select-tree-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreePlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,keyword:o.keyword,py:o.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&(this.isSelected()?self.triggerExpand():self.triggerCollapse())});var type=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),items=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(type,BI.extend(o.logic,{items:items}))))},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(v){BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(v)}}),BI.shortcut("bi.select_tree_plus_group_node",BI.SelectTreePlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:o.text,height:o.height,items:o.items,value:o.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:o.items,value:o.value}),this.combo=BI.createWidget({type:"bi.combo",container:o.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,fun
hasNext=ob.hasNext;var firstItems=[];if(1===op.times&&BI.isNotNull(self.storeValue)){var json=BI.map([self.storeValue],function(i,v){var txt=opts.valueFormatter(v)||v;return{text:txt,value:v,title:txt,selected:!0}});firstItems=self._createItems(json)}callback(firstItems.concat(self._createItems(ob.items)),ob.keyword||""),1===op.times&&self.storeValue&&(BI.isKey(startValue)&&(self.storeValue=startValue),self.setValue(self.storeValue)),1===op.times&&self._scrollToTop()})},hasNext:function(){return hasNext},value:this.storeValue}),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){self.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(items){return BI.createItems(items,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:!1})},_scrollToTop:function(){var self=this;BI.delay(function(){self.button_group.element.scrollTop(0)},30)},_assertValue:function(val){},setStartValue:function(v){this._startValue=v},setValue:function(v){this.storeValue=v,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(items){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(h){this.button_group.resetHeight(h)},resetWidth:function(w){this.button_group.resetWidth(w)}}),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",allowNoSelect:!1,maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var self=this,opts=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:opts.allowNoSelect,itemsCreator:opts.itemsCreator,valueFormatter:opts.valueFormatter,onLoaded:opts.onLoaded,value:opts.value}),this.popupView=BI.createWidget({type:"bi.popup_view",stopPropagation:!1,maxWidth:opts.maxWidth,minWidth:opts.minWidth,maxHeight:opts.maxHeight,element:this,el:this.loader,value:opts.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){self.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)})},setStartValue:function(v){this.loader.setStartValue(v)},setValue:function(v){this.popupView.setValue(v)},getValue:function(){return this.popupView.getValue()},populate:function(items){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(h){this.popupView.resetHeight(h)},resetWidth:function(w){this.popupView.resetWidth(w)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",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 bi-border-radius",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var self=this,o=this.options;o.height&&this.setHeight(o.height-2),this.searcher=BI.createWidget(o.searcher,{type:"bi.single_select_searcher",allowNoSelect:o.allowNoSelect,text:o.text,height:o.height,itemsCreator:o.itemsCreator,valueFormatter:o.valueFormatter,popup:{},adapter:o.adapter,masker:o.masker,value:o.value}),this.searcher.on(BI.
var self=this,c=this._constant,track=this._createTrack();this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var sliderVertical=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:c.SLIDER_WIDTH_HALF,height:c.SLIDER_HEIGHT});return sliderVertical.element.click(function(e){if(self.enable&&self.isEnabled()&&sliderVertical.element[0]===e.originalEvent.target){var offset=e.clientX-self.element.offset().left-c.SLIDER_WIDTH_HALF,trackLength=self.track.element[0].scrollWidth-c.TRACK_GAP,percent=0;offset<0&&(percent=0),offset>0&&offset<trackLength&&(percent=100*offset/self._getGrayTrackLength()),offset>=trackLength&&(percent=100);var significantPercent=BI.parseFloat(percent.toFixed(1));self._setAllPosition(significantPercent);var v=self._getValueByPercent(significantPercent);self.value=v,self.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:c.TRACK_GAP_HALF,height:c.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:sliderVertical,top:0,left:0,width:"100%"}]}},_draggable:function(widget){function optimizeSize(s){return BI.clamp(s,0,self._getGrayTrackLength())}var self=this,o=this.options,startDrag=!1,size=0,offset=0,defaultSize=0,mouseMoveTracker=new BI.MouseMoveTracker(function(deltaX){if(mouseMoveTracker.isDragging()){startDrag=!0,offset+=deltaX,size=optimizeSize(defaultSize+offset),widget.element.addClass("dragging");var percent=100*size/self._getGrayTrackLength(),significantPercent=BI.parseFloat(percent.toFixed(1));self._setBlueTrack(significantPercent),self._setSliderPosition(significantPercent);var v=self._getValueByPercent(significantPercent);v=o.digit===!1?v:v.toFixed(o.digit),self.value=v,self.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,v)}},function(){if(startDrag===!0){size=optimizeSize(size);var percent=100*size/self._getGrayTrackLength(),significantPercent=BI.parseFloat(percent.toFixed(1));self._setSliderPosition(significantPercent),size=0,offset=0,defaultSize=size,startDrag=!1}widget.element.removeClass("dragging"),mouseMoveTracker.releaseMouseMoves(),self.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);widget.element.on("mousedown",function(event){widget.isEnabled()&&(defaultSize=this.offsetLeft,optimizeSize(defaultSize),mouseMoveTracker.captureMouseMoves(event))})},_createTrack:function(){var self=this,c=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(ref){self.track=ref}}},_checkValidation:function(v){return!(BI.isNull(v)||v<this.min||v>this.max)},_setBlueTrack:function(percent){this.blueTrack.element.css({width:percent+"%"})},_setSliderPosition:function(percent){this.slider.element.css({left:percent+"%"})},_setAllPosition:function(percent){this._setSliderPosition(percent),this._setBlueTrack(percent)},_setVisible:function(visible){this.slider.setVisible(visible)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(percent){var thousandth=BI.parseInt(10*percent);return(this.max-this.min)*thousandth/1e3+this.min},_getPercentByValue:function(v){return 100*(v-this.min)/(this.max-this.min)},_setEnable:function(b){BI.SingleSliderNormal.superclass._setEnable.apply(this,[b]),b?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.value},setValue:function(v){var value=BI.parseFloat(v);isNaN(value)||(this._checkValidation(value)&&(this.value=value),v
max:o.max,logic:{dynamic:!0},year:y+12*v});return calendar.setValue(this._year),calendar},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var self=this,o=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){self.navigation.setSelect(self.navigation.getSelect()-1),self._checkLeftValid(),self._checkRightValid()}}]}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){self.navigation.setSelect(self.navigation.getSelect()+1),self._checkLeftValid(),self._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:{dynamic:!0},tab:{type:"bi.htape",cls:"bi-split-top bi-split-bottom",height:30,items:[{el:{type:"bi.center_adapt",items:[self.backBtn]},width:25},{type:"bi.layout"},{el:{type:"bi.center_adapt",items:[self.preBtn]},width:25}]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(self.selectedYear);var calendar=this.getSelectedCard();self.backBtn.setEnable(!calendar.isFrontYear()),self.preBtn.setEnable(!calendar.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){self.selectedYear=this.getValue(),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),self.fireEvent(BI.StaticYearCard.EVENT_CHANGE,self.selectedYear)}),BI.isKey(o.value)&&this.setValue(o.value)},_checkLeftValid:function(){var o=this.options,valid=!0;return this.backBtn.setEnable(valid),valid},_checkRightValid:function(){var o=this.options,valid=!0;return this.preBtn.setEnable(valid),valid},getValue:function(){return{year:this.selectedYear}},setValue:function(obj){var o=this.options;obj=obj||{};var v=obj.year;BI.checkDateVoid(v,1,1,o.min,o.max)[0]?(v=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(v)),this.navigation.setValue("")):(this.selectedYear=BI.parseInt(v),this.navigation.setSelect(BI.YearCalendar.getPageByYear(v)),this.navigation.setValue(this.selectedYear)),this._checkLeftValid(),this._checkRightValid()}}),BI.StaticYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_card",BI.StaticYearCard),BI.DynamicYearCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-combo bi-border bi-focus-shadow",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:22},_init:function(){BI.DynamicYearCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;this.storeValue=o.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_trigger",min:o.min,max:o.max,height:o.height,value:o.value||""}),this.trigger.on(BI.DynamicYearTrigger.EVENT_KEY_DOWN,function(){self.combo.isViewVisible()&&self.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS,function(){self.storeTriggerValue=this.getKey()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_START,function(){self.combo.isViewVisible()&&self.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP,function(){self.combo.showView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR,function(){self.combo.isViewVisible()&&self.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM,function(){self.combo.isViewVisible()||(this.getKey()&&this.getKey()!==self.storeTriggerValue?(self.storeValue=self.trigger.getValue(),self.setValue(self.storeValue)):this.getKey()||(self.storeValue=null,self.setValue()),self._checkDynamicValue(self.storeValue),self.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",container:o.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_popup",ref:function(){self.popup=this},listeners:[{eventName:BI.DynamicYearPopup.EVENT_CHANGE,action:function(){self.setValue(self.popup.getValue()),self.combo.hideView(),self.fireEvent(BI.DynamicY
BI.DynamicYearMonthTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthTrigger.EVENT_START="EVENT_START",BI.DynamicYearMonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_year_month_trigger",BI.DynamicYearMonthTrigger),BI.YearMonthInterval=BI.inherit(BI.Single,{constants:{height:24,width:25,lgap:15,offset:-15,timeErrorCls:"time-error"},props:{extraCls:"bi-year-month-interval",minDate:"1900-01-01",maxDate:"2099-12-31"},_init:function(){var self=this,o=this.options;BI.YearMonthInterval.superclass._init.apply(this,arguments),o.value=o.value||{},this.left=this._createCombo(o.value.start),this.right=this._createCombo(o.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:self,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:self.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:self.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[self.label]})},_createCombo:function(v){var self=this,o=this.options,combo=BI.createWidget({type:"bi.dynamic_year_month_combo",behaviors:o.behaviors,value:v,listeners:[{eventName:BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,action:function(){self.fireEvent(BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW)}}]});return combo.on(BI.DynamicYearMonthCombo.EVENT_ERROR,function(){self._clearTitle(),BI.Bubbles.hide("error"),self.element.removeClass(self.constants.timeErrorCls),self.fireEvent(BI.YearMonthInterval.EVENT_ERROR)}),combo.on(BI.DynamicYearMonthCombo.EVENT_VALID,function(){self._checkValid()}),combo.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){self._checkValid()}),combo.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,function(){self.left.hideView(),self.right.hideView()}),combo.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var smallDate=self.left.getKey(),bigDate=self.right.getKey();self.left.isValid()&&self.right.isValid()&&self._check(smallDate,bigDate)&&self._compare(smallDate,bigDate)?(self._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),self.element.addClass(self.constants.timeErrorCls),self.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(self._clearTitle(),self.element.removeClass(self.constants.timeErrorCls),self.fireEvent(BI.YearMonthInterval.EVENT_CHANGE))}),combo},_dateCheck:function(date){return BI.print(BI.parseDateTime(date,"%Y-%x"),"%Y-%x")===date||BI.print(BI.parseDateTime(date,"%Y-%X"),"%Y-%X")===date},_checkVoid:function(obj){var o=this.options;return!BI.checkDateVoid(obj.year,obj.month,1,o.minDate,o.maxDate)[0]},_check:function(smallDate,bigDate){var smallObj=smallDate.match(/\d+/g),bigObj=bigDate.match(/\d+/g),smallDate4Check="";BI.isNotNull(smallObj)&&(smallDate4Check=(smallObj[0]||"")+"-"+(smallObj[1]||1));var bigDate4Check="";return BI.isNotNull(bigObj)&&(bigDate4Check=(bigObj[0]||"")+"-"+(bigObj[1]||1)),this._dateCheck(smallDate4Check)&&BI.checkDateLegal(smallDate)&&this._checkVoid({year:smallObj[0],month:smallObj[1],day:1})&&this._dateCheck(bigDate4Check)&&BI.checkDateLegal(bigDate)&&this._checkVoid({year:bigObj[0],month:bigObj[1],day:1})},_compare:function(smallDate,bigDate){return smallDate=BI.print(BI.parseDateTime(smallDate,"%Y-%X"),"%Y-%X"),bigDate=BI.print(BI.parseDateTime(bigDate,"%Y-%X"),"%Y-%X"),BI.isNotNull(smallDate)&&BI.isNotNull(bigDate)&&smallDate>bigDate},_setTitle:function(v){this.setTitle(v)},_clearTitle:function(){this.setTitle("")},_checkValid:function(){var self=this;BI.Bubbles.hide("error");var smallDate=self.left.getKey(),bigDate=self.right.getKey();self.left.isValid()&&self.right.isValid()&&self._check(smallDate,bigDate)&&self._compare(smallDate,bigDate)?(self._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),self.element.addClass(self.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),self,{of
start=j+1;break}}else start=0;for(var output=[],i=start,len=children.length;i<len;i++){if(output.length<self._const.perPage)var find=nodeSearch(1,[],children[i].value,!1,result);else if(output.length===self._const.perPage)var find=nodeSearch(1,[],children[i].value,!1,[]);if(find[0]===!0&&output.push(children[i].value),output.length>self._const.perPage)break}if(1===op.times){var nodes=self._getAddedValueNode([],selectedValues);result=BI.concat(BI.filter(nodes,function(idx,node){var find=BI.Func.getSearchResult([node.text||node.value],keyword);return find.find.length>0||find.match.length>0}),result)}return output}function nodeSearch(deep,parentValues,current,isAllSelect,result){if(self._isMatch(parentValues,current,keyword)){var checked=isAllSelect||isSelected(parentValues,current);return createOneJson(parentValues,current,!1,checked,!isAllSelect&&isHalf(parentValues,current),!0,result),[!0,checked]}var newParents=BI.clone(parentValues);newParents.push(current);var children=self._getChildren(newParents),can=!1,checked=!1,isCurAllSelected=isAllSelect||isAllSelected(parentValues,current);return BI.each(children,function(i,child){var state=nodeSearch(deep+1,newParents,child.value,isCurAllSelected,result);state[1]===!0&&(checked=!0),state[0]===!0&&(can=!0)}),can===!0&&(checked=isCurAllSelected||isSelected(parentValues,current)&&checked,createOneJson(parentValues,current,!0,checked,!1,!1,result)),[can,checked]}function createOneJson(parentValues,value,isOpen,checked,half,flag,result){var node=self._getTreeNode(parentValues,value);result.push({id:node.id,pId:node.pId,text:node.text,value:node.value,title:node.title,isParent:node.getChildrenLength()>0,open:isOpen,checked:checked,halfCheck:half,flag:flag})}function isHalf(parentValues,value){var find=findSelectedObj(parentValues);return null==find?null:BI.any(find,function(v,ob){if(v===value&&null!=ob&&!BI.isEmpty(ob))return!0})}function isAllSelected(parentValues,value){var find=findSelectedObj(parentValues);return null==find?null:BI.any(find,function(v,ob){if(v===value&&null!=ob&&BI.isEmpty(ob))return!0})}function isSelected(parentValues,value){var find=findSelectedObj(parentValues);return null!=find&&BI.any(find,function(v){if(v===value)return!0})}function findSelectedObj(parentValues){var find=selectedValues;return null==find?null:(BI.every(parentValues,function(i,v){return find=find[v],null!=find}),find)}var self=this,result=[],keyword=op.keyword||"",selectedValues=op.selectedValues,lastSearchValue=op.lastSearchValue||"",output=search();BI.nextTick(function(){callback({hasNext:output.length>self._const.perPage,items:result,lastSearchValue:BI.last(output)})})},_reqTreeNode:function(op,callback){function judgeState(parentValues,selected_value,checkState){var checked=checkState.checked,half=checkState.half;return!(parentValues.length>0&&!checked)&&(0===parentValues.length||checked&&half&&!BI.isEmpty(selected_value))}function dealWithSelectedValue(parentValues,selectedValues){var valueMap={};return BI.each(parentValues,function(i,v){selectedValues=selectedValues[v]||{}}),BI.each(selectedValues,function(value,obj){if(BI.isNull(obj))return void(valueMap[value]=[0,0]);if(BI.isEmpty(obj))return void(valueMap[value]=[2,0]);var nextNames={};BI.each(obj,function(t,o){(BI.isNull(o)||BI.isEmpty(o))&&(nextNames[t]=!0)}),valueMap[value]=[1,BI.size(nextNames)]}),valueMap}function getCheckState(current,parentValues,valueMap,checkState){var checked=checkState.checked,half=checkState.half,tempCheck=!1,halfCheck=!1;if(BI.has(valueMap,current))if(1===valueMap[current][0]){var values=BI.clone(parentValues);values.push(current);var childCount=self._getChildCount(values);childCount>0&&childCount!==valueMap[current][1]&&(halfCheck=!0)}else 2===valueMap[current][0]&&(tempCheck=!0);var check;return check=checked||halfCheck||tempCheck?(tempCheck||checked)&&!half||BI.has(valueMap,current):BI.has(valueMap,current),[check,halfCheck]}var self=this,o=this.options,result=[],times=op.times,checkState=op.checkState||{},parentValues=op.parentValues||[],selectedValues=op.selectedValues||{},valueMap={};valueMap=d
return optional?match:"([^/?]+)"}).replace(splatParam,"([^?]*?)"),new RegExp("^"+route+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(route,fragment){var params=route.exec(fragment).slice(1);return _.map(params,function(param,i){return i===params.length-1?param||null:param?decodeURIComponent(param):null})}});var History=function(){this.handlers=[],this.checkUrl=_.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=_global.location,this.history=_global.history)},routeStripper=/^[#\/]|\s+$/g,rootStripper=/^\/+|\/+$/g,pathStripper=/#.*$/;History.started=!1,_.extend(History.prototype,Events,{interval:50,atRoot:function(){var path=this.location.pathname.replace(/[^\/]$/,"$&/");return path===this.root&&!this.getSearch()},getSearch:function(){var match=this.location.href.replace(/#.*/,"").match(/\?.+/);return match?match[0]:""},getHash:function(window){var match=(window||this).location.href.match(/#(.*)$/);return match?match[1]:""},getPath:function(){var path=decodeURI(this.location.pathname+this.getSearch()),root=this.root.slice(0,-1);return path.indexOf(root)||(path=path.slice(root.length)),"/"===path.charAt(0)?path.slice(1):path},getFragment:function(fragment){return null==fragment&&(fragment=this._hasPushState||!this._wantsHashChange?this.getPath():this.getHash()),fragment.replace(routeStripper,"")},start:function(options){if(History.started)throw new Error("BI.history has already been started");if(History.started=!0,this.options=_.extend({root:"/"},this.options,options),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState),this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(rootStripper,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var root=this.root.slice(0,-1)||"/";return this.location.replace(root+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&(!this._wantsPushState||!this._hasPushState)){var iframe=document.createElement("iframe");iframe.src="javascript:0",iframe.style.display="none",iframe.tabIndex=-1;var body=document.body;this.iframe=body.insertBefore(iframe,body.firstChild).contentWindow,this.iframe.document.open().close(),this.iframe.location.hash="#"+this.fragment}var addEventListener=_global.addEventListener||function(eventName,listener){return attachEvent("on"+eventName,listener)};if(this._hasPushState?addEventListener("popstate",this.checkUrl,!1):this._wantsHashChange&&this._hasHashChange&&!this.iframe?addEventListener("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var removeEventListener=_global.removeEventListener||function(eventName,listener){return detachEvent("on"+eventName,listener)};this._hasPushState?removeEventListener("popstate",this.checkUrl,!1):this._wantsHashChange&&this._hasHashChange&&!this.iframe&&removeEventListener("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe.frameElement),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),History.started=!1},route:function(route,callback){this.handlers.unshift({route:route,callback:callback})},checkUrl:function(e){var current=this.getFragment();return current===this.fragment&&this.iframe&&(current=this.getHash(this.iframe)),current!==this.fragment&&(this.iframe&&this.navigate(current),void this.loadUrl())},loadUrl:function(fragment){return fragment=this.fragment=this.getFragment(fragment),_.some(this.handlers,function(handler){if(handler.route.test(fragment))return handler.callback(fragment),!0})},navigate:function(fragment,options){if(!History.started)return!1;options&&options!==!0||(options={trigger:!!options}),fragment=this.getFragment(fragment||"");var root=this.root;""!==fragme
!function(r){var n={};function o(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=141)}({141:function(e,t,r){e.exports=r(142)},142:function(e,t,r){"use strict";var n=function o(e){return e&&e.__esModule?e:{"default":e}}(r(143));BI.extend(BI,n["default"])},143:function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n={Decorators:function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{"default":e};var t=c();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}r["default"]=e,t&&t.set(e,r);return r}(r(144))};t["default"]=n},144:function(e,t,r){"use strict";function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){e.prototype=Object.create(t.prototype),function i(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],u=Object.getOwnPropertyDescriptor(t,o);u&&u.configurable&&e[o]===undefined&&Object.defineProperty(e,o,u)}return e}(e.prototype.constructor=e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.shortcut=function o(){return function(e){BI.shortcut(e.xtype,e)}},t.model=function f(){return function(e){BI.model(e.xtype,e)}},t.store=function l(r){var n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return function(e){return function(e){function t(){return e.apply(this,arguments)||this}return c(t,e),t.prototype._store=function(){var e=n.props?n.props.apply(this):undefined;return BI.Models.getModel(r.xtype,e)},t}(e)}},t.Model=void 0;var n=function(o){function e(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return i(u(e=o.call.apply(o,[this].concat(r))||this),"model",void 0),i(u(e),"store",void 0),i(u(e),"context",void 0),i(u(e),"actions",void 0),i(u(e),"childContext",void 0),i(u(e),"TYPE",void 0),i(u(e),"computed",void 0),e}return c(e,o),e.prototype.state=function(){return{}},e}(Fix.Model);t.Model=n}});